maelstrom

package
v0.0.0-...-ba30ba3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package maelstrom is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Maelstrom_Info_FullMethodName              = "/maelstrom.v1.Maelstrom/Info"
	Maelstrom_Submit_FullMethodName            = "/maelstrom.v1.Maelstrom/Submit"
	Maelstrom_Status_FullMethodName            = "/maelstrom.v1.Maelstrom/Status"
	Maelstrom_Balance_FullMethodName           = "/maelstrom.v1.Maelstrom/Balance"
	Maelstrom_Cancel_FullMethodName            = "/maelstrom.v1.Maelstrom/Cancel"
	Maelstrom_Withdraw_FullMethodName          = "/maelstrom.v1.Maelstrom/Withdraw"
	Maelstrom_PendingWithdrawal_FullMethodName = "/maelstrom.v1.Maelstrom/PendingWithdrawal"
	Maelstrom_BroadcastTx_FullMethodName       = "/maelstrom.v1.Maelstrom/BroadcastTx"
	Maelstrom_AccountInfo_FullMethodName       = "/maelstrom.v1.Maelstrom/AccountInfo"
)

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 File_maelstrom_v1_server_proto protoreflect.FileDescriptor
View Source
var File_maelstrom_v1_wire_proto protoreflect.FileDescriptor
View Source
var Maelstrom_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "maelstrom.v1.Maelstrom",
	HandlerType: (*MaelstromServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Maelstrom_Info_Handler,
		},
		{
			MethodName: "Submit",
			Handler:    _Maelstrom_Submit_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Maelstrom_Status_Handler,
		},
		{
			MethodName: "Balance",
			Handler:    _Maelstrom_Balance_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _Maelstrom_Cancel_Handler,
		},
		{
			MethodName: "Withdraw",
			Handler:    _Maelstrom_Withdraw_Handler,
		},
		{
			MethodName: "PendingWithdrawal",
			Handler:    _Maelstrom_PendingWithdrawal_Handler,
		},
		{
			MethodName: "BroadcastTx",
			Handler:    _Maelstrom_BroadcastTx_Handler,
		},
		{
			MethodName: "AccountInfo",
			Handler:    _Maelstrom_AccountInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "maelstrom/v1/server.proto",
}

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

Functions

func RegisterMaelstromHandler

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

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

func RegisterMaelstromHandlerClient

func RegisterMaelstromHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MaelstromClient) error

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

func RegisterMaelstromHandlerFromEndpoint

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

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

func RegisterMaelstromHandlerServer

func RegisterMaelstromHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MaelstromServer) error

RegisterMaelstromHandlerServer registers the http handlers for service Maelstrom to "mux". UnaryRPC :call MaelstromServer 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 RegisterMaelstromHandlerFromEndpoint instead.

func RegisterMaelstromServer

func RegisterMaelstromServer(s grpc.ServiceRegistrar, srv MaelstromServer)

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 AccountInfoRequest

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

func (*AccountInfoRequest) Descriptor deprecated

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

Deprecated: Use AccountInfoRequest.ProtoReflect.Descriptor instead.

func (*AccountInfoRequest) GetAddress

func (x *AccountInfoRequest) GetAddress() string

func (*AccountInfoRequest) ProtoMessage

func (*AccountInfoRequest) ProtoMessage()

func (*AccountInfoRequest) ProtoReflect

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

func (*AccountInfoRequest) Reset

func (x *AccountInfoRequest) Reset()

func (*AccountInfoRequest) String

func (x *AccountInfoRequest) String() string

type AccountInfoResponse

type AccountInfoResponse struct {
	AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	Sequence      uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountInfoResponse) Descriptor deprecated

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

Deprecated: Use AccountInfoResponse.ProtoReflect.Descriptor instead.

func (*AccountInfoResponse) GetAccountNumber

func (x *AccountInfoResponse) GetAccountNumber() uint64

func (*AccountInfoResponse) GetSequence

func (x *AccountInfoResponse) GetSequence() uint64

func (*AccountInfoResponse) ProtoMessage

func (*AccountInfoResponse) ProtoMessage()

func (*AccountInfoResponse) ProtoReflect

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

func (*AccountInfoResponse) Reset

func (x *AccountInfoResponse) Reset()

func (*AccountInfoResponse) String

func (x *AccountInfoResponse) 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 {
	MaelstromBalance uint64 `protobuf:"varint,1,opt,name=maelstrom_balance,json=maelstromBalance,proto3" json:"maelstrom_balance,omitempty"`
	CelestiaBalance  uint64 `protobuf:"varint,2,opt,name=celestia_balance,json=celestiaBalance,proto3" json:"celestia_balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetCelestiaBalance

func (x *BalanceResponse) GetCelestiaBalance() uint64

func (*BalanceResponse) GetMaelstromBalance

func (x *BalanceResponse) GetMaelstromBalance() 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 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 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
}

BroadcastTxRequest matches the fields and types of the BroadcastTxRequest in the Cosmos SDK

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 {
	TxResponse *types.TxResponse `protobuf:"bytes,1,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"`
	// the ID is additional information and relates to the ID
	// used to track the status of the blob in maelstrom
	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) GetTxResponse

func (x *BroadcastTxResponse) GetTxResponse() *types.TxResponse

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 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"`
	ChainId     string  `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	MinGasPrice float64 `protobuf:"fixed64,4,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) GetChainId

func (x *InfoResponse) GetChainId() 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 MaelstromClient

type MaelstromClient interface {
	// Info
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	// Submit
	Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error)
	// Status
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// Balance
	Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	// Cancel
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error)
	// Withdraw
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error)
	// Pending Withdrawal
	PendingWithdrawal(ctx context.Context, in *PendingWithdrawalRequest, opts ...grpc.CallOption) (*PendingWithdrawalResponse, error)
	// 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)
	// AccountInfo returns the sequence and account number of the account on Celestia.
	// It does this by proxying the request to the underlying consensus node.
	AccountInfo(ctx context.Context, in *AccountInfoRequest, opts ...grpc.CallOption) (*AccountInfoResponse, error)
}

MaelstromClient is the client API for Maelstrom 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 NewMaelstromClient

func NewMaelstromClient(cc grpc.ClientConnInterface) MaelstromClient

type MaelstromServer

type MaelstromServer interface {
	// Info
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
	// Submit
	Submit(context.Context, *SubmitRequest) (*SubmitResponse, error)
	// Status
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// Balance
	Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
	// Cancel
	Cancel(context.Context, *CancelRequest) (*CancelResponse, error)
	// Withdraw
	Withdraw(context.Context, *WithdrawRequest) (*WithdrawResponse, error)
	// Pending Withdrawal
	PendingWithdrawal(context.Context, *PendingWithdrawalRequest) (*PendingWithdrawalResponse, error)
	// 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)
	// AccountInfo returns the sequence and account number of the account on Celestia.
	// It does this by proxying the request to the underlying consensus node.
	AccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error)
	// contains filtered or unexported methods
}

MaelstromServer is the server API for Maelstrom service. All implementations must embed UnimplementedMaelstromServer for forward compatibility

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 UnimplementedMaelstromServer

type UnimplementedMaelstromServer struct {
}

UnimplementedMaelstromServer must be embedded to have forward compatible implementations.

func (UnimplementedMaelstromServer) AccountInfo

func (UnimplementedMaelstromServer) Balance

func (UnimplementedMaelstromServer) BroadcastTx

func (UnimplementedMaelstromServer) Cancel

func (UnimplementedMaelstromServer) Info

func (UnimplementedMaelstromServer) PendingWithdrawal

func (UnimplementedMaelstromServer) Status

func (UnimplementedMaelstromServer) Submit

func (UnimplementedMaelstromServer) Withdraw

type UnsafeMaelstromServer

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

UnsafeMaelstromServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MaelstromServer 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