maelstrom

package
v0.0.0-...-b4b7c53 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package maelstrom is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package maelstrom is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Blob_Info_FullMethodName              = "/maelstrom.v1.Blob/Info"
	Blob_Submit_FullMethodName            = "/maelstrom.v1.Blob/Submit"
	Blob_Status_FullMethodName            = "/maelstrom.v1.Blob/Status"
	Blob_Balance_FullMethodName           = "/maelstrom.v1.Blob/Balance"
	Blob_Cancel_FullMethodName            = "/maelstrom.v1.Blob/Cancel"
	Blob_Withdraw_FullMethodName          = "/maelstrom.v1.Blob/Withdraw"
	Blob_PendingWithdrawal_FullMethodName = "/maelstrom.v1.Blob/PendingWithdrawal"
)
View Source
const (
	Cosmos_BroadcastTx_FullMethodName = "/maelstrom.v1.Cosmos/BroadcastTx"
)

Variables

View Source
var (
	StatusResponse_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "PENDING",
		2: "BROADCASTING",
		3: "COMMITTED",
		4: "EXPIRED",
	}
	StatusResponse_Status_value = map[string]int32{
		"UNKNOWN":      0,
		"PENDING":      1,
		"BROADCASTING": 2,
		"COMMITTED":    3,
		"EXPIRED":      4,
	}
)

Enum value maps for StatusResponse_Status.

View Source
var (
	Account_PubKeyType_name = map[int32]string{
		0: "UNKNOWN",
		1: "SECP256R1",
		2: "SECP256K1",
		3: "ED25519",
	}
	Account_PubKeyType_value = map[string]int32{
		"UNKNOWN":   0,
		"SECP256R1": 1,
		"SECP256K1": 2,
		"ED25519":   3,
	}
)

Enum value maps for Account_PubKeyType.

View Source
var Blob_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "maelstrom.v1.Blob",
	HandlerType: (*BlobServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Blob_Info_Handler,
		},
		{
			MethodName: "Submit",
			Handler:    _Blob_Submit_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Blob_Status_Handler,
		},
		{
			MethodName: "Balance",
			Handler:    _Blob_Balance_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _Blob_Cancel_Handler,
		},
		{
			MethodName: "Withdraw",
			Handler:    _Blob_Withdraw_Handler,
		},
		{
			MethodName: "PendingWithdrawal",
			Handler:    _Blob_PendingWithdrawal_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "maelstrom/v1/server.proto",
}

Blob_ServiceDesc is the grpc.ServiceDesc for Blob 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 Cosmos_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "maelstrom.v1.Cosmos",
	HandlerType: (*CosmosServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BroadcastTx",
			Handler:    _Cosmos_BroadcastTx_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "maelstrom/v1/cosmos.proto",
}

Cosmos_ServiceDesc is the grpc.ServiceDesc for Cosmos 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 File_maelstrom_v1_cosmos_proto protoreflect.FileDescriptor
View Source
var File_maelstrom_v1_server_proto protoreflect.FileDescriptor
View Source
var File_maelstrom_v1_wire_proto protoreflect.FileDescriptor

Functions

func RegisterBlobHandler

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

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

func RegisterBlobHandlerClient

func RegisterBlobHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlobClient) error

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

func RegisterBlobHandlerFromEndpoint

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

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

func RegisterBlobHandlerServer

func RegisterBlobHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlobServer) error

RegisterBlobHandlerServer registers the http handlers for service Blob to "mux". UnaryRPC :call BlobServer 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 RegisterBlobHandlerFromEndpoint instead.

func RegisterBlobServer

func RegisterBlobServer(s grpc.ServiceRegistrar, srv BlobServer)

func RegisterCosmosHandler

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

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

func RegisterCosmosHandlerClient

func RegisterCosmosHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CosmosClient) error

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

func RegisterCosmosHandlerFromEndpoint

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

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

func RegisterCosmosHandlerServer

func RegisterCosmosHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CosmosServer) error

RegisterCosmosHandlerServer registers the http handlers for service Cosmos to "mux". UnaryRPC :call CosmosServer 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 RegisterCosmosHandlerFromEndpoint instead.

func RegisterCosmosServer

func RegisterCosmosServer(s grpc.ServiceRegistrar, srv CosmosServer)

Types

type Account

type Account struct {
	Balance       uint64             `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	PubKey        []byte             `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
	PubKeyType    Account_PubKeyType `` /* 131-byte string literal not displayed */
	AccountNumber uint64             `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAccountNumber

func (x *Account) GetAccountNumber() uint64

func (*Account) GetBalance

func (x *Account) GetBalance() uint64

func (*Account) GetPubKey

func (x *Account) GetPubKey() []byte

func (*Account) GetPubKeyType

func (x *Account) GetPubKeyType() Account_PubKeyType

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type Account_PubKeyType

type Account_PubKeyType int32
const (
	Account_UNKNOWN   Account_PubKeyType = 0
	Account_SECP256R1 Account_PubKeyType = 1
	Account_SECP256K1 Account_PubKeyType = 2
	Account_ED25519   Account_PubKeyType = 3
)

func (Account_PubKeyType) Descriptor

func (Account_PubKeyType) Enum

func (Account_PubKeyType) EnumDescriptor deprecated

func (Account_PubKeyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Account_PubKeyType.Descriptor instead.

func (Account_PubKeyType) Number

func (Account_PubKeyType) String

func (x Account_PubKeyType) String() string

func (Account_PubKeyType) Type

type BalanceRequest

type BalanceRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceRequest) Descriptor deprecated

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

Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.

func (*BalanceRequest) GetAddress

func (x *BalanceRequest) GetAddress() string

func (*BalanceRequest) ProtoMessage

func (*BalanceRequest) ProtoMessage()

func (*BalanceRequest) ProtoReflect

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

func (*BalanceRequest) Reset

func (x *BalanceRequest) Reset()

func (*BalanceRequest) String

func (x *BalanceRequest) String() string

type BalanceResponse

type BalanceResponse struct {
	Balance uint64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetBalance

func (x *BalanceResponse) GetBalance() uint64

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect

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

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type BlobClient

type BlobClient interface {
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error)
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error)
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error)
	PendingWithdrawal(ctx context.Context, in *PendingWithdrawalRequest, opts ...grpc.CallOption) (*PendingWithdrawalResponse, error)
}

BlobClient is the client API for Blob 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 NewBlobClient

func NewBlobClient(cc grpc.ClientConnInterface) BlobClient

type BlobMeta

type BlobMeta struct {
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	Fee    uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"`
	TxHash []byte `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BlobMeta) Descriptor deprecated

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

Deprecated: Use BlobMeta.ProtoReflect.Descriptor instead.

func (*BlobMeta) GetFee

func (x *BlobMeta) GetFee() uint64

func (*BlobMeta) GetSigner

func (x *BlobMeta) GetSigner() string

func (*BlobMeta) GetTxHash

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

func (*BlobMeta) ProtoMessage

func (*BlobMeta) ProtoMessage()

func (*BlobMeta) ProtoReflect

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

func (*BlobMeta) Reset

func (x *BlobMeta) Reset()

func (*BlobMeta) String

func (x *BlobMeta) String() string

type BlobServer

BlobServer is the server API for Blob service. All implementations must embed UnimplementedBlobServer for forward compatibility

type BlobTx

type BlobTx struct {
	TxIds         []uint64 `protobuf:"varint,1,rep,packed,name=tx_ids,json=txIds,proto3" json:"tx_ids,omitempty"`
	TimeoutHeight uint64   `protobuf:"varint,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"`
	// contains filtered or unexported fields
}

func (*BlobTx) Descriptor deprecated

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

Deprecated: Use BlobTx.ProtoReflect.Descriptor instead.

func (*BlobTx) GetTimeoutHeight

func (x *BlobTx) GetTimeoutHeight() uint64

func (*BlobTx) GetTxIds

func (x *BlobTx) GetTxIds() []uint64

func (*BlobTx) ProtoMessage

func (*BlobTx) ProtoMessage()

func (*BlobTx) ProtoReflect

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

func (*BlobTx) Reset

func (x *BlobTx) Reset()

func (*BlobTx) String

func (x *BlobTx) String() string

type BroadcastTxRequest

type BroadcastTxRequest struct {

	// tx_bytes is the raw transaction.
	TxBytes []byte `protobuf:"bytes,1,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastTxRequest) Descriptor deprecated

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

Deprecated: Use BroadcastTxRequest.ProtoReflect.Descriptor instead.

func (*BroadcastTxRequest) GetTxBytes

func (x *BroadcastTxRequest) GetTxBytes() []byte

func (*BroadcastTxRequest) ProtoMessage

func (*BroadcastTxRequest) ProtoMessage()

func (*BroadcastTxRequest) ProtoReflect

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

func (*BroadcastTxRequest) Reset

func (x *BroadcastTxRequest) Reset()

func (*BroadcastTxRequest) String

func (x *BroadcastTxRequest) String() string

type BroadcastTxResponse

type BroadcastTxResponse struct {
	Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastTxResponse) Descriptor deprecated

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

Deprecated: Use BroadcastTxResponse.ProtoReflect.Descriptor instead.

func (*BroadcastTxResponse) GetId

func (x *BroadcastTxResponse) GetId() uint64

func (*BroadcastTxResponse) ProtoMessage

func (*BroadcastTxResponse) ProtoMessage()

func (*BroadcastTxResponse) ProtoReflect

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

func (*BroadcastTxResponse) Reset

func (x *BroadcastTxResponse) Reset()

func (*BroadcastTxResponse) String

func (x *BroadcastTxResponse) String() string

type CancelRequest

type CancelRequest struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelRequest) Descriptor deprecated

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

Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead.

func (*CancelRequest) GetId

func (x *CancelRequest) GetId() uint64

func (*CancelRequest) GetSignature

func (x *CancelRequest) GetSignature() []byte

func (*CancelRequest) ProtoMessage

func (*CancelRequest) ProtoMessage()

func (*CancelRequest) ProtoReflect

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

func (*CancelRequest) Reset

func (x *CancelRequest) Reset()

func (*CancelRequest) String

func (x *CancelRequest) String() string

type CancelResponse

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

func (*CancelResponse) Descriptor deprecated

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

Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead.

func (*CancelResponse) ProtoMessage

func (*CancelResponse) ProtoMessage()

func (*CancelResponse) ProtoReflect

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

func (*CancelResponse) Reset

func (x *CancelResponse) Reset()

func (*CancelResponse) String

func (x *CancelResponse) String() string

type CosmosClient

type CosmosClient interface {
	// BroadcastTx mimics the gRPC endpoint for the Cosmos SDK's tx service. This allows easier compatibility
	// for clients. They can simply redirect their endpoint to the Maelstrom service and continue submitting
	// BlobTxs. Maelstrom will decode them, verify the signer and signature, extract the blobs and aggregate
	// them with others, eventually submitting them to the main chain
	BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error)
}

CosmosClient is the client API for Cosmos 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 NewCosmosClient

func NewCosmosClient(cc grpc.ClientConnInterface) CosmosClient

type CosmosServer

type CosmosServer interface {
	// BroadcastTx mimics the gRPC endpoint for the Cosmos SDK's tx service. This allows easier compatibility
	// for clients. They can simply redirect their endpoint to the Maelstrom service and continue submitting
	// BlobTxs. Maelstrom will decode them, verify the signer and signature, extract the blobs and aggregate
	// them with others, eventually submitting them to the main chain
	BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error)
	// contains filtered or unexported methods
}

CosmosServer is the server API for Cosmos service. All implementations must embed UnimplementedCosmosServer for forward compatibility

type InfoRequest

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

func (*InfoRequest) Descriptor deprecated

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

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect

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

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {
	Address     string  `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Height      uint64  `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	MinGasPrice float64 `protobuf:"fixed64,3,opt,name=min_gas_price,json=minGasPrice,proto3" json:"min_gas_price,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoResponse) Descriptor deprecated

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

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetAddress

func (x *InfoResponse) GetAddress() string

func (*InfoResponse) GetHeight

func (x *InfoResponse) GetHeight() uint64

func (*InfoResponse) GetMinGasPrice

func (x *InfoResponse) GetMinGasPrice() float64

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

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

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type Options

type Options struct {
	TimeoutBlocks    uint64 `protobuf:"varint,1,opt,name=timeout_blocks,json=timeoutBlocks,proto3" json:"timeout_blocks,omitempty"`
	Compact          bool   `protobuf:"varint,2,opt,name=compact,proto3" json:"compact,omitempty"`
	NamespaceVersion uint32 `protobuf:"varint,3,opt,name=namespace_version,json=namespaceVersion,proto3" json:"namespace_version,omitempty"`
	ShareVersion     uint32 `protobuf:"varint,4,opt,name=share_version,json=shareVersion,proto3" json:"share_version,omitempty"`
	// contains filtered or unexported fields
}

func (*Options) Descriptor deprecated

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

Deprecated: Use Options.ProtoReflect.Descriptor instead.

func (*Options) GetCompact

func (x *Options) GetCompact() bool

func (*Options) GetNamespaceVersion

func (x *Options) GetNamespaceVersion() uint32

func (*Options) GetShareVersion

func (x *Options) GetShareVersion() uint32

func (*Options) GetTimeoutBlocks

func (x *Options) GetTimeoutBlocks() uint64

func (*Options) ProtoMessage

func (*Options) ProtoMessage()

func (*Options) ProtoReflect

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

func (*Options) Reset

func (x *Options) Reset()

func (*Options) String

func (x *Options) String() string

type PendingWithdrawalRequest

type PendingWithdrawalRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*PendingWithdrawalRequest) Descriptor deprecated

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

Deprecated: Use PendingWithdrawalRequest.ProtoReflect.Descriptor instead.

func (*PendingWithdrawalRequest) GetAddress

func (x *PendingWithdrawalRequest) GetAddress() string

func (*PendingWithdrawalRequest) ProtoMessage

func (*PendingWithdrawalRequest) ProtoMessage()

func (*PendingWithdrawalRequest) ProtoReflect

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

func (*PendingWithdrawalRequest) Reset

func (x *PendingWithdrawalRequest) Reset()

func (*PendingWithdrawalRequest) String

func (x *PendingWithdrawalRequest) String() string

type PendingWithdrawalResponse

type PendingWithdrawalResponse struct {
	Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*PendingWithdrawalResponse) Descriptor deprecated

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

Deprecated: Use PendingWithdrawalResponse.ProtoReflect.Descriptor instead.

func (*PendingWithdrawalResponse) GetAmount

func (x *PendingWithdrawalResponse) GetAmount() uint64

func (*PendingWithdrawalResponse) ProtoMessage

func (*PendingWithdrawalResponse) ProtoMessage()

func (*PendingWithdrawalResponse) ProtoReflect

func (*PendingWithdrawalResponse) Reset

func (x *PendingWithdrawalResponse) Reset()

func (*PendingWithdrawalResponse) String

func (x *PendingWithdrawalResponse) String() string

type StatusRequest

type StatusRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetId

func (x *StatusRequest) GetId() uint64

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Status StatusResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=maelstrom.v1.StatusResponse_Status" json:"status,omitempty"`
	// If the tx is pending, these fields will be populated
	InsertHeight uint64 `protobuf:"varint,2,opt,name=insert_height,json=insertHeight,proto3" json:"insert_height,omitempty"`
	ExpiryHeight uint64 `protobuf:"varint,3,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
	// if the tx is committed, thid field will be populated
	TxHash []byte `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetExpiryHeight

func (x *StatusResponse) GetExpiryHeight() uint64

func (*StatusResponse) GetInsertHeight

func (x *StatusResponse) GetInsertHeight() uint64

func (*StatusResponse) GetStatus

func (x *StatusResponse) GetStatus() StatusResponse_Status

func (*StatusResponse) GetTxHash

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

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type StatusResponse_Status

type StatusResponse_Status int32
const (
	StatusResponse_UNKNOWN      StatusResponse_Status = 0
	StatusResponse_PENDING      StatusResponse_Status = 1
	StatusResponse_BROADCASTING StatusResponse_Status = 2
	StatusResponse_COMMITTED    StatusResponse_Status = 3
	StatusResponse_EXPIRED      StatusResponse_Status = 4
)

func (StatusResponse_Status) Descriptor

func (StatusResponse_Status) Enum

func (StatusResponse_Status) EnumDescriptor deprecated

func (StatusResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use StatusResponse_Status.Descriptor instead.

func (StatusResponse_Status) Number

func (StatusResponse_Status) String

func (x StatusResponse_Status) String() string

func (StatusResponse_Status) Type

type SubmitRequest

type SubmitRequest struct {
	Signer    string   `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	Namespace []byte   `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Blobs     [][]byte `protobuf:"bytes,3,rep,name=blobs,proto3" json:"blobs,omitempty"`
	Fee       uint64   `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
	Signature []byte   `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	Options   *Options `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitRequest) Descriptor deprecated

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

Deprecated: Use SubmitRequest.ProtoReflect.Descriptor instead.

func (*SubmitRequest) GetBlobs

func (x *SubmitRequest) GetBlobs() [][]byte

func (*SubmitRequest) GetFee

func (x *SubmitRequest) GetFee() uint64

func (*SubmitRequest) GetNamespace

func (x *SubmitRequest) GetNamespace() []byte

func (*SubmitRequest) GetOptions

func (x *SubmitRequest) GetOptions() *Options

func (*SubmitRequest) GetSignature

func (x *SubmitRequest) GetSignature() []byte

func (*SubmitRequest) GetSigner

func (x *SubmitRequest) GetSigner() string

func (*SubmitRequest) ProtoMessage

func (*SubmitRequest) ProtoMessage()

func (*SubmitRequest) ProtoReflect

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

func (*SubmitRequest) Reset

func (x *SubmitRequest) Reset()

func (*SubmitRequest) String

func (x *SubmitRequest) String() string

type SubmitResponse

type SubmitResponse struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitResponse) Descriptor deprecated

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

Deprecated: Use SubmitResponse.ProtoReflect.Descriptor instead.

func (*SubmitResponse) GetId

func (x *SubmitResponse) GetId() uint64

func (*SubmitResponse) ProtoMessage

func (*SubmitResponse) ProtoMessage()

func (*SubmitResponse) ProtoReflect

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

func (*SubmitResponse) Reset

func (x *SubmitResponse) Reset()

func (*SubmitResponse) String

func (x *SubmitResponse) String() string

type UnimplementedBlobServer

type UnimplementedBlobServer struct {
}

UnimplementedBlobServer must be embedded to have forward compatible implementations.

func (UnimplementedBlobServer) Balance

func (UnimplementedBlobServer) Cancel

func (UnimplementedBlobServer) Info

func (UnimplementedBlobServer) Status

func (UnimplementedBlobServer) Submit

func (UnimplementedBlobServer) Withdraw

type UnimplementedCosmosServer

type UnimplementedCosmosServer struct {
}

UnimplementedCosmosServer must be embedded to have forward compatible implementations.

func (UnimplementedCosmosServer) BroadcastTx

type UnsafeBlobServer

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

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

type UnsafeCosmosServer

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

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

type WithdrawRequest

type WithdrawRequest struct {
	Signer    string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	Balance   uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
	Amount    uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*WithdrawRequest) Descriptor deprecated

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

Deprecated: Use WithdrawRequest.ProtoReflect.Descriptor instead.

func (*WithdrawRequest) GetAmount

func (x *WithdrawRequest) GetAmount() uint64

func (*WithdrawRequest) GetBalance

func (x *WithdrawRequest) GetBalance() uint64

func (*WithdrawRequest) GetSignature

func (x *WithdrawRequest) GetSignature() []byte

func (*WithdrawRequest) GetSigner

func (x *WithdrawRequest) GetSigner() string

func (*WithdrawRequest) GetTimestamp

func (x *WithdrawRequest) GetTimestamp() uint64

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) ProtoReflect

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

func (*WithdrawRequest) Reset

func (x *WithdrawRequest) Reset()

func (*WithdrawRequest) String

func (x *WithdrawRequest) String() string

type WithdrawResponse

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

func (*WithdrawResponse) Descriptor deprecated

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

Deprecated: Use WithdrawResponse.ProtoReflect.Descriptor instead.

func (*WithdrawResponse) ProtoMessage

func (*WithdrawResponse) ProtoMessage()

func (*WithdrawResponse) ProtoReflect

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

func (*WithdrawResponse) Reset

func (x *WithdrawResponse) Reset()

func (*WithdrawResponse) String

func (x *WithdrawResponse) String() string

type Withdrawal

type Withdrawal struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Amount  uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*Withdrawal) Descriptor deprecated

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

Deprecated: Use Withdrawal.ProtoReflect.Descriptor instead.

func (*Withdrawal) GetAddress

func (x *Withdrawal) GetAddress() string

func (*Withdrawal) GetAmount

func (x *Withdrawal) GetAmount() uint64

func (*Withdrawal) ProtoMessage

func (*Withdrawal) ProtoMessage()

func (*Withdrawal) ProtoReflect

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

func (*Withdrawal) Reset

func (x *Withdrawal) Reset()

func (*Withdrawal) String

func (x *Withdrawal) String() string

type WithdrawalTx

type WithdrawalTx struct {
	Withdrawals   []*Withdrawal `protobuf:"bytes,1,rep,name=withdrawals,proto3" json:"withdrawals,omitempty"`
	TimeoutHeight uint64        `protobuf:"varint,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"`
	// contains filtered or unexported fields
}

func (*WithdrawalTx) Descriptor deprecated

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

Deprecated: Use WithdrawalTx.ProtoReflect.Descriptor instead.

func (*WithdrawalTx) GetTimeoutHeight

func (x *WithdrawalTx) GetTimeoutHeight() uint64

func (*WithdrawalTx) GetWithdrawals

func (x *WithdrawalTx) GetWithdrawals() []*Withdrawal

func (*WithdrawalTx) ProtoMessage

func (*WithdrawalTx) ProtoMessage()

func (*WithdrawalTx) ProtoReflect

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

func (*WithdrawalTx) Reset

func (x *WithdrawalTx) Reset()

func (*WithdrawalTx) String

func (x *WithdrawalTx) String() string

Jump to

Keyboard shortcuts

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