Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, ...) (*tx.BroadcastTxResponse, error)
- func BuildPayForMessageTxFromWireTx(origTx authsigning.Tx, builder sdkclient.TxBuilder, signature []byte, ...) (authsigning.Tx, error)
- func CreateCommitment(k uint64, namespace, message []byte) ([]byte, error)
- func KeyPrefix(p string) []byte
- func NewPayForMessageEvent(signer string, size uint64) sdk.Event
- func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg cosmoscmd.EncodingConfig, ...) (accNum uint64, seqNum uint64, err error)
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type KeyringSigner
- func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, msg sdktypes.Msg) (authsigning.Tx, error)
- func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)
- func (k *KeyringSigner) GetSignerInfo() keyring.Info
- func (k *KeyringSigner) NewTxBuilder() sdkclient.TxBuilder
- func (k *KeyringSigner) QueryAccountNumber(ctx context.Context, conn *grpc.ClientConn) error
- func (k *KeyringSigner) SetAccountNumber(n uint64)
- func (k *KeyringSigner) SetKeyringAccName(name string)
- func (k *KeyringSigner) SetSequence(n uint64)
- type MsgClient
- type MsgPayForMessage
- func (*MsgPayForMessage) Descriptor() ([]byte, []int)
- func (m *MsgPayForMessage) GetMessageNamespaceId() []byte
- func (m *MsgPayForMessage) GetMessageShareCommitment() []byte
- func (m *MsgPayForMessage) GetMessageSize() uint64
- func (msg *MsgPayForMessage) GetSignBytes() []byte
- func (m *MsgPayForMessage) GetSigner() string
- func (msg *MsgPayForMessage) GetSigners() []sdk.AccAddress
- func (m *MsgPayForMessage) Marshal() (dAtA []byte, err error)
- func (m *MsgPayForMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPayForMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPayForMessage) ProtoMessage()
- func (m *MsgPayForMessage) Reset()
- func (msg *MsgPayForMessage) Route() string
- func (m *MsgPayForMessage) Size() (n int)
- func (m *MsgPayForMessage) String() string
- func (msg *MsgPayForMessage) Type() string
- func (m *MsgPayForMessage) Unmarshal(dAtA []byte) error
- func (msg *MsgPayForMessage) ValidateBasic() error
- func (m *MsgPayForMessage) XXX_DiscardUnknown()
- func (m *MsgPayForMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPayForMessage) XXX_Merge(src proto.Message)
- func (m *MsgPayForMessage) XXX_Size() int
- func (m *MsgPayForMessage) XXX_Unmarshal(b []byte) error
- type MsgPayForMessageResponse
- func (*MsgPayForMessageResponse) Descriptor() ([]byte, []int)
- func (m *MsgPayForMessageResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPayForMessageResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPayForMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPayForMessageResponse) ProtoMessage()
- func (m *MsgPayForMessageResponse) Reset()
- func (m *MsgPayForMessageResponse) Size() (n int)
- func (m *MsgPayForMessageResponse) String() string
- func (m *MsgPayForMessageResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPayForMessageResponse) XXX_DiscardUnknown()
- func (m *MsgPayForMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPayForMessageResponse) XXX_Merge(src proto.Message)
- func (m *MsgPayForMessageResponse) XXX_Size() int
- func (m *MsgPayForMessageResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgWirePayForMessage
- func (*MsgWirePayForMessage) Descriptor() ([]byte, []int)
- func (m *MsgWirePayForMessage) GetMessage() []byte
- func (m *MsgWirePayForMessage) GetMessageNameSpaceId() []byte
- func (m *MsgWirePayForMessage) GetMessageShareCommitment() []ShareCommitAndSignature
- func (m *MsgWirePayForMessage) GetMessageSize() uint64
- func (msg *MsgWirePayForMessage) GetSignBytes() []byte
- func (m *MsgWirePayForMessage) GetSigner() string
- func (msg *MsgWirePayForMessage) GetSigners() []sdk.AccAddress
- func (m *MsgWirePayForMessage) Marshal() (dAtA []byte, err error)
- func (m *MsgWirePayForMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWirePayForMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWirePayForMessage) ProtoMessage()
- func (m *MsgWirePayForMessage) Reset()
- func (msg *MsgWirePayForMessage) Route() string
- func (msg *MsgWirePayForMessage) SignShareCommitments(signer *KeyringSigner, options ...TxBuilderOption) error
- func (m *MsgWirePayForMessage) Size() (n int)
- func (m *MsgWirePayForMessage) String() string
- func (m *MsgWirePayForMessage) Unmarshal(dAtA []byte) error
- func (msg *MsgWirePayForMessage) ValidateBasic() error
- func (m *MsgWirePayForMessage) XXX_DiscardUnknown()
- func (m *MsgWirePayForMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWirePayForMessage) XXX_Merge(src proto.Message)
- func (m *MsgWirePayForMessage) XXX_Size() int
- func (m *MsgWirePayForMessage) XXX_Unmarshal(b []byte) error
- type MsgWirePayForMessageResponse
- func (*MsgWirePayForMessageResponse) Descriptor() ([]byte, []int)
- func (m *MsgWirePayForMessageResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgWirePayForMessageResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWirePayForMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWirePayForMessageResponse) ProtoMessage()
- func (m *MsgWirePayForMessageResponse) Reset()
- func (m *MsgWirePayForMessageResponse) Size() (n int)
- func (m *MsgWirePayForMessageResponse) String() string
- func (m *MsgWirePayForMessageResponse) Unmarshal(dAtA []byte) error
- func (m *MsgWirePayForMessageResponse) XXX_DiscardUnknown()
- func (m *MsgWirePayForMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWirePayForMessageResponse) XXX_Merge(src proto.Message)
- func (m *MsgWirePayForMessageResponse) XXX_Size() int
- func (m *MsgWirePayForMessageResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type ShareCommitAndSignature
- func (*ShareCommitAndSignature) Descriptor() ([]byte, []int)
- func (m *ShareCommitAndSignature) GetK() uint64
- func (m *ShareCommitAndSignature) GetShareCommitment() []byte
- func (m *ShareCommitAndSignature) GetSignature() []byte
- func (m *ShareCommitAndSignature) Marshal() (dAtA []byte, err error)
- func (m *ShareCommitAndSignature) MarshalTo(dAtA []byte) (int, error)
- func (m *ShareCommitAndSignature) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ShareCommitAndSignature) ProtoMessage()
- func (m *ShareCommitAndSignature) Reset()
- func (m *ShareCommitAndSignature) Size() (n int)
- func (m *ShareCommitAndSignature) String() string
- func (m *ShareCommitAndSignature) Unmarshal(dAtA []byte) error
- func (m *ShareCommitAndSignature) XXX_DiscardUnknown()
- func (m *ShareCommitAndSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShareCommitAndSignature) XXX_Merge(src proto.Message)
- func (m *ShareCommitAndSignature) XXX_Size() int
- func (m *ShareCommitAndSignature) XXX_Unmarshal(b []byte) error
- type TxBuilderOption
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( EventTypePayForMessage = "payformessage" AttributeKeySigner = "signer" AttributeKeySize = "size" )
const ( // ModuleName defines the module name ModuleName = "payment" // 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_payment" )
const ( URLMsgWirePayforMessage = "/payment.MsgWirePayForMessage" URLMsgPayforMessage = "/payment.MsgPayForMessage" SquareSize = consts.MaxSquareSize NamespaceIDSize = consts.NamespaceSize )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)
x/payment module sentinel errors
var (
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
Functions ¶
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 BuildPayForMessageTxFromWireTx ¶
func BuildPayForMessageTxFromWireTx( origTx authsigning.Tx, builder sdkclient.TxBuilder, signature []byte, msg *MsgPayForMessage, ) (authsigning.Tx, error)
BuildPayForMessageTxFromWireTx creates an authsigning.Tx using data from the original MsgWirePayForMessage sdk.Tx and the signature provided. This is used while processing the MsgWirePayForMessages into Signed MsgPayForMessage
func CreateCommitment ¶
CreateCommitment generates the commit bytes for a given message, namespace, and squaresize using a namespace merkle tree and the rules described at https://github.com/celestiaorg/celestia-specs/blob/master/src/rationale/message_block_layout.md#message-layout-rationale
func NewPayForMessageEvent ¶ added in v0.2.0
NewPayForMessageEvent construt a new payformessge sdk.Event
func QueryAccount ¶
func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg cosmoscmd.EncodingConfig, address string) (accNum uint64, seqNum uint64, err error)
QueryAccount fetches the account number and sequence number from the celestia-app node.
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
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 ¶
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type GenesisState ¶
type GenesisState struct { }
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) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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 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) GetSignerInfo ¶
func (k *KeyringSigner) GetSignerInfo() keyring.Info
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() 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 applicaiton 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 valide
func (*KeyringSigner) SetAccountNumber ¶
func (k *KeyringSigner) SetAccountNumber(n uint64)
SetAccountNumber manually sets the underlying account number
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
type MsgClient ¶
type MsgClient interface { // PayForMessage allows the user to pay for the inclusion of a message PayForMessage(ctx context.Context, in *MsgPayForMessage, opts ...grpc.CallOption) (*MsgPayForMessageResponse, 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 MsgPayForMessage ¶
type MsgPayForMessage struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` MessageNamespaceId []byte `protobuf:"bytes,2,opt,name=message_namespace_id,json=messageNamespaceId,proto3" json:"message_namespace_id,omitempty"` MessageSize uint64 `protobuf:"varint,3,opt,name=message_size,json=messageSize,proto3" json:"message_size,omitempty"` }
MsgPayForMessage is what gets signed by users when creating ShareCommitSignatures.
Multiple versions are signed and included, each version creates a commitment for a
specific square size.
func ProcessWirePayForMessage ¶
func ProcessWirePayForMessage(msg *MsgWirePayForMessage, squareSize uint64) (*tmproto.Message, *MsgPayForMessage, []byte, error)
ProcessWirePayForMessage will perform the processing required by PreProcessTxs. It parses the MsgWirePayForMessage to produce the components needed to create a single MsgPayForMessage
func (*MsgPayForMessage) Descriptor ¶
func (*MsgPayForMessage) Descriptor() ([]byte, []int)
func (*MsgPayForMessage) GetMessageNamespaceId ¶
func (m *MsgPayForMessage) GetMessageNamespaceId() []byte
func (*MsgPayForMessage) GetMessageShareCommitment ¶
func (m *MsgPayForMessage) GetMessageShareCommitment() []byte
func (*MsgPayForMessage) GetMessageSize ¶
func (m *MsgPayForMessage) GetMessageSize() uint64
func (*MsgPayForMessage) GetSignBytes ¶
func (msg *MsgPayForMessage) GetSignBytes() []byte
GetSignBytes fullfills the sdk.Msg interface by reterning a deterministic set of bytes to sign over
func (*MsgPayForMessage) GetSigner ¶
func (m *MsgPayForMessage) GetSigner() string
func (*MsgPayForMessage) GetSigners ¶
func (msg *MsgPayForMessage) GetSigners() []sdk.AccAddress
GetSigners fullfills the sdk.Msg interface by returning the signer's address
func (*MsgPayForMessage) Marshal ¶
func (m *MsgPayForMessage) Marshal() (dAtA []byte, err error)
func (*MsgPayForMessage) MarshalToSizedBuffer ¶
func (m *MsgPayForMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPayForMessage) ProtoMessage ¶
func (*MsgPayForMessage) ProtoMessage()
func (*MsgPayForMessage) Reset ¶
func (m *MsgPayForMessage) Reset()
func (*MsgPayForMessage) Route ¶
func (msg *MsgPayForMessage) Route() string
Route fullfills the sdk.Msg interface
func (*MsgPayForMessage) Size ¶
func (m *MsgPayForMessage) Size() (n int)
func (*MsgPayForMessage) String ¶
func (m *MsgPayForMessage) String() string
func (*MsgPayForMessage) Type ¶
func (msg *MsgPayForMessage) Type() string
Type fullfills the sdk.Msg interface
func (*MsgPayForMessage) Unmarshal ¶
func (m *MsgPayForMessage) Unmarshal(dAtA []byte) error
func (*MsgPayForMessage) ValidateBasic ¶
func (msg *MsgPayForMessage) ValidateBasic() error
ValidateBasic fullfills the sdk.Msg interface by performing stateless validity checks on the msg that also don't require having the actual message
func (*MsgPayForMessage) XXX_DiscardUnknown ¶
func (m *MsgPayForMessage) XXX_DiscardUnknown()
func (*MsgPayForMessage) XXX_Marshal ¶
func (m *MsgPayForMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPayForMessage) XXX_Merge ¶
func (m *MsgPayForMessage) XXX_Merge(src proto.Message)
func (*MsgPayForMessage) XXX_Size ¶
func (m *MsgPayForMessage) XXX_Size() int
func (*MsgPayForMessage) XXX_Unmarshal ¶
func (m *MsgPayForMessage) XXX_Unmarshal(b []byte) error
type MsgPayForMessageResponse ¶
type MsgPayForMessageResponse struct { }
MsgPayForMessageResponse describes the response returned after the submission of a PayForMessage
func (*MsgPayForMessageResponse) Descriptor ¶
func (*MsgPayForMessageResponse) Descriptor() ([]byte, []int)
func (*MsgPayForMessageResponse) Marshal ¶
func (m *MsgPayForMessageResponse) Marshal() (dAtA []byte, err error)
func (*MsgPayForMessageResponse) MarshalTo ¶
func (m *MsgPayForMessageResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgPayForMessageResponse) MarshalToSizedBuffer ¶
func (m *MsgPayForMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPayForMessageResponse) ProtoMessage ¶
func (*MsgPayForMessageResponse) ProtoMessage()
func (*MsgPayForMessageResponse) Reset ¶
func (m *MsgPayForMessageResponse) Reset()
func (*MsgPayForMessageResponse) Size ¶
func (m *MsgPayForMessageResponse) Size() (n int)
func (*MsgPayForMessageResponse) String ¶
func (m *MsgPayForMessageResponse) String() string
func (*MsgPayForMessageResponse) Unmarshal ¶
func (m *MsgPayForMessageResponse) Unmarshal(dAtA []byte) error
func (*MsgPayForMessageResponse) XXX_DiscardUnknown ¶
func (m *MsgPayForMessageResponse) XXX_DiscardUnknown()
func (*MsgPayForMessageResponse) XXX_Marshal ¶
func (m *MsgPayForMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPayForMessageResponse) XXX_Merge ¶
func (m *MsgPayForMessageResponse) XXX_Merge(src proto.Message)
func (*MsgPayForMessageResponse) XXX_Size ¶
func (m *MsgPayForMessageResponse) XXX_Size() int
func (*MsgPayForMessageResponse) XXX_Unmarshal ¶
func (m *MsgPayForMessageResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // PayForMessage allows the user to pay for the inclusion of a message PayForMessage(context.Context, *MsgPayForMessage) (*MsgPayForMessageResponse, error) }
MsgServer is the server API for Msg service.
type MsgWirePayForMessage ¶
type MsgWirePayForMessage struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` MessageNameSpaceId []byte `protobuf:"bytes,2,opt,name=message_name_space_id,json=messageNameSpaceId,proto3" json:"message_name_space_id,omitempty"` MessageSize uint64 `protobuf:"varint,3,opt,name=message_size,json=messageSize,proto3" json:"message_size,omitempty"` Message []byte `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` }
MsgWirePayForMessage describes the format of data that is sent over the wire for each PayForMessage
func NewWirePayForMessage ¶
func NewWirePayForMessage(namespace, message []byte, sizes ...uint64) (*MsgWirePayForMessage, error)
NewWirePayForMessage creates a new MsgWirePayForMessage by using the namespace and message to generate share commitments for the provided square sizes Note that the share commitments generated still need to be signed using the SignShareCommitments method.
func (*MsgWirePayForMessage) Descriptor ¶
func (*MsgWirePayForMessage) Descriptor() ([]byte, []int)
func (*MsgWirePayForMessage) GetMessage ¶
func (m *MsgWirePayForMessage) GetMessage() []byte
func (*MsgWirePayForMessage) GetMessageNameSpaceId ¶
func (m *MsgWirePayForMessage) GetMessageNameSpaceId() []byte
func (*MsgWirePayForMessage) GetMessageShareCommitment ¶
func (m *MsgWirePayForMessage) GetMessageShareCommitment() []ShareCommitAndSignature
func (*MsgWirePayForMessage) GetMessageSize ¶
func (m *MsgWirePayForMessage) GetMessageSize() uint64
func (*MsgWirePayForMessage) GetSignBytes ¶
func (msg *MsgWirePayForMessage) GetSignBytes() []byte
GetSignBytes returns the bytes that are expected to be signed for the MsgWirePayForMessage. The signature of these bytes will never actually get included on chain. Note: instead the signature in the ShareCommitAndSignature of the appropriate square size is used
func (*MsgWirePayForMessage) GetSigner ¶
func (m *MsgWirePayForMessage) GetSigner() string
func (*MsgWirePayForMessage) GetSigners ¶
func (msg *MsgWirePayForMessage) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of the message signers
func (*MsgWirePayForMessage) Marshal ¶
func (m *MsgWirePayForMessage) Marshal() (dAtA []byte, err error)
func (*MsgWirePayForMessage) MarshalTo ¶
func (m *MsgWirePayForMessage) MarshalTo(dAtA []byte) (int, error)
func (*MsgWirePayForMessage) MarshalToSizedBuffer ¶
func (m *MsgWirePayForMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWirePayForMessage) ProtoMessage ¶
func (*MsgWirePayForMessage) ProtoMessage()
func (*MsgWirePayForMessage) Reset ¶
func (m *MsgWirePayForMessage) Reset()
func (*MsgWirePayForMessage) Route ¶
func (msg *MsgWirePayForMessage) Route() string
func (*MsgWirePayForMessage) SignShareCommitments ¶
func (msg *MsgWirePayForMessage) SignShareCommitments(signer *KeyringSigner, options ...TxBuilderOption) error
SignShareCommitments creates and signs MsgPayForMessages for each square size configured in the MsgWirePayForMessage to complete each shares commitment.
func (*MsgWirePayForMessage) Size ¶
func (m *MsgWirePayForMessage) Size() (n int)
func (*MsgWirePayForMessage) String ¶
func (m *MsgWirePayForMessage) String() string
func (*MsgWirePayForMessage) Unmarshal ¶
func (m *MsgWirePayForMessage) Unmarshal(dAtA []byte) error
func (*MsgWirePayForMessage) ValidateBasic ¶
func (msg *MsgWirePayForMessage) ValidateBasic() error
ValidateBasic checks for valid namespace length, declared message size, share commitments, signatures for those share commitments, and fulfills the sdk.Msg interface
func (*MsgWirePayForMessage) XXX_DiscardUnknown ¶
func (m *MsgWirePayForMessage) XXX_DiscardUnknown()
func (*MsgWirePayForMessage) XXX_Marshal ¶
func (m *MsgWirePayForMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWirePayForMessage) XXX_Merge ¶
func (m *MsgWirePayForMessage) XXX_Merge(src proto.Message)
func (*MsgWirePayForMessage) XXX_Size ¶
func (m *MsgWirePayForMessage) XXX_Size() int
func (*MsgWirePayForMessage) XXX_Unmarshal ¶
func (m *MsgWirePayForMessage) XXX_Unmarshal(b []byte) error
type MsgWirePayForMessageResponse ¶
type MsgWirePayForMessageResponse struct { }
MsgWirePayForMessageResponse describes the response returned after the submission of a WirePayForMessage
func (*MsgWirePayForMessageResponse) Descriptor ¶
func (*MsgWirePayForMessageResponse) Descriptor() ([]byte, []int)
func (*MsgWirePayForMessageResponse) Marshal ¶
func (m *MsgWirePayForMessageResponse) Marshal() (dAtA []byte, err error)
func (*MsgWirePayForMessageResponse) MarshalTo ¶
func (m *MsgWirePayForMessageResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgWirePayForMessageResponse) MarshalToSizedBuffer ¶
func (m *MsgWirePayForMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWirePayForMessageResponse) ProtoMessage ¶
func (*MsgWirePayForMessageResponse) ProtoMessage()
func (*MsgWirePayForMessageResponse) Reset ¶
func (m *MsgWirePayForMessageResponse) Reset()
func (*MsgWirePayForMessageResponse) Size ¶
func (m *MsgWirePayForMessageResponse) Size() (n int)
func (*MsgWirePayForMessageResponse) String ¶
func (m *MsgWirePayForMessageResponse) String() string
func (*MsgWirePayForMessageResponse) Unmarshal ¶
func (m *MsgWirePayForMessageResponse) Unmarshal(dAtA []byte) error
func (*MsgWirePayForMessageResponse) XXX_DiscardUnknown ¶
func (m *MsgWirePayForMessageResponse) XXX_DiscardUnknown()
func (*MsgWirePayForMessageResponse) XXX_Marshal ¶
func (m *MsgWirePayForMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWirePayForMessageResponse) XXX_Merge ¶
func (m *MsgWirePayForMessageResponse) XXX_Merge(src proto.Message)
func (*MsgWirePayForMessageResponse) XXX_Size ¶
func (m *MsgWirePayForMessageResponse) XXX_Size() int
func (*MsgWirePayForMessageResponse) XXX_Unmarshal ¶
func (m *MsgWirePayForMessageResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { }
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 ShareCommitAndSignature ¶
type ShareCommitAndSignature struct {}
ShareCommitAndSignature defines the
func (*ShareCommitAndSignature) Descriptor ¶
func (*ShareCommitAndSignature) Descriptor() ([]byte, []int)
func (*ShareCommitAndSignature) GetK ¶
func (m *ShareCommitAndSignature) GetK() uint64
func (*ShareCommitAndSignature) GetShareCommitment ¶
func (m *ShareCommitAndSignature) GetShareCommitment() []byte
func (*ShareCommitAndSignature) GetSignature ¶
func (m *ShareCommitAndSignature) GetSignature() []byte
func (*ShareCommitAndSignature) Marshal ¶
func (m *ShareCommitAndSignature) Marshal() (dAtA []byte, err error)
func (*ShareCommitAndSignature) MarshalTo ¶
func (m *ShareCommitAndSignature) MarshalTo(dAtA []byte) (int, error)
func (*ShareCommitAndSignature) MarshalToSizedBuffer ¶
func (m *ShareCommitAndSignature) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ShareCommitAndSignature) ProtoMessage ¶
func (*ShareCommitAndSignature) ProtoMessage()
func (*ShareCommitAndSignature) Reset ¶
func (m *ShareCommitAndSignature) Reset()
func (*ShareCommitAndSignature) Size ¶
func (m *ShareCommitAndSignature) Size() (n int)
func (*ShareCommitAndSignature) String ¶
func (m *ShareCommitAndSignature) String() string
func (*ShareCommitAndSignature) Unmarshal ¶
func (m *ShareCommitAndSignature) Unmarshal(dAtA []byte) error
func (*ShareCommitAndSignature) XXX_DiscardUnknown ¶
func (m *ShareCommitAndSignature) XXX_DiscardUnknown()
func (*ShareCommitAndSignature) XXX_Marshal ¶
func (m *ShareCommitAndSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShareCommitAndSignature) XXX_Merge ¶
func (m *ShareCommitAndSignature) XXX_Merge(src proto.Message)
func (*ShareCommitAndSignature) XXX_Size ¶
func (m *ShareCommitAndSignature) XXX_Size() int
func (*ShareCommitAndSignature) XXX_Unmarshal ¶
func (m *ShareCommitAndSignature) XXX_Unmarshal(b []byte) error
type TxBuilderOption ¶ added in v0.1.0
func SetFeeAmount ¶ added in v0.1.0
func SetFeeAmount(fees sdk.Coins) TxBuilderOption
func SetGasLimit ¶ added in v0.1.0
func SetGasLimit(limit uint64) TxBuilderOption
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) PayForMessage ¶
func (*UnimplementedMsgServer) PayForMessage(ctx context.Context, req *MsgPayForMessage) (*MsgPayForMessageResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.