zktxv1

package
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: 19 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

View Source
const (
	Query_Contract_FullMethodName         = "/hyle.zktx.v1.Query/Contract"
	Query_ContractList_FullMethodName     = "/hyle.zktx.v1.Query/ContractList"
	Query_SettlementStatus_FullMethodName = "/hyle.zktx.v1.Query/SettlementStatus"
	Query_Params_FullMethodName           = "/hyle.zktx.v1.Query/Params"
)
View Source
const (
	Msg_PublishPayloads_FullMethodName     = "/hyle.zktx.v1.Msg/PublishPayloads"
	Msg_PublishPayloadProof_FullMethodName = "/hyle.zktx.v1.Msg/PublishPayloadProof"
	Msg_RegisterContract_FullMethodName    = "/hyle.zktx.v1.Msg/RegisterContract"
)

Variables

View Source
var File_hyle_zktx_v1_events_proto protoreflect.FileDescriptor
View Source
var File_hyle_zktx_v1_query_proto protoreflect.FileDescriptor
View Source
var File_hyle_zktx_v1_tx_proto protoreflect.FileDescriptor
View Source
var File_hyle_zktx_v1_types_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hyle.zktx.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PublishPayloads",
			Handler:    _Msg_PublishPayloads_Handler,
		},
		{
			MethodName: "PublishPayloadProof",
			Handler:    _Msg_PublishPayloadProof_Handler,
		},
		{
			MethodName: "RegisterContract",
			Handler:    _Msg_RegisterContract_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hyle/zktx/v1/tx.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hyle.zktx.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Contract",
			Handler:    _Query_Contract_Handler,
		},
		{
			MethodName: "ContractList",
			Handler:    _Query_ContractList_Handler,
		},
		{
			MethodName: "SettlementStatus",
			Handler:    _Query_SettlementStatus_Handler,
		},
		{
			MethodName: "Params",
			Handler:    _Query_Params_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hyle/zktx/v1/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, 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"`
	// contains filtered or unexported fields
}

Contract is the state of a contract

func (*Contract) Descriptor deprecated

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

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetLatestTxReceived

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

func (*Contract) GetNextTxToSettle

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

func (*Contract) GetProgramId

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

func (*Contract) GetStateDigest

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

func (*Contract) GetVerifier

func (x *Contract) GetVerifier() string

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) ProtoReflect

func (x *Contract) ProtoReflect() protoreflect.Message

func (*Contract) Reset

func (x *Contract) Reset()

func (*Contract) String

func (x *Contract) String() string

type ContractListRequest

type ContractListRequest struct {

	// pagination defines an optional pagination for the request.
	Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

ContractRequest is the request type for the Query/Contract RPC

func (*ContractListRequest) Descriptor deprecated

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

Deprecated: Use ContractListRequest.ProtoReflect.Descriptor instead.

func (*ContractListRequest) GetPagination

func (x *ContractListRequest) GetPagination() *v1beta1.PageRequest

func (*ContractListRequest) ProtoMessage

func (*ContractListRequest) ProtoMessage()

func (*ContractListRequest) ProtoReflect

func (x *ContractListRequest) ProtoReflect() protoreflect.Message

func (*ContractListRequest) Reset

func (x *ContractListRequest) Reset()

func (*ContractListRequest) String

func (x *ContractListRequest) String() string

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 *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

ContractResponse is the response type for the Query/Contract RPC

func (*ContractListResponse) Descriptor deprecated

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

Deprecated: Use ContractListResponse.ProtoReflect.Descriptor instead.

func (*ContractListResponse) GetContracts

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

func (*ContractListResponse) GetPagination

func (x *ContractListResponse) GetPagination() *v1beta1.PageResponse

func (*ContractListResponse) ProtoMessage

func (*ContractListResponse) ProtoMessage()

func (*ContractListResponse) ProtoReflect

func (x *ContractListResponse) ProtoReflect() protoreflect.Message

func (*ContractListResponse) Reset

func (x *ContractListResponse) Reset()

func (*ContractListResponse) String

func (x *ContractListResponse) String() string

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"`
	// contains filtered or unexported fields
}

ContractRequest is the request type for the Query/Contract RPC

func (*ContractRequest) Descriptor deprecated

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

Deprecated: Use ContractRequest.ProtoReflect.Descriptor instead.

func (*ContractRequest) GetContractName

func (x *ContractRequest) GetContractName() string

func (*ContractRequest) ProtoMessage

func (*ContractRequest) ProtoMessage()

func (*ContractRequest) ProtoReflect

func (x *ContractRequest) ProtoReflect() protoreflect.Message

func (*ContractRequest) Reset

func (x *ContractRequest) Reset()

func (*ContractRequest) String

func (x *ContractRequest) String() string

type ContractResponse

type ContractResponse struct {

	// contract defines the current state of the contract.
	Contract *Contract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
	// contains filtered or unexported fields
}

ContractResponse is the response type for the Query/Contract RPC

func (*ContractResponse) Descriptor deprecated

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

Deprecated: Use ContractResponse.ProtoReflect.Descriptor instead.

func (*ContractResponse) GetContract

func (x *ContractResponse) GetContract() *Contract

func (*ContractResponse) ProtoMessage

func (*ContractResponse) ProtoMessage()

func (*ContractResponse) ProtoReflect

func (x *ContractResponse) ProtoReflect() protoreflect.Message

func (*ContractResponse) Reset

func (x *ContractResponse) Reset()

func (*ContractResponse) String

func (x *ContractResponse) String() string

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"`
	// contains filtered or unexported fields
}

EventContractRegistered is an event emitted when a contract is registered

func (*EventContractRegistered) Descriptor deprecated

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

Deprecated: Use EventContractRegistered.ProtoReflect.Descriptor instead.

func (*EventContractRegistered) GetContractName

func (x *EventContractRegistered) GetContractName() string

func (*EventContractRegistered) ProtoMessage

func (*EventContractRegistered) ProtoMessage()

func (*EventContractRegistered) ProtoReflect

func (x *EventContractRegistered) ProtoReflect() protoreflect.Message

func (*EventContractRegistered) Reset

func (x *EventContractRegistered) Reset()

func (*EventContractRegistered) String

func (x *EventContractRegistered) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*EventPayload) Descriptor deprecated

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

Deprecated: Use EventPayload.ProtoReflect.Descriptor instead.

func (*EventPayload) GetContractName

func (x *EventPayload) GetContractName() string

func (*EventPayload) GetData

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

func (*EventPayload) GetPayloadIndex

func (x *EventPayload) GetPayloadIndex() uint32

func (*EventPayload) ProtoMessage

func (*EventPayload) ProtoMessage()

func (*EventPayload) ProtoReflect

func (x *EventPayload) ProtoReflect() protoreflect.Message

func (*EventPayload) Reset

func (x *EventPayload) Reset()

func (*EventPayload) String

func (x *EventPayload) String() string

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"`
	// contains filtered or unexported fields
}

EventPayloadSettled is emitted when a payload is settled

func (*EventPayloadSettled) Descriptor deprecated

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

Deprecated: Use EventPayloadSettled.ProtoReflect.Descriptor instead.

func (*EventPayloadSettled) GetContractName

func (x *EventPayloadSettled) GetContractName() string

func (*EventPayloadSettled) GetPayloadIndex

func (x *EventPayloadSettled) GetPayloadIndex() uint32

func (*EventPayloadSettled) GetTxHash

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

func (*EventPayloadSettled) ProtoMessage

func (*EventPayloadSettled) ProtoMessage()

func (*EventPayloadSettled) ProtoReflect

func (x *EventPayloadSettled) ProtoReflect() protoreflect.Message

func (*EventPayloadSettled) Reset

func (x *EventPayloadSettled) Reset()

func (*EventPayloadSettled) String

func (x *EventPayloadSettled) String() string

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"`
	// contains filtered or unexported fields
}

EventTxSettled is emitted when a full transaction is settled

func (*EventTxSettled) Descriptor deprecated

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

Deprecated: Use EventTxSettled.ProtoReflect.Descriptor instead.

func (*EventTxSettled) GetSuccess

func (x *EventTxSettled) GetSuccess() bool

func (*EventTxSettled) GetTxHash

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

func (*EventTxSettled) ProtoMessage

func (*EventTxSettled) ProtoMessage()

func (*EventTxSettled) ProtoReflect

func (x *EventTxSettled) ProtoReflect() protoreflect.Message

func (*EventTxSettled) Reset

func (x *EventTxSettled) Reset()

func (*EventTxSettled) String

func (x *EventTxSettled) String() string

type GenesisState

type GenesisState struct {

	// params defines all the parameters of the module.
	Params    *Params              `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	Contracts map[string]*Contract `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

GenesisState is the state that must be provided at genesis.

func (*GenesisState) Descriptor deprecated

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

Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.

func (*GenesisState) GetContracts

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

func (*GenesisState) GetParams

func (x *GenesisState) GetParams() *Params

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) ProtoReflect

func (x *GenesisState) ProtoReflect() protoreflect.Message

func (*GenesisState) Reset

func (x *GenesisState) Reset()

func (*GenesisState) String

func (x *GenesisState) String() string

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) 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"`
	// contains filtered or unexported fields
}

Prove a previously published payload

func (*MsgPublishPayloadProof) Descriptor deprecated

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

Deprecated: Use MsgPublishPayloadProof.ProtoReflect.Descriptor instead.

func (*MsgPublishPayloadProof) GetContractName

func (x *MsgPublishPayloadProof) GetContractName() string

func (*MsgPublishPayloadProof) GetPayloadIndex

func (x *MsgPublishPayloadProof) GetPayloadIndex() uint32

func (*MsgPublishPayloadProof) GetProof

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

func (*MsgPublishPayloadProof) GetTxHash

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

func (*MsgPublishPayloadProof) ProtoMessage

func (*MsgPublishPayloadProof) ProtoMessage()

func (*MsgPublishPayloadProof) ProtoReflect

func (x *MsgPublishPayloadProof) ProtoReflect() protoreflect.Message

func (*MsgPublishPayloadProof) Reset

func (x *MsgPublishPayloadProof) Reset()

func (*MsgPublishPayloadProof) String

func (x *MsgPublishPayloadProof) String() string

type MsgPublishPayloadProofResponse

type MsgPublishPayloadProofResponse struct {
	// contains filtered or unexported fields
}

No response

func (*MsgPublishPayloadProofResponse) Descriptor deprecated

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

Deprecated: Use MsgPublishPayloadProofResponse.ProtoReflect.Descriptor instead.

func (*MsgPublishPayloadProofResponse) ProtoMessage

func (*MsgPublishPayloadProofResponse) ProtoMessage()

func (*MsgPublishPayloadProofResponse) ProtoReflect

func (*MsgPublishPayloadProofResponse) Reset

func (x *MsgPublishPayloadProofResponse) Reset()

func (*MsgPublishPayloadProofResponse) String

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"`
	// contains filtered or unexported fields
}

execute a zk-proven state change - request type

func (*MsgPublishPayloads) Descriptor deprecated

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

Deprecated: Use MsgPublishPayloads.ProtoReflect.Descriptor instead.

func (*MsgPublishPayloads) GetIdentity

func (x *MsgPublishPayloads) GetIdentity() string

func (*MsgPublishPayloads) GetPayloads

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

func (*MsgPublishPayloads) ProtoMessage

func (*MsgPublishPayloads) ProtoMessage()

func (*MsgPublishPayloads) ProtoReflect

func (x *MsgPublishPayloads) ProtoReflect() protoreflect.Message

func (*MsgPublishPayloads) Reset

func (x *MsgPublishPayloads) Reset()

func (*MsgPublishPayloads) String

func (x *MsgPublishPayloads) String() string

type MsgPublishPayloadsResponse

type MsgPublishPayloadsResponse struct {
	// contains filtered or unexported fields
}

No response

func (*MsgPublishPayloadsResponse) Descriptor deprecated

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

Deprecated: Use MsgPublishPayloadsResponse.ProtoReflect.Descriptor instead.

func (*MsgPublishPayloadsResponse) ProtoMessage

func (*MsgPublishPayloadsResponse) ProtoMessage()

func (*MsgPublishPayloadsResponse) ProtoReflect

func (*MsgPublishPayloadsResponse) Reset

func (x *MsgPublishPayloadsResponse) Reset()

func (*MsgPublishPayloadsResponse) String

func (x *MsgPublishPayloadsResponse) String() string

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"`
	// contains filtered or unexported fields
}

Register a contract - request type

func (*MsgRegisterContract) Descriptor deprecated

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

Deprecated: Use MsgRegisterContract.ProtoReflect.Descriptor instead.

func (*MsgRegisterContract) GetContractName

func (x *MsgRegisterContract) GetContractName() string

func (*MsgRegisterContract) GetOwner

func (x *MsgRegisterContract) GetOwner() string

func (*MsgRegisterContract) GetProgramId

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

func (*MsgRegisterContract) GetStateDigest

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

func (*MsgRegisterContract) GetVerifier

func (x *MsgRegisterContract) GetVerifier() string

func (*MsgRegisterContract) ProtoMessage

func (*MsgRegisterContract) ProtoMessage()

func (*MsgRegisterContract) ProtoReflect

func (x *MsgRegisterContract) ProtoReflect() protoreflect.Message

func (*MsgRegisterContract) Reset

func (x *MsgRegisterContract) Reset()

func (*MsgRegisterContract) String

func (x *MsgRegisterContract) String() string

type MsgRegisterContractResponse

type MsgRegisterContractResponse struct {
	// contains filtered or unexported fields
}

Register a contract - response type

func (*MsgRegisterContractResponse) Descriptor deprecated

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

Deprecated: Use MsgRegisterContractResponse.ProtoReflect.Descriptor instead.

func (*MsgRegisterContractResponse) ProtoMessage

func (*MsgRegisterContractResponse) ProtoMessage()

func (*MsgRegisterContractResponse) ProtoReflect

func (*MsgRegisterContractResponse) Reset

func (x *MsgRegisterContractResponse) Reset()

func (*MsgRegisterContractResponse) String

func (x *MsgRegisterContractResponse) String() string

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)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type Params

type Params struct {
	// contains filtered or unexported fields
}

Params defines the parameters of the module.

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) ProtoReflect

func (x *Params) ProtoReflect() protoreflect.Message

func (*Params) Reset

func (x *Params) Reset()

func (*Params) String

func (x *Params) String() string

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"`
	// contains filtered or unexported fields
}

Payload is a blob

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetContractName

func (x *Payload) GetContractName() string

func (*Payload) GetData

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

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*PayloadMetadata) Descriptor deprecated

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

Deprecated: Use PayloadMetadata.ProtoReflect.Descriptor instead.

func (*PayloadMetadata) GetContractName

func (x *PayloadMetadata) GetContractName() string

func (*PayloadMetadata) GetIdentity

func (x *PayloadMetadata) GetIdentity() string

func (*PayloadMetadata) GetInitialState

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

func (*PayloadMetadata) GetNextState

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

func (*PayloadMetadata) GetNextTxHash

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

func (*PayloadMetadata) GetPayloadHash

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

func (*PayloadMetadata) GetSuccess

func (x *PayloadMetadata) GetSuccess() bool

func (*PayloadMetadata) GetVerified

func (x *PayloadMetadata) GetVerified() bool

func (*PayloadMetadata) ProtoMessage

func (*PayloadMetadata) ProtoMessage()

func (*PayloadMetadata) ProtoReflect

func (x *PayloadMetadata) ProtoReflect() protoreflect.Message

func (*PayloadMetadata) Reset

func (x *PayloadMetadata) Reset()

func (*PayloadMetadata) String

func (x *PayloadMetadata) String() string

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
	// contains filtered or unexported fields
}

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

func (*QueryParamsRequest) Descriptor deprecated

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

Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) ProtoReflect

func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message

func (*QueryParamsRequest) Reset

func (x *QueryParamsRequest) Reset()

func (*QueryParamsRequest) String

func (x *QueryParamsRequest) String() string

type QueryParamsResponse

type QueryParamsResponse struct {

	// params defines the parameters of the module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

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

func (*QueryParamsResponse) Descriptor deprecated

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

Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.

func (*QueryParamsResponse) GetParams

func (x *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) ProtoReflect

func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message

func (*QueryParamsResponse) Reset

func (x *QueryParamsResponse) Reset()

func (*QueryParamsResponse) String

func (x *QueryParamsResponse) String() string

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)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

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"`
	// contains filtered or unexported fields
}

SettlementStatusRequest is the request type for the Query/SettlementStatus RPC

func (*SettlementStatusRequest) Descriptor deprecated

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

Deprecated: Use SettlementStatusRequest.ProtoReflect.Descriptor instead.

func (*SettlementStatusRequest) GetTxHash

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

func (*SettlementStatusRequest) ProtoMessage

func (*SettlementStatusRequest) ProtoMessage()

func (*SettlementStatusRequest) ProtoReflect

func (x *SettlementStatusRequest) ProtoReflect() protoreflect.Message

func (*SettlementStatusRequest) Reset

func (x *SettlementStatusRequest) Reset()

func (*SettlementStatusRequest) String

func (x *SettlementStatusRequest) String() string

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"`
	// contains filtered or unexported fields
}

SettlementStatusResponse is the response type for the Query/SettlementStatus RPC

func (*SettlementStatusResponse) Descriptor deprecated

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

Deprecated: Use SettlementStatusResponse.ProtoReflect.Descriptor instead.

func (*SettlementStatusResponse) GetSettled

func (x *SettlementStatusResponse) GetSettled() bool

func (*SettlementStatusResponse) GetSuccess

func (x *SettlementStatusResponse) GetSuccess() bool

func (*SettlementStatusResponse) ProtoMessage

func (*SettlementStatusResponse) ProtoMessage()

func (*SettlementStatusResponse) ProtoReflect

func (x *SettlementStatusResponse) ProtoReflect() protoreflect.Message

func (*SettlementStatusResponse) Reset

func (x *SettlementStatusResponse) Reset()

func (*SettlementStatusResponse) String

func (x *SettlementStatusResponse) String() string

type TxTimeout

type TxTimeout struct {

	// List of transactions to timeout
	Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

TxTimeout is a list of TXs used to timeout

func (*TxTimeout) Descriptor deprecated

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

Deprecated: Use TxTimeout.ProtoReflect.Descriptor instead.

func (*TxTimeout) GetTxs

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

func (*TxTimeout) ProtoMessage

func (*TxTimeout) ProtoMessage()

func (*TxTimeout) ProtoReflect

func (x *TxTimeout) ProtoReflect() protoreflect.Message

func (*TxTimeout) Reset

func (x *TxTimeout) Reset()

func (*TxTimeout) String

func (x *TxTimeout) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) PublishPayloads

func (UnimplementedMsgServer) RegisterContract

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Contract

func (UnimplementedQueryServer) ContractList

func (UnimplementedQueryServer) Params

func (UnimplementedQueryServer) SettlementStatus

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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