types

package
v0.13.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 49 Imported by: 14

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "blob"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_blob"
)
View Source
const (
	URLMsgPayForBlobs = "/celestia.blob.v1.MsgPayForBlobs"
	ShareSize         = appconsts.ShareSize
	SquareSize        = appconsts.DefaultMaxSquareSize
	NamespaceIDSize   = appconsts.NamespaceSize
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const (
	// nolint:lll
	TestAccName = "test-account"
)

Variables

View Source
var (
	ErrReservedNamespace              = sdkerrors.Register(ModuleName, 11110, "cannot use reserved namespace IDs")
	ErrInvalidNamespaceLen            = sdkerrors.Register(ModuleName, 11111, "invalid namespace length")
	ErrInvalidDataSize                = sdkerrors.Register(ModuleName, 11112, "data must be multiple of shareSize")
	ErrBlobSizeMismatch               = sdkerrors.Register(ModuleName, 11113, "actual blob size differs from that specified in the MsgPayForBlob")
	ErrCommittedSquareSizeNotPowOf2   = sdkerrors.Register(ModuleName, 11114, "committed to invalid square size: must be power of two")
	ErrCalculateCommitment            = sdkerrors.Register(ModuleName, 11115, "unexpected error calculating commitment for share")
	ErrInvalidShareCommitment         = sdkerrors.Register(ModuleName, 11116, "invalid commitment for share")
	ErrParitySharesNamespace          = sdkerrors.Register(ModuleName, 11117, "cannot use parity shares namespace ID")
	ErrTailPaddingNamespace           = sdkerrors.Register(ModuleName, 11118, "cannot use tail padding namespace ID")
	ErrTxNamespace                    = sdkerrors.Register(ModuleName, 11119, "cannot use transaction namespace ID")
	ErrEvidenceNamespace              = sdkerrors.Register(ModuleName, 11120, "cannot use evidence namespace ID")
	ErrEmptyShareCommitment           = sdkerrors.Register(ModuleName, 11121, "empty share commitment")
	ErrInvalidShareCommitments        = sdkerrors.Register(ModuleName, 11122, "invalid share commitments: all relevant square sizes must be committed to")
	ErrUnsupportedShareVersion        = sdkerrors.Register(ModuleName, 11123, "unsupported share version")
	ErrZeroBlobSize                   = sdkerrors.Register(ModuleName, 11124, "cannot use zero blob size")
	ErrMismatchedNumberOfPFBorBlob    = sdkerrors.Register(ModuleName, 11125, "mismatched number of blobs per MsgPayForBlob")
	ErrNoPFB                          = sdkerrors.Register(ModuleName, 11126, "no MsgPayForBlobs found in blob transaction")
	ErrNamespaceMismatch              = sdkerrors.Register(ModuleName, 11127, "namespace of blob and its respective MsgPayForBlobs differ")
	ErrProtoParsing                   = sdkerrors.Register(ModuleName, 11128, "failure to parse a transaction from its protobuf representation")
	ErrMultipleMsgsInBlobTx           = sdkerrors.Register(ModuleName, 11129, "not yet supported: multiple sdk.Msgs found in BlobTx")
	ErrMismatchedNumberOfPFBComponent = sdkerrors.Register(ModuleName, 11130, "number of each component in a MsgPayForBlobs must be identical")
	ErrNoBlobs                        = sdkerrors.Register(ModuleName, 11131, "no blobs provided")
	ErrNoNamespaceIds                 = sdkerrors.Register(ModuleName, 11132, "no namespace IDs provided")
	ErrNoShareVersions                = sdkerrors.Register(ModuleName, 11133, "no share versions provided")
	ErrNoBlobSizes                    = sdkerrors.Register(ModuleName, 11134, "no blob sizes provided")
	ErrNoShareCommitments             = sdkerrors.Register(ModuleName, 11135, "no share commitments provided")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyMinSquareSize            = []byte("MinSquareSize")
	DefaultMinSquareSize uint32 = appconsts.DefaultMinSquareSize
)
View Source
var (
	KeyMaxSquareSize            = []byte("MaxSquareSize")
	DefaultMaxSquareSize uint32 = appconsts.DefaultMaxSquareSize
)
View Source
var (
	KeyGasPerBlobByte            = []byte("GasPerBlobByte")
	DefaultGasPerBlobByte uint32 = appconsts.DefaultGasPerBlobByte
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EventTypePayForBlob = proto.MessageName(&EventPayForBlobs{})

Functions

func BlobMinSquareSize

func BlobMinSquareSize[T constraints.Integer](blobSize T) T

BlobMinSquareSize returns the minimum square size that blobSize can be included in. The returned square size does not account for the associated transaction shares or non-interactive defaults, so it is a minimum.

func BlobTxSharesUsed

func BlobTxSharesUsed(btx tmproto.BlobTx) int

func BroadcastTx

func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, txBytes []byte) (*tx.BroadcastTxResponse, error)

BroadcastTx uses the provided grpc connection to broadcast a signed and encoded transaction

func CreateCommitment

func CreateCommitment(blob *Blob) ([]byte, error)

CreateCommitment generates the commitment bytes for a given namespace, blobData, and shareVersion using a namespace merkle tree and the rules described at Message layout rationale and Non-interactive default rules.

func CreateCommitments

func CreateCommitments(blobs []*Blob) ([][]byte, error)

func GenerateKeyring

func GenerateKeyring(t *testing.T, accts ...string) keyring.Keyring

func InheritTxConfig

func InheritTxConfig(builder sdkclient.TxBuilder, tx authsigning.Tx) sdkclient.TxBuilder

InheritTxConfig sets all of the accessible configurations from a given tx into a a give client.TxBuilder

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the param key table for the blob module

func QueryAccount

func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg encoding.Config, address string) (accNum uint64, seqNum uint64, err error)

QueryAccount fetches the account number and sequence number from the celestia-app node.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateBlobNamespaceID

func ValidateBlobNamespaceID(ns namespace.ID) error

ValidateBlobNamespaceID returns an error if the provided namespace.ID is an invalid or reserved namespace id.

func ValidateBlobTx

func ValidateBlobTx(txcfg client.TxEncodingConfig, bTx tmproto.BlobTx) error

ValidateBlobTx performs stateless checks on the BlobTx to ensure that the blobs attached to the transaction are valid.

func ValidateBlobs

func ValidateBlobs(blobs ...*Blob) error

ValidatePFBComponents performs basic checks over the components of one or more PFBs.

Types

type Blob

type Blob = tmproto.Blob

Blob wraps the tendermint type so that users can simply import this one.

func NewBlob

func NewBlob(ns namespace.ID, blob []byte) (*Blob, error)

NewBlob creates a new coretypes.Blob from the provided data after performing basic stateless checks over it.

type EventPayForBlobs

type EventPayForBlobs struct {
	Signer       string   `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	BlobSizes    []uint32 `protobuf:"varint,2,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"`
	NamespaceIds [][]byte `protobuf:"bytes,3,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"`
}

EventPayForBlobs defines an event that is emitted after a pay for blob has been processed.

func NewPayForBlobsEvent

func NewPayForBlobsEvent(signer string, blobSizes []uint32, namespaceIDs [][]byte) *EventPayForBlobs

NewPayForBlobsEvent returns a new EventPayForBlobs

func (*EventPayForBlobs) Descriptor

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

func (*EventPayForBlobs) GetBlobSizes

func (m *EventPayForBlobs) GetBlobSizes() []uint32

func (*EventPayForBlobs) GetNamespaceIds

func (m *EventPayForBlobs) GetNamespaceIds() [][]byte

func (*EventPayForBlobs) GetSigner

func (m *EventPayForBlobs) GetSigner() string

func (*EventPayForBlobs) Marshal

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

func (*EventPayForBlobs) MarshalTo

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

func (*EventPayForBlobs) MarshalToSizedBuffer

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

func (*EventPayForBlobs) ProtoMessage

func (*EventPayForBlobs) ProtoMessage()

func (*EventPayForBlobs) Reset

func (m *EventPayForBlobs) Reset()

func (*EventPayForBlobs) Size

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

func (*EventPayForBlobs) String

func (m *EventPayForBlobs) String() string

func (*EventPayForBlobs) Unmarshal

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

func (*EventPayForBlobs) XXX_DiscardUnknown

func (m *EventPayForBlobs) XXX_DiscardUnknown()

func (*EventPayForBlobs) XXX_Marshal

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

func (*EventPayForBlobs) XXX_Merge

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

func (*EventPayForBlobs) XXX_Size

func (m *EventPayForBlobs) XXX_Size() int

func (*EventPayForBlobs) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the capability module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type KeyringSigner

type KeyringSigner struct {
	keyring.Keyring

	sync.RWMutex
	// contains filtered or unexported fields
}

KeyringSigner uses a keyring to sign and build celestia-app transactions

func GenerateKeyringSigner

func GenerateKeyringSigner(t *testing.T, accts ...string) *KeyringSigner

func NewKeyringSigner

func NewKeyringSigner(ring keyring.Keyring, name string, chainID string) *KeyringSigner

NewKeyringSigner returns a new KeyringSigner using the provided keyring

func (*KeyringSigner) BuildSignedTx

func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, msg ...sdktypes.Msg) (authsigning.Tx, error)

BuildSignedTx creates and signs a sdk.Tx that contains the provided message. The interal account number must be set by calling k.QueryAccountNumber or by manually setting it via k.SetAccountNumber for the built transactions to be valid.

func (*KeyringSigner) EncodeTx

func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)

EncodeTx uses the keyring signer's encoding config to encode the provided sdk transaction

func (*KeyringSigner) GetSignerData

func (k *KeyringSigner) GetSignerData() (authsigning.SignerData, error)

func (*KeyringSigner) GetSignerInfo

func (k *KeyringSigner) GetSignerInfo() *keyring.Record

GetSignerInfo returns the signer info for the KeyringSigner's account. panics if the account in KeyringSigner does not exist.

func (*KeyringSigner) NewTxBuilder

func (k *KeyringSigner) NewTxBuilder(opts ...TxBuilderOption) sdkclient.TxBuilder

NewTxBuilder returns the default sdk Tx builder using the celestia-app encoding config

func (*KeyringSigner) QueryAccountNumber

func (k *KeyringSigner) QueryAccountNumber(ctx context.Context, conn *grpc.ClientConn) error

QueryAccountNumber queries the application to find the latest account number and sequence, updating the respective internal fields. The internal account number must be set by this method or by manually calling k.SetAccountNumber in order for any built transactions to be valid

func (*KeyringSigner) SetAccountNumber

func (k *KeyringSigner) SetAccountNumber(n uint64)

SetAccountNumber manually sets the underlying account number

func (*KeyringSigner) SetEncodingConfig

func (k *KeyringSigner) SetEncodingConfig(encCfg encoding.Config)

SetEncodingConfig manually overides the encoding config of the underlying signer

func (*KeyringSigner) SetKeyringAccName

func (k *KeyringSigner) SetKeyringAccName(name string)

SetKeyringAccName manually sets the underlying keyring account name

func (*KeyringSigner) SetSequence

func (k *KeyringSigner) SetSequence(n uint64)

SetSequence manually sets the underlying sequence number

func (*KeyringSigner) UpdateAccountFromClient

func (k *KeyringSigner) UpdateAccountFromClient(clientCtx client.Context) error

type MsgClient

type MsgClient interface {
	// PayForBlobs allows the user to pay for the inclusion of one or more blobs
	PayForBlobs(ctx context.Context, in *MsgPayForBlobs, opts ...grpc.CallOption) (*MsgPayForBlobsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgPayForBlobs

type MsgPayForBlobs struct {
	Signer       string   `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	NamespaceIds [][]byte `protobuf:"bytes,2,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"`
	BlobSizes    []uint32 `protobuf:"varint,3,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"`
	// share_commitments is a list of share commitments (one per blob).
	ShareCommitments [][]byte `protobuf:"bytes,4,rep,name=share_commitments,json=shareCommitments,proto3" json:"share_commitments,omitempty"`
	// share_versions are the versions of the share format that the blobs
	// associated with this message should use when included in a block. The
	// share_versions specified must match the share_versions used to generate the
	// share_commitment in this message.
	ShareVersions []uint32 `protobuf:"varint,8,rep,packed,name=share_versions,json=shareVersions,proto3" json:"share_versions,omitempty"`
}

MsgPayForBlobs pays for the inclusion of a blob in the block.

func NewMsgPayForBlobs

func NewMsgPayForBlobs(signer string, blobs ...*Blob) (*MsgPayForBlobs, error)

func (*MsgPayForBlobs) Descriptor

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

func (*MsgPayForBlobs) GetBlobSizes

func (m *MsgPayForBlobs) GetBlobSizes() []uint32

func (*MsgPayForBlobs) GetNamespaceIds

func (m *MsgPayForBlobs) GetNamespaceIds() [][]byte

func (*MsgPayForBlobs) GetShareCommitments

func (m *MsgPayForBlobs) GetShareCommitments() [][]byte

func (*MsgPayForBlobs) GetShareVersions

func (m *MsgPayForBlobs) GetShareVersions() []uint32

func (*MsgPayForBlobs) GetSignBytes

func (msg *MsgPayForBlobs) GetSignBytes() []byte

GetSignBytes fulfills the sdk.Msg interface by returning a deterministic set of bytes to sign over

func (*MsgPayForBlobs) GetSigner

func (m *MsgPayForBlobs) GetSigner() string

func (*MsgPayForBlobs) GetSigners

func (msg *MsgPayForBlobs) GetSigners() []sdk.AccAddress

GetSigners fulfills the sdk.Msg interface by returning the signer's address

func (*MsgPayForBlobs) Marshal

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

func (*MsgPayForBlobs) MarshalTo

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

func (*MsgPayForBlobs) MarshalToSizedBuffer

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

func (*MsgPayForBlobs) ProtoMessage

func (*MsgPayForBlobs) ProtoMessage()

func (*MsgPayForBlobs) Reset

func (m *MsgPayForBlobs) Reset()

func (*MsgPayForBlobs) Route

func (msg *MsgPayForBlobs) Route() string

Route fulfills the sdk.Msg interface

func (*MsgPayForBlobs) Size

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

func (*MsgPayForBlobs) String

func (m *MsgPayForBlobs) String() string

func (*MsgPayForBlobs) Type

func (msg *MsgPayForBlobs) Type() string

Type fulfills the sdk.Msg interface

func (*MsgPayForBlobs) Unmarshal

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

func (*MsgPayForBlobs) ValidateBasic

func (msg *MsgPayForBlobs) ValidateBasic() error

ValidateBasic fulfills the sdk.Msg interface by performing stateless validity checks on the msg that also don't require having the actual blob(s)

func (*MsgPayForBlobs) XXX_DiscardUnknown

func (m *MsgPayForBlobs) XXX_DiscardUnknown()

func (*MsgPayForBlobs) XXX_Marshal

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

func (*MsgPayForBlobs) XXX_Merge

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

func (*MsgPayForBlobs) XXX_Size

func (m *MsgPayForBlobs) XXX_Size() int

func (*MsgPayForBlobs) XXX_Unmarshal

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

type MsgPayForBlobsResponse

type MsgPayForBlobsResponse struct {
}

MsgPayForBlobsResponse describes the response returned after the submission of a PayForBlobs

func (*MsgPayForBlobsResponse) Descriptor

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

func (*MsgPayForBlobsResponse) Marshal

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

func (*MsgPayForBlobsResponse) MarshalTo

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

func (*MsgPayForBlobsResponse) MarshalToSizedBuffer

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

func (*MsgPayForBlobsResponse) ProtoMessage

func (*MsgPayForBlobsResponse) ProtoMessage()

func (*MsgPayForBlobsResponse) Reset

func (m *MsgPayForBlobsResponse) Reset()

func (*MsgPayForBlobsResponse) Size

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

func (*MsgPayForBlobsResponse) String

func (m *MsgPayForBlobsResponse) String() string

func (*MsgPayForBlobsResponse) Unmarshal

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

func (*MsgPayForBlobsResponse) XXX_DiscardUnknown

func (m *MsgPayForBlobsResponse) XXX_DiscardUnknown()

func (*MsgPayForBlobsResponse) XXX_Marshal

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

func (*MsgPayForBlobsResponse) XXX_Merge

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

func (*MsgPayForBlobsResponse) XXX_Size

func (m *MsgPayForBlobsResponse) XXX_Size() int

func (*MsgPayForBlobsResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// PayForBlobs allows the user to pay for the inclusion of one or more blobs
	PayForBlobs(context.Context, *MsgPayForBlobs) (*MsgPayForBlobsResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	MinSquareSize  uint32 `` /* 126-byte string literal not displayed */
	MaxSquareSize  uint32 `` /* 126-byte string literal not displayed */
	GasPerBlobByte uint32 `` /* 133-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(
	minSquareSize uint32,
	maxSquareSize uint32,
	GasPerBlobByte uint32,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetGasPerBlobByte

func (m *Params) GetGasPerBlobByte() uint32

func (*Params) GetMaxSquareSize

func (m *Params) GetMaxSquareSize() uint32

func (*Params) GetMinSquareSize

func (m *Params) GetMinSquareSize() uint32

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs gets the list of param key-value pairs

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type TxBuilderOption

type TxBuilderOption func(builder sdkclient.TxBuilder) sdkclient.TxBuilder

func SetFeeAmount

func SetFeeAmount(fees sdk.Coins) TxBuilderOption

func SetFeeGranter

func SetFeeGranter(feeGranter sdk.AccAddress) TxBuilderOption

func SetFeePayer

func SetFeePayer(feePayer sdk.AccAddress) TxBuilderOption

func SetGasLimit

func SetGasLimit(limit uint64) TxBuilderOption

func SetMemo

func SetMemo(memo string) TxBuilderOption

func SetTimeoutHeight

func SetTimeoutHeight(height uint64) TxBuilderOption

func SetTip

func SetTip(tip *tx.Tip) TxBuilderOption

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PayForBlobs

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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