zktx

package module
v0.0.0-...-f0abe85 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

README

{Module Name}

Overview of the module.

Concepts

Describe specialized concepts and definitions used throughout the spec.

State

Specify and describe structures expected to marshalled into the store, and their keys

State Transitions

Standard state transition operations triggered by hooks, messages, etc.

Messages

Specify message structure(s) and expected state machine behaviour(s).

Begin Block

Specify any begin-block operations.

End Block

Specify any end-block operations.

Hooks

Describe available hooks to be called by/from this module.

Events

List and describe event tags used.

Client

List and describe CLI commands and gRPC and REST endpoints.

Params

List all module parameters, their types (in JSON) and hyles.

Future Improvements

Describe future improvements of this module.

Tests

Acceptance tests.

Appendix

Supplementary details referenced elsewhere within the spec.

Documentation

Overview

Package zktx is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const ModuleName = "zktx"

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsKey        = collections.NewPrefix(0)
	ContractNameKey  = collections.NewPrefix(1)
	ProvenPayloadKey = collections.NewPrefix(2)
	TimeoutKey       = collections.NewPrefix(3)
	SettledTxKey     = collections.NewPrefix(4)
)
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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// ErrDuplicateAddress error if there is a duplicate address
	ErrDuplicateAddress = errors.Register(ModuleName, 2, "duplicate address")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the interfaces types with the interface registry.

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)

Types

type Contract

type Contract struct {
	// The identifier of the verifier to run for this contract
	Verifier string `protobuf:"bytes,1,opt,name=verifier,proto3" json:"verifier,omitempty"`
	// An identifier for the program (may depend on verifier)
	ProgramId []byte `protobuf:"bytes,2,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"`
	// Recap of the current contract state
	StateDigest []byte `protobuf:"bytes,3,opt,name=state_digest,json=stateDigest,proto3" json:"state_digest,omitempty"`
	// Hash of the next TX to settle, in order
	NextTxToSettle []byte `protobuf:"bytes,4,opt,name=next_tx_to_settle,json=nextTxToSettle,proto3" json:"next_tx_to_settle,omitempty"`
	// Latest tx received to settle, for optimisation
	LatestTxReceived []byte `protobuf:"bytes,5,opt,name=latest_tx_received,json=latestTxReceived,proto3" json:"latest_tx_received,omitempty"`
}

Contract is the state of a contract

func (*Contract) Descriptor

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

func (*Contract) GetLatestTxReceived

func (m *Contract) GetLatestTxReceived() []byte

func (*Contract) GetNextTxToSettle

func (m *Contract) GetNextTxToSettle() []byte

func (*Contract) GetProgramId

func (m *Contract) GetProgramId() []byte

func (*Contract) GetStateDigest

func (m *Contract) GetStateDigest() []byte

func (*Contract) GetVerifier

func (m *Contract) GetVerifier() string

func (*Contract) Marshal

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

func (*Contract) MarshalTo

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

func (*Contract) MarshalToSizedBuffer

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

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) Reset

func (m *Contract) Reset()

func (*Contract) Size

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

func (*Contract) String

func (m *Contract) String() string

func (*Contract) Unmarshal

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

func (*Contract) XXX_DiscardUnknown

func (m *Contract) XXX_DiscardUnknown()

func (*Contract) XXX_Marshal

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

func (*Contract) XXX_Merge

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

func (*Contract) XXX_Size

func (m *Contract) XXX_Size() int

func (*Contract) XXX_Unmarshal

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

type ContractListRequest

type ContractListRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

ContractRequest is the request type for the Query/Contract RPC

func (*ContractListRequest) Descriptor

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

func (*ContractListRequest) GetPagination

func (m *ContractListRequest) GetPagination() *query.PageRequest

func (*ContractListRequest) Marshal

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

func (*ContractListRequest) MarshalTo

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

func (*ContractListRequest) MarshalToSizedBuffer

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

func (*ContractListRequest) ProtoMessage

func (*ContractListRequest) ProtoMessage()

func (*ContractListRequest) Reset

func (m *ContractListRequest) Reset()

func (*ContractListRequest) Size

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

func (*ContractListRequest) String

func (m *ContractListRequest) String() string

func (*ContractListRequest) Unmarshal

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

func (*ContractListRequest) XXX_DiscardUnknown

func (m *ContractListRequest) XXX_DiscardUnknown()

func (*ContractListRequest) XXX_Marshal

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

func (*ContractListRequest) XXX_Merge

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

func (*ContractListRequest) XXX_Size

func (m *ContractListRequest) XXX_Size() int

func (*ContractListRequest) XXX_Unmarshal

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

type ContractListResponse

type ContractListResponse struct {
	// contract defines the current state of the contract.
	Contracts []string `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

ContractResponse is the response type for the Query/Contract RPC

func (*ContractListResponse) Descriptor

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

func (*ContractListResponse) GetContracts

func (m *ContractListResponse) GetContracts() []string

func (*ContractListResponse) GetPagination

func (m *ContractListResponse) GetPagination() *query.PageResponse

func (*ContractListResponse) Marshal

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

func (*ContractListResponse) MarshalTo

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

func (*ContractListResponse) MarshalToSizedBuffer

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

func (*ContractListResponse) ProtoMessage

func (*ContractListResponse) ProtoMessage()

func (*ContractListResponse) Reset

func (m *ContractListResponse) Reset()

func (*ContractListResponse) Size

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

func (*ContractListResponse) String

func (m *ContractListResponse) String() string

func (*ContractListResponse) Unmarshal

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

func (*ContractListResponse) XXX_DiscardUnknown

func (m *ContractListResponse) XXX_DiscardUnknown()

func (*ContractListResponse) XXX_Marshal

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

func (*ContractListResponse) XXX_Merge

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

func (*ContractListResponse) XXX_Size

func (m *ContractListResponse) XXX_Size() int

func (*ContractListResponse) XXX_Unmarshal

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

type ContractRequest

type ContractRequest struct {
	// contract_name defines the name to query for the contract.
	ContractName string `protobuf:"bytes,1,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
}

ContractRequest is the request type for the Query/Contract RPC

func (*ContractRequest) Descriptor

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

func (*ContractRequest) GetContractName

func (m *ContractRequest) GetContractName() string

func (*ContractRequest) Marshal

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

func (*ContractRequest) MarshalTo

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

func (*ContractRequest) MarshalToSizedBuffer

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

func (*ContractRequest) ProtoMessage

func (*ContractRequest) ProtoMessage()

func (*ContractRequest) Reset

func (m *ContractRequest) Reset()

func (*ContractRequest) Size

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

func (*ContractRequest) String

func (m *ContractRequest) String() string

func (*ContractRequest) Unmarshal

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

func (*ContractRequest) XXX_DiscardUnknown

func (m *ContractRequest) XXX_DiscardUnknown()

func (*ContractRequest) XXX_Marshal

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

func (*ContractRequest) XXX_Merge

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

func (*ContractRequest) XXX_Size

func (m *ContractRequest) XXX_Size() int

func (*ContractRequest) XXX_Unmarshal

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

type ContractResponse

type ContractResponse struct {
	// contract defines the current state of the contract.
	Contract Contract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract"`
}

ContractResponse is the response type for the Query/Contract RPC

func (*ContractResponse) Descriptor

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

func (*ContractResponse) GetContract

func (m *ContractResponse) GetContract() Contract

func (*ContractResponse) Marshal

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

func (*ContractResponse) MarshalTo

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

func (*ContractResponse) MarshalToSizedBuffer

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

func (*ContractResponse) ProtoMessage

func (*ContractResponse) ProtoMessage()

func (*ContractResponse) Reset

func (m *ContractResponse) Reset()

func (*ContractResponse) Size

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

func (*ContractResponse) String

func (m *ContractResponse) String() string

func (*ContractResponse) Unmarshal

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

func (*ContractResponse) XXX_DiscardUnknown

func (m *ContractResponse) XXX_DiscardUnknown()

func (*ContractResponse) XXX_Marshal

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

func (*ContractResponse) XXX_Merge

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

func (*ContractResponse) XXX_Size

func (m *ContractResponse) XXX_Size() int

func (*ContractResponse) XXX_Unmarshal

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

type EventContractRegistered

type EventContractRegistered struct {
	// contract_name is the name of the contract
	ContractName string `protobuf:"bytes,1,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
}

EventContractRegistered is an event emitted when a contract is registered

func (*EventContractRegistered) Descriptor

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

func (*EventContractRegistered) GetContractName

func (m *EventContractRegistered) GetContractName() string

func (*EventContractRegistered) Marshal

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

func (*EventContractRegistered) MarshalTo

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

func (*EventContractRegistered) MarshalToSizedBuffer

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

func (*EventContractRegistered) ProtoMessage

func (*EventContractRegistered) ProtoMessage()

func (*EventContractRegistered) Reset

func (m *EventContractRegistered) Reset()

func (*EventContractRegistered) Size

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

func (*EventContractRegistered) String

func (m *EventContractRegistered) String() string

func (*EventContractRegistered) Unmarshal

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

func (*EventContractRegistered) XXX_DiscardUnknown

func (m *EventContractRegistered) XXX_DiscardUnknown()

func (*EventContractRegistered) XXX_Marshal

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

func (*EventContractRegistered) XXX_Merge

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

func (*EventContractRegistered) XXX_Size

func (m *EventContractRegistered) XXX_Size() int

func (*EventContractRegistered) XXX_Unmarshal

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

type EventPayload

type EventPayload struct {
	// contract_name is the name of the target contract
	ContractName string `protobuf:"bytes,1,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// Arbitrary data of the payload
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Index of the payload in the tx
	PayloadIndex uint32 `protobuf:"varint,3,opt,name=payload_index,json=payloadIndex,proto3" json:"payload_index,omitempty"`
}

EventPayload is an event emitted for each payload processed in a transaction

func (*EventPayload) Descriptor

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

func (*EventPayload) GetContractName

func (m *EventPayload) GetContractName() string

func (*EventPayload) GetData

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

func (*EventPayload) GetPayloadIndex

func (m *EventPayload) GetPayloadIndex() uint32

func (*EventPayload) Marshal

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

func (*EventPayload) MarshalTo

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

func (*EventPayload) MarshalToSizedBuffer

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

func (*EventPayload) ProtoMessage

func (*EventPayload) ProtoMessage()

func (*EventPayload) Reset

func (m *EventPayload) Reset()

func (*EventPayload) Size

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

func (*EventPayload) String

func (m *EventPayload) String() string

func (*EventPayload) Unmarshal

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

func (*EventPayload) XXX_DiscardUnknown

func (m *EventPayload) XXX_DiscardUnknown()

func (*EventPayload) XXX_Marshal

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

func (*EventPayload) XXX_Merge

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

func (*EventPayload) XXX_Size

func (m *EventPayload) XXX_Size() int

func (*EventPayload) XXX_Unmarshal

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

type EventPayloadSettled

type EventPayloadSettled struct {
	// contract_name is the name of the target contract
	ContractName string `protobuf:"bytes,1,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// TX hash of the payload
	TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// Index of the payload in the tx
	PayloadIndex uint32 `protobuf:"varint,3,opt,name=payload_index,json=payloadIndex,proto3" json:"payload_index,omitempty"`
}

EventPayloadSettled is emitted when a payload is settled

func (*EventPayloadSettled) Descriptor

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

func (*EventPayloadSettled) GetContractName

func (m *EventPayloadSettled) GetContractName() string

func (*EventPayloadSettled) GetPayloadIndex

func (m *EventPayloadSettled) GetPayloadIndex() uint32

func (*EventPayloadSettled) GetTxHash

func (m *EventPayloadSettled) GetTxHash() []byte

func (*EventPayloadSettled) Marshal

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

func (*EventPayloadSettled) MarshalTo

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

func (*EventPayloadSettled) MarshalToSizedBuffer

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

func (*EventPayloadSettled) ProtoMessage

func (*EventPayloadSettled) ProtoMessage()

func (*EventPayloadSettled) Reset

func (m *EventPayloadSettled) Reset()

func (*EventPayloadSettled) Size

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

func (*EventPayloadSettled) String

func (m *EventPayloadSettled) String() string

func (*EventPayloadSettled) Unmarshal

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

func (*EventPayloadSettled) XXX_DiscardUnknown

func (m *EventPayloadSettled) XXX_DiscardUnknown()

func (*EventPayloadSettled) XXX_Marshal

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

func (*EventPayloadSettled) XXX_Merge

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

func (*EventPayloadSettled) XXX_Size

func (m *EventPayloadSettled) XXX_Size() int

func (*EventPayloadSettled) XXX_Unmarshal

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

type EventTxSettled

type EventTxSettled struct {
	// TX hash of the payload
	TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// Success or failure of the TX
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
}

EventTxSettled is emitted when a full transaction is settled

func (*EventTxSettled) Descriptor

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

func (*EventTxSettled) GetSuccess

func (m *EventTxSettled) GetSuccess() bool

func (*EventTxSettled) GetTxHash

func (m *EventTxSettled) GetTxHash() []byte

func (*EventTxSettled) Marshal

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

func (*EventTxSettled) MarshalTo

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

func (*EventTxSettled) MarshalToSizedBuffer

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

func (*EventTxSettled) ProtoMessage

func (*EventTxSettled) ProtoMessage()

func (*EventTxSettled) Reset

func (m *EventTxSettled) Reset()

func (*EventTxSettled) Size

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

func (*EventTxSettled) String

func (m *EventTxSettled) String() string

func (*EventTxSettled) Unmarshal

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

func (*EventTxSettled) XXX_DiscardUnknown

func (m *EventTxSettled) XXX_DiscardUnknown()

func (*EventTxSettled) XXX_Marshal

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

func (*EventTxSettled) XXX_Merge

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

func (*EventTxSettled) XXX_Size

func (m *EventTxSettled) XXX_Size() int

func (*EventTxSettled) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params    Params               `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	Contracts map[string]*Contract `` /* 159-byte string literal not displayed */
}

GenesisState is the state that must be provided at genesis.

func NewGenesisState

func NewGenesisState() *GenesisState

NewGenesisState creates a new genesis state with default values.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetContracts

func (m *GenesisState) GetContracts() map[string]*Contract

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

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 HyleContext

type HyleContext struct {
	Identity string
	TxHash   []byte
}

type HyleOutput

type HyleOutput struct {
	InitialState []byte `json:"initial_state"`
	NextState    []byte `json:"next_state"`
	Identity     string `json:"identity"`
	TxHash       []byte `json:"tx_hash"`
	PayloadHash  []byte `json:"payload_hash"`
	Success      bool   `json:"success"`
}

type MsgClient

type MsgClient interface {
	// execute a zk-proven state change
	PublishPayloads(ctx context.Context, in *MsgPublishPayloads, opts ...grpc.CallOption) (*MsgPublishPayloadsResponse, error)
	// Verify a payload
	PublishPayloadProof(ctx context.Context, in *MsgPublishPayloadProof, opts ...grpc.CallOption) (*MsgPublishPayloadProofResponse, error)
	// RegisterContract registers a contract
	RegisterContract(ctx context.Context, in *MsgRegisterContract, opts ...grpc.CallOption) (*MsgRegisterContractResponse, 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 MsgPublishPayloadProof

type MsgPublishPayloadProof struct {
	// Tx hash of the payload to prove
	TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// Index of the payload in the tx
	PayloadIndex uint32 `protobuf:"varint,2,opt,name=payload_index,json=payloadIndex,proto3" json:"payload_index,omitempty"`
	// Contract name
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// Proof of the payload
	Proof []byte `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"`
}

Prove a previously published payload

func (*MsgPublishPayloadProof) Descriptor

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

func (*MsgPublishPayloadProof) GetContractName

func (m *MsgPublishPayloadProof) GetContractName() string

func (*MsgPublishPayloadProof) GetPayloadIndex

func (m *MsgPublishPayloadProof) GetPayloadIndex() uint32

func (*MsgPublishPayloadProof) GetProof

func (m *MsgPublishPayloadProof) GetProof() []byte

func (*MsgPublishPayloadProof) GetTxHash

func (m *MsgPublishPayloadProof) GetTxHash() []byte

func (*MsgPublishPayloadProof) Marshal

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

func (*MsgPublishPayloadProof) MarshalTo

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

func (*MsgPublishPayloadProof) MarshalToSizedBuffer

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

func (*MsgPublishPayloadProof) ProtoMessage

func (*MsgPublishPayloadProof) ProtoMessage()

func (*MsgPublishPayloadProof) Reset

func (m *MsgPublishPayloadProof) Reset()

func (*MsgPublishPayloadProof) Size

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

func (*MsgPublishPayloadProof) String

func (m *MsgPublishPayloadProof) String() string

func (*MsgPublishPayloadProof) Unmarshal

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

func (*MsgPublishPayloadProof) XXX_DiscardUnknown

func (m *MsgPublishPayloadProof) XXX_DiscardUnknown()

func (*MsgPublishPayloadProof) XXX_Marshal

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

func (*MsgPublishPayloadProof) XXX_Merge

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

func (*MsgPublishPayloadProof) XXX_Size

func (m *MsgPublishPayloadProof) XXX_Size() int

func (*MsgPublishPayloadProof) XXX_Unmarshal

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

type MsgPublishPayloadProofResponse

type MsgPublishPayloadProofResponse struct {
}

No response

func (*MsgPublishPayloadProofResponse) Descriptor

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

func (*MsgPublishPayloadProofResponse) Marshal

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

func (*MsgPublishPayloadProofResponse) MarshalTo

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

func (*MsgPublishPayloadProofResponse) MarshalToSizedBuffer

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

func (*MsgPublishPayloadProofResponse) ProtoMessage

func (*MsgPublishPayloadProofResponse) ProtoMessage()

func (*MsgPublishPayloadProofResponse) Reset

func (m *MsgPublishPayloadProofResponse) Reset()

func (*MsgPublishPayloadProofResponse) Size

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

func (*MsgPublishPayloadProofResponse) String

func (*MsgPublishPayloadProofResponse) Unmarshal

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

func (*MsgPublishPayloadProofResponse) XXX_DiscardUnknown

func (m *MsgPublishPayloadProofResponse) XXX_DiscardUnknown()

func (*MsgPublishPayloadProofResponse) XXX_Marshal

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

func (*MsgPublishPayloadProofResponse) XXX_Merge

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

func (*MsgPublishPayloadProofResponse) XXX_Size

func (m *MsgPublishPayloadProofResponse) XXX_Size() int

func (*MsgPublishPayloadProofResponse) XXX_Unmarshal

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

type MsgPublishPayloads

type MsgPublishPayloads struct {
	// Identity is the identity of the TX sender
	Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	// list of payloads
	Payloads []*Payload `protobuf:"bytes,2,rep,name=payloads,proto3" json:"payloads,omitempty"`
}

execute a zk-proven state change - request type

func (*MsgPublishPayloads) Descriptor

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

func (*MsgPublishPayloads) GetIdentity

func (m *MsgPublishPayloads) GetIdentity() string

func (*MsgPublishPayloads) GetPayloads

func (m *MsgPublishPayloads) GetPayloads() []*Payload

func (*MsgPublishPayloads) Marshal

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

func (*MsgPublishPayloads) MarshalTo

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

func (*MsgPublishPayloads) MarshalToSizedBuffer

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

func (*MsgPublishPayloads) ProtoMessage

func (*MsgPublishPayloads) ProtoMessage()

func (*MsgPublishPayloads) Reset

func (m *MsgPublishPayloads) Reset()

func (*MsgPublishPayloads) Size

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

func (*MsgPublishPayloads) String

func (m *MsgPublishPayloads) String() string

func (*MsgPublishPayloads) Unmarshal

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

func (*MsgPublishPayloads) XXX_DiscardUnknown

func (m *MsgPublishPayloads) XXX_DiscardUnknown()

func (*MsgPublishPayloads) XXX_Marshal

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

func (*MsgPublishPayloads) XXX_Merge

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

func (*MsgPublishPayloads) XXX_Size

func (m *MsgPublishPayloads) XXX_Size() int

func (*MsgPublishPayloads) XXX_Unmarshal

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

type MsgPublishPayloadsResponse

type MsgPublishPayloadsResponse struct {
}

No response

func (*MsgPublishPayloadsResponse) Descriptor

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

func (*MsgPublishPayloadsResponse) Marshal

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

func (*MsgPublishPayloadsResponse) MarshalTo

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

func (*MsgPublishPayloadsResponse) MarshalToSizedBuffer

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

func (*MsgPublishPayloadsResponse) ProtoMessage

func (*MsgPublishPayloadsResponse) ProtoMessage()

func (*MsgPublishPayloadsResponse) Reset

func (m *MsgPublishPayloadsResponse) Reset()

func (*MsgPublishPayloadsResponse) Size

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

func (*MsgPublishPayloadsResponse) String

func (m *MsgPublishPayloadsResponse) String() string

func (*MsgPublishPayloadsResponse) Unmarshal

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

func (*MsgPublishPayloadsResponse) XXX_DiscardUnknown

func (m *MsgPublishPayloadsResponse) XXX_DiscardUnknown()

func (*MsgPublishPayloadsResponse) XXX_Marshal

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

func (*MsgPublishPayloadsResponse) XXX_Merge

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

func (*MsgPublishPayloadsResponse) XXX_Size

func (m *MsgPublishPayloadsResponse) XXX_Size() int

func (*MsgPublishPayloadsResponse) XXX_Unmarshal

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

type MsgRegisterContract

type MsgRegisterContract struct {
	// owner is the contract owner
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// Identifier of the verifier
	Verifier string `protobuf:"bytes,2,opt,name=verifier,proto3" json:"verifier,omitempty"`
	// Identifier of the smart contract
	ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"`
	// Initial state digest
	StateDigest []byte `protobuf:"bytes,4,opt,name=state_digest,json=stateDigest,proto3" json:"state_digest,omitempty"`
	// Identifier of the contract name
	ContractName string `protobuf:"bytes,5,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
}

Register a contract - request type

func (*MsgRegisterContract) Descriptor

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

func (*MsgRegisterContract) GetContractName

func (m *MsgRegisterContract) GetContractName() string

func (*MsgRegisterContract) GetOwner

func (m *MsgRegisterContract) GetOwner() string

func (*MsgRegisterContract) GetProgramId

func (m *MsgRegisterContract) GetProgramId() []byte

func (*MsgRegisterContract) GetStateDigest

func (m *MsgRegisterContract) GetStateDigest() []byte

func (*MsgRegisterContract) GetVerifier

func (m *MsgRegisterContract) GetVerifier() string

func (*MsgRegisterContract) Marshal

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

func (*MsgRegisterContract) MarshalTo

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

func (*MsgRegisterContract) MarshalToSizedBuffer

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

func (*MsgRegisterContract) ProtoMessage

func (*MsgRegisterContract) ProtoMessage()

func (*MsgRegisterContract) Reset

func (m *MsgRegisterContract) Reset()

func (*MsgRegisterContract) Size

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

func (*MsgRegisterContract) String

func (m *MsgRegisterContract) String() string

func (*MsgRegisterContract) Unmarshal

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

func (*MsgRegisterContract) XXX_DiscardUnknown

func (m *MsgRegisterContract) XXX_DiscardUnknown()

func (*MsgRegisterContract) XXX_Marshal

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

func (*MsgRegisterContract) XXX_Merge

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

func (*MsgRegisterContract) XXX_Size

func (m *MsgRegisterContract) XXX_Size() int

func (*MsgRegisterContract) XXX_Unmarshal

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

type MsgRegisterContractResponse

type MsgRegisterContractResponse struct {
}

Register a contract - response type

func (*MsgRegisterContractResponse) Descriptor

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

func (*MsgRegisterContractResponse) Marshal

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

func (*MsgRegisterContractResponse) MarshalTo

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

func (*MsgRegisterContractResponse) MarshalToSizedBuffer

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

func (*MsgRegisterContractResponse) ProtoMessage

func (*MsgRegisterContractResponse) ProtoMessage()

func (*MsgRegisterContractResponse) Reset

func (m *MsgRegisterContractResponse) Reset()

func (*MsgRegisterContractResponse) Size

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

func (*MsgRegisterContractResponse) String

func (m *MsgRegisterContractResponse) String() string

func (*MsgRegisterContractResponse) Unmarshal

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

func (*MsgRegisterContractResponse) XXX_DiscardUnknown

func (m *MsgRegisterContractResponse) XXX_DiscardUnknown()

func (*MsgRegisterContractResponse) XXX_Marshal

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

func (*MsgRegisterContractResponse) XXX_Merge

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

func (*MsgRegisterContractResponse) XXX_Size

func (m *MsgRegisterContractResponse) XXX_Size() int

func (*MsgRegisterContractResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// execute a zk-proven state change
	PublishPayloads(context.Context, *MsgPublishPayloads) (*MsgPublishPayloadsResponse, error)
	// Verify a payload
	PublishPayloadProof(context.Context, *MsgPublishPayloadProof) (*MsgPublishPayloadProofResponse, error)
	// RegisterContract registers a contract
	RegisterContract(context.Context, *MsgRegisterContract) (*MsgRegisterContractResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
}

Params defines the parameters of the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default module parameters.

func (*Params) Descriptor

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

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) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate does the sanity check on the 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 Payload

type Payload struct {
	// Name of target contract
	ContractName string `protobuf:"bytes,1,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// Payload data
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

Payload is a blob

func (*Payload) Descriptor

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

func (*Payload) GetContractName

func (m *Payload) GetContractName() string

func (*Payload) GetData

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

func (*Payload) Marshal

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

func (*Payload) MarshalTo

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

func (*Payload) MarshalToSizedBuffer

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

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) Size

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

func (*Payload) String

func (m *Payload) String() string

func (*Payload) Unmarshal

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

func (*Payload) XXX_DiscardUnknown

func (m *Payload) XXX_DiscardUnknown()

func (*Payload) XXX_Marshal

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

func (*Payload) XXX_Merge

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

func (*Payload) XXX_Size

func (m *Payload) XXX_Size() int

func (*Payload) XXX_Unmarshal

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

type PayloadMetadata

type PayloadMetadata struct {
	// Hash of the payload
	PayloadHash []byte `protobuf:"bytes,1,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"`
	// Identity of the caller
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// Contract name to settle
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// The initial state of the contract
	InitialState []byte `protobuf:"bytes,4,opt,name=initial_state,json=initialState,proto3" json:"initial_state,omitempty"`
	// The next state to transition to
	NextState []byte `protobuf:"bytes,5,opt,name=next_state,json=nextState,proto3" json:"next_state,omitempty"`
	// If this payload was verified
	Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"`
	// If this is a success or failure
	Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"`
	// Next TX hash in the list of TX to settle
	NextTxHash []byte `protobuf:"bytes,8,opt,name=next_tx_hash,json=nextTxHash,proto3" json:"next_tx_hash,omitempty"`
}

PayloadMetadata is the transient state we need to keep to settle payloads

func (*PayloadMetadata) Descriptor

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

func (*PayloadMetadata) GetContractName

func (m *PayloadMetadata) GetContractName() string

func (*PayloadMetadata) GetIdentity

func (m *PayloadMetadata) GetIdentity() string

func (*PayloadMetadata) GetInitialState

func (m *PayloadMetadata) GetInitialState() []byte

func (*PayloadMetadata) GetNextState

func (m *PayloadMetadata) GetNextState() []byte

func (*PayloadMetadata) GetNextTxHash

func (m *PayloadMetadata) GetNextTxHash() []byte

func (*PayloadMetadata) GetPayloadHash

func (m *PayloadMetadata) GetPayloadHash() []byte

func (*PayloadMetadata) GetSuccess

func (m *PayloadMetadata) GetSuccess() bool

func (*PayloadMetadata) GetVerified

func (m *PayloadMetadata) GetVerified() bool

func (*PayloadMetadata) Marshal

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

func (*PayloadMetadata) MarshalTo

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

func (*PayloadMetadata) MarshalToSizedBuffer

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

func (*PayloadMetadata) ProtoMessage

func (*PayloadMetadata) ProtoMessage()

func (*PayloadMetadata) Reset

func (m *PayloadMetadata) Reset()

func (*PayloadMetadata) Size

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

func (*PayloadMetadata) String

func (m *PayloadMetadata) String() string

func (*PayloadMetadata) Unmarshal

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

func (*PayloadMetadata) XXX_DiscardUnknown

func (m *PayloadMetadata) XXX_DiscardUnknown()

func (*PayloadMetadata) XXX_Marshal

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

func (*PayloadMetadata) XXX_Merge

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

func (*PayloadMetadata) XXX_Size

func (m *PayloadMetadata) XXX_Size() int

func (*PayloadMetadata) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Contract returns the current state of the contract.
	Contract(ctx context.Context, in *ContractRequest, opts ...grpc.CallOption) (*ContractResponse, error)
	// ContractList returns the list of all contracts with a given verifier and
	// program_id
	ContractList(ctx context.Context, in *ContractListRequest, opts ...grpc.CallOption) (*ContractListResponse, error)
	// SettlementStatus returns whether a TX has been settled or not
	SettlementStatus(ctx context.Context, in *SettlementStatusRequest, opts ...grpc.CallOption) (*SettlementStatusResponse, error)
	// Params returns the module parameters.
	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 defines the parameters of the module.
	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 {
	// Contract returns the current state of the contract.
	Contract(context.Context, *ContractRequest) (*ContractResponse, error)
	// ContractList returns the list of all contracts with a given verifier and
	// program_id
	ContractList(context.Context, *ContractListRequest) (*ContractListResponse, error)
	// SettlementStatus returns whether a TX has been settled or not
	SettlementStatus(context.Context, *SettlementStatusRequest) (*SettlementStatusResponse, error)
	// Params returns the module parameters.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type SettlementStatusRequest

type SettlementStatusRequest struct {
	// tx_hash defines the hash of the transaction to query for the settlement
	// status.
	TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
}

SettlementStatusRequest is the request type for the Query/SettlementStatus RPC

func (*SettlementStatusRequest) Descriptor

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

func (*SettlementStatusRequest) GetTxHash

func (m *SettlementStatusRequest) GetTxHash() []byte

func (*SettlementStatusRequest) Marshal

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

func (*SettlementStatusRequest) MarshalTo

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

func (*SettlementStatusRequest) MarshalToSizedBuffer

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

func (*SettlementStatusRequest) ProtoMessage

func (*SettlementStatusRequest) ProtoMessage()

func (*SettlementStatusRequest) Reset

func (m *SettlementStatusRequest) Reset()

func (*SettlementStatusRequest) Size

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

func (*SettlementStatusRequest) String

func (m *SettlementStatusRequest) String() string

func (*SettlementStatusRequest) Unmarshal

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

func (*SettlementStatusRequest) XXX_DiscardUnknown

func (m *SettlementStatusRequest) XXX_DiscardUnknown()

func (*SettlementStatusRequest) XXX_Marshal

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

func (*SettlementStatusRequest) XXX_Merge

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

func (*SettlementStatusRequest) XXX_Size

func (m *SettlementStatusRequest) XXX_Size() int

func (*SettlementStatusRequest) XXX_Unmarshal

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

type SettlementStatusResponse

type SettlementStatusResponse struct {
	// settled defines whether the payload has been settled or not.
	Settled bool `protobuf:"varint,1,opt,name=settled,proto3" json:"settled,omitempty"`
	// success defines whether the payload is a success or failure
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
}

SettlementStatusResponse is the response type for the Query/SettlementStatus RPC

func (*SettlementStatusResponse) Descriptor

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

func (*SettlementStatusResponse) GetSettled

func (m *SettlementStatusResponse) GetSettled() bool

func (*SettlementStatusResponse) GetSuccess

func (m *SettlementStatusResponse) GetSuccess() bool

func (*SettlementStatusResponse) Marshal

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

func (*SettlementStatusResponse) MarshalTo

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

func (*SettlementStatusResponse) MarshalToSizedBuffer

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

func (*SettlementStatusResponse) ProtoMessage

func (*SettlementStatusResponse) ProtoMessage()

func (*SettlementStatusResponse) Reset

func (m *SettlementStatusResponse) Reset()

func (*SettlementStatusResponse) Size

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

func (*SettlementStatusResponse) String

func (m *SettlementStatusResponse) String() string

func (*SettlementStatusResponse) Unmarshal

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

func (*SettlementStatusResponse) XXX_DiscardUnknown

func (m *SettlementStatusResponse) XXX_DiscardUnknown()

func (*SettlementStatusResponse) XXX_Marshal

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

func (*SettlementStatusResponse) XXX_Merge

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

func (*SettlementStatusResponse) XXX_Size

func (m *SettlementStatusResponse) XXX_Size() int

func (*SettlementStatusResponse) XXX_Unmarshal

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

type TxTimeout

type TxTimeout struct {
	// List of transactions to timeout
	Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
}

TxTimeout is a list of TXs used to timeout

func (*TxTimeout) Descriptor

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

func (*TxTimeout) GetTxs

func (m *TxTimeout) GetTxs() [][]byte

func (*TxTimeout) Marshal

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

func (*TxTimeout) MarshalTo

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

func (*TxTimeout) MarshalToSizedBuffer

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

func (*TxTimeout) ProtoMessage

func (*TxTimeout) ProtoMessage()

func (*TxTimeout) Reset

func (m *TxTimeout) Reset()

func (*TxTimeout) Size

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

func (*TxTimeout) String

func (m *TxTimeout) String() string

func (*TxTimeout) Unmarshal

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

func (*TxTimeout) XXX_DiscardUnknown

func (m *TxTimeout) XXX_DiscardUnknown()

func (*TxTimeout) XXX_Marshal

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

func (*TxTimeout) XXX_Merge

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

func (*TxTimeout) XXX_Size

func (m *TxTimeout) XXX_Size() int

func (*TxTimeout) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PublishPayloadProof

func (*UnimplementedMsgServer) PublishPayloads

func (*UnimplementedMsgServer) RegisterContract

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Contract

func (*UnimplementedQueryServer) ContractList

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) SettlementStatus

Directories

Path Synopsis
api
module/v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.

Jump to

Keyboard shortcuts

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