From c8674eec51638286f471194be84135cfb3cafbcb Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 28 Apr 2021 21:45:37 +0300 Subject: [PATCH] Add the generated exchange api client stubs --- Makefile | 13 + README.md | 10 + exchange/accounts_rpc/client/client.go | 165 + exchange/accounts_rpc/client/encode_decode.go | 202 + exchange/accounts_rpc/client/types.go | 440 +++ .../pb/injective_accounts_rpc.pb.go | 1257 +++++++ .../pb/injective_accounts_rpc.proto | 130 + .../pb/injective_accounts_rpc_grpc.pb.go | 287 ++ .../derivative_exchange_rpc/client/client.go | 394 ++ .../client/encode_decode.go | 450 +++ .../derivative_exchange_rpc/client/types.go | 1175 ++++++ .../injective_derivative_exchange_rpc.pb.go | 3293 +++++++++++++++++ .../injective_derivative_exchange_rpc.proto | 380 ++ ...jective_derivative_exchange_rpc_grpc.pb.go | 633 ++++ exchange/exchange_rpc/client/client.go | 131 + exchange/exchange_rpc/client/encode_decode.go | 168 + exchange/exchange_rpc/client/types.go | 240 ++ .../pb/injective_exchange_rpc.pb.go | 1281 +++++++ .../pb/injective_exchange_rpc.proto | 151 + .../pb/injective_exchange_rpc_grpc.pb.go | 255 ++ exchange/spot_exchange_rpc/client/client.go | 358 ++ .../spot_exchange_rpc/client/encode_decode.go | 412 +++ exchange/spot_exchange_rpc/client/types.go | 1016 +++++ .../pb/injective_spot_exchange_rpc.pb.go | 2773 ++++++++++++++ .../pb/injective_spot_exchange_rpc.proto | 311 ++ .../pb/injective_spot_exchange_rpc_grpc.pb.go | 593 +++ 26 files changed, 16518 insertions(+) create mode 100644 Makefile create mode 100644 exchange/accounts_rpc/client/client.go create mode 100644 exchange/accounts_rpc/client/encode_decode.go create mode 100644 exchange/accounts_rpc/client/types.go create mode 100644 exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go create mode 100644 exchange/accounts_rpc/pb/injective_accounts_rpc.proto create mode 100644 exchange/accounts_rpc/pb/injective_accounts_rpc_grpc.pb.go create mode 100644 exchange/derivative_exchange_rpc/client/client.go create mode 100644 exchange/derivative_exchange_rpc/client/encode_decode.go create mode 100644 exchange/derivative_exchange_rpc/client/types.go create mode 100644 exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go create mode 100644 exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto create mode 100644 exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc_grpc.pb.go create mode 100644 exchange/exchange_rpc/client/client.go create mode 100644 exchange/exchange_rpc/client/encode_decode.go create mode 100644 exchange/exchange_rpc/client/types.go create mode 100644 exchange/exchange_rpc/pb/injective_exchange_rpc.pb.go create mode 100644 exchange/exchange_rpc/pb/injective_exchange_rpc.proto create mode 100644 exchange/exchange_rpc/pb/injective_exchange_rpc_grpc.pb.go create mode 100644 exchange/spot_exchange_rpc/client/client.go create mode 100644 exchange/spot_exchange_rpc/client/encode_decode.go create mode 100644 exchange/spot_exchange_rpc/client/types.go create mode 100644 exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.go create mode 100644 exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto create mode 100644 exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc_grpc.pb.go diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..0f7f7c88 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +all: + +copy-exchange-client: + cp -r ../injective-exchange/api/gen/grpc/injective_exchange_rpc exchange/exchange_rpc + cp -r ../injective-exchange/api/gen/grpc/injective_accounts_rpc exchange/accounts_rpc + cp -r ../injective-exchange/api/gen/grpc/injective_spot_exchange_rpc exchange/spot_exchange_rpc + cp -r ../injective-exchange/api/gen/grpc/injective_derivative_exchange_rpc exchange/derivative_exchange_rpc + rm -rf exchange/exchange_rpc/server + rm -rf exchange/accounts_rpc/server + rm -rf exchange/spot_exchange_rpc/server + rm -rf exchange/derivative_exchange_rpc/server + +.PHONY: copy-exchange-client diff --git a/README.md b/README.md index 7a942ce9..536970be 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,16 @@ $ go install ./... --- +## Updating Exchange API proto and client + +```bash +$ make copy-exchange-client +``` + +(you have to clone [this repo](https://github.com/InjectiveLabs/injective-exchange) into `../injective-exchange`) + +--- + ## Publishing Tagged Release ```bash diff --git a/exchange/accounts_rpc/client/client.go b/exchange/accounts_rpc/client/client.go new file mode 100644 index 00000000..a4f94196 --- /dev/null +++ b/exchange/accounts_rpc/client/client.go @@ -0,0 +1,165 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveAccountsRPC gRPC client +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_accounts_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_accounts_rpc/pb" + injectiveaccountsrpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_accounts_rpc" + goagrpc "goa.design/goa/v3/grpc" + goapb "goa.design/goa/v3/grpc/pb" + goa "goa.design/goa/v3/pkg" + "google.golang.org/grpc" +) + +// Client lists the service endpoint gRPC clients. +type Client struct { + grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient + opts []grpc.CallOption +} + +// StreamSubaccountBalanceClientStream implements the +// injectiveaccountsrpc.StreamSubaccountBalanceClientStream interface. +type StreamSubaccountBalanceClientStream struct { + stream injective_accounts_rpcpb.InjectiveAccountsRPC_StreamSubaccountBalanceClient +} + +// NewClient instantiates gRPC client for all the InjectiveAccountsRPC service +// servers. +func NewClient(cc *grpc.ClientConn, opts ...grpc.CallOption) *Client { + return &Client{ + grpccli: injective_accounts_rpcpb.NewInjectiveAccountsRPCClient(cc), + opts: opts, + } +} + +// SubaccountsList calls the "SubaccountsList" function in +// injective_accounts_rpcpb.InjectiveAccountsRPCClient interface. +func (c *Client) SubaccountsList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountsListFunc(c.grpccli, c.opts...), + EncodeSubaccountsListRequest, + DecodeSubaccountsListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountBalancesList calls the "SubaccountBalancesList" function in +// injective_accounts_rpcpb.InjectiveAccountsRPCClient interface. +func (c *Client) SubaccountBalancesList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountBalancesListFunc(c.grpccli, c.opts...), + EncodeSubaccountBalancesListRequest, + DecodeSubaccountBalancesListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountBalanceEndpoint calls the "SubaccountBalanceEndpoint" function in +// injective_accounts_rpcpb.InjectiveAccountsRPCClient interface. +func (c *Client) SubaccountBalanceEndpoint() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountBalanceEndpointFunc(c.grpccli, c.opts...), + EncodeSubaccountBalanceEndpointRequest, + DecodeSubaccountBalanceEndpointResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamSubaccountBalance calls the "StreamSubaccountBalance" function in +// injective_accounts_rpcpb.InjectiveAccountsRPCClient interface. +func (c *Client) StreamSubaccountBalance() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamSubaccountBalanceFunc(c.grpccli, c.opts...), + EncodeStreamSubaccountBalanceRequest, + DecodeStreamSubaccountBalanceResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountHistory calls the "SubaccountHistory" function in +// injective_accounts_rpcpb.InjectiveAccountsRPCClient interface. +func (c *Client) SubaccountHistory() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountHistoryFunc(c.grpccli, c.opts...), + EncodeSubaccountHistoryRequest, + DecodeSubaccountHistoryResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Recv reads instances of +// "injective_accounts_rpcpb.StreamSubaccountBalanceResponse" from the +// "streamSubaccountBalance" endpoint gRPC stream. +func (s *StreamSubaccountBalanceClientStream) Recv() (*injectiveaccountsrpc.StreamSubaccountBalanceResult, error) { + var res *injectiveaccountsrpc.StreamSubaccountBalanceResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamSubaccountBalanceResponse(v); err != nil { + return res, err + } + return NewStreamSubaccountBalanceResult(v), nil +} diff --git a/exchange/accounts_rpc/client/encode_decode.go b/exchange/accounts_rpc/client/encode_decode.go new file mode 100644 index 00000000..0fd8ef68 --- /dev/null +++ b/exchange/accounts_rpc/client/encode_decode.go @@ -0,0 +1,202 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveAccountsRPC gRPC client encoders and decoders +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_accounts_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_accounts_rpc/pb" + injectiveaccountsrpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_accounts_rpc" + goagrpc "goa.design/goa/v3/grpc" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// BuildSubaccountsListFunc builds the remote method to invoke for +// "InjectiveAccountsRPC" service "subaccountsList" endpoint. +func BuildSubaccountsListFunc(grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountsList(ctx, reqpb.(*injective_accounts_rpcpb.SubaccountsListRequest), opts...) + } + return grpccli.SubaccountsList(ctx, &injective_accounts_rpcpb.SubaccountsListRequest{}, opts...) + } +} + +// EncodeSubaccountsListRequest encodes requests sent to InjectiveAccountsRPC +// subaccountsList endpoint. +func EncodeSubaccountsListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveaccountsrpc.SubaccountsListPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountsList", "*injectiveaccountsrpc.SubaccountsListPayload", v) + } + return NewSubaccountsListRequest(payload), nil +} + +// DecodeSubaccountsListResponse decodes responses from the +// InjectiveAccountsRPC subaccountsList endpoint. +func DecodeSubaccountsListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_accounts_rpcpb.SubaccountsListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountsList", "*injective_accounts_rpcpb.SubaccountsListResponse", v) + } + if err := ValidateSubaccountsListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountsListResult(message) + return res, nil +} + +// BuildSubaccountBalancesListFunc builds the remote method to invoke for +// "InjectiveAccountsRPC" service "subaccountBalancesList" endpoint. +func BuildSubaccountBalancesListFunc(grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountBalancesList(ctx, reqpb.(*injective_accounts_rpcpb.SubaccountBalancesListRequest), opts...) + } + return grpccli.SubaccountBalancesList(ctx, &injective_accounts_rpcpb.SubaccountBalancesListRequest{}, opts...) + } +} + +// EncodeSubaccountBalancesListRequest encodes requests sent to +// InjectiveAccountsRPC subaccountBalancesList endpoint. +func EncodeSubaccountBalancesListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveaccountsrpc.SubaccountBalanceFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountBalancesList", "*injectiveaccountsrpc.SubaccountBalanceFilter", v) + } + return NewSubaccountBalancesListRequest(payload), nil +} + +// DecodeSubaccountBalancesListResponse decodes responses from the +// InjectiveAccountsRPC subaccountBalancesList endpoint. +func DecodeSubaccountBalancesListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_accounts_rpcpb.SubaccountBalancesListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountBalancesList", "*injective_accounts_rpcpb.SubaccountBalancesListResponse", v) + } + if err := ValidateSubaccountBalancesListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountBalancesListResult(message) + return res, nil +} + +// BuildSubaccountBalanceEndpointFunc builds the remote method to invoke for +// "InjectiveAccountsRPC" service "subaccountBalance" endpoint. +func BuildSubaccountBalanceEndpointFunc(grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountBalanceEndpoint(ctx, reqpb.(*injective_accounts_rpcpb.SubaccountBalanceRequest), opts...) + } + return grpccli.SubaccountBalanceEndpoint(ctx, &injective_accounts_rpcpb.SubaccountBalanceRequest{}, opts...) + } +} + +// EncodeSubaccountBalanceEndpointRequest encodes requests sent to +// InjectiveAccountsRPC subaccountBalance endpoint. +func EncodeSubaccountBalanceEndpointRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveaccountsrpc.SubaccountBalancePayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountBalance", "*injectiveaccountsrpc.SubaccountBalancePayload", v) + } + return NewSubaccountBalanceRequest(payload), nil +} + +// DecodeSubaccountBalanceEndpointResponse decodes responses from the +// InjectiveAccountsRPC subaccountBalance endpoint. +func DecodeSubaccountBalanceEndpointResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_accounts_rpcpb.SubaccountBalanceResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountBalance", "*injective_accounts_rpcpb.SubaccountBalanceResponse", v) + } + if err := ValidateSubaccountBalanceResponse(message); err != nil { + return nil, err + } + res := NewSubaccountBalanceResult(message) + return res, nil +} + +// BuildStreamSubaccountBalanceFunc builds the remote method to invoke for +// "InjectiveAccountsRPC" service "streamSubaccountBalance" endpoint. +func BuildStreamSubaccountBalanceFunc(grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamSubaccountBalance(ctx, reqpb.(*injective_accounts_rpcpb.StreamSubaccountBalanceRequest), opts...) + } + return grpccli.StreamSubaccountBalance(ctx, &injective_accounts_rpcpb.StreamSubaccountBalanceRequest{}, opts...) + } +} + +// EncodeStreamSubaccountBalanceRequest encodes requests sent to +// InjectiveAccountsRPC streamSubaccountBalance endpoint. +func EncodeStreamSubaccountBalanceRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveaccountsrpc.SubaccountBalanceFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "streamSubaccountBalance", "*injectiveaccountsrpc.SubaccountBalanceFilter", v) + } + return NewStreamSubaccountBalanceRequest(payload), nil +} + +// DecodeStreamSubaccountBalanceResponse decodes responses from the +// InjectiveAccountsRPC streamSubaccountBalance endpoint. +func DecodeStreamSubaccountBalanceResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamSubaccountBalanceClientStream{ + stream: v.(injective_accounts_rpcpb.InjectiveAccountsRPC_StreamSubaccountBalanceClient), + }, nil +} + +// BuildSubaccountHistoryFunc builds the remote method to invoke for +// "InjectiveAccountsRPC" service "subaccountHistory" endpoint. +func BuildSubaccountHistoryFunc(grpccli injective_accounts_rpcpb.InjectiveAccountsRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountHistory(ctx, reqpb.(*injective_accounts_rpcpb.SubaccountHistoryRequest), opts...) + } + return grpccli.SubaccountHistory(ctx, &injective_accounts_rpcpb.SubaccountHistoryRequest{}, opts...) + } +} + +// EncodeSubaccountHistoryRequest encodes requests sent to InjectiveAccountsRPC +// subaccountHistory endpoint. +func EncodeSubaccountHistoryRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveaccountsrpc.SubaccountHistoryPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountHistory", "*injectiveaccountsrpc.SubaccountHistoryPayload", v) + } + return NewSubaccountHistoryRequest(payload), nil +} + +// DecodeSubaccountHistoryResponse decodes responses from the +// InjectiveAccountsRPC subaccountHistory endpoint. +func DecodeSubaccountHistoryResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_accounts_rpcpb.SubaccountHistoryResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveAccountsRPC", "subaccountHistory", "*injective_accounts_rpcpb.SubaccountHistoryResponse", v) + } + if err := ValidateSubaccountHistoryResponse(message); err != nil { + return nil, err + } + res := NewSubaccountHistoryResult(message) + return res, nil +} diff --git a/exchange/accounts_rpc/client/types.go b/exchange/accounts_rpc/client/types.go new file mode 100644 index 00000000..628817e5 --- /dev/null +++ b/exchange/accounts_rpc/client/types.go @@ -0,0 +1,440 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveAccountsRPC gRPC client types +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "unicode/utf8" + + injective_accounts_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_accounts_rpc/pb" + injectiveaccountsrpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_accounts_rpc" + goa "goa.design/goa/v3/pkg" +) + +// NewSubaccountsListRequest builds the gRPC request type from the payload of +// the "subaccountsList" endpoint of the "InjectiveAccountsRPC" service. +func NewSubaccountsListRequest(payload *injectiveaccountsrpc.SubaccountsListPayload) *injective_accounts_rpcpb.SubaccountsListRequest { + message := &injective_accounts_rpcpb.SubaccountsListRequest{ + AccountAddress: payload.AccountAddress, + } + return message +} + +// NewSubaccountsListResult builds the result type of the "subaccountsList" +// endpoint of the "InjectiveAccountsRPC" service from the gRPC response type. +func NewSubaccountsListResult(message *injective_accounts_rpcpb.SubaccountsListResponse) *injectiveaccountsrpc.SubaccountsListResult { + result := &injectiveaccountsrpc.SubaccountsListResult{} + if message.Subaccounts != nil { + result.Subaccounts = make([]string, len(message.Subaccounts)) + for i, val := range message.Subaccounts { + result.Subaccounts[i] = val + } + } + return result +} + +// NewSubaccountBalancesListRequest builds the gRPC request type from the +// payload of the "subaccountBalancesList" endpoint of the +// "InjectiveAccountsRPC" service. +func NewSubaccountBalancesListRequest(payload *injectiveaccountsrpc.SubaccountBalanceFilter) *injective_accounts_rpcpb.SubaccountBalancesListRequest { + message := &injective_accounts_rpcpb.SubaccountBalancesListRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.Denoms != nil { + message.Denoms = make([]string, len(payload.Denoms)) + for i, val := range payload.Denoms { + message.Denoms[i] = val + } + } + return message +} + +// NewSubaccountBalancesListResult builds the result type of the +// "subaccountBalancesList" endpoint of the "InjectiveAccountsRPC" service from +// the gRPC response type. +func NewSubaccountBalancesListResult(message *injective_accounts_rpcpb.SubaccountBalancesListResponse) *injectiveaccountsrpc.SubaccountBalancesListResult { + result := &injectiveaccountsrpc.SubaccountBalancesListResult{} + if message.Balances != nil { + result.Balances = make([]*injectiveaccountsrpc.SubaccountBalance, len(message.Balances)) + for i, val := range message.Balances { + result.Balances[i] = &injectiveaccountsrpc.SubaccountBalance{ + SubaccountID: val.SubaccountId, + AccountAddress: val.AccountAddress, + Denom: val.Denom, + } + if val.Deposit != nil { + result.Balances[i].Deposit = protobufInjectiveAccountsRpcpbSubaccountDepositToInjectiveaccountsrpcSubaccountDeposit(val.Deposit) + } + } + } + return result +} + +// NewSubaccountBalanceRequest builds the gRPC request type from the payload of +// the "subaccountBalance" endpoint of the "InjectiveAccountsRPC" service. +func NewSubaccountBalanceRequest(payload *injectiveaccountsrpc.SubaccountBalancePayload) *injective_accounts_rpcpb.SubaccountBalanceRequest { + message := &injective_accounts_rpcpb.SubaccountBalanceRequest{ + SubaccountId: payload.SubaccountID, + Denom: payload.Denom, + } + return message +} + +// NewSubaccountBalanceResult builds the result type of the "subaccountBalance" +// endpoint of the "InjectiveAccountsRPC" service from the gRPC response type. +func NewSubaccountBalanceResult(message *injective_accounts_rpcpb.SubaccountBalanceResponse) *injectiveaccountsrpc.SubaccountBalanceResult { + result := &injectiveaccountsrpc.SubaccountBalanceResult{} + if message.Balance != nil { + result.Balance = protobufInjectiveAccountsRpcpbSubaccountBalanceToInjectiveaccountsrpcSubaccountBalance(message.Balance) + } + return result +} + +// NewStreamSubaccountBalanceRequest builds the gRPC request type from the +// payload of the "streamSubaccountBalance" endpoint of the +// "InjectiveAccountsRPC" service. +func NewStreamSubaccountBalanceRequest(payload *injectiveaccountsrpc.SubaccountBalanceFilter) *injective_accounts_rpcpb.StreamSubaccountBalanceRequest { + message := &injective_accounts_rpcpb.StreamSubaccountBalanceRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.Denoms != nil { + message.Denoms = make([]string, len(payload.Denoms)) + for i, val := range payload.Denoms { + message.Denoms[i] = val + } + } + return message +} + +func NewStreamSubaccountBalanceResult(v *injective_accounts_rpcpb.StreamSubaccountBalanceResponse) *injectiveaccountsrpc.StreamSubaccountBalanceResult { + result := &injectiveaccountsrpc.StreamSubaccountBalanceResult{ + Timestamp: v.Timestamp, + } + if v.Balance != nil { + result.Balance = protobufInjectiveAccountsRpcpbSubaccountBalanceToInjectiveaccountsrpcSubaccountBalance(v.Balance) + } + return result +} + +// NewSubaccountHistoryRequest builds the gRPC request type from the payload of +// the "subaccountHistory" endpoint of the "InjectiveAccountsRPC" service. +func NewSubaccountHistoryRequest(payload *injectiveaccountsrpc.SubaccountHistoryPayload) *injective_accounts_rpcpb.SubaccountHistoryRequest { + message := &injective_accounts_rpcpb.SubaccountHistoryRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.Denom != nil { + message.Denom = *payload.Denom + } + if payload.TransferTypes != nil { + message.TransferTypes = make([]string, len(payload.TransferTypes)) + for i, val := range payload.TransferTypes { + message.TransferTypes[i] = val + } + } + return message +} + +// NewSubaccountHistoryResult builds the result type of the "subaccountHistory" +// endpoint of the "InjectiveAccountsRPC" service from the gRPC response type. +func NewSubaccountHistoryResult(message *injective_accounts_rpcpb.SubaccountHistoryResponse) *injectiveaccountsrpc.SubaccountHistoryResult { + result := &injectiveaccountsrpc.SubaccountHistoryResult{} + if message.Transfers != nil { + result.Transfers = make([]*injectiveaccountsrpc.SubaccountBalanceTransfer, len(message.Transfers)) + for i, val := range message.Transfers { + result.Transfers[i] = &injectiveaccountsrpc.SubaccountBalanceTransfer{ + TransferType: val.TransferType, + ExecutedAt: val.ExecutedAt, + } + if val.SrcSubaccountId != "" { + result.Transfers[i].SrcSubaccountID = &val.SrcSubaccountId + } + if val.SrcAccountAddress != "" { + result.Transfers[i].SrcAccountAddress = &val.SrcAccountAddress + } + if val.DstSubaccountId != "" { + result.Transfers[i].DstSubaccountID = &val.DstSubaccountId + } + if val.DstAccountAddress != "" { + result.Transfers[i].DstAccountAddress = &val.DstAccountAddress + } + if val.Amount != nil { + result.Transfers[i].Amount = protobufInjectiveAccountsRpcpbCosmosCoinToInjectiveaccountsrpcCosmosCoin(val.Amount) + } + } + } + return result +} + +// ValidateSubaccountsListResponse runs the validations defined on +// SubaccountsListResponse. +func ValidateSubaccountsListResponse(message *injective_accounts_rpcpb.SubaccountsListResponse) (err error) { + for _, e := range message.Subaccounts { + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccounts[*]", e, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(e) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccounts[*]", e, utf8.RuneCountInString(e), 66, true)) + } + if utf8.RuneCountInString(e) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccounts[*]", e, utf8.RuneCountInString(e), 66, false)) + } + } + return +} + +// ValidateSubaccountBalancesListResponse runs the validations defined on +// SubaccountBalancesListResponse. +func ValidateSubaccountBalancesListResponse(message *injective_accounts_rpcpb.SubaccountBalancesListResponse) (err error) { + for _, e := range message.Balances { + if e != nil { + if err2 := ValidateSubaccountBalance(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSubaccountBalance runs the validations defined on SubaccountBalance. +func ValidateSubaccountBalance(message *injective_accounts_rpcpb.SubaccountBalance) (err error) { + if message.Deposit == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("deposit", "message")) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.accountAddress", message.AccountAddress, "^inj1[0-9a-zA-Z]{38}$")) + if utf8.RuneCountInString(message.AccountAddress) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.accountAddress", message.AccountAddress, utf8.RuneCountInString(message.AccountAddress), 42, true)) + } + if utf8.RuneCountInString(message.AccountAddress) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.accountAddress", message.AccountAddress, utf8.RuneCountInString(message.AccountAddress), 42, false)) + } + if message.Deposit != nil { + if err2 := ValidateSubaccountDeposit(message.Deposit); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateSubaccountDeposit runs the validations defined on SubaccountDeposit. +func ValidateSubaccountDeposit(message *injective_accounts_rpcpb.SubaccountDeposit) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.totalBalance", message.TotalBalance, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.TotalBalance) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.totalBalance", message.TotalBalance, utf8.RuneCountInString(message.TotalBalance), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.availableBalance", message.AvailableBalance, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.AvailableBalance) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.availableBalance", message.AvailableBalance, utf8.RuneCountInString(message.AvailableBalance), 100, false)) + } + return +} + +// ValidateSubaccountBalanceResponse runs the validations defined on +// SubaccountBalanceResponse. +func ValidateSubaccountBalanceResponse(message *injective_accounts_rpcpb.SubaccountBalanceResponse) (err error) { + if message.Balance != nil { + if err2 := ValidateSubaccountBalance(message.Balance); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateStreamSubaccountBalanceResponse runs the validations defined on +// StreamSubaccountBalanceResponse. +func ValidateStreamSubaccountBalanceResponse(message *injective_accounts_rpcpb.StreamSubaccountBalanceResponse) (err error) { + if message.Balance == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("balance", "message")) + } + if message.Balance != nil { + if err2 := ValidateSubaccountBalance(message.Balance); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateSubaccountHistoryResponse runs the validations defined on +// SubaccountHistoryResponse. +func ValidateSubaccountHistoryResponse(message *injective_accounts_rpcpb.SubaccountHistoryResponse) (err error) { + for _, e := range message.Transfers { + if e != nil { + if err2 := ValidateSubaccountBalanceTransfer(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSubaccountBalanceTransfer runs the validations defined on +// SubaccountBalanceTransfer. +func ValidateSubaccountBalanceTransfer(message *injective_accounts_rpcpb.SubaccountBalanceTransfer) (err error) { + if message.Amount == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("amount", "message")) + } + if !(message.TransferType == "internal" || message.TransferType == "external" || message.TransferType == "withdraw" || message.TransferType == "deposit") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.transferType", message.TransferType, []interface{}{"internal", "external", "withdraw", "deposit"})) + } + if message.SrcSubaccountId != "" { + err = goa.MergeErrors(err, goa.ValidatePattern("message.srcSubaccountID", message.SrcSubaccountId, "^0x[0-9a-fA-F]{64}$")) + } + if message.SrcSubaccountId != "" { + if utf8.RuneCountInString(message.SrcSubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.srcSubaccountID", message.SrcSubaccountId, utf8.RuneCountInString(message.SrcSubaccountId), 66, true)) + } + } + if message.SrcSubaccountId != "" { + if utf8.RuneCountInString(message.SrcSubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.srcSubaccountID", message.SrcSubaccountId, utf8.RuneCountInString(message.SrcSubaccountId), 66, false)) + } + } + if message.SrcAccountAddress != "" { + err = goa.MergeErrors(err, goa.ValidatePattern("message.srcAccountAddress", message.SrcAccountAddress, "^inj1[0-9a-zA-Z]{38}$")) + } + if message.SrcAccountAddress != "" { + if utf8.RuneCountInString(message.SrcAccountAddress) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.srcAccountAddress", message.SrcAccountAddress, utf8.RuneCountInString(message.SrcAccountAddress), 42, true)) + } + } + if message.SrcAccountAddress != "" { + if utf8.RuneCountInString(message.SrcAccountAddress) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.srcAccountAddress", message.SrcAccountAddress, utf8.RuneCountInString(message.SrcAccountAddress), 42, false)) + } + } + if message.DstSubaccountId != "" { + err = goa.MergeErrors(err, goa.ValidatePattern("message.dstSubaccountID", message.DstSubaccountId, "^0x[0-9a-fA-F]{64}$")) + } + if message.DstSubaccountId != "" { + if utf8.RuneCountInString(message.DstSubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.dstSubaccountID", message.DstSubaccountId, utf8.RuneCountInString(message.DstSubaccountId), 66, true)) + } + } + if message.DstSubaccountId != "" { + if utf8.RuneCountInString(message.DstSubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.dstSubaccountID", message.DstSubaccountId, utf8.RuneCountInString(message.DstSubaccountId), 66, false)) + } + } + if message.DstAccountAddress != "" { + err = goa.MergeErrors(err, goa.ValidatePattern("message.dstAccountAddress", message.DstAccountAddress, "^inj1[0-9a-zA-Z]{38}$")) + } + if message.DstAccountAddress != "" { + if utf8.RuneCountInString(message.DstAccountAddress) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.dstAccountAddress", message.DstAccountAddress, utf8.RuneCountInString(message.DstAccountAddress), 42, true)) + } + } + if message.DstAccountAddress != "" { + if utf8.RuneCountInString(message.DstAccountAddress) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.dstAccountAddress", message.DstAccountAddress, utf8.RuneCountInString(message.DstAccountAddress), 42, false)) + } + } + if message.Amount != nil { + if err2 := ValidateCosmosCoin(message.Amount); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateCosmosCoin runs the validations defined on CosmosCoin. +func ValidateCosmosCoin(message *injective_accounts_rpcpb.CosmosCoin) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.amount", message.Amount, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Amount) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.amount", message.Amount, utf8.RuneCountInString(message.Amount), 100, false)) + } + return +} + +// svcInjectiveaccountsrpcSubaccountDepositToInjectiveAccountsRpcpbSubaccountDeposit +// builds a value of type *injective_accounts_rpcpb.SubaccountDeposit from a +// value of type *injectiveaccountsrpc.SubaccountDeposit. +func svcInjectiveaccountsrpcSubaccountDepositToInjectiveAccountsRpcpbSubaccountDeposit(v *injectiveaccountsrpc.SubaccountDeposit) *injective_accounts_rpcpb.SubaccountDeposit { + res := &injective_accounts_rpcpb.SubaccountDeposit{ + TotalBalance: v.TotalBalance, + AvailableBalance: v.AvailableBalance, + } + + return res +} + +// protobufInjectiveAccountsRpcpbSubaccountDepositToInjectiveaccountsrpcSubaccountDeposit +// builds a value of type *injectiveaccountsrpc.SubaccountDeposit from a value +// of type *injective_accounts_rpcpb.SubaccountDeposit. +func protobufInjectiveAccountsRpcpbSubaccountDepositToInjectiveaccountsrpcSubaccountDeposit(v *injective_accounts_rpcpb.SubaccountDeposit) *injectiveaccountsrpc.SubaccountDeposit { + res := &injectiveaccountsrpc.SubaccountDeposit{ + TotalBalance: v.TotalBalance, + AvailableBalance: v.AvailableBalance, + } + + return res +} + +// svcInjectiveaccountsrpcSubaccountBalanceToInjectiveAccountsRpcpbSubaccountBalance +// builds a value of type *injective_accounts_rpcpb.SubaccountBalance from a +// value of type *injectiveaccountsrpc.SubaccountBalance. +func svcInjectiveaccountsrpcSubaccountBalanceToInjectiveAccountsRpcpbSubaccountBalance(v *injectiveaccountsrpc.SubaccountBalance) *injective_accounts_rpcpb.SubaccountBalance { + if v == nil { + return nil + } + res := &injective_accounts_rpcpb.SubaccountBalance{ + SubaccountId: v.SubaccountID, + AccountAddress: v.AccountAddress, + Denom: v.Denom, + } + if v.Deposit != nil { + res.Deposit = svcInjectiveaccountsrpcSubaccountDepositToInjectiveAccountsRpcpbSubaccountDeposit(v.Deposit) + } + + return res +} + +// protobufInjectiveAccountsRpcpbSubaccountBalanceToInjectiveaccountsrpcSubaccountBalance +// builds a value of type *injectiveaccountsrpc.SubaccountBalance from a value +// of type *injective_accounts_rpcpb.SubaccountBalance. +func protobufInjectiveAccountsRpcpbSubaccountBalanceToInjectiveaccountsrpcSubaccountBalance(v *injective_accounts_rpcpb.SubaccountBalance) *injectiveaccountsrpc.SubaccountBalance { + if v == nil { + return nil + } + res := &injectiveaccountsrpc.SubaccountBalance{ + SubaccountID: v.SubaccountId, + AccountAddress: v.AccountAddress, + Denom: v.Denom, + } + if v.Deposit != nil { + res.Deposit = protobufInjectiveAccountsRpcpbSubaccountDepositToInjectiveaccountsrpcSubaccountDeposit(v.Deposit) + } + + return res +} + +// svcInjectiveaccountsrpcCosmosCoinToInjectiveAccountsRpcpbCosmosCoin builds a +// value of type *injective_accounts_rpcpb.CosmosCoin from a value of type +// *injectiveaccountsrpc.CosmosCoin. +func svcInjectiveaccountsrpcCosmosCoinToInjectiveAccountsRpcpbCosmosCoin(v *injectiveaccountsrpc.CosmosCoin) *injective_accounts_rpcpb.CosmosCoin { + res := &injective_accounts_rpcpb.CosmosCoin{ + Denom: v.Denom, + Amount: v.Amount, + } + + return res +} + +// protobufInjectiveAccountsRpcpbCosmosCoinToInjectiveaccountsrpcCosmosCoin +// builds a value of type *injectiveaccountsrpc.CosmosCoin from a value of type +// *injective_accounts_rpcpb.CosmosCoin. +func protobufInjectiveAccountsRpcpbCosmosCoinToInjectiveaccountsrpcCosmosCoin(v *injective_accounts_rpcpb.CosmosCoin) *injectiveaccountsrpc.CosmosCoin { + res := &injectiveaccountsrpc.CosmosCoin{ + Denom: v.Denom, + Amount: v.Amount, + } + + return res +} diff --git a/exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go b/exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go new file mode 100644 index 00000000..eeca5e0b --- /dev/null +++ b/exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go @@ -0,0 +1,1257 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveAccountsRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 +// source: injective_accounts_rpc.proto + +package injective_accounts_rpcpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubaccountsListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Account address, the subaccounts owner + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (x *SubaccountsListRequest) Reset() { + *x = SubaccountsListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountsListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountsListRequest) ProtoMessage() {} + +func (x *SubaccountsListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountsListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountsListRequest) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{0} +} + +func (x *SubaccountsListRequest) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +type SubaccountsListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subaccounts []string `protobuf:"bytes,1,rep,name=subaccounts,proto3" json:"subaccounts,omitempty"` +} + +func (x *SubaccountsListResponse) Reset() { + *x = SubaccountsListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountsListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountsListResponse) ProtoMessage() {} + +func (x *SubaccountsListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountsListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountsListResponse) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{1} +} + +func (x *SubaccountsListResponse) GetSubaccounts() []string { + if x != nil { + return x.Subaccounts + } + return nil +} + +type SubaccountBalancesListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Filter balances by denoms. If not set, the balances of all the denoms for + // the subaccount are provided. + Denoms []string `protobuf:"bytes,2,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (x *SubaccountBalancesListRequest) Reset() { + *x = SubaccountBalancesListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalancesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalancesListRequest) ProtoMessage() {} + +func (x *SubaccountBalancesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalancesListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountBalancesListRequest) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{2} +} + +func (x *SubaccountBalancesListRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountBalancesListRequest) GetDenoms() []string { + if x != nil { + return x.Denoms + } + return nil +} + +type SubaccountBalancesListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of subaccount balances + Balances []*SubaccountBalance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` +} + +func (x *SubaccountBalancesListResponse) Reset() { + *x = SubaccountBalancesListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalancesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalancesListResponse) ProtoMessage() {} + +func (x *SubaccountBalancesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalancesListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountBalancesListResponse) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{3} +} + +func (x *SubaccountBalancesListResponse) GetBalances() []*SubaccountBalance { + if x != nil { + return x.Balances + } + return nil +} + +type SubaccountBalance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Related subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Account address, owner of this subaccount + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // Coin denom on the chain. + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + Deposit *SubaccountDeposit `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (x *SubaccountBalance) Reset() { + *x = SubaccountBalance{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalance) ProtoMessage() {} + +func (x *SubaccountBalance) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalance.ProtoReflect.Descriptor instead. +func (*SubaccountBalance) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{4} +} + +func (x *SubaccountBalance) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountBalance) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *SubaccountBalance) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *SubaccountBalance) GetDeposit() *SubaccountDeposit { + if x != nil { + return x.Deposit + } + return nil +} + +type SubaccountDeposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalBalance string `protobuf:"bytes,1,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"` + AvailableBalance string `protobuf:"bytes,2,opt,name=available_balance,json=availableBalance,proto3" json:"available_balance,omitempty"` +} + +func (x *SubaccountDeposit) Reset() { + *x = SubaccountDeposit{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountDeposit) ProtoMessage() {} + +func (x *SubaccountDeposit) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountDeposit.ProtoReflect.Descriptor instead. +func (*SubaccountDeposit) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{5} +} + +func (x *SubaccountDeposit) GetTotalBalance() string { + if x != nil { + return x.TotalBalance + } + return "" +} + +func (x *SubaccountDeposit) GetAvailableBalance() string { + if x != nil { + return x.AvailableBalance + } + return "" +} + +type SubaccountBalanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Specify denom to get balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *SubaccountBalanceRequest) Reset() { + *x = SubaccountBalanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalanceRequest) ProtoMessage() {} + +func (x *SubaccountBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalanceRequest.ProtoReflect.Descriptor instead. +func (*SubaccountBalanceRequest) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{6} +} + +func (x *SubaccountBalanceRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountBalanceRequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +type SubaccountBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Subaccount balance + Balance *SubaccountBalance `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (x *SubaccountBalanceResponse) Reset() { + *x = SubaccountBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalanceResponse) ProtoMessage() {} + +func (x *SubaccountBalanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalanceResponse.ProtoReflect.Descriptor instead. +func (*SubaccountBalanceResponse) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{7} +} + +func (x *SubaccountBalanceResponse) GetBalance() *SubaccountBalance { + if x != nil { + return x.Balance + } + return nil +} + +type StreamSubaccountBalanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Filter balances by denoms. If not set, the balances of all the denoms for + // the subaccount are provided. + Denoms []string `protobuf:"bytes,2,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (x *StreamSubaccountBalanceRequest) Reset() { + *x = StreamSubaccountBalanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamSubaccountBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSubaccountBalanceRequest) ProtoMessage() {} + +func (x *StreamSubaccountBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSubaccountBalanceRequest.ProtoReflect.Descriptor instead. +func (*StreamSubaccountBalanceRequest) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{8} +} + +func (x *StreamSubaccountBalanceRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *StreamSubaccountBalanceRequest) GetDenoms() []string { + if x != nil { + return x.Denoms + } + return nil +} + +type StreamSubaccountBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Subaccount balance + Balance *SubaccountBalance `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamSubaccountBalanceResponse) Reset() { + *x = StreamSubaccountBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamSubaccountBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSubaccountBalanceResponse) ProtoMessage() {} + +func (x *StreamSubaccountBalanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSubaccountBalanceResponse.ProtoReflect.Descriptor instead. +func (*StreamSubaccountBalanceResponse) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{9} +} + +func (x *StreamSubaccountBalanceResponse) GetBalance() *SubaccountBalance { + if x != nil { + return x.Balance + } + return nil +} + +func (x *StreamSubaccountBalanceResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SubaccountHistoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the history from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Filter history by denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // Filter history by transfer type + TransferTypes []string `protobuf:"bytes,3,rep,name=transfer_types,json=transferTypes,proto3" json:"transfer_types,omitempty"` +} + +func (x *SubaccountHistoryRequest) Reset() { + *x = SubaccountHistoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountHistoryRequest) ProtoMessage() {} + +func (x *SubaccountHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountHistoryRequest.ProtoReflect.Descriptor instead. +func (*SubaccountHistoryRequest) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{10} +} + +func (x *SubaccountHistoryRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountHistoryRequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *SubaccountHistoryRequest) GetTransferTypes() []string { + if x != nil { + return x.TransferTypes + } + return nil +} + +type SubaccountHistoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of subaccount transfers + Transfers []*SubaccountBalanceTransfer `protobuf:"bytes,1,rep,name=transfers,proto3" json:"transfers,omitempty"` +} + +func (x *SubaccountHistoryResponse) Reset() { + *x = SubaccountHistoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountHistoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountHistoryResponse) ProtoMessage() {} + +func (x *SubaccountHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountHistoryResponse.ProtoReflect.Descriptor instead. +func (*SubaccountHistoryResponse) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{11} +} + +func (x *SubaccountHistoryResponse) GetTransfers() []*SubaccountBalanceTransfer { + if x != nil { + return x.Transfers + } + return nil +} + +type SubaccountBalanceTransfer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of the subaccount balance transfer + TransferType string `protobuf:"bytes,1,opt,name=transfer_type,json=transferType,proto3" json:"transfer_type,omitempty"` + // Subaccount ID of the sending side + SrcSubaccountId string `protobuf:"bytes,2,opt,name=src_subaccount_id,json=srcSubaccountId,proto3" json:"src_subaccount_id,omitempty"` + // Account address of the sending side + SrcAccountAddress string `protobuf:"bytes,3,opt,name=src_account_address,json=srcAccountAddress,proto3" json:"src_account_address,omitempty"` + // Subaccount ID of the receiving side + DstSubaccountId string `protobuf:"bytes,4,opt,name=dst_subaccount_id,json=dstSubaccountId,proto3" json:"dst_subaccount_id,omitempty"` + // Account address of the receiving side + DstAccountAddress string `protobuf:"bytes,5,opt,name=dst_account_address,json=dstAccountAddress,proto3" json:"dst_account_address,omitempty"` + // Coin amount of the transfer + Amount *CosmosCoin `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` + // Timestamp of the transfer in UNIX millis + ExecutedAt int64 `protobuf:"zigzag64,7,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` +} + +func (x *SubaccountBalanceTransfer) Reset() { + *x = SubaccountBalanceTransfer{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountBalanceTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountBalanceTransfer) ProtoMessage() {} + +func (x *SubaccountBalanceTransfer) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountBalanceTransfer.ProtoReflect.Descriptor instead. +func (*SubaccountBalanceTransfer) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{12} +} + +func (x *SubaccountBalanceTransfer) GetTransferType() string { + if x != nil { + return x.TransferType + } + return "" +} + +func (x *SubaccountBalanceTransfer) GetSrcSubaccountId() string { + if x != nil { + return x.SrcSubaccountId + } + return "" +} + +func (x *SubaccountBalanceTransfer) GetSrcAccountAddress() string { + if x != nil { + return x.SrcAccountAddress + } + return "" +} + +func (x *SubaccountBalanceTransfer) GetDstSubaccountId() string { + if x != nil { + return x.DstSubaccountId + } + return "" +} + +func (x *SubaccountBalanceTransfer) GetDstAccountAddress() string { + if x != nil { + return x.DstAccountAddress + } + return "" +} + +func (x *SubaccountBalanceTransfer) GetAmount() *CosmosCoin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SubaccountBalanceTransfer) GetExecutedAt() int64 { + if x != nil { + return x.ExecutedAt + } + return 0 +} + +type CosmosCoin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Coin denominator + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // Coin amount (big int) + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *CosmosCoin) Reset() { + *x = CosmosCoin{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_accounts_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CosmosCoin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CosmosCoin) ProtoMessage() {} + +func (x *CosmosCoin) ProtoReflect() protoreflect.Message { + mi := &file_injective_accounts_rpc_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CosmosCoin.ProtoReflect.Descriptor instead. +func (*CosmosCoin) Descriptor() ([]byte, []int) { + return file_injective_accounts_rpc_proto_rawDescGZIP(), []int{13} +} + +func (x *CosmosCoin) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *CosmosCoin) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +var File_injective_accounts_rpc_proto protoreflect.FileDescriptor + +var file_injective_accounts_rpc_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x22, 0x41, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3b, 0x0a, 0x17, 0x53, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x1d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x73, 0x22, 0x67, 0x0a, 0x1e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xbc, 0x01, + 0x0a, 0x11, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x43, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x65, 0x0a, 0x11, + 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x60, 0x0a, 0x19, 0x53, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x5d, 0x0a, 0x1e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x1f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x7c, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x22, 0x6c, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x22, 0xd5, + 0x02, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x72, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x72, + 0x63, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, + 0x13, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x72, 0x63, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, + 0x11, 0x64, 0x73, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x73, 0x74, 0x53, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x73, 0x74, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x32, 0xa0, 0x05, 0x0a, 0x14, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x50, 0x43, 0x12, 0x72, 0x0a, 0x0f, 0x53, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x87, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x53, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8c, 0x01, 0x0a, + 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x78, 0x0a, 0x11, 0x53, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1b, 0x5a, 0x19, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x70, 0x63, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_injective_accounts_rpc_proto_rawDescOnce sync.Once + file_injective_accounts_rpc_proto_rawDescData = file_injective_accounts_rpc_proto_rawDesc +) + +func file_injective_accounts_rpc_proto_rawDescGZIP() []byte { + file_injective_accounts_rpc_proto_rawDescOnce.Do(func() { + file_injective_accounts_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_injective_accounts_rpc_proto_rawDescData) + }) + return file_injective_accounts_rpc_proto_rawDescData +} + +var file_injective_accounts_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_injective_accounts_rpc_proto_goTypes = []interface{}{ + (*SubaccountsListRequest)(nil), // 0: injective_accounts_rpc.SubaccountsListRequest + (*SubaccountsListResponse)(nil), // 1: injective_accounts_rpc.SubaccountsListResponse + (*SubaccountBalancesListRequest)(nil), // 2: injective_accounts_rpc.SubaccountBalancesListRequest + (*SubaccountBalancesListResponse)(nil), // 3: injective_accounts_rpc.SubaccountBalancesListResponse + (*SubaccountBalance)(nil), // 4: injective_accounts_rpc.SubaccountBalance + (*SubaccountDeposit)(nil), // 5: injective_accounts_rpc.SubaccountDeposit + (*SubaccountBalanceRequest)(nil), // 6: injective_accounts_rpc.SubaccountBalanceRequest + (*SubaccountBalanceResponse)(nil), // 7: injective_accounts_rpc.SubaccountBalanceResponse + (*StreamSubaccountBalanceRequest)(nil), // 8: injective_accounts_rpc.StreamSubaccountBalanceRequest + (*StreamSubaccountBalanceResponse)(nil), // 9: injective_accounts_rpc.StreamSubaccountBalanceResponse + (*SubaccountHistoryRequest)(nil), // 10: injective_accounts_rpc.SubaccountHistoryRequest + (*SubaccountHistoryResponse)(nil), // 11: injective_accounts_rpc.SubaccountHistoryResponse + (*SubaccountBalanceTransfer)(nil), // 12: injective_accounts_rpc.SubaccountBalanceTransfer + (*CosmosCoin)(nil), // 13: injective_accounts_rpc.CosmosCoin +} +var file_injective_accounts_rpc_proto_depIdxs = []int32{ + 4, // 0: injective_accounts_rpc.SubaccountBalancesListResponse.balances:type_name -> injective_accounts_rpc.SubaccountBalance + 5, // 1: injective_accounts_rpc.SubaccountBalance.deposit:type_name -> injective_accounts_rpc.SubaccountDeposit + 4, // 2: injective_accounts_rpc.SubaccountBalanceResponse.balance:type_name -> injective_accounts_rpc.SubaccountBalance + 4, // 3: injective_accounts_rpc.StreamSubaccountBalanceResponse.balance:type_name -> injective_accounts_rpc.SubaccountBalance + 12, // 4: injective_accounts_rpc.SubaccountHistoryResponse.transfers:type_name -> injective_accounts_rpc.SubaccountBalanceTransfer + 13, // 5: injective_accounts_rpc.SubaccountBalanceTransfer.amount:type_name -> injective_accounts_rpc.CosmosCoin + 0, // 6: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountsList:input_type -> injective_accounts_rpc.SubaccountsListRequest + 2, // 7: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountBalancesList:input_type -> injective_accounts_rpc.SubaccountBalancesListRequest + 6, // 8: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountBalanceEndpoint:input_type -> injective_accounts_rpc.SubaccountBalanceRequest + 8, // 9: injective_accounts_rpc.InjectiveAccountsRPC.StreamSubaccountBalance:input_type -> injective_accounts_rpc.StreamSubaccountBalanceRequest + 10, // 10: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountHistory:input_type -> injective_accounts_rpc.SubaccountHistoryRequest + 1, // 11: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountsList:output_type -> injective_accounts_rpc.SubaccountsListResponse + 3, // 12: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountBalancesList:output_type -> injective_accounts_rpc.SubaccountBalancesListResponse + 7, // 13: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountBalanceEndpoint:output_type -> injective_accounts_rpc.SubaccountBalanceResponse + 9, // 14: injective_accounts_rpc.InjectiveAccountsRPC.StreamSubaccountBalance:output_type -> injective_accounts_rpc.StreamSubaccountBalanceResponse + 11, // 15: injective_accounts_rpc.InjectiveAccountsRPC.SubaccountHistory:output_type -> injective_accounts_rpc.SubaccountHistoryResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_injective_accounts_rpc_proto_init() } +func file_injective_accounts_rpc_proto_init() { + if File_injective_accounts_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_injective_accounts_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountsListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountsListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalancesListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalancesListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountDeposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamSubaccountBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamSubaccountBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountHistoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountHistoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountBalanceTransfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_accounts_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CosmosCoin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_injective_accounts_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_injective_accounts_rpc_proto_goTypes, + DependencyIndexes: file_injective_accounts_rpc_proto_depIdxs, + MessageInfos: file_injective_accounts_rpc_proto_msgTypes, + }.Build() + File_injective_accounts_rpc_proto = out.File + file_injective_accounts_rpc_proto_rawDesc = nil + file_injective_accounts_rpc_proto_goTypes = nil + file_injective_accounts_rpc_proto_depIdxs = nil +} diff --git a/exchange/accounts_rpc/pb/injective_accounts_rpc.proto b/exchange/accounts_rpc/pb/injective_accounts_rpc.proto new file mode 100644 index 00000000..94294cea --- /dev/null +++ b/exchange/accounts_rpc/pb/injective_accounts_rpc.proto @@ -0,0 +1,130 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveAccountsRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +syntax = "proto3"; + +package injective_accounts_rpc; + +option go_package = "/injective_accounts_rpcpb"; + +// InjectiveAccountsRPC defines gRPC API of Exchange Accounts provider. +service InjectiveAccountsRPC { + // List all subaccounts IDs of an account address + rpc SubaccountsList (SubaccountsListRequest) returns (SubaccountsListResponse); + // List subaccount balances for the provided denoms. + rpc SubaccountBalancesList (SubaccountBalancesListRequest) returns (SubaccountBalancesListResponse); + // Gets a balance for specific coin denom + rpc SubaccountBalanceEndpoint (SubaccountBalanceRequest) returns (SubaccountBalanceResponse); + // StreamSubaccountBalance streams new balance changes for a specified +// subaccount and denoms. If no denoms are provided, all denom changes are +// streamed. + rpc StreamSubaccountBalance (StreamSubaccountBalanceRequest) returns (stream StreamSubaccountBalanceResponse); + // Get subaccount's deposits and withdrawals history + rpc SubaccountHistory (SubaccountHistoryRequest) returns (SubaccountHistoryResponse); +} + +message SubaccountsListRequest { + // Account address, the subaccounts owner + string account_address = 1; +} + +message SubaccountsListResponse { + repeated string subaccounts = 1; +} + +message SubaccountBalancesListRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // Filter balances by denoms. If not set, the balances of all the denoms for +// the subaccount are provided. + repeated string denoms = 2; +} + +message SubaccountBalancesListResponse { + // List of subaccount balances + repeated SubaccountBalance balances = 1; +} + +message SubaccountBalance { + // Related subaccount ID + string subaccount_id = 1; + // Account address, owner of this subaccount + string account_address = 2; + // Coin denom on the chain. + string denom = 3; + SubaccountDeposit deposit = 4; +} + +message SubaccountDeposit { + string total_balance = 1; + string available_balance = 2; +} + +message SubaccountBalanceRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // Specify denom to get balance + string denom = 2; +} + +message SubaccountBalanceResponse { + // Subaccount balance + SubaccountBalance balance = 1; +} + +message StreamSubaccountBalanceRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // Filter balances by denoms. If not set, the balances of all the denoms for +// the subaccount are provided. + repeated string denoms = 2; +} + +message StreamSubaccountBalanceResponse { + // Subaccount balance + SubaccountBalance balance = 1; + // Operation timestamp in UNIX millis. + sint64 timestamp = 2; +} + +message SubaccountHistoryRequest { + // SubaccountId of the trader we want to get the history from + string subaccount_id = 1; + // Filter history by denom + string denom = 2; + // Filter history by transfer type + repeated string transfer_types = 3; +} + +message SubaccountHistoryResponse { + // List of subaccount transfers + repeated SubaccountBalanceTransfer transfers = 1; +} + +message SubaccountBalanceTransfer { + // Type of the subaccount balance transfer + string transfer_type = 1; + // Subaccount ID of the sending side + string src_subaccount_id = 2; + // Account address of the sending side + string src_account_address = 3; + // Subaccount ID of the receiving side + string dst_subaccount_id = 4; + // Account address of the receiving side + string dst_account_address = 5; + // Coin amount of the transfer + CosmosCoin amount = 6; + // Timestamp of the transfer in UNIX millis + sint64 executed_at = 7; +} + +message CosmosCoin { + // Coin denominator + string denom = 1; + // Coin amount (big int) + string amount = 2; +} diff --git a/exchange/accounts_rpc/pb/injective_accounts_rpc_grpc.pb.go b/exchange/accounts_rpc/pb/injective_accounts_rpc_grpc.pb.go new file mode 100644 index 00000000..9236e225 --- /dev/null +++ b/exchange/accounts_rpc/pb/injective_accounts_rpc_grpc.pb.go @@ -0,0 +1,287 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package injective_accounts_rpcpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InjectiveAccountsRPCClient is the client API for InjectiveAccountsRPC 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. +type InjectiveAccountsRPCClient interface { + // List all subaccounts IDs of an account address + SubaccountsList(ctx context.Context, in *SubaccountsListRequest, opts ...grpc.CallOption) (*SubaccountsListResponse, error) + // List subaccount balances for the provided denoms. + SubaccountBalancesList(ctx context.Context, in *SubaccountBalancesListRequest, opts ...grpc.CallOption) (*SubaccountBalancesListResponse, error) + // Gets a balance for specific coin denom + SubaccountBalanceEndpoint(ctx context.Context, in *SubaccountBalanceRequest, opts ...grpc.CallOption) (*SubaccountBalanceResponse, error) + // StreamSubaccountBalance streams new balance changes for a specified + // subaccount and denoms. If no denoms are provided, all denom changes are + // streamed. + StreamSubaccountBalance(ctx context.Context, in *StreamSubaccountBalanceRequest, opts ...grpc.CallOption) (InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) + // Get subaccount's deposits and withdrawals history + SubaccountHistory(ctx context.Context, in *SubaccountHistoryRequest, opts ...grpc.CallOption) (*SubaccountHistoryResponse, error) +} + +type injectiveAccountsRPCClient struct { + cc grpc.ClientConnInterface +} + +func NewInjectiveAccountsRPCClient(cc grpc.ClientConnInterface) InjectiveAccountsRPCClient { + return &injectiveAccountsRPCClient{cc} +} + +func (c *injectiveAccountsRPCClient) SubaccountsList(ctx context.Context, in *SubaccountsListRequest, opts ...grpc.CallOption) (*SubaccountsListResponse, error) { + out := new(SubaccountsListResponse) + err := c.cc.Invoke(ctx, "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountsList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveAccountsRPCClient) SubaccountBalancesList(ctx context.Context, in *SubaccountBalancesListRequest, opts ...grpc.CallOption) (*SubaccountBalancesListResponse, error) { + out := new(SubaccountBalancesListResponse) + err := c.cc.Invoke(ctx, "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalancesList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveAccountsRPCClient) SubaccountBalanceEndpoint(ctx context.Context, in *SubaccountBalanceRequest, opts ...grpc.CallOption) (*SubaccountBalanceResponse, error) { + out := new(SubaccountBalanceResponse) + err := c.cc.Invoke(ctx, "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalanceEndpoint", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveAccountsRPCClient) StreamSubaccountBalance(ctx context.Context, in *StreamSubaccountBalanceRequest, opts ...grpc.CallOption) (InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveAccountsRPC_ServiceDesc.Streams[0], "/injective_accounts_rpc.InjectiveAccountsRPC/StreamSubaccountBalance", opts...) + if err != nil { + return nil, err + } + x := &injectiveAccountsRPCStreamSubaccountBalanceClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveAccountsRPC_StreamSubaccountBalanceClient interface { + Recv() (*StreamSubaccountBalanceResponse, error) + grpc.ClientStream +} + +type injectiveAccountsRPCStreamSubaccountBalanceClient struct { + grpc.ClientStream +} + +func (x *injectiveAccountsRPCStreamSubaccountBalanceClient) Recv() (*StreamSubaccountBalanceResponse, error) { + m := new(StreamSubaccountBalanceResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveAccountsRPCClient) SubaccountHistory(ctx context.Context, in *SubaccountHistoryRequest, opts ...grpc.CallOption) (*SubaccountHistoryResponse, error) { + out := new(SubaccountHistoryResponse) + err := c.cc.Invoke(ctx, "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountHistory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InjectiveAccountsRPCServer is the server API for InjectiveAccountsRPC service. +// All implementations must embed UnimplementedInjectiveAccountsRPCServer +// for forward compatibility +type InjectiveAccountsRPCServer interface { + // List all subaccounts IDs of an account address + SubaccountsList(context.Context, *SubaccountsListRequest) (*SubaccountsListResponse, error) + // List subaccount balances for the provided denoms. + SubaccountBalancesList(context.Context, *SubaccountBalancesListRequest) (*SubaccountBalancesListResponse, error) + // Gets a balance for specific coin denom + SubaccountBalanceEndpoint(context.Context, *SubaccountBalanceRequest) (*SubaccountBalanceResponse, error) + // StreamSubaccountBalance streams new balance changes for a specified + // subaccount and denoms. If no denoms are provided, all denom changes are + // streamed. + StreamSubaccountBalance(*StreamSubaccountBalanceRequest, InjectiveAccountsRPC_StreamSubaccountBalanceServer) error + // Get subaccount's deposits and withdrawals history + SubaccountHistory(context.Context, *SubaccountHistoryRequest) (*SubaccountHistoryResponse, error) + mustEmbedUnimplementedInjectiveAccountsRPCServer() +} + +// UnimplementedInjectiveAccountsRPCServer must be embedded to have forward compatible implementations. +type UnimplementedInjectiveAccountsRPCServer struct { +} + +func (UnimplementedInjectiveAccountsRPCServer) SubaccountsList(context.Context, *SubaccountsListRequest) (*SubaccountsListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountsList not implemented") +} +func (UnimplementedInjectiveAccountsRPCServer) SubaccountBalancesList(context.Context, *SubaccountBalancesListRequest) (*SubaccountBalancesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountBalancesList not implemented") +} +func (UnimplementedInjectiveAccountsRPCServer) SubaccountBalanceEndpoint(context.Context, *SubaccountBalanceRequest) (*SubaccountBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountBalanceEndpoint not implemented") +} +func (UnimplementedInjectiveAccountsRPCServer) StreamSubaccountBalance(*StreamSubaccountBalanceRequest, InjectiveAccountsRPC_StreamSubaccountBalanceServer) error { + return status.Errorf(codes.Unimplemented, "method StreamSubaccountBalance not implemented") +} +func (UnimplementedInjectiveAccountsRPCServer) SubaccountHistory(context.Context, *SubaccountHistoryRequest) (*SubaccountHistoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountHistory not implemented") +} +func (UnimplementedInjectiveAccountsRPCServer) mustEmbedUnimplementedInjectiveAccountsRPCServer() {} + +// UnsafeInjectiveAccountsRPCServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InjectiveAccountsRPCServer will +// result in compilation errors. +type UnsafeInjectiveAccountsRPCServer interface { + mustEmbedUnimplementedInjectiveAccountsRPCServer() +} + +func RegisterInjectiveAccountsRPCServer(s grpc.ServiceRegistrar, srv InjectiveAccountsRPCServer) { + s.RegisterService(&InjectiveAccountsRPC_ServiceDesc, srv) +} + +func _InjectiveAccountsRPC_SubaccountsList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountsListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveAccountsRPCServer).SubaccountsList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountsList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveAccountsRPCServer).SubaccountsList(ctx, req.(*SubaccountsListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveAccountsRPC_SubaccountBalancesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountBalancesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveAccountsRPCServer).SubaccountBalancesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalancesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveAccountsRPCServer).SubaccountBalancesList(ctx, req.(*SubaccountBalancesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveAccountsRPC_SubaccountBalanceEndpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveAccountsRPCServer).SubaccountBalanceEndpoint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalanceEndpoint", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveAccountsRPCServer).SubaccountBalanceEndpoint(ctx, req.(*SubaccountBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveAccountsRPC_StreamSubaccountBalance_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamSubaccountBalanceRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveAccountsRPCServer).StreamSubaccountBalance(m, &injectiveAccountsRPCStreamSubaccountBalanceServer{stream}) +} + +type InjectiveAccountsRPC_StreamSubaccountBalanceServer interface { + Send(*StreamSubaccountBalanceResponse) error + grpc.ServerStream +} + +type injectiveAccountsRPCStreamSubaccountBalanceServer struct { + grpc.ServerStream +} + +func (x *injectiveAccountsRPCStreamSubaccountBalanceServer) Send(m *StreamSubaccountBalanceResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveAccountsRPC_SubaccountHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountHistoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveAccountsRPCServer).SubaccountHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountHistory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveAccountsRPCServer).SubaccountHistory(ctx, req.(*SubaccountHistoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InjectiveAccountsRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveAccountsRPC service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InjectiveAccountsRPC_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "injective_accounts_rpc.InjectiveAccountsRPC", + HandlerType: (*InjectiveAccountsRPCServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SubaccountsList", + Handler: _InjectiveAccountsRPC_SubaccountsList_Handler, + }, + { + MethodName: "SubaccountBalancesList", + Handler: _InjectiveAccountsRPC_SubaccountBalancesList_Handler, + }, + { + MethodName: "SubaccountBalanceEndpoint", + Handler: _InjectiveAccountsRPC_SubaccountBalanceEndpoint_Handler, + }, + { + MethodName: "SubaccountHistory", + Handler: _InjectiveAccountsRPC_SubaccountHistory_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamSubaccountBalance", + Handler: _InjectiveAccountsRPC_StreamSubaccountBalance_Handler, + ServerStreams: true, + }, + }, + Metadata: "injective_accounts_rpc.proto", +} diff --git a/exchange/derivative_exchange_rpc/client/client.go b/exchange/derivative_exchange_rpc/client/client.go new file mode 100644 index 00000000..3e086b2b --- /dev/null +++ b/exchange/derivative_exchange_rpc/client/client.go @@ -0,0 +1,394 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveDerivativeExchangeRPC gRPC client +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_derivative_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_derivative_exchange_rpc/pb" + injectivederivativeexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_derivative_exchange_rpc" + goagrpc "goa.design/goa/v3/grpc" + goapb "goa.design/goa/v3/grpc/pb" + goa "goa.design/goa/v3/pkg" + "google.golang.org/grpc" +) + +// Client lists the service endpoint gRPC clients. +type Client struct { + grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient + opts []grpc.CallOption +} + +// StreamMarketClientStream implements the +// injectivederivativeexchangerpc.StreamMarketClientStream interface. +type StreamMarketClientStream struct { + stream injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamMarketClient +} + +// StreamOrderbookClientStream implements the +// injectivederivativeexchangerpc.StreamOrderbookClientStream interface. +type StreamOrderbookClientStream struct { + stream injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamOrderbookClient +} + +// StreamOrdersClientStream implements the +// injectivederivativeexchangerpc.StreamOrdersClientStream interface. +type StreamOrdersClientStream struct { + stream injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamOrdersClient +} + +// StreamTradesClientStream implements the +// injectivederivativeexchangerpc.StreamTradesClientStream interface. +type StreamTradesClientStream struct { + stream injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamTradesClient +} + +// NewClient instantiates gRPC client for all the +// InjectiveDerivativeExchangeRPC service servers. +func NewClient(cc *grpc.ClientConn, opts ...grpc.CallOption) *Client { + return &Client{ + grpccli: injective_derivative_exchange_rpcpb.NewInjectiveDerivativeExchangeRPCClient(cc), + opts: opts, + } +} + +// Markets calls the "Markets" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Markets() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildMarketsFunc(c.grpccli, c.opts...), + EncodeMarketsRequest, + DecodeMarketsResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Market calls the "Market" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Market() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildMarketFunc(c.grpccli, c.opts...), + EncodeMarketRequest, + DecodeMarketResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamMarket calls the "StreamMarket" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) StreamMarket() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamMarketFunc(c.grpccli, c.opts...), + EncodeStreamMarketRequest, + DecodeStreamMarketResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Orderbook calls the "Orderbook" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Orderbook() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildOrderbookFunc(c.grpccli, c.opts...), + EncodeOrderbookRequest, + DecodeOrderbookResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamOrderbook calls the "StreamOrderbook" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) StreamOrderbook() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamOrderbookFunc(c.grpccli, c.opts...), + EncodeStreamOrderbookRequest, + DecodeStreamOrderbookResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Orders calls the "Orders" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Orders() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildOrdersFunc(c.grpccli, c.opts...), + EncodeOrdersRequest, + DecodeOrdersResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Positions calls the "Positions" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Positions() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildPositionsFunc(c.grpccli, c.opts...), + EncodePositionsRequest, + DecodePositionsResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamOrders calls the "StreamOrders" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) StreamOrders() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamOrdersFunc(c.grpccli, c.opts...), + EncodeStreamOrdersRequest, + DecodeStreamOrdersResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Trades calls the "Trades" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) Trades() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildTradesFunc(c.grpccli, c.opts...), + EncodeTradesRequest, + DecodeTradesResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamTrades calls the "StreamTrades" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) StreamTrades() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamTradesFunc(c.grpccli, c.opts...), + EncodeStreamTradesRequest, + DecodeStreamTradesResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountOrdersList calls the "SubaccountOrdersList" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) SubaccountOrdersList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountOrdersListFunc(c.grpccli, c.opts...), + EncodeSubaccountOrdersListRequest, + DecodeSubaccountOrdersListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountTradesList calls the "SubaccountTradesList" function in +// injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient +// interface. +func (c *Client) SubaccountTradesList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountTradesListFunc(c.grpccli, c.opts...), + EncodeSubaccountTradesListRequest, + DecodeSubaccountTradesListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Recv reads instances of +// "injective_derivative_exchange_rpcpb.StreamMarketResponse" from the +// "streamMarket" endpoint gRPC stream. +func (s *StreamMarketClientStream) Recv() (*injectivederivativeexchangerpc.StreamMarketResult, error) { + var res *injectivederivativeexchangerpc.StreamMarketResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamMarketResponse(v); err != nil { + return res, err + } + return NewStreamMarketResult(v), nil +} + +// Recv reads instances of +// "injective_derivative_exchange_rpcpb.StreamOrderbookResponse" from the +// "streamOrderbook" endpoint gRPC stream. +func (s *StreamOrderbookClientStream) Recv() (*injectivederivativeexchangerpc.StreamOrderbookResult, error) { + var res *injectivederivativeexchangerpc.StreamOrderbookResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamOrderbookResponse(v); err != nil { + return res, err + } + return NewStreamOrderbookResult(v), nil +} + +// Recv reads instances of +// "injective_derivative_exchange_rpcpb.StreamOrdersResponse" from the +// "streamOrders" endpoint gRPC stream. +func (s *StreamOrdersClientStream) Recv() (*injectivederivativeexchangerpc.StreamOrdersResult, error) { + var res *injectivederivativeexchangerpc.StreamOrdersResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamOrdersResponse(v); err != nil { + return res, err + } + return NewStreamOrdersResult(v), nil +} + +// Recv reads instances of +// "injective_derivative_exchange_rpcpb.StreamTradesResponse" from the +// "streamTrades" endpoint gRPC stream. +func (s *StreamTradesClientStream) Recv() (*injectivederivativeexchangerpc.StreamTradesResult, error) { + var res *injectivederivativeexchangerpc.StreamTradesResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamTradesResponse(v); err != nil { + return res, err + } + return NewStreamTradesResult(v), nil +} diff --git a/exchange/derivative_exchange_rpc/client/encode_decode.go b/exchange/derivative_exchange_rpc/client/encode_decode.go new file mode 100644 index 00000000..044772d4 --- /dev/null +++ b/exchange/derivative_exchange_rpc/client/encode_decode.go @@ -0,0 +1,450 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveDerivativeExchangeRPC gRPC client encoders and decoders +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_derivative_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_derivative_exchange_rpc/pb" + injectivederivativeexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_derivative_exchange_rpc" + goagrpc "goa.design/goa/v3/grpc" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// BuildMarketsFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "markets" endpoint. +func BuildMarketsFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Markets(ctx, reqpb.(*injective_derivative_exchange_rpcpb.MarketsRequest), opts...) + } + return grpccli.Markets(ctx, &injective_derivative_exchange_rpcpb.MarketsRequest{}, opts...) + } +} + +// EncodeMarketsRequest encodes requests sent to InjectiveDerivativeExchangeRPC +// markets endpoint. +func EncodeMarketsRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.MarketsPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "markets", "*injectivederivativeexchangerpc.MarketsPayload", v) + } + return NewMarketsRequest(payload), nil +} + +// DecodeMarketsResponse decodes responses from the +// InjectiveDerivativeExchangeRPC markets endpoint. +func DecodeMarketsResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.MarketsResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "markets", "*injective_derivative_exchange_rpcpb.MarketsResponse", v) + } + if err := ValidateMarketsResponse(message); err != nil { + return nil, err + } + res := NewMarketsResult(message) + return res, nil +} + +// BuildMarketFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "market" endpoint. +func BuildMarketFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Market(ctx, reqpb.(*injective_derivative_exchange_rpcpb.MarketRequest), opts...) + } + return grpccli.Market(ctx, &injective_derivative_exchange_rpcpb.MarketRequest{}, opts...) + } +} + +// EncodeMarketRequest encodes requests sent to InjectiveDerivativeExchangeRPC +// market endpoint. +func EncodeMarketRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.MarketPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "market", "*injectivederivativeexchangerpc.MarketPayload", v) + } + return NewMarketRequest(payload), nil +} + +// DecodeMarketResponse decodes responses from the +// InjectiveDerivativeExchangeRPC market endpoint. +func DecodeMarketResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.MarketResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "market", "*injective_derivative_exchange_rpcpb.MarketResponse", v) + } + if err := ValidateMarketResponse(message); err != nil { + return nil, err + } + res := NewMarketResult(message) + return res, nil +} + +// BuildStreamMarketFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "streamMarket" endpoint. +func BuildStreamMarketFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamMarket(ctx, reqpb.(*injective_derivative_exchange_rpcpb.StreamMarketRequest), opts...) + } + return grpccli.StreamMarket(ctx, &injective_derivative_exchange_rpcpb.StreamMarketRequest{}, opts...) + } +} + +// EncodeStreamMarketRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC streamMarket endpoint. +func EncodeStreamMarketRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.StreamMarketPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "streamMarket", "*injectivederivativeexchangerpc.StreamMarketPayload", v) + } + return NewStreamMarketRequest(payload), nil +} + +// DecodeStreamMarketResponse decodes responses from the +// InjectiveDerivativeExchangeRPC streamMarket endpoint. +func DecodeStreamMarketResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamMarketClientStream{ + stream: v.(injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamMarketClient), + }, nil +} + +// BuildOrderbookFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "orderbook" endpoint. +func BuildOrderbookFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Orderbook(ctx, reqpb.(*injective_derivative_exchange_rpcpb.OrderbookRequest), opts...) + } + return grpccli.Orderbook(ctx, &injective_derivative_exchange_rpcpb.OrderbookRequest{}, opts...) + } +} + +// EncodeOrderbookRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC orderbook endpoint. +func EncodeOrderbookRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.OrderbookPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "orderbook", "*injectivederivativeexchangerpc.OrderbookPayload", v) + } + return NewOrderbookRequest(payload), nil +} + +// DecodeOrderbookResponse decodes responses from the +// InjectiveDerivativeExchangeRPC orderbook endpoint. +func DecodeOrderbookResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.OrderbookResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "orderbook", "*injective_derivative_exchange_rpcpb.OrderbookResponse", v) + } + if err := ValidateOrderbookResponse(message); err != nil { + return nil, err + } + res := NewOrderbookResult(message) + return res, nil +} + +// BuildStreamOrderbookFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "streamOrderbook" endpoint. +func BuildStreamOrderbookFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamOrderbook(ctx, reqpb.(*injective_derivative_exchange_rpcpb.StreamOrderbookRequest), opts...) + } + return grpccli.StreamOrderbook(ctx, &injective_derivative_exchange_rpcpb.StreamOrderbookRequest{}, opts...) + } +} + +// EncodeStreamOrderbookRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC streamOrderbook endpoint. +func EncodeStreamOrderbookRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.StreamOrderbookPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "streamOrderbook", "*injectivederivativeexchangerpc.StreamOrderbookPayload", v) + } + return NewStreamOrderbookRequest(payload), nil +} + +// DecodeStreamOrderbookResponse decodes responses from the +// InjectiveDerivativeExchangeRPC streamOrderbook endpoint. +func DecodeStreamOrderbookResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamOrderbookClientStream{ + stream: v.(injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamOrderbookClient), + }, nil +} + +// BuildOrdersFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "orders" endpoint. +func BuildOrdersFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Orders(ctx, reqpb.(*injective_derivative_exchange_rpcpb.OrdersRequest), opts...) + } + return grpccli.Orders(ctx, &injective_derivative_exchange_rpcpb.OrdersRequest{}, opts...) + } +} + +// EncodeOrdersRequest encodes requests sent to InjectiveDerivativeExchangeRPC +// orders endpoint. +func EncodeOrdersRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.DerivativeLimitOrdersFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "orders", "*injectivederivativeexchangerpc.DerivativeLimitOrdersFilter", v) + } + return NewOrdersRequest(payload), nil +} + +// DecodeOrdersResponse decodes responses from the +// InjectiveDerivativeExchangeRPC orders endpoint. +func DecodeOrdersResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.OrdersResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "orders", "*injective_derivative_exchange_rpcpb.OrdersResponse", v) + } + if err := ValidateOrdersResponse(message); err != nil { + return nil, err + } + res := NewOrdersResult(message) + return res, nil +} + +// BuildPositionsFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "positions" endpoint. +func BuildPositionsFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Positions(ctx, reqpb.(*injective_derivative_exchange_rpcpb.PositionsRequest), opts...) + } + return grpccli.Positions(ctx, &injective_derivative_exchange_rpcpb.PositionsRequest{}, opts...) + } +} + +// EncodePositionsRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC positions endpoint. +func EncodePositionsRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.DerivativePositionsFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "positions", "*injectivederivativeexchangerpc.DerivativePositionsFilter", v) + } + return NewPositionsRequest(payload), nil +} + +// DecodePositionsResponse decodes responses from the +// InjectiveDerivativeExchangeRPC positions endpoint. +func DecodePositionsResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.PositionsResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "positions", "*injective_derivative_exchange_rpcpb.PositionsResponse", v) + } + if err := ValidatePositionsResponse(message); err != nil { + return nil, err + } + res := NewPositionsResult(message) + return res, nil +} + +// BuildStreamOrdersFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "streamOrders" endpoint. +func BuildStreamOrdersFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamOrders(ctx, reqpb.(*injective_derivative_exchange_rpcpb.StreamOrdersRequest), opts...) + } + return grpccli.StreamOrders(ctx, &injective_derivative_exchange_rpcpb.StreamOrdersRequest{}, opts...) + } +} + +// EncodeStreamOrdersRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC streamOrders endpoint. +func EncodeStreamOrdersRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.DerivativeLimitOrdersFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "streamOrders", "*injectivederivativeexchangerpc.DerivativeLimitOrdersFilter", v) + } + return NewStreamOrdersRequest(payload), nil +} + +// DecodeStreamOrdersResponse decodes responses from the +// InjectiveDerivativeExchangeRPC streamOrders endpoint. +func DecodeStreamOrdersResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamOrdersClientStream{ + stream: v.(injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamOrdersClient), + }, nil +} + +// BuildTradesFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "trades" endpoint. +func BuildTradesFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Trades(ctx, reqpb.(*injective_derivative_exchange_rpcpb.TradesRequest), opts...) + } + return grpccli.Trades(ctx, &injective_derivative_exchange_rpcpb.TradesRequest{}, opts...) + } +} + +// EncodeTradesRequest encodes requests sent to InjectiveDerivativeExchangeRPC +// trades endpoint. +func EncodeTradesRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.DerivativeTradesFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "trades", "*injectivederivativeexchangerpc.DerivativeTradesFilter", v) + } + return NewTradesRequest(payload), nil +} + +// DecodeTradesResponse decodes responses from the +// InjectiveDerivativeExchangeRPC trades endpoint. +func DecodeTradesResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.TradesResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "trades", "*injective_derivative_exchange_rpcpb.TradesResponse", v) + } + if err := ValidateTradesResponse(message); err != nil { + return nil, err + } + res := NewTradesResult(message) + return res, nil +} + +// BuildStreamTradesFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "streamTrades" endpoint. +func BuildStreamTradesFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamTrades(ctx, reqpb.(*injective_derivative_exchange_rpcpb.StreamTradesRequest), opts...) + } + return grpccli.StreamTrades(ctx, &injective_derivative_exchange_rpcpb.StreamTradesRequest{}, opts...) + } +} + +// EncodeStreamTradesRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC streamTrades endpoint. +func EncodeStreamTradesRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.DerivativeTradesFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "streamTrades", "*injectivederivativeexchangerpc.DerivativeTradesFilter", v) + } + return NewStreamTradesRequest(payload), nil +} + +// DecodeStreamTradesResponse decodes responses from the +// InjectiveDerivativeExchangeRPC streamTrades endpoint. +func DecodeStreamTradesResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamTradesClientStream{ + stream: v.(injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPC_StreamTradesClient), + }, nil +} + +// BuildSubaccountOrdersListFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "subaccountOrdersList" endpoint. +func BuildSubaccountOrdersListFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountOrdersList(ctx, reqpb.(*injective_derivative_exchange_rpcpb.SubaccountOrdersListRequest), opts...) + } + return grpccli.SubaccountOrdersList(ctx, &injective_derivative_exchange_rpcpb.SubaccountOrdersListRequest{}, opts...) + } +} + +// EncodeSubaccountOrdersListRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC subaccountOrdersList endpoint. +func EncodeSubaccountOrdersListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.SubaccountOrdersListPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "subaccountOrdersList", "*injectivederivativeexchangerpc.SubaccountOrdersListPayload", v) + } + return NewSubaccountOrdersListRequest(payload), nil +} + +// DecodeSubaccountOrdersListResponse decodes responses from the +// InjectiveDerivativeExchangeRPC subaccountOrdersList endpoint. +func DecodeSubaccountOrdersListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.SubaccountOrdersListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "subaccountOrdersList", "*injective_derivative_exchange_rpcpb.SubaccountOrdersListResponse", v) + } + if err := ValidateSubaccountOrdersListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountOrdersListResult(message) + return res, nil +} + +// BuildSubaccountTradesListFunc builds the remote method to invoke for +// "InjectiveDerivativeExchangeRPC" service "subaccountTradesList" endpoint. +func BuildSubaccountTradesListFunc(grpccli injective_derivative_exchange_rpcpb.InjectiveDerivativeExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountTradesList(ctx, reqpb.(*injective_derivative_exchange_rpcpb.SubaccountTradesListRequest), opts...) + } + return grpccli.SubaccountTradesList(ctx, &injective_derivative_exchange_rpcpb.SubaccountTradesListRequest{}, opts...) + } +} + +// EncodeSubaccountTradesListRequest encodes requests sent to +// InjectiveDerivativeExchangeRPC subaccountTradesList endpoint. +func EncodeSubaccountTradesListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivederivativeexchangerpc.SubaccountTradesListPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "subaccountTradesList", "*injectivederivativeexchangerpc.SubaccountTradesListPayload", v) + } + return NewSubaccountTradesListRequest(payload), nil +} + +// DecodeSubaccountTradesListResponse decodes responses from the +// InjectiveDerivativeExchangeRPC subaccountTradesList endpoint. +func DecodeSubaccountTradesListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_derivative_exchange_rpcpb.SubaccountTradesListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveDerivativeExchangeRPC", "subaccountTradesList", "*injective_derivative_exchange_rpcpb.SubaccountTradesListResponse", v) + } + if err := ValidateSubaccountTradesListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountTradesListResult(message) + return res, nil +} diff --git a/exchange/derivative_exchange_rpc/client/types.go b/exchange/derivative_exchange_rpc/client/types.go new file mode 100644 index 00000000..4443361b --- /dev/null +++ b/exchange/derivative_exchange_rpc/client/types.go @@ -0,0 +1,1175 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveDerivativeExchangeRPC gRPC client types +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "unicode/utf8" + + injective_derivative_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_derivative_exchange_rpc/pb" + injectivederivativeexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_derivative_exchange_rpc" + goa "goa.design/goa/v3/pkg" +) + +// NewMarketsRequest builds the gRPC request type from the payload of the +// "markets" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewMarketsRequest(payload *injectivederivativeexchangerpc.MarketsPayload) *injective_derivative_exchange_rpcpb.MarketsRequest { + message := &injective_derivative_exchange_rpcpb.MarketsRequest{ + MarketStatus: payload.MarketStatus, + } + if payload.QuoteDenom != nil { + message.QuoteDenom = *payload.QuoteDenom + } + return message +} + +// NewMarketsResult builds the result type of the "markets" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewMarketsResult(message *injective_derivative_exchange_rpcpb.MarketsResponse) *injectivederivativeexchangerpc.MarketsResult { + result := &injectivederivativeexchangerpc.MarketsResult{} + if message.Markets != nil { + result.Markets = make([]*injectivederivativeexchangerpc.DerivativeMarketInfo, len(message.Markets)) + for i, val := range message.Markets { + result.Markets[i] = &injectivederivativeexchangerpc.DerivativeMarketInfo{ + MarketID: val.MarketId, + MarketStatus: val.MarketStatus, + Ticker: val.Ticker, + OracleBase: val.OracleBase, + OracleQuote: val.OracleQuote, + OracleType: val.OracleType, + InitialMarginRatio: val.InitialMarginRatio, + MaintenanceMarginRatio: val.MaintenanceMarginRatio, + QuoteDenom: val.QuoteDenom, + MakerFeeRate: val.MakerFeeRate, + TakerFeeRate: val.TakerFeeRate, + ServiceProviderFee: val.ServiceProviderFee, + IsPerpetual: val.IsPerpetual, + MaxPriceScaleDecimals: val.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: val.MaxQuantityScaleDecimals, + } + if val.QuoteTokenMeta != nil { + result.Markets[i].QuoteTokenMeta = protobufInjectiveDerivativeExchangeRpcpbTokenMetaToInjectivederivativeexchangerpcTokenMeta(val.QuoteTokenMeta) + } + } + } + return result +} + +// NewMarketRequest builds the gRPC request type from the payload of the +// "market" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewMarketRequest(payload *injectivederivativeexchangerpc.MarketPayload) *injective_derivative_exchange_rpcpb.MarketRequest { + message := &injective_derivative_exchange_rpcpb.MarketRequest{ + MarketId: payload.MarketID, + } + return message +} + +// NewMarketResult builds the result type of the "market" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewMarketResult(message *injective_derivative_exchange_rpcpb.MarketResponse) *injectivederivativeexchangerpc.MarketResult { + result := &injectivederivativeexchangerpc.MarketResult{} + if message.Market != nil { + result.Market = protobufInjectiveDerivativeExchangeRpcpbDerivativeMarketInfoToInjectivederivativeexchangerpcDerivativeMarketInfo(message.Market) + } + return result +} + +// NewStreamMarketRequest builds the gRPC request type from the payload of the +// "streamMarket" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewStreamMarketRequest(payload *injectivederivativeexchangerpc.StreamMarketPayload) *injective_derivative_exchange_rpcpb.StreamMarketRequest { + message := &injective_derivative_exchange_rpcpb.StreamMarketRequest{} + if payload.MarketIds != nil { + message.MarketIds = make([]string, len(payload.MarketIds)) + for i, val := range payload.MarketIds { + message.MarketIds[i] = val + } + } + return message +} + +func NewStreamMarketResult(v *injective_derivative_exchange_rpcpb.StreamMarketResponse) *injectivederivativeexchangerpc.StreamMarketResult { + result := &injectivederivativeexchangerpc.StreamMarketResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Market != nil { + result.Market = protobufInjectiveDerivativeExchangeRpcpbDerivativeMarketInfoToInjectivederivativeexchangerpcDerivativeMarketInfo(v.Market) + } + return result +} + +// NewOrderbookRequest builds the gRPC request type from the payload of the +// "orderbook" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewOrderbookRequest(payload *injectivederivativeexchangerpc.OrderbookPayload) *injective_derivative_exchange_rpcpb.OrderbookRequest { + message := &injective_derivative_exchange_rpcpb.OrderbookRequest{ + MarketId: payload.MarketID, + } + return message +} + +// NewOrderbookResult builds the result type of the "orderbook" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewOrderbookResult(message *injective_derivative_exchange_rpcpb.OrderbookResponse) *injectivederivativeexchangerpc.OrderbookResult { + result := &injectivederivativeexchangerpc.OrderbookResult{} + if message.Orderbook != nil { + result.Orderbook = protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbookToInjectivederivativeexchangerpcDerivativeLimitOrderbook(message.Orderbook) + } + return result +} + +// NewStreamOrderbookRequest builds the gRPC request type from the payload of +// the "streamOrderbook" endpoint of the "InjectiveDerivativeExchangeRPC" +// service. +func NewStreamOrderbookRequest(payload *injectivederivativeexchangerpc.StreamOrderbookPayload) *injective_derivative_exchange_rpcpb.StreamOrderbookRequest { + message := &injective_derivative_exchange_rpcpb.StreamOrderbookRequest{ + MarketId: payload.MarketID, + } + return message +} + +func NewStreamOrderbookResult(v *injective_derivative_exchange_rpcpb.StreamOrderbookResponse) *injectivederivativeexchangerpc.StreamOrderbookResult { + result := &injectivederivativeexchangerpc.StreamOrderbookResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Orderbook != nil { + result.Orderbook = protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbookToInjectivederivativeexchangerpcDerivativeLimitOrderbook(v.Orderbook) + } + return result +} + +// NewOrdersRequest builds the gRPC request type from the payload of the +// "orders" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewOrdersRequest(payload *injectivederivativeexchangerpc.DerivativeLimitOrdersFilter) *injective_derivative_exchange_rpcpb.OrdersRequest { + message := &injective_derivative_exchange_rpcpb.OrdersRequest{ + MarketId: payload.MarketID, + } + if payload.OrderType != nil { + message.OrderType = *payload.OrderType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +// NewOrdersResult builds the result type of the "orders" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewOrdersResult(message *injective_derivative_exchange_rpcpb.OrdersResponse) *injectivederivativeexchangerpc.OrdersResult { + result := &injectivederivativeexchangerpc.OrdersResult{} + if message.Orders != nil { + result.Orders = make([]*injectivederivativeexchangerpc.DerivativeLimitOrder, len(message.Orders)) + for i, val := range message.Orders { + result.Orders[i] = &injectivederivativeexchangerpc.DerivativeLimitOrder{ + OrderHash: val.OrderHash, + OrderType: val.OrderType, + MarketID: val.MarketId, + SubaccountID: val.SubaccountId, + IsReduceOnly: val.IsReduceOnly, + Margin: val.Margin, + Price: val.Price, + Quantity: val.Quantity, + UnfilledQuantity: val.UnfilledQuantity, + FeeRecipient: val.FeeRecipient, + State: val.State, + CreatedAt: val.CreatedAt, + } + if val.TriggerPrice != "" { + result.Orders[i].TriggerPrice = &val.TriggerPrice + } + if val.UpdatedAt != 0 { + result.Orders[i].UpdatedAt = &val.UpdatedAt + } + } + } + return result +} + +// NewPositionsRequest builds the gRPC request type from the payload of the +// "positions" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewPositionsRequest(payload *injectivederivativeexchangerpc.DerivativePositionsFilter) *injective_derivative_exchange_rpcpb.PositionsRequest { + message := &injective_derivative_exchange_rpcpb.PositionsRequest{} + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + if payload.MarketID != nil { + message.MarketId = *payload.MarketID + } + return message +} + +// NewPositionsResult builds the result type of the "positions" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewPositionsResult(message *injective_derivative_exchange_rpcpb.PositionsResponse) *injectivederivativeexchangerpc.PositionsResult { + result := &injectivederivativeexchangerpc.PositionsResult{} + if message.Positions != nil { + result.Positions = make([]*injectivederivativeexchangerpc.DerivativePosition, len(message.Positions)) + for i, val := range message.Positions { + result.Positions[i] = &injectivederivativeexchangerpc.DerivativePosition{ + MarketID: val.MarketId, + SubaccountID: val.SubaccountId, + Direction: val.Direction, + Quantity: val.Quantity, + EntryPrice: val.EntryPrice, + Margin: val.Margin, + HoldQuantity: val.HoldQuantity, + LiquidationPrice: val.LiquidationPrice, + MarkPrice: val.MarkPrice, + ImpliedPNL: val.ImpliedPnl, + Leverage: val.Leverage, + } + } + } + return result +} + +// NewStreamOrdersRequest builds the gRPC request type from the payload of the +// "streamOrders" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewStreamOrdersRequest(payload *injectivederivativeexchangerpc.DerivativeLimitOrdersFilter) *injective_derivative_exchange_rpcpb.StreamOrdersRequest { + message := &injective_derivative_exchange_rpcpb.StreamOrdersRequest{ + MarketId: payload.MarketID, + } + if payload.OrderType != nil { + message.OrderType = *payload.OrderType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +func NewStreamOrdersResult(v *injective_derivative_exchange_rpcpb.StreamOrdersResponse) *injectivederivativeexchangerpc.StreamOrdersResult { + result := &injectivederivativeexchangerpc.StreamOrdersResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Order != nil { + result.Order = protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderToInjectivederivativeexchangerpcDerivativeLimitOrder(v.Order) + } + return result +} + +// NewTradesRequest builds the gRPC request type from the payload of the +// "trades" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewTradesRequest(payload *injectivederivativeexchangerpc.DerivativeTradesFilter) *injective_derivative_exchange_rpcpb.TradesRequest { + message := &injective_derivative_exchange_rpcpb.TradesRequest{ + MarketId: payload.MarketID, + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.ExecutionSide != nil { + message.ExecutionSide = *payload.ExecutionSide + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +// NewTradesResult builds the result type of the "trades" endpoint of the +// "InjectiveDerivativeExchangeRPC" service from the gRPC response type. +func NewTradesResult(message *injective_derivative_exchange_rpcpb.TradesResponse) *injectivederivativeexchangerpc.TradesResult { + result := &injectivederivativeexchangerpc.TradesResult{} + if message.Trades != nil { + result.Trades = make([]*injectivederivativeexchangerpc.DerivativeTrade, len(message.Trades)) + for i, val := range message.Trades { + result.Trades[i] = &injectivederivativeexchangerpc.DerivativeTrade{ + OrderHash: val.OrderHash, + SubaccountID: val.SubaccountId, + MarketID: val.MarketId, + TradeExecutionType: val.TradeExecutionType, + IsLiquidation: val.IsLiquidation, + Payout: val.Payout, + Fee: val.Fee, + ExecutedAt: val.ExecutedAt, + } + if val.PositionDelta != nil { + result.Trades[i].PositionDelta = protobufInjectiveDerivativeExchangeRpcpbPositionDeltaToInjectivederivativeexchangerpcPositionDelta(val.PositionDelta) + } + } + } + return result +} + +// NewStreamTradesRequest builds the gRPC request type from the payload of the +// "streamTrades" endpoint of the "InjectiveDerivativeExchangeRPC" service. +func NewStreamTradesRequest(payload *injectivederivativeexchangerpc.DerivativeTradesFilter) *injective_derivative_exchange_rpcpb.StreamTradesRequest { + message := &injective_derivative_exchange_rpcpb.StreamTradesRequest{ + MarketId: payload.MarketID, + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.ExecutionSide != nil { + message.ExecutionSide = *payload.ExecutionSide + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +func NewStreamTradesResult(v *injective_derivative_exchange_rpcpb.StreamTradesResponse) *injectivederivativeexchangerpc.StreamTradesResult { + result := &injectivederivativeexchangerpc.StreamTradesResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Trade != nil { + result.Trade = protobufInjectiveDerivativeExchangeRpcpbDerivativeTradeToInjectivederivativeexchangerpcDerivativeTrade(v.Trade) + } + return result +} + +// NewSubaccountOrdersListRequest builds the gRPC request type from the payload +// of the "subaccountOrdersList" endpoint of the +// "InjectiveDerivativeExchangeRPC" service. +func NewSubaccountOrdersListRequest(payload *injectivederivativeexchangerpc.SubaccountOrdersListPayload) *injective_derivative_exchange_rpcpb.SubaccountOrdersListRequest { + message := &injective_derivative_exchange_rpcpb.SubaccountOrdersListRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.MarketID != nil { + message.MarketId = *payload.MarketID + } + return message +} + +// NewSubaccountOrdersListResult builds the result type of the +// "subaccountOrdersList" endpoint of the "InjectiveDerivativeExchangeRPC" +// service from the gRPC response type. +func NewSubaccountOrdersListResult(message *injective_derivative_exchange_rpcpb.SubaccountOrdersListResponse) *injectivederivativeexchangerpc.SubaccountOrdersListResult { + result := &injectivederivativeexchangerpc.SubaccountOrdersListResult{} + if message.Orders != nil { + result.Orders = make([]*injectivederivativeexchangerpc.DerivativeLimitOrder, len(message.Orders)) + for i, val := range message.Orders { + result.Orders[i] = &injectivederivativeexchangerpc.DerivativeLimitOrder{ + OrderHash: val.OrderHash, + OrderType: val.OrderType, + MarketID: val.MarketId, + SubaccountID: val.SubaccountId, + IsReduceOnly: val.IsReduceOnly, + Margin: val.Margin, + Price: val.Price, + Quantity: val.Quantity, + UnfilledQuantity: val.UnfilledQuantity, + FeeRecipient: val.FeeRecipient, + State: val.State, + CreatedAt: val.CreatedAt, + } + if val.TriggerPrice != "" { + result.Orders[i].TriggerPrice = &val.TriggerPrice + } + if val.UpdatedAt != 0 { + result.Orders[i].UpdatedAt = &val.UpdatedAt + } + } + } + return result +} + +// NewSubaccountTradesListRequest builds the gRPC request type from the payload +// of the "subaccountTradesList" endpoint of the +// "InjectiveDerivativeExchangeRPC" service. +func NewSubaccountTradesListRequest(payload *injectivederivativeexchangerpc.SubaccountTradesListPayload) *injective_derivative_exchange_rpcpb.SubaccountTradesListRequest { + message := &injective_derivative_exchange_rpcpb.SubaccountTradesListRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.MarketID != nil { + message.MarketId = *payload.MarketID + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + return message +} + +// NewSubaccountTradesListResult builds the result type of the +// "subaccountTradesList" endpoint of the "InjectiveDerivativeExchangeRPC" +// service from the gRPC response type. +func NewSubaccountTradesListResult(message *injective_derivative_exchange_rpcpb.SubaccountTradesListResponse) *injectivederivativeexchangerpc.SubaccountTradesListResult { + result := &injectivederivativeexchangerpc.SubaccountTradesListResult{} + if message.Trades != nil { + result.Trades = make([]*injectivederivativeexchangerpc.DerivativeTrade, len(message.Trades)) + for i, val := range message.Trades { + result.Trades[i] = &injectivederivativeexchangerpc.DerivativeTrade{ + OrderHash: val.OrderHash, + SubaccountID: val.SubaccountId, + MarketID: val.MarketId, + TradeExecutionType: val.TradeExecutionType, + IsLiquidation: val.IsLiquidation, + Payout: val.Payout, + Fee: val.Fee, + ExecutedAt: val.ExecutedAt, + } + if val.PositionDelta != nil { + result.Trades[i].PositionDelta = protobufInjectiveDerivativeExchangeRpcpbPositionDeltaToInjectivederivativeexchangerpcPositionDelta(val.PositionDelta) + } + } + } + return result +} + +// ValidateMarketsResponse runs the validations defined on MarketsResponse. +func ValidateMarketsResponse(message *injective_derivative_exchange_rpcpb.MarketsResponse) (err error) { + for _, e := range message.Markets { + if e != nil { + if err2 := ValidateDerivativeMarketInfo(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateDerivativeMarketInfo runs the validations defined on +// DerivativeMarketInfo. +func ValidateDerivativeMarketInfo(message *injective_derivative_exchange_rpcpb.DerivativeMarketInfo) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + if !(message.MarketStatus == "active" || message.MarketStatus == "paused" || message.MarketStatus == "suspended" || message.MarketStatus == "demolished" || message.MarketStatus == "expired") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.marketStatus", message.MarketStatus, []interface{}{"active", "paused", "suspended", "demolished", "expired"})) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.initialMarginRatio", message.InitialMarginRatio, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.InitialMarginRatio) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.initialMarginRatio", message.InitialMarginRatio, utf8.RuneCountInString(message.InitialMarginRatio), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.maintenanceMarginRatio", message.MaintenanceMarginRatio, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.MaintenanceMarginRatio) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.maintenanceMarginRatio", message.MaintenanceMarginRatio, utf8.RuneCountInString(message.MaintenanceMarginRatio), 100, false)) + } + if message.QuoteTokenMeta != nil { + if err2 := ValidateTokenMeta(message.QuoteTokenMeta); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.makerFeeRate", message.MakerFeeRate, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.MakerFeeRate) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.makerFeeRate", message.MakerFeeRate, utf8.RuneCountInString(message.MakerFeeRate), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.takerFeeRate", message.TakerFeeRate, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.TakerFeeRate) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.takerFeeRate", message.TakerFeeRate, utf8.RuneCountInString(message.TakerFeeRate), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.serviceProviderFee", message.ServiceProviderFee, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ServiceProviderFee) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.serviceProviderFee", message.ServiceProviderFee, utf8.RuneCountInString(message.ServiceProviderFee), 100, false)) + } + return +} + +// ValidateTokenMeta runs the validations defined on TokenMeta. +func ValidateTokenMeta(message *injective_derivative_exchange_rpcpb.TokenMeta) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.address", message.Address, "^0x[0-9a-fA-F]{40}$")) + if utf8.RuneCountInString(message.Address) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.address", message.Address, utf8.RuneCountInString(message.Address), 42, true)) + } + if utf8.RuneCountInString(message.Address) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.address", message.Address, utf8.RuneCountInString(message.Address), 42, false)) + } + if utf8.RuneCountInString(message.Symbol) > 16 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.symbol", message.Symbol, utf8.RuneCountInString(message.Symbol), 16, false)) + } + if message.Logo != "" { + if utf8.RuneCountInString(message.Logo) > 256 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.logo", message.Logo, utf8.RuneCountInString(message.Logo), 256, false)) + } + } + if message.Decimals < 0 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.decimals", message.Decimals, 0, true)) + } + if message.Decimals > 18 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.decimals", message.Decimals, 18, false)) + } + return +} + +// ValidateMarketResponse runs the validations defined on MarketResponse. +func ValidateMarketResponse(message *injective_derivative_exchange_rpcpb.MarketResponse) (err error) { + if message.Market != nil { + if err2 := ValidateDerivativeMarketInfo(message.Market); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateStreamMarketResponse runs the validations defined on +// StreamMarketResponse. +func ValidateStreamMarketResponse(message *injective_derivative_exchange_rpcpb.StreamMarketResponse) (err error) { + if message.Market == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("market", "message")) + } + if message.Market != nil { + if err2 := ValidateDerivativeMarketInfo(message.Market); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "delete" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "delete", "replace", "update", "invalidate"})) + } + return +} + +// ValidateOrderbookResponse runs the validations defined on OrderbookResponse. +func ValidateOrderbookResponse(message *injective_derivative_exchange_rpcpb.OrderbookResponse) (err error) { + if message.Orderbook != nil { + if err2 := ValidateDerivativeLimitOrderbook(message.Orderbook); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateDerivativeLimitOrderbook runs the validations defined on +// DerivativeLimitOrderbook. +func ValidateDerivativeLimitOrderbook(message *injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook) (err error) { + for _, e := range message.Buys { + if e != nil { + if err2 := ValidatePriceLevel(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + for _, e := range message.Sells { + if e != nil { + if err2 := ValidatePriceLevel(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidatePriceLevel runs the validations defined on PriceLevel. +func ValidatePriceLevel(message *injective_derivative_exchange_rpcpb.PriceLevel) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.price", message.Price, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Price) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.price", message.Price, utf8.RuneCountInString(message.Price), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.quantity", message.Quantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Quantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.quantity", message.Quantity, utf8.RuneCountInString(message.Quantity), 100, false)) + } + return +} + +// ValidateStreamOrderbookResponse runs the validations defined on +// StreamOrderbookResponse. +func ValidateStreamOrderbookResponse(message *injective_derivative_exchange_rpcpb.StreamOrderbookResponse) (err error) { + if message.Orderbook == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("orderbook", "message")) + } + if message.Orderbook != nil { + if err2 := ValidateDerivativeLimitOrderbook(message.Orderbook); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "delete" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "delete", "replace", "update", "invalidate"})) + } + return +} + +// ValidateOrdersResponse runs the validations defined on OrdersResponse. +func ValidateOrdersResponse(message *injective_derivative_exchange_rpcpb.OrdersResponse) (err error) { + for _, e := range message.Orders { + if e != nil { + if err2 := ValidateDerivativeLimitOrder(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateDerivativeLimitOrder runs the validations defined on +// DerivativeLimitOrder. +func ValidateDerivativeLimitOrder(message *injective_derivative_exchange_rpcpb.DerivativeLimitOrder) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.orderHash", message.OrderHash, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.OrderHash) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, true)) + } + if utf8.RuneCountInString(message.OrderHash) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, false)) + } + if !(message.OrderType == "buy" || message.OrderType == "sell" || message.OrderType == "stop_buy" || message.OrderType == "stop_sell" || message.OrderType == "take_buy" || message.OrderType == "take_sell") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.orderType", message.OrderType, []interface{}{"buy", "sell", "stop_buy", "stop_sell", "take_buy", "take_sell"})) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.margin", message.Margin, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Margin) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.margin", message.Margin, utf8.RuneCountInString(message.Margin), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.price", message.Price, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Price) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.price", message.Price, utf8.RuneCountInString(message.Price), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.quantity", message.Quantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Quantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.quantity", message.Quantity, utf8.RuneCountInString(message.Quantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.unfilledQuantity", message.UnfilledQuantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.UnfilledQuantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.unfilledQuantity", message.UnfilledQuantity, utf8.RuneCountInString(message.UnfilledQuantity), 100, false)) + } + if message.TriggerPrice != "" { + err = goa.MergeErrors(err, goa.ValidatePattern("message.triggerPrice", message.TriggerPrice, "^\\d+(\\.\\d+)?$")) + } + if message.TriggerPrice != "" { + if utf8.RuneCountInString(message.TriggerPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.triggerPrice", message.TriggerPrice, utf8.RuneCountInString(message.TriggerPrice), 100, false)) + } + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.feeRecipient", message.FeeRecipient, "^inj1[0-9a-zA-Z]{38}$")) + if utf8.RuneCountInString(message.FeeRecipient) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.feeRecipient", message.FeeRecipient, utf8.RuneCountInString(message.FeeRecipient), 42, true)) + } + if utf8.RuneCountInString(message.FeeRecipient) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.feeRecipient", message.FeeRecipient, utf8.RuneCountInString(message.FeeRecipient), 42, false)) + } + if !(message.State == "unfilled" || message.State == "filled" || message.State == "canceled") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.state", message.State, []interface{}{"unfilled", "filled", "canceled"})) + } + return +} + +// ValidatePositionsResponse runs the validations defined on PositionsResponse. +func ValidatePositionsResponse(message *injective_derivative_exchange_rpcpb.PositionsResponse) (err error) { + for _, e := range message.Positions { + if e != nil { + if err2 := ValidateDerivativePosition(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateDerivativePosition runs the validations defined on +// DerivativePosition. +func ValidateDerivativePosition(message *injective_derivative_exchange_rpcpb.DerivativePosition) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + if !(message.Direction == "long" || message.Direction == "short") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.direction", message.Direction, []interface{}{"long", "short"})) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.quantity", message.Quantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Quantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.quantity", message.Quantity, utf8.RuneCountInString(message.Quantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.entryPrice", message.EntryPrice, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.EntryPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.entryPrice", message.EntryPrice, utf8.RuneCountInString(message.EntryPrice), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.margin", message.Margin, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Margin) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.margin", message.Margin, utf8.RuneCountInString(message.Margin), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.holdQuantity", message.HoldQuantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.HoldQuantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.holdQuantity", message.HoldQuantity, utf8.RuneCountInString(message.HoldQuantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.liquidationPrice", message.LiquidationPrice, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.LiquidationPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.liquidationPrice", message.LiquidationPrice, utf8.RuneCountInString(message.LiquidationPrice), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.markPrice", message.MarkPrice, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.MarkPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.markPrice", message.MarkPrice, utf8.RuneCountInString(message.MarkPrice), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.impliedPNL", message.ImpliedPnl, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ImpliedPnl) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.impliedPNL", message.ImpliedPnl, utf8.RuneCountInString(message.ImpliedPnl), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.leverage", message.Leverage, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Leverage) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.leverage", message.Leverage, utf8.RuneCountInString(message.Leverage), 100, false)) + } + return +} + +// ValidateStreamOrdersResponse runs the validations defined on +// StreamOrdersResponse. +func ValidateStreamOrdersResponse(message *injective_derivative_exchange_rpcpb.StreamOrdersResponse) (err error) { + if message.Order == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("order", "message")) + } + if message.Order != nil { + if err2 := ValidateDerivativeLimitOrder(message.Order); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "delete" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "delete", "replace", "update", "invalidate"})) + } + return +} + +// ValidateTradesResponse runs the validations defined on TradesResponse. +func ValidateTradesResponse(message *injective_derivative_exchange_rpcpb.TradesResponse) (err error) { + for _, e := range message.Trades { + if e != nil { + if err2 := ValidateDerivativeTrade(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateDerivativeTrade runs the validations defined on DerivativeTrade. +func ValidateDerivativeTrade(message *injective_derivative_exchange_rpcpb.DerivativeTrade) (err error) { + if message.PositionDelta == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("positionDelta", "message")) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.orderHash", message.OrderHash, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.OrderHash) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, true)) + } + if utf8.RuneCountInString(message.OrderHash) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + if !(message.TradeExecutionType == "market" || message.TradeExecutionType == "limitFill" || message.TradeExecutionType == "limitMatchRestingOrder" || message.TradeExecutionType == "limitMatchNewOrder") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.tradeExecutionType", message.TradeExecutionType, []interface{}{"market", "limitFill", "limitMatchRestingOrder", "limitMatchNewOrder"})) + } + if message.PositionDelta != nil { + if err2 := ValidatePositionDelta(message.PositionDelta); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.payout", message.Payout, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Payout) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.payout", message.Payout, utf8.RuneCountInString(message.Payout), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.fee", message.Fee, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Fee) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.fee", message.Fee, utf8.RuneCountInString(message.Fee), 100, false)) + } + return +} + +// ValidatePositionDelta runs the validations defined on PositionDelta. +func ValidatePositionDelta(message *injective_derivative_exchange_rpcpb.PositionDelta) (err error) { + if !(message.TradeDirection == "buy" || message.TradeDirection == "sell") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.tradeDirection", message.TradeDirection, []interface{}{"buy", "sell"})) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.executionPrice", message.ExecutionPrice, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ExecutionPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.executionPrice", message.ExecutionPrice, utf8.RuneCountInString(message.ExecutionPrice), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.executionQuantity", message.ExecutionQuantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ExecutionQuantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.executionQuantity", message.ExecutionQuantity, utf8.RuneCountInString(message.ExecutionQuantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.executionMargin", message.ExecutionMargin, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ExecutionMargin) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.executionMargin", message.ExecutionMargin, utf8.RuneCountInString(message.ExecutionMargin), 100, false)) + } + return +} + +// ValidateStreamTradesResponse runs the validations defined on +// StreamTradesResponse. +func ValidateStreamTradesResponse(message *injective_derivative_exchange_rpcpb.StreamTradesResponse) (err error) { + if message.Trade == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("trade", "message")) + } + if message.Trade != nil { + if err2 := ValidateDerivativeTrade(message.Trade); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "invalidate"})) + } + return +} + +// ValidateSubaccountOrdersListResponse runs the validations defined on +// SubaccountOrdersListResponse. +func ValidateSubaccountOrdersListResponse(message *injective_derivative_exchange_rpcpb.SubaccountOrdersListResponse) (err error) { + for _, e := range message.Orders { + if e != nil { + if err2 := ValidateDerivativeLimitOrder(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSubaccountTradesListResponse runs the validations defined on +// SubaccountTradesListResponse. +func ValidateSubaccountTradesListResponse(message *injective_derivative_exchange_rpcpb.SubaccountTradesListResponse) (err error) { + for _, e := range message.Trades { + if e != nil { + if err2 := ValidateDerivativeTrade(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// svcInjectivederivativeexchangerpcTokenMetaToInjectiveDerivativeExchangeRpcpbTokenMeta +// builds a value of type *injective_derivative_exchange_rpcpb.TokenMeta from a +// value of type *injectivederivativeexchangerpc.TokenMeta. +func svcInjectivederivativeexchangerpcTokenMetaToInjectiveDerivativeExchangeRpcpbTokenMeta(v *injectivederivativeexchangerpc.TokenMeta) *injective_derivative_exchange_rpcpb.TokenMeta { + if v == nil { + return nil + } + res := &injective_derivative_exchange_rpcpb.TokenMeta{ + Name: v.Name, + Address: v.Address, + Symbol: v.Symbol, + Decimals: int32(v.Decimals), + UpdatedAt: v.UpdatedAt, + } + if v.Logo != nil { + res.Logo = *v.Logo + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbTokenMetaToInjectivederivativeexchangerpcTokenMeta +// builds a value of type *injectivederivativeexchangerpc.TokenMeta from a +// value of type *injective_derivative_exchange_rpcpb.TokenMeta. +func protobufInjectiveDerivativeExchangeRpcpbTokenMetaToInjectivederivativeexchangerpcTokenMeta(v *injective_derivative_exchange_rpcpb.TokenMeta) *injectivederivativeexchangerpc.TokenMeta { + if v == nil { + return nil + } + res := &injectivederivativeexchangerpc.TokenMeta{ + Name: v.Name, + Address: v.Address, + Symbol: v.Symbol, + Decimals: int(v.Decimals), + UpdatedAt: v.UpdatedAt, + } + if v.Logo != "" { + res.Logo = &v.Logo + } + + return res +} + +// svcInjectivederivativeexchangerpcDerivativeMarketInfoToInjectiveDerivativeExchangeRpcpbDerivativeMarketInfo +// builds a value of type +// *injective_derivative_exchange_rpcpb.DerivativeMarketInfo from a value of +// type *injectivederivativeexchangerpc.DerivativeMarketInfo. +func svcInjectivederivativeexchangerpcDerivativeMarketInfoToInjectiveDerivativeExchangeRpcpbDerivativeMarketInfo(v *injectivederivativeexchangerpc.DerivativeMarketInfo) *injective_derivative_exchange_rpcpb.DerivativeMarketInfo { + if v == nil { + return nil + } + res := &injective_derivative_exchange_rpcpb.DerivativeMarketInfo{ + MarketId: v.MarketID, + MarketStatus: v.MarketStatus, + Ticker: v.Ticker, + OracleBase: v.OracleBase, + OracleQuote: v.OracleQuote, + OracleType: v.OracleType, + InitialMarginRatio: v.InitialMarginRatio, + MaintenanceMarginRatio: v.MaintenanceMarginRatio, + QuoteDenom: v.QuoteDenom, + MakerFeeRate: v.MakerFeeRate, + TakerFeeRate: v.TakerFeeRate, + ServiceProviderFee: v.ServiceProviderFee, + IsPerpetual: v.IsPerpetual, + MaxPriceScaleDecimals: v.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: v.MaxQuantityScaleDecimals, + } + if v.QuoteTokenMeta != nil { + res.QuoteTokenMeta = svcInjectivederivativeexchangerpcTokenMetaToInjectiveDerivativeExchangeRpcpbTokenMeta(v.QuoteTokenMeta) + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbDerivativeMarketInfoToInjectivederivativeexchangerpcDerivativeMarketInfo +// builds a value of type *injectivederivativeexchangerpc.DerivativeMarketInfo +// from a value of type +// *injective_derivative_exchange_rpcpb.DerivativeMarketInfo. +func protobufInjectiveDerivativeExchangeRpcpbDerivativeMarketInfoToInjectivederivativeexchangerpcDerivativeMarketInfo(v *injective_derivative_exchange_rpcpb.DerivativeMarketInfo) *injectivederivativeexchangerpc.DerivativeMarketInfo { + if v == nil { + return nil + } + res := &injectivederivativeexchangerpc.DerivativeMarketInfo{ + MarketID: v.MarketId, + MarketStatus: v.MarketStatus, + Ticker: v.Ticker, + OracleBase: v.OracleBase, + OracleQuote: v.OracleQuote, + OracleType: v.OracleType, + InitialMarginRatio: v.InitialMarginRatio, + MaintenanceMarginRatio: v.MaintenanceMarginRatio, + QuoteDenom: v.QuoteDenom, + MakerFeeRate: v.MakerFeeRate, + TakerFeeRate: v.TakerFeeRate, + ServiceProviderFee: v.ServiceProviderFee, + IsPerpetual: v.IsPerpetual, + MaxPriceScaleDecimals: v.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: v.MaxQuantityScaleDecimals, + } + if v.QuoteTokenMeta != nil { + res.QuoteTokenMeta = protobufInjectiveDerivativeExchangeRpcpbTokenMetaToInjectivederivativeexchangerpcTokenMeta(v.QuoteTokenMeta) + } + + return res +} + +// svcInjectivederivativeexchangerpcDerivativeLimitOrderbookToInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbook +// builds a value of type +// *injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook from a value +// of type *injectivederivativeexchangerpc.DerivativeLimitOrderbook. +func svcInjectivederivativeexchangerpcDerivativeLimitOrderbookToInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbook(v *injectivederivativeexchangerpc.DerivativeLimitOrderbook) *injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook { + if v == nil { + return nil + } + res := &injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook{} + if v.Buys != nil { + res.Buys = make([]*injective_derivative_exchange_rpcpb.PriceLevel, len(v.Buys)) + for i, val := range v.Buys { + res.Buys[i] = &injective_derivative_exchange_rpcpb.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + if v.Sells != nil { + res.Sells = make([]*injective_derivative_exchange_rpcpb.PriceLevel, len(v.Sells)) + for i, val := range v.Sells { + res.Sells[i] = &injective_derivative_exchange_rpcpb.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbookToInjectivederivativeexchangerpcDerivativeLimitOrderbook +// builds a value of type +// *injectivederivativeexchangerpc.DerivativeLimitOrderbook from a value of +// type *injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook. +func protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderbookToInjectivederivativeexchangerpcDerivativeLimitOrderbook(v *injective_derivative_exchange_rpcpb.DerivativeLimitOrderbook) *injectivederivativeexchangerpc.DerivativeLimitOrderbook { + if v == nil { + return nil + } + res := &injectivederivativeexchangerpc.DerivativeLimitOrderbook{} + if v.Buys != nil { + res.Buys = make([]*injectivederivativeexchangerpc.PriceLevel, len(v.Buys)) + for i, val := range v.Buys { + res.Buys[i] = &injectivederivativeexchangerpc.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + if v.Sells != nil { + res.Sells = make([]*injectivederivativeexchangerpc.PriceLevel, len(v.Sells)) + for i, val := range v.Sells { + res.Sells[i] = &injectivederivativeexchangerpc.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + + return res +} + +// svcInjectivederivativeexchangerpcDerivativeLimitOrderToInjectiveDerivativeExchangeRpcpbDerivativeLimitOrder +// builds a value of type +// *injective_derivative_exchange_rpcpb.DerivativeLimitOrder from a value of +// type *injectivederivativeexchangerpc.DerivativeLimitOrder. +func svcInjectivederivativeexchangerpcDerivativeLimitOrderToInjectiveDerivativeExchangeRpcpbDerivativeLimitOrder(v *injectivederivativeexchangerpc.DerivativeLimitOrder) *injective_derivative_exchange_rpcpb.DerivativeLimitOrder { + res := &injective_derivative_exchange_rpcpb.DerivativeLimitOrder{ + OrderHash: v.OrderHash, + OrderType: v.OrderType, + MarketId: v.MarketID, + SubaccountId: v.SubaccountID, + IsReduceOnly: v.IsReduceOnly, + Margin: v.Margin, + Price: v.Price, + Quantity: v.Quantity, + UnfilledQuantity: v.UnfilledQuantity, + FeeRecipient: v.FeeRecipient, + State: v.State, + CreatedAt: v.CreatedAt, + } + if v.TriggerPrice != nil { + res.TriggerPrice = *v.TriggerPrice + } + if v.UpdatedAt != nil { + res.UpdatedAt = *v.UpdatedAt + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderToInjectivederivativeexchangerpcDerivativeLimitOrder +// builds a value of type *injectivederivativeexchangerpc.DerivativeLimitOrder +// from a value of type +// *injective_derivative_exchange_rpcpb.DerivativeLimitOrder. +func protobufInjectiveDerivativeExchangeRpcpbDerivativeLimitOrderToInjectivederivativeexchangerpcDerivativeLimitOrder(v *injective_derivative_exchange_rpcpb.DerivativeLimitOrder) *injectivederivativeexchangerpc.DerivativeLimitOrder { + res := &injectivederivativeexchangerpc.DerivativeLimitOrder{ + OrderHash: v.OrderHash, + OrderType: v.OrderType, + MarketID: v.MarketId, + SubaccountID: v.SubaccountId, + IsReduceOnly: v.IsReduceOnly, + Margin: v.Margin, + Price: v.Price, + Quantity: v.Quantity, + UnfilledQuantity: v.UnfilledQuantity, + FeeRecipient: v.FeeRecipient, + State: v.State, + CreatedAt: v.CreatedAt, + } + if v.TriggerPrice != "" { + res.TriggerPrice = &v.TriggerPrice + } + if v.UpdatedAt != 0 { + res.UpdatedAt = &v.UpdatedAt + } + + return res +} + +// svcInjectivederivativeexchangerpcPositionDeltaToInjectiveDerivativeExchangeRpcpbPositionDelta +// builds a value of type *injective_derivative_exchange_rpcpb.PositionDelta +// from a value of type *injectivederivativeexchangerpc.PositionDelta. +func svcInjectivederivativeexchangerpcPositionDeltaToInjectiveDerivativeExchangeRpcpbPositionDelta(v *injectivederivativeexchangerpc.PositionDelta) *injective_derivative_exchange_rpcpb.PositionDelta { + res := &injective_derivative_exchange_rpcpb.PositionDelta{ + TradeDirection: v.TradeDirection, + ExecutionPrice: v.ExecutionPrice, + ExecutionQuantity: v.ExecutionQuantity, + ExecutionMargin: v.ExecutionMargin, + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbPositionDeltaToInjectivederivativeexchangerpcPositionDelta +// builds a value of type *injectivederivativeexchangerpc.PositionDelta from a +// value of type *injective_derivative_exchange_rpcpb.PositionDelta. +func protobufInjectiveDerivativeExchangeRpcpbPositionDeltaToInjectivederivativeexchangerpcPositionDelta(v *injective_derivative_exchange_rpcpb.PositionDelta) *injectivederivativeexchangerpc.PositionDelta { + res := &injectivederivativeexchangerpc.PositionDelta{ + TradeDirection: v.TradeDirection, + ExecutionPrice: v.ExecutionPrice, + ExecutionQuantity: v.ExecutionQuantity, + ExecutionMargin: v.ExecutionMargin, + } + + return res +} + +// svcInjectivederivativeexchangerpcDerivativeTradeToInjectiveDerivativeExchangeRpcpbDerivativeTrade +// builds a value of type *injective_derivative_exchange_rpcpb.DerivativeTrade +// from a value of type *injectivederivativeexchangerpc.DerivativeTrade. +func svcInjectivederivativeexchangerpcDerivativeTradeToInjectiveDerivativeExchangeRpcpbDerivativeTrade(v *injectivederivativeexchangerpc.DerivativeTrade) *injective_derivative_exchange_rpcpb.DerivativeTrade { + res := &injective_derivative_exchange_rpcpb.DerivativeTrade{ + OrderHash: v.OrderHash, + SubaccountId: v.SubaccountID, + MarketId: v.MarketID, + TradeExecutionType: v.TradeExecutionType, + IsLiquidation: v.IsLiquidation, + Payout: v.Payout, + Fee: v.Fee, + ExecutedAt: v.ExecutedAt, + } + if v.PositionDelta != nil { + res.PositionDelta = svcInjectivederivativeexchangerpcPositionDeltaToInjectiveDerivativeExchangeRpcpbPositionDelta(v.PositionDelta) + } + + return res +} + +// protobufInjectiveDerivativeExchangeRpcpbDerivativeTradeToInjectivederivativeexchangerpcDerivativeTrade +// builds a value of type *injectivederivativeexchangerpc.DerivativeTrade from +// a value of type *injective_derivative_exchange_rpcpb.DerivativeTrade. +func protobufInjectiveDerivativeExchangeRpcpbDerivativeTradeToInjectivederivativeexchangerpcDerivativeTrade(v *injective_derivative_exchange_rpcpb.DerivativeTrade) *injectivederivativeexchangerpc.DerivativeTrade { + res := &injectivederivativeexchangerpc.DerivativeTrade{ + OrderHash: v.OrderHash, + SubaccountID: v.SubaccountId, + MarketID: v.MarketId, + TradeExecutionType: v.TradeExecutionType, + IsLiquidation: v.IsLiquidation, + Payout: v.Payout, + Fee: v.Fee, + ExecutedAt: v.ExecutedAt, + } + if v.PositionDelta != nil { + res.PositionDelta = protobufInjectiveDerivativeExchangeRpcpbPositionDeltaToInjectivederivativeexchangerpcPositionDelta(v.PositionDelta) + } + + return res +} diff --git a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go new file mode 100644 index 00000000..449550b8 --- /dev/null +++ b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go @@ -0,0 +1,3293 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveDerivativeExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 +// source: injective_derivative_exchange_rpc.proto + +package injective_derivative_exchange_rpcpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MarketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Filter by market status + MarketStatus string `protobuf:"bytes,1,opt,name=market_status,json=marketStatus,proto3" json:"market_status,omitempty"` + // Filter by the Coin denomination of the quote currency + QuoteDenom string `protobuf:"bytes,2,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` +} + +func (x *MarketsRequest) Reset() { + *x = MarketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketsRequest) ProtoMessage() {} + +func (x *MarketsRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketsRequest.ProtoReflect.Descriptor instead. +func (*MarketsRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{0} +} + +func (x *MarketsRequest) GetMarketStatus() string { + if x != nil { + return x.MarketStatus + } + return "" +} + +func (x *MarketsRequest) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +type MarketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Derivative Markets list + Markets []*DerivativeMarketInfo `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (x *MarketsResponse) Reset() { + *x = MarketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketsResponse) ProtoMessage() {} + +func (x *MarketsResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketsResponse.ProtoReflect.Descriptor instead. +func (*MarketsResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{1} +} + +func (x *MarketsResponse) GetMarkets() []*DerivativeMarketInfo { + if x != nil { + return x.Markets + } + return nil +} + +type DerivativeMarketInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DerivativeMarket ID is crypto.Keccak256Hash([]byte((oracleType.String() + + // ticker + quoteDenom + oracleBase + oracleQuote))) for perpetual markets and + // crypto.Keccak256Hash([]byte((oracleType.String() + ticker + quoteDenom + + // oracleBase + oracleQuote + strconv.Itoa(int(expiry))))) for expiry futures + // markets + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The status of the market + MarketStatus string `protobuf:"bytes,2,opt,name=market_status,json=marketStatus,proto3" json:"market_status,omitempty"` + // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote + // asset. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,4,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,5,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Oracle Type + OracleType string `protobuf:"bytes,6,opt,name=oracle_type,json=oracleType,proto3" json:"oracle_type,omitempty"` + // Defines the initial margin ratio of a derivative market + InitialMarginRatio string `protobuf:"bytes,7,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3" json:"initial_margin_ratio,omitempty"` + // Defines the maintenance margin ratio of a derivative market + MaintenanceMarginRatio string `protobuf:"bytes,8,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3" json:"maintenance_margin_ratio,omitempty"` + // Coin denom used for the quote asset. + QuoteDenom string `protobuf:"bytes,9,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Token metadata for quote asset, only for Ethereum-based assets + QuoteTokenMeta *TokenMeta `protobuf:"bytes,10,opt,name=quote_token_meta,json=quoteTokenMeta,proto3" json:"quote_token_meta,omitempty"` + // Defines the fee percentage makers pay when trading (in quote asset) + MakerFeeRate string `protobuf:"bytes,11,opt,name=maker_fee_rate,json=makerFeeRate,proto3" json:"maker_fee_rate,omitempty"` + // Defines the fee percentage takers pay when trading (in quote asset) + TakerFeeRate string `protobuf:"bytes,12,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` + // Percentage of the transaction fee shared with the service provider + ServiceProviderFee string `protobuf:"bytes,13,opt,name=service_provider_fee,json=serviceProviderFee,proto3" json:"service_provider_fee,omitempty"` + // True if the market is a perpetual swap market + IsPerpetual bool `protobuf:"varint,14,opt,name=is_perpetual,json=isPerpetual,proto3" json:"is_perpetual,omitempty"` + // Defines the maximum amount of decimal places that each order's price cannot + // exceed + MaxPriceScaleDecimals uint32 `protobuf:"varint,15,opt,name=max_price_scale_decimals,json=maxPriceScaleDecimals,proto3" json:"max_price_scale_decimals,omitempty"` + // Defines the maximum amount of decimal places that each order's quantity + // cannot exceed + MaxQuantityScaleDecimals uint32 `protobuf:"varint,16,opt,name=max_quantity_scale_decimals,json=maxQuantityScaleDecimals,proto3" json:"max_quantity_scale_decimals,omitempty"` +} + +func (x *DerivativeMarketInfo) Reset() { + *x = DerivativeMarketInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DerivativeMarketInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DerivativeMarketInfo) ProtoMessage() {} + +func (x *DerivativeMarketInfo) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DerivativeMarketInfo.ProtoReflect.Descriptor instead. +func (*DerivativeMarketInfo) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{2} +} + +func (x *DerivativeMarketInfo) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *DerivativeMarketInfo) GetMarketStatus() string { + if x != nil { + return x.MarketStatus + } + return "" +} + +func (x *DerivativeMarketInfo) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *DerivativeMarketInfo) GetOracleBase() string { + if x != nil { + return x.OracleBase + } + return "" +} + +func (x *DerivativeMarketInfo) GetOracleQuote() string { + if x != nil { + return x.OracleQuote + } + return "" +} + +func (x *DerivativeMarketInfo) GetOracleType() string { + if x != nil { + return x.OracleType + } + return "" +} + +func (x *DerivativeMarketInfo) GetInitialMarginRatio() string { + if x != nil { + return x.InitialMarginRatio + } + return "" +} + +func (x *DerivativeMarketInfo) GetMaintenanceMarginRatio() string { + if x != nil { + return x.MaintenanceMarginRatio + } + return "" +} + +func (x *DerivativeMarketInfo) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +func (x *DerivativeMarketInfo) GetQuoteTokenMeta() *TokenMeta { + if x != nil { + return x.QuoteTokenMeta + } + return nil +} + +func (x *DerivativeMarketInfo) GetMakerFeeRate() string { + if x != nil { + return x.MakerFeeRate + } + return "" +} + +func (x *DerivativeMarketInfo) GetTakerFeeRate() string { + if x != nil { + return x.TakerFeeRate + } + return "" +} + +func (x *DerivativeMarketInfo) GetServiceProviderFee() string { + if x != nil { + return x.ServiceProviderFee + } + return "" +} + +func (x *DerivativeMarketInfo) GetIsPerpetual() bool { + if x != nil { + return x.IsPerpetual + } + return false +} + +func (x *DerivativeMarketInfo) GetMaxPriceScaleDecimals() uint32 { + if x != nil { + return x.MaxPriceScaleDecimals + } + return 0 +} + +func (x *DerivativeMarketInfo) GetMaxQuantityScaleDecimals() uint32 { + if x != nil { + return x.MaxQuantityScaleDecimals + } + return 0 +} + +type TokenMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Token full name + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Token Ethereum contract address + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Token symbol short name + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // URL to the logo image + Logo string `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"` + // Token decimals + Decimals int32 `protobuf:"zigzag32,5,opt,name=decimals,proto3" json:"decimals,omitempty"` + // Token metadata fetched timestamp in UNIX millis. + UpdatedAt int64 `protobuf:"zigzag64,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *TokenMeta) Reset() { + *x = TokenMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenMeta) ProtoMessage() {} + +func (x *TokenMeta) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenMeta.ProtoReflect.Descriptor instead. +func (*TokenMeta) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{3} +} + +func (x *TokenMeta) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TokenMeta) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TokenMeta) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenMeta) GetLogo() string { + if x != nil { + return x.Logo + } + return "" +} + +func (x *TokenMeta) GetDecimals() int32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *TokenMeta) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +type MarketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *MarketRequest) Reset() { + *x = MarketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketRequest) ProtoMessage() {} + +func (x *MarketRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketRequest.ProtoReflect.Descriptor instead. +func (*MarketRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{4} +} + +func (x *MarketRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type MarketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Info about particular derivative market + Market *DerivativeMarketInfo `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` +} + +func (x *MarketResponse) Reset() { + *x = MarketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketResponse) ProtoMessage() {} + +func (x *MarketResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketResponse.ProtoReflect.Descriptor instead. +func (*MarketResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{5} +} + +func (x *MarketResponse) GetMarket() *DerivativeMarketInfo { + if x != nil { + return x.Market + } + return nil +} + +type StreamMarketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of market IDs for updates streaming, empty means 'ALL' derivative + // markets + MarketIds []string `protobuf:"bytes,1,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (x *StreamMarketRequest) Reset() { + *x = StreamMarketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMarketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMarketRequest) ProtoMessage() {} + +func (x *StreamMarketRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMarketRequest.ProtoReflect.Descriptor instead. +func (*StreamMarketRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{6} +} + +func (x *StreamMarketRequest) GetMarketIds() []string { + if x != nil { + return x.MarketIds + } + return nil +} + +type StreamMarketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Info about particular derivative market + Market *DerivativeMarketInfo `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // Update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamMarketResponse) Reset() { + *x = StreamMarketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMarketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMarketResponse) ProtoMessage() {} + +func (x *StreamMarketResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMarketResponse.ProtoReflect.Descriptor instead. +func (*StreamMarketResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{7} +} + +func (x *StreamMarketResponse) GetMarket() *DerivativeMarketInfo { + if x != nil { + return x.Market + } + return nil +} + +func (x *StreamMarketResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamMarketResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type OrderbookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *OrderbookRequest) Reset() { + *x = OrderbookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderbookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderbookRequest) ProtoMessage() {} + +func (x *OrderbookRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderbookRequest.ProtoReflect.Descriptor instead. +func (*OrderbookRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{8} +} + +func (x *OrderbookRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type OrderbookResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Orderbook of a particular derivative market + Orderbook *DerivativeLimitOrderbook `protobuf:"bytes,1,opt,name=orderbook,proto3" json:"orderbook,omitempty"` +} + +func (x *OrderbookResponse) Reset() { + *x = OrderbookResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderbookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderbookResponse) ProtoMessage() {} + +func (x *OrderbookResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderbookResponse.ProtoReflect.Descriptor instead. +func (*OrderbookResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{9} +} + +func (x *OrderbookResponse) GetOrderbook() *DerivativeLimitOrderbook { + if x != nil { + return x.Orderbook + } + return nil +} + +type DerivativeLimitOrderbook struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Array of price levels for buys + Buys []*PriceLevel `protobuf:"bytes,1,rep,name=buys,proto3" json:"buys,omitempty"` + // Array of price levels for sells + Sells []*PriceLevel `protobuf:"bytes,2,rep,name=sells,proto3" json:"sells,omitempty"` +} + +func (x *DerivativeLimitOrderbook) Reset() { + *x = DerivativeLimitOrderbook{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DerivativeLimitOrderbook) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DerivativeLimitOrderbook) ProtoMessage() {} + +func (x *DerivativeLimitOrderbook) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DerivativeLimitOrderbook.ProtoReflect.Descriptor instead. +func (*DerivativeLimitOrderbook) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{10} +} + +func (x *DerivativeLimitOrderbook) GetBuys() []*PriceLevel { + if x != nil { + return x.Buys + } + return nil +} + +func (x *DerivativeLimitOrderbook) GetSells() []*PriceLevel { + if x != nil { + return x.Sells + } + return nil +} + +type PriceLevel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Price number of the price level. + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + // Quantity of the price level. + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + // Price level last updated timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *PriceLevel) Reset() { + *x = PriceLevel{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PriceLevel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriceLevel) ProtoMessage() {} + +func (x *PriceLevel) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PriceLevel.ProtoReflect.Descriptor instead. +func (*PriceLevel) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{11} +} + +func (x *PriceLevel) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PriceLevel) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PriceLevel) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type StreamOrderbookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Market ID for orderbook updates streaming + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *StreamOrderbookRequest) Reset() { + *x = StreamOrderbookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrderbookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrderbookRequest) ProtoMessage() {} + +func (x *StreamOrderbookRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrderbookRequest.ProtoReflect.Descriptor instead. +func (*StreamOrderbookRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{12} +} + +func (x *StreamOrderbookRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type StreamOrderbookResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Orderbook of a Derivative Market + Orderbook *DerivativeLimitOrderbook `protobuf:"bytes,1,opt,name=orderbook,proto3" json:"orderbook,omitempty"` + // Order update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamOrderbookResponse) Reset() { + *x = StreamOrderbookResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrderbookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrderbookResponse) ProtoMessage() {} + +func (x *StreamOrderbookResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrderbookResponse.ProtoReflect.Descriptor instead. +func (*StreamOrderbookResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{13} +} + +func (x *StreamOrderbookResponse) GetOrderbook() *DerivativeLimitOrderbook { + if x != nil { + return x.Orderbook + } + return nil +} + +func (x *StreamOrderbookResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamOrderbookResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type OrdersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Look for specific order type + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // Look for specific trade direction of an order + Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + // Look for specific subaccountId of an order + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *OrdersRequest) Reset() { + *x = OrdersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrdersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrdersRequest) ProtoMessage() {} + +func (x *OrdersRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrdersRequest.ProtoReflect.Descriptor instead. +func (*OrdersRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{14} +} + +func (x *OrdersRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *OrdersRequest) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *OrdersRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *OrdersRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type OrdersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of derivative market orders + Orders []*DerivativeLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (x *OrdersResponse) Reset() { + *x = OrdersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrdersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrdersResponse) ProtoMessage() {} + +func (x *OrdersResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrdersResponse.ProtoReflect.Descriptor instead. +func (*OrdersResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{15} +} + +func (x *OrdersResponse) GetOrders() []*DerivativeLimitOrder { + if x != nil { + return x.Orders + } + return nil +} + +type DerivativeLimitOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Hash of the order + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // The type of the order + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // DerivativeMarket ID is keccak265(baseDenom || quoteDenom) + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The subaccountId that this order belongs to + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // True if the order is a reduce-only order + IsReduceOnly bool `protobuf:"varint,5,opt,name=is_reduce_only,json=isReduceOnly,proto3" json:"is_reduce_only,omitempty"` + // Margin of the order + Margin string `protobuf:"bytes,6,opt,name=margin,proto3" json:"margin,omitempty"` + // Price of the order + Price string `protobuf:"bytes,7,opt,name=price,proto3" json:"price,omitempty"` + // Quantity of the order + Quantity string `protobuf:"bytes,8,opt,name=quantity,proto3" json:"quantity,omitempty"` + // The amount of the quantity remaining unfilled + UnfilledQuantity string `protobuf:"bytes,9,opt,name=unfilled_quantity,json=unfilledQuantity,proto3" json:"unfilled_quantity,omitempty"` + // Trigger price is the trigger price used by stop/take orders + TriggerPrice string `protobuf:"bytes,10,opt,name=trigger_price,json=triggerPrice,proto3" json:"trigger_price,omitempty"` + // Fee recipient address + FeeRecipient string `protobuf:"bytes,11,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty"` + // Order state + State string `protobuf:"bytes,12,opt,name=state,proto3" json:"state,omitempty"` + // Order committed timestamp in UNIX millis. + CreatedAt int64 `protobuf:"zigzag64,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Order updated timestamp in UNIX millis. + UpdatedAt int64 `protobuf:"zigzag64,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *DerivativeLimitOrder) Reset() { + *x = DerivativeLimitOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DerivativeLimitOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DerivativeLimitOrder) ProtoMessage() {} + +func (x *DerivativeLimitOrder) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DerivativeLimitOrder.ProtoReflect.Descriptor instead. +func (*DerivativeLimitOrder) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{16} +} + +func (x *DerivativeLimitOrder) GetOrderHash() string { + if x != nil { + return x.OrderHash + } + return "" +} + +func (x *DerivativeLimitOrder) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *DerivativeLimitOrder) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *DerivativeLimitOrder) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *DerivativeLimitOrder) GetIsReduceOnly() bool { + if x != nil { + return x.IsReduceOnly + } + return false +} + +func (x *DerivativeLimitOrder) GetMargin() string { + if x != nil { + return x.Margin + } + return "" +} + +func (x *DerivativeLimitOrder) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *DerivativeLimitOrder) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *DerivativeLimitOrder) GetUnfilledQuantity() string { + if x != nil { + return x.UnfilledQuantity + } + return "" +} + +func (x *DerivativeLimitOrder) GetTriggerPrice() string { + if x != nil { + return x.TriggerPrice + } + return "" +} + +func (x *DerivativeLimitOrder) GetFeeRecipient() string { + if x != nil { + return x.FeeRecipient + } + return "" +} + +func (x *DerivativeLimitOrder) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *DerivativeLimitOrder) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *DerivativeLimitOrder) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +type PositionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // MarketId of the position we want to fetch + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *PositionsRequest) Reset() { + *x = PositionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PositionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PositionsRequest) ProtoMessage() {} + +func (x *PositionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PositionsRequest.ProtoReflect.Descriptor instead. +func (*PositionsRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{17} +} + +func (x *PositionsRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *PositionsRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type PositionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of derivative positions + Positions []*DerivativePosition `protobuf:"bytes,1,rep,name=positions,proto3" json:"positions,omitempty"` +} + +func (x *PositionsResponse) Reset() { + *x = PositionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PositionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PositionsResponse) ProtoMessage() {} + +func (x *PositionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PositionsResponse.ProtoReflect.Descriptor instead. +func (*PositionsResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{18} +} + +func (x *PositionsResponse) GetPositions() []*DerivativePosition { + if x != nil { + return x.Positions + } + return nil +} + +type DerivativePosition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DerivativeMarket ID is keccak265(baseDenom || quoteDenom) + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The subaccountId that this order belongs to + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Direction of the position + Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + // Quantity of the order + Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` + // Price of the order + EntryPrice string `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3" json:"entry_price,omitempty"` + // Margin of the position + Margin string `protobuf:"bytes,6,opt,name=margin,proto3" json:"margin,omitempty"` + // Hold quantity of the position + HoldQuantity string `protobuf:"bytes,7,opt,name=hold_quantity,json=holdQuantity,proto3" json:"hold_quantity,omitempty"` + // LiquidationPrice of the position + LiquidationPrice string `protobuf:"bytes,8,opt,name=liquidation_price,json=liquidationPrice,proto3" json:"liquidation_price,omitempty"` + // LiquidationPrice of the position + MarkPrice string `protobuf:"bytes,9,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` + // Implied PNL of the Position + ImpliedPnl string `protobuf:"bytes,10,opt,name=implied_pnl,json=impliedPnl,proto3" json:"implied_pnl,omitempty"` + // Leverage of the Position + Leverage string `protobuf:"bytes,11,opt,name=leverage,proto3" json:"leverage,omitempty"` +} + +func (x *DerivativePosition) Reset() { + *x = DerivativePosition{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DerivativePosition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DerivativePosition) ProtoMessage() {} + +func (x *DerivativePosition) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DerivativePosition.ProtoReflect.Descriptor instead. +func (*DerivativePosition) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{19} +} + +func (x *DerivativePosition) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *DerivativePosition) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *DerivativePosition) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *DerivativePosition) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *DerivativePosition) GetEntryPrice() string { + if x != nil { + return x.EntryPrice + } + return "" +} + +func (x *DerivativePosition) GetMargin() string { + if x != nil { + return x.Margin + } + return "" +} + +func (x *DerivativePosition) GetHoldQuantity() string { + if x != nil { + return x.HoldQuantity + } + return "" +} + +func (x *DerivativePosition) GetLiquidationPrice() string { + if x != nil { + return x.LiquidationPrice + } + return "" +} + +func (x *DerivativePosition) GetMarkPrice() string { + if x != nil { + return x.MarkPrice + } + return "" +} + +func (x *DerivativePosition) GetImpliedPnl() string { + if x != nil { + return x.ImpliedPnl + } + return "" +} + +func (x *DerivativePosition) GetLeverage() string { + if x != nil { + return x.Leverage + } + return "" +} + +type StreamOrdersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Look for specific order type + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // Look for specific trade direction of an order + Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + // Look for specific subaccountId of an order + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *StreamOrdersRequest) Reset() { + *x = StreamOrdersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrdersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrdersRequest) ProtoMessage() {} + +func (x *StreamOrdersRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrdersRequest.ProtoReflect.Descriptor instead. +func (*StreamOrdersRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{20} +} + +func (x *StreamOrdersRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *StreamOrdersRequest) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *StreamOrdersRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *StreamOrdersRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type StreamOrdersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Updated market order + Order *DerivativeLimitOrder `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` + // Order update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamOrdersResponse) Reset() { + *x = StreamOrdersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrdersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrdersResponse) ProtoMessage() {} + +func (x *StreamOrdersResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrdersResponse.ProtoReflect.Descriptor instead. +func (*StreamOrdersResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{21} +} + +func (x *StreamOrdersResponse) GetOrder() *DerivativeLimitOrder { + if x != nil { + return x.Order + } + return nil +} + +func (x *StreamOrdersResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamOrdersResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type TradesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of the trade + ExecutionType string `protobuf:"bytes,2,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by execution side of the trade + ExecutionSide string `protobuf:"bytes,3,opt,name=execution_side,json=executionSide,proto3" json:"execution_side,omitempty"` + // Filter by direction the trade + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,5,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *TradesRequest) Reset() { + *x = TradesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradesRequest) ProtoMessage() {} + +func (x *TradesRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradesRequest.ProtoReflect.Descriptor instead. +func (*TradesRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{22} +} + +func (x *TradesRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *TradesRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *TradesRequest) GetExecutionSide() string { + if x != nil { + return x.ExecutionSide + } + return "" +} + +func (x *TradesRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *TradesRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type TradesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Trades of a Derivative Market + Trades []*DerivativeTrade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (x *TradesResponse) Reset() { + *x = TradesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradesResponse) ProtoMessage() {} + +func (x *TradesResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradesResponse.ProtoReflect.Descriptor instead. +func (*TradesResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{23} +} + +func (x *TradesResponse) GetTrades() []*DerivativeTrade { + if x != nil { + return x.Trades + } + return nil +} + +type DerivativeTrade struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Order hash. + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // The subaccountId that executed the trade + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // The ID of the market that this trade is in + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The execution type of the trade + TradeExecutionType string `protobuf:"bytes,4,opt,name=trade_execution_type,json=tradeExecutionType,proto3" json:"trade_execution_type,omitempty"` + // True if the trade is a liquidation + IsLiquidation bool `protobuf:"varint,5,opt,name=is_liquidation,json=isLiquidation,proto3" json:"is_liquidation,omitempty"` + // Position Delta from the trade + PositionDelta *PositionDelta `protobuf:"bytes,6,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + // The payout associated with the trade + Payout string `protobuf:"bytes,7,opt,name=payout,proto3" json:"payout,omitempty"` + // The fee associated with the trade + Fee string `protobuf:"bytes,8,opt,name=fee,proto3" json:"fee,omitempty"` + // Timestamp of trade execution in UNIX millis + ExecutedAt int64 `protobuf:"zigzag64,9,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` +} + +func (x *DerivativeTrade) Reset() { + *x = DerivativeTrade{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DerivativeTrade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DerivativeTrade) ProtoMessage() {} + +func (x *DerivativeTrade) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DerivativeTrade.ProtoReflect.Descriptor instead. +func (*DerivativeTrade) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{24} +} + +func (x *DerivativeTrade) GetOrderHash() string { + if x != nil { + return x.OrderHash + } + return "" +} + +func (x *DerivativeTrade) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *DerivativeTrade) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *DerivativeTrade) GetTradeExecutionType() string { + if x != nil { + return x.TradeExecutionType + } + return "" +} + +func (x *DerivativeTrade) GetIsLiquidation() bool { + if x != nil { + return x.IsLiquidation + } + return false +} + +func (x *DerivativeTrade) GetPositionDelta() *PositionDelta { + if x != nil { + return x.PositionDelta + } + return nil +} + +func (x *DerivativeTrade) GetPayout() string { + if x != nil { + return x.Payout + } + return "" +} + +func (x *DerivativeTrade) GetFee() string { + if x != nil { + return x.Fee + } + return "" +} + +func (x *DerivativeTrade) GetExecutedAt() int64 { + if x != nil { + return x.ExecutedAt + } + return 0 +} + +type PositionDelta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The direction the trade + TradeDirection string `protobuf:"bytes,1,opt,name=trade_direction,json=tradeDirection,proto3" json:"trade_direction,omitempty"` + // Execution Price of the trade. + ExecutionPrice string `protobuf:"bytes,2,opt,name=execution_price,json=executionPrice,proto3" json:"execution_price,omitempty"` + // Execution Quantity of the trade. + ExecutionQuantity string `protobuf:"bytes,3,opt,name=execution_quantity,json=executionQuantity,proto3" json:"execution_quantity,omitempty"` + // Execution Margin of the trade. + ExecutionMargin string `protobuf:"bytes,4,opt,name=execution_margin,json=executionMargin,proto3" json:"execution_margin,omitempty"` +} + +func (x *PositionDelta) Reset() { + *x = PositionDelta{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PositionDelta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PositionDelta) ProtoMessage() {} + +func (x *PositionDelta) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PositionDelta.ProtoReflect.Descriptor instead. +func (*PositionDelta) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{25} +} + +func (x *PositionDelta) GetTradeDirection() string { + if x != nil { + return x.TradeDirection + } + return "" +} + +func (x *PositionDelta) GetExecutionPrice() string { + if x != nil { + return x.ExecutionPrice + } + return "" +} + +func (x *PositionDelta) GetExecutionQuantity() string { + if x != nil { + return x.ExecutionQuantity + } + return "" +} + +func (x *PositionDelta) GetExecutionMargin() string { + if x != nil { + return x.ExecutionMargin + } + return "" +} + +type StreamTradesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of the trade + ExecutionType string `protobuf:"bytes,2,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by execution side of the trade + ExecutionSide string `protobuf:"bytes,3,opt,name=execution_side,json=executionSide,proto3" json:"execution_side,omitempty"` + // Filter by direction the trade + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,5,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *StreamTradesRequest) Reset() { + *x = StreamTradesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTradesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTradesRequest) ProtoMessage() {} + +func (x *StreamTradesRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTradesRequest.ProtoReflect.Descriptor instead. +func (*StreamTradesRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{26} +} + +func (x *StreamTradesRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *StreamTradesRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *StreamTradesRequest) GetExecutionSide() string { + if x != nil { + return x.ExecutionSide + } + return "" +} + +func (x *StreamTradesRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *StreamTradesRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type StreamTradesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // New derivative market trade + Trade *DerivativeTrade `protobuf:"bytes,1,opt,name=trade,proto3" json:"trade,omitempty"` + // Executed trades update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamTradesResponse) Reset() { + *x = StreamTradesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTradesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTradesResponse) ProtoMessage() {} + +func (x *StreamTradesResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTradesResponse.ProtoReflect.Descriptor instead. +func (*StreamTradesResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{27} +} + +func (x *StreamTradesResponse) GetTrade() *DerivativeTrade { + if x != nil { + return x.Trade + } + return nil +} + +func (x *StreamTradesResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamTradesResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SubaccountOrdersListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // subaccount ID to filter orders for specific subaccount + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Market ID to filter orders for specific market + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *SubaccountOrdersListRequest) Reset() { + *x = SubaccountOrdersListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountOrdersListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountOrdersListRequest) ProtoMessage() {} + +func (x *SubaccountOrdersListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountOrdersListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountOrdersListRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{28} +} + +func (x *SubaccountOrdersListRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountOrdersListRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type SubaccountOrdersListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of derivative orders + Orders []*DerivativeLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (x *SubaccountOrdersListResponse) Reset() { + *x = SubaccountOrdersListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountOrdersListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountOrdersListResponse) ProtoMessage() {} + +func (x *SubaccountOrdersListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountOrdersListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountOrdersListResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{29} +} + +func (x *SubaccountOrdersListResponse) GetOrders() []*DerivativeLimitOrder { + if x != nil { + return x.Orders + } + return nil +} + +type SubaccountTradesListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Filter trades by market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of trades + ExecutionType string `protobuf:"bytes,3,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by direction trades + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` +} + +func (x *SubaccountTradesListRequest) Reset() { + *x = SubaccountTradesListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountTradesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountTradesListRequest) ProtoMessage() {} + +func (x *SubaccountTradesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountTradesListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountTradesListRequest) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{30} +} + +func (x *SubaccountTradesListRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountTradesListRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *SubaccountTradesListRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *SubaccountTradesListRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +type SubaccountTradesListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of derivative market trades + Trades []*DerivativeTrade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (x *SubaccountTradesListResponse) Reset() { + *x = SubaccountTradesListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountTradesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountTradesListResponse) ProtoMessage() {} + +func (x *SubaccountTradesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_derivative_exchange_rpc_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountTradesListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountTradesListResponse) Descriptor() ([]byte, []int) { + return file_injective_derivative_exchange_rpc_proto_rawDescGZIP(), []int{31} +} + +func (x *SubaccountTradesListResponse) GetTrades() []*DerivativeTrade { + if x != nil { + return x.Trades + } + return nil +} + +var File_injective_derivative_exchange_rpc_proto protoreflect.FileDescriptor + +var file_injective_derivative_exchange_rpc_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x22, 0x56, 0x0a, 0x0e, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x64, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0xd3, 0x05, 0x0a, 0x14, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1f, 0x0a, + 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x38, 0x0a, 0x18, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x1f, + 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x56, 0x0a, 0x10, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x6b, 0x65, 0x72, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, + 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x50, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, + 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, + 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x2c, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x22, 0x61, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x2f, 0x0a, 0x10, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x11, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x59, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, + 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0xa2, 0x01, 0x0a, 0x18, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x41, 0x0a, 0x04, 0x62, 0x75, 0x79, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x62, 0x75, 0x79, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x73, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x22, + 0x5c, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x35, 0x0a, + 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x22, 0xb9, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x61, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x22, 0xd1, 0x03, 0x0a, 0x14, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, + 0x0e, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x4f, + 0x6e, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a, + 0x11, 0x75, 0x6e, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x6e, 0x66, 0x69, 0x6c, 0x6c, + 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x54, 0x0a, 0x10, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x68, + 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf7, 0x02, 0x0a, 0x12, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x71, 0x75, 0x61, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x6f, 0x6c, + 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x6c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x64, + 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x70, 0x6c, + 0x69, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, + 0x61, 0x64, 0x65, 0x73, 0x22, 0xef, 0x02, 0x0a, 0x0f, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x72, 0x61, 0x64, 0x65, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, + 0x73, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x0d, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x79, + 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x64, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x22, 0xc3, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x5f, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6a, 0x0a, 0x1c, 0x53, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x32, 0x9c, 0x0c, 0x0a, 0x1e, 0x49, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x50, 0x43, 0x12, 0x70, 0x0a, 0x07, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x06, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x76, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x33, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x39, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x12, 0x6d, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x6d, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, + 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, + 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, + 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_injective_derivative_exchange_rpc_proto_rawDescOnce sync.Once + file_injective_derivative_exchange_rpc_proto_rawDescData = file_injective_derivative_exchange_rpc_proto_rawDesc +) + +func file_injective_derivative_exchange_rpc_proto_rawDescGZIP() []byte { + file_injective_derivative_exchange_rpc_proto_rawDescOnce.Do(func() { + file_injective_derivative_exchange_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_injective_derivative_exchange_rpc_proto_rawDescData) + }) + return file_injective_derivative_exchange_rpc_proto_rawDescData +} + +var file_injective_derivative_exchange_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_injective_derivative_exchange_rpc_proto_goTypes = []interface{}{ + (*MarketsRequest)(nil), // 0: injective_derivative_exchange_rpc.MarketsRequest + (*MarketsResponse)(nil), // 1: injective_derivative_exchange_rpc.MarketsResponse + (*DerivativeMarketInfo)(nil), // 2: injective_derivative_exchange_rpc.DerivativeMarketInfo + (*TokenMeta)(nil), // 3: injective_derivative_exchange_rpc.TokenMeta + (*MarketRequest)(nil), // 4: injective_derivative_exchange_rpc.MarketRequest + (*MarketResponse)(nil), // 5: injective_derivative_exchange_rpc.MarketResponse + (*StreamMarketRequest)(nil), // 6: injective_derivative_exchange_rpc.StreamMarketRequest + (*StreamMarketResponse)(nil), // 7: injective_derivative_exchange_rpc.StreamMarketResponse + (*OrderbookRequest)(nil), // 8: injective_derivative_exchange_rpc.OrderbookRequest + (*OrderbookResponse)(nil), // 9: injective_derivative_exchange_rpc.OrderbookResponse + (*DerivativeLimitOrderbook)(nil), // 10: injective_derivative_exchange_rpc.DerivativeLimitOrderbook + (*PriceLevel)(nil), // 11: injective_derivative_exchange_rpc.PriceLevel + (*StreamOrderbookRequest)(nil), // 12: injective_derivative_exchange_rpc.StreamOrderbookRequest + (*StreamOrderbookResponse)(nil), // 13: injective_derivative_exchange_rpc.StreamOrderbookResponse + (*OrdersRequest)(nil), // 14: injective_derivative_exchange_rpc.OrdersRequest + (*OrdersResponse)(nil), // 15: injective_derivative_exchange_rpc.OrdersResponse + (*DerivativeLimitOrder)(nil), // 16: injective_derivative_exchange_rpc.DerivativeLimitOrder + (*PositionsRequest)(nil), // 17: injective_derivative_exchange_rpc.PositionsRequest + (*PositionsResponse)(nil), // 18: injective_derivative_exchange_rpc.PositionsResponse + (*DerivativePosition)(nil), // 19: injective_derivative_exchange_rpc.DerivativePosition + (*StreamOrdersRequest)(nil), // 20: injective_derivative_exchange_rpc.StreamOrdersRequest + (*StreamOrdersResponse)(nil), // 21: injective_derivative_exchange_rpc.StreamOrdersResponse + (*TradesRequest)(nil), // 22: injective_derivative_exchange_rpc.TradesRequest + (*TradesResponse)(nil), // 23: injective_derivative_exchange_rpc.TradesResponse + (*DerivativeTrade)(nil), // 24: injective_derivative_exchange_rpc.DerivativeTrade + (*PositionDelta)(nil), // 25: injective_derivative_exchange_rpc.PositionDelta + (*StreamTradesRequest)(nil), // 26: injective_derivative_exchange_rpc.StreamTradesRequest + (*StreamTradesResponse)(nil), // 27: injective_derivative_exchange_rpc.StreamTradesResponse + (*SubaccountOrdersListRequest)(nil), // 28: injective_derivative_exchange_rpc.SubaccountOrdersListRequest + (*SubaccountOrdersListResponse)(nil), // 29: injective_derivative_exchange_rpc.SubaccountOrdersListResponse + (*SubaccountTradesListRequest)(nil), // 30: injective_derivative_exchange_rpc.SubaccountTradesListRequest + (*SubaccountTradesListResponse)(nil), // 31: injective_derivative_exchange_rpc.SubaccountTradesListResponse +} +var file_injective_derivative_exchange_rpc_proto_depIdxs = []int32{ + 2, // 0: injective_derivative_exchange_rpc.MarketsResponse.markets:type_name -> injective_derivative_exchange_rpc.DerivativeMarketInfo + 3, // 1: injective_derivative_exchange_rpc.DerivativeMarketInfo.quote_token_meta:type_name -> injective_derivative_exchange_rpc.TokenMeta + 2, // 2: injective_derivative_exchange_rpc.MarketResponse.market:type_name -> injective_derivative_exchange_rpc.DerivativeMarketInfo + 2, // 3: injective_derivative_exchange_rpc.StreamMarketResponse.market:type_name -> injective_derivative_exchange_rpc.DerivativeMarketInfo + 10, // 4: injective_derivative_exchange_rpc.OrderbookResponse.orderbook:type_name -> injective_derivative_exchange_rpc.DerivativeLimitOrderbook + 11, // 5: injective_derivative_exchange_rpc.DerivativeLimitOrderbook.buys:type_name -> injective_derivative_exchange_rpc.PriceLevel + 11, // 6: injective_derivative_exchange_rpc.DerivativeLimitOrderbook.sells:type_name -> injective_derivative_exchange_rpc.PriceLevel + 10, // 7: injective_derivative_exchange_rpc.StreamOrderbookResponse.orderbook:type_name -> injective_derivative_exchange_rpc.DerivativeLimitOrderbook + 16, // 8: injective_derivative_exchange_rpc.OrdersResponse.orders:type_name -> injective_derivative_exchange_rpc.DerivativeLimitOrder + 19, // 9: injective_derivative_exchange_rpc.PositionsResponse.positions:type_name -> injective_derivative_exchange_rpc.DerivativePosition + 16, // 10: injective_derivative_exchange_rpc.StreamOrdersResponse.order:type_name -> injective_derivative_exchange_rpc.DerivativeLimitOrder + 24, // 11: injective_derivative_exchange_rpc.TradesResponse.trades:type_name -> injective_derivative_exchange_rpc.DerivativeTrade + 25, // 12: injective_derivative_exchange_rpc.DerivativeTrade.position_delta:type_name -> injective_derivative_exchange_rpc.PositionDelta + 24, // 13: injective_derivative_exchange_rpc.StreamTradesResponse.trade:type_name -> injective_derivative_exchange_rpc.DerivativeTrade + 16, // 14: injective_derivative_exchange_rpc.SubaccountOrdersListResponse.orders:type_name -> injective_derivative_exchange_rpc.DerivativeLimitOrder + 24, // 15: injective_derivative_exchange_rpc.SubaccountTradesListResponse.trades:type_name -> injective_derivative_exchange_rpc.DerivativeTrade + 0, // 16: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Markets:input_type -> injective_derivative_exchange_rpc.MarketsRequest + 4, // 17: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Market:input_type -> injective_derivative_exchange_rpc.MarketRequest + 6, // 18: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamMarket:input_type -> injective_derivative_exchange_rpc.StreamMarketRequest + 8, // 19: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Orderbook:input_type -> injective_derivative_exchange_rpc.OrderbookRequest + 12, // 20: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamOrderbook:input_type -> injective_derivative_exchange_rpc.StreamOrderbookRequest + 14, // 21: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Orders:input_type -> injective_derivative_exchange_rpc.OrdersRequest + 17, // 22: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Positions:input_type -> injective_derivative_exchange_rpc.PositionsRequest + 20, // 23: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamOrders:input_type -> injective_derivative_exchange_rpc.StreamOrdersRequest + 22, // 24: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Trades:input_type -> injective_derivative_exchange_rpc.TradesRequest + 26, // 25: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamTrades:input_type -> injective_derivative_exchange_rpc.StreamTradesRequest + 28, // 26: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.SubaccountOrdersList:input_type -> injective_derivative_exchange_rpc.SubaccountOrdersListRequest + 30, // 27: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.SubaccountTradesList:input_type -> injective_derivative_exchange_rpc.SubaccountTradesListRequest + 1, // 28: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Markets:output_type -> injective_derivative_exchange_rpc.MarketsResponse + 5, // 29: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Market:output_type -> injective_derivative_exchange_rpc.MarketResponse + 7, // 30: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamMarket:output_type -> injective_derivative_exchange_rpc.StreamMarketResponse + 9, // 31: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Orderbook:output_type -> injective_derivative_exchange_rpc.OrderbookResponse + 13, // 32: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamOrderbook:output_type -> injective_derivative_exchange_rpc.StreamOrderbookResponse + 15, // 33: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Orders:output_type -> injective_derivative_exchange_rpc.OrdersResponse + 18, // 34: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Positions:output_type -> injective_derivative_exchange_rpc.PositionsResponse + 21, // 35: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamOrders:output_type -> injective_derivative_exchange_rpc.StreamOrdersResponse + 23, // 36: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.Trades:output_type -> injective_derivative_exchange_rpc.TradesResponse + 27, // 37: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.StreamTrades:output_type -> injective_derivative_exchange_rpc.StreamTradesResponse + 29, // 38: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.SubaccountOrdersList:output_type -> injective_derivative_exchange_rpc.SubaccountOrdersListResponse + 31, // 39: injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC.SubaccountTradesList:output_type -> injective_derivative_exchange_rpc.SubaccountTradesListResponse + 28, // [28:40] is the sub-list for method output_type + 16, // [16:28] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_injective_derivative_exchange_rpc_proto_init() } +func file_injective_derivative_exchange_rpc_proto_init() { + if File_injective_derivative_exchange_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_injective_derivative_exchange_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DerivativeMarketInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMarketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMarketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderbookRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderbookResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DerivativeLimitOrderbook); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PriceLevel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrderbookRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrderbookResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DerivativeLimitOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DerivativePosition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DerivativeTrade); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionDelta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTradesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTradesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountOrdersListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountOrdersListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountTradesListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_derivative_exchange_rpc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountTradesListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_injective_derivative_exchange_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_injective_derivative_exchange_rpc_proto_goTypes, + DependencyIndexes: file_injective_derivative_exchange_rpc_proto_depIdxs, + MessageInfos: file_injective_derivative_exchange_rpc_proto_msgTypes, + }.Build() + File_injective_derivative_exchange_rpc_proto = out.File + file_injective_derivative_exchange_rpc_proto_rawDesc = nil + file_injective_derivative_exchange_rpc_proto_goTypes = nil + file_injective_derivative_exchange_rpc_proto_depIdxs = nil +} diff --git a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto new file mode 100644 index 00000000..015c44fc --- /dev/null +++ b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto @@ -0,0 +1,380 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveDerivativeExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +syntax = "proto3"; + +package injective_derivative_exchange_rpc; + +option go_package = "/injective_derivative_exchange_rpcpb"; + +// InjectiveDerivativeExchangeRPC defines gRPC API of Derivative Markets +// provider. +service InjectiveDerivativeExchangeRPC { + // Markets gets a list of Derivative Markets + rpc Markets (MarketsRequest) returns (MarketsResponse); + // Market gets details of a single derivative market + rpc Market (MarketRequest) returns (MarketResponse); + // StreamMarket streams live updates of selected derivative markets + rpc StreamMarket (StreamMarketRequest) returns (stream StreamMarketResponse); + // Orderbook gets the Orderbook of a Derivative Market + rpc Orderbook (OrderbookRequest) returns (OrderbookResponse); + // StreamOrderbook streams live updates of selected derivative market orderbook. + rpc StreamOrderbook (StreamOrderbookRequest) returns (stream StreamOrderbookResponse); + // DerivativeLimitOrders gets the limit orders of a Derivative Market. + rpc Orders (OrdersRequest) returns (OrdersResponse); + // Positions gets the positions for a trader. + rpc Positions (PositionsRequest) returns (PositionsResponse); + // StreamOrders streams updates to individual orders of a Derivative Market. + rpc StreamOrders (StreamOrdersRequest) returns (stream StreamOrdersResponse); + // Trades gets the trades of a Derivative Market. + rpc Trades (TradesRequest) returns (TradesResponse); + // StreamTrades streams newly executed trades from Derivative Market. + rpc StreamTrades (StreamTradesRequest) returns (stream StreamTradesResponse); + // SubaccountOrdersList lists orders posted from this subaccount. + rpc SubaccountOrdersList (SubaccountOrdersListRequest) returns (SubaccountOrdersListResponse); + // SubaccountTradesList gets a list of derivatives trades executed by this +// subaccount. + rpc SubaccountTradesList (SubaccountTradesListRequest) returns (SubaccountTradesListResponse); +} + +message MarketsRequest { + // Filter by market status + string market_status = 1; + // Filter by the Coin denomination of the quote currency + string quote_denom = 2; +} + +message MarketsResponse { + // Derivative Markets list + repeated DerivativeMarketInfo markets = 1; +} + +message DerivativeMarketInfo { + // DerivativeMarket ID is crypto.Keccak256Hash([]byte((oracleType.String() + +// ticker + quoteDenom + oracleBase + oracleQuote))) for perpetual markets and +// crypto.Keccak256Hash([]byte((oracleType.String() + ticker + quoteDenom + +// oracleBase + oracleQuote + strconv.Itoa(int(expiry))))) for expiry futures +// markets + string market_id = 1; + // The status of the market + string market_status = 2; + // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote +// asset. + string ticker = 3; + // Oracle base currency + string oracle_base = 4; + // Oracle quote currency + string oracle_quote = 5; + // Oracle Type + string oracle_type = 6; + // Defines the initial margin ratio of a derivative market + string initial_margin_ratio = 7; + // Defines the maintenance margin ratio of a derivative market + string maintenance_margin_ratio = 8; + // Coin denom used for the quote asset. + string quote_denom = 9; + // Token metadata for quote asset, only for Ethereum-based assets + TokenMeta quote_token_meta = 10; + // Defines the fee percentage makers pay when trading (in quote asset) + string maker_fee_rate = 11; + // Defines the fee percentage takers pay when trading (in quote asset) + string taker_fee_rate = 12; + // Percentage of the transaction fee shared with the service provider + string service_provider_fee = 13; + // True if the market is a perpetual swap market + bool is_perpetual = 14; + // Defines the maximum amount of decimal places that each order's price cannot +// exceed + uint32 max_price_scale_decimals = 15; + // Defines the maximum amount of decimal places that each order's quantity +// cannot exceed + uint32 max_quantity_scale_decimals = 16; +} + +message TokenMeta { + // Token full name + string name = 1; + // Token Ethereum contract address + string address = 2; + // Token symbol short name + string symbol = 3; + // URL to the logo image + string logo = 4; + // Token decimals + sint32 decimals = 5; + // Token metadata fetched timestamp in UNIX millis. + sint64 updated_at = 6; +} + +message MarketRequest { + // MarketId of the market we want to fetch + string market_id = 1; +} + +message MarketResponse { + // Info about particular derivative market + DerivativeMarketInfo market = 1; +} + +message StreamMarketRequest { + // List of market IDs for updates streaming, empty means 'ALL' derivative +// markets + repeated string market_ids = 1; +} + +message StreamMarketResponse { + // Info about particular derivative market + DerivativeMarketInfo market = 1; + // Update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message OrderbookRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; +} + +message OrderbookResponse { + // Orderbook of a particular derivative market + DerivativeLimitOrderbook orderbook = 1; +} + +message DerivativeLimitOrderbook { + // Array of price levels for buys + repeated PriceLevel buys = 1; + // Array of price levels for sells + repeated PriceLevel sells = 2; +} + +message PriceLevel { + // Price number of the price level. + string price = 1; + // Quantity of the price level. + string quantity = 2; + // Price level last updated timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message StreamOrderbookRequest { + // Market ID for orderbook updates streaming + string market_id = 1; +} + +message StreamOrderbookResponse { + // Orderbook of a Derivative Market + DerivativeLimitOrderbook orderbook = 1; + // Order update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message OrdersRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Look for specific order type + string order_type = 2; + // Look for specific trade direction of an order + string direction = 3; + // Look for specific subaccountId of an order + string subaccount_id = 4; +} + +message OrdersResponse { + // List of derivative market orders + repeated DerivativeLimitOrder orders = 1; +} + +message DerivativeLimitOrder { + // Hash of the order + string order_hash = 1; + // The type of the order + string order_type = 2; + // DerivativeMarket ID is keccak265(baseDenom || quoteDenom) + string market_id = 3; + // The subaccountId that this order belongs to + string subaccount_id = 4; + // True if the order is a reduce-only order + bool is_reduce_only = 5; + // Margin of the order + string margin = 6; + // Price of the order + string price = 7; + // Quantity of the order + string quantity = 8; + // The amount of the quantity remaining unfilled + string unfilled_quantity = 9; + // Trigger price is the trigger price used by stop/take orders + string trigger_price = 10; + // Fee recipient address + string fee_recipient = 11; + // Order state + string state = 12; + // Order committed timestamp in UNIX millis. + sint64 created_at = 13; + // Order updated timestamp in UNIX millis. + sint64 updated_at = 14; +} + +message PositionsRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // MarketId of the position we want to fetch + string market_id = 2; +} + +message PositionsResponse { + // List of derivative positions + repeated DerivativePosition positions = 1; +} + +message DerivativePosition { + // DerivativeMarket ID is keccak265(baseDenom || quoteDenom) + string market_id = 1; + // The subaccountId that this order belongs to + string subaccount_id = 2; + // Direction of the position + string direction = 3; + // Quantity of the order + string quantity = 4; + // Price of the order + string entry_price = 5; + // Margin of the position + string margin = 6; + // Hold quantity of the position + string hold_quantity = 7; + // LiquidationPrice of the position + string liquidation_price = 8; + // LiquidationPrice of the position + string mark_price = 9; + // Implied PNL of the Position + string implied_pnl = 10; + // Leverage of the Position + string leverage = 11; +} + +message StreamOrdersRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Look for specific order type + string order_type = 2; + // Look for specific trade direction of an order + string direction = 3; + // Look for specific subaccountId of an order + string subaccount_id = 4; +} + +message StreamOrdersResponse { + // Updated market order + DerivativeLimitOrder order = 1; + // Order update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message TradesRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Filter by execution type of the trade + string execution_type = 2; + // Filter by execution side of the trade + string execution_side = 3; + // Filter by direction the trade + string direction = 4; + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 5; +} + +message TradesResponse { + // Trades of a Derivative Market + repeated DerivativeTrade trades = 1; +} + +message DerivativeTrade { + // Order hash. + string order_hash = 1; + // The subaccountId that executed the trade + string subaccount_id = 2; + // The ID of the market that this trade is in + string market_id = 3; + // The execution type of the trade + string trade_execution_type = 4; + // True if the trade is a liquidation + bool is_liquidation = 5; + // Position Delta from the trade + PositionDelta position_delta = 6; + // The payout associated with the trade + string payout = 7; + // The fee associated with the trade + string fee = 8; + // Timestamp of trade execution in UNIX millis + sint64 executed_at = 9; +} + +message PositionDelta { + // The direction the trade + string trade_direction = 1; + // Execution Price of the trade. + string execution_price = 2; + // Execution Quantity of the trade. + string execution_quantity = 3; + // Execution Margin of the trade. + string execution_margin = 4; +} + +message StreamTradesRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Filter by execution type of the trade + string execution_type = 2; + // Filter by execution side of the trade + string execution_side = 3; + // Filter by direction the trade + string direction = 4; + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 5; +} + +message StreamTradesResponse { + // New derivative market trade + DerivativeTrade trade = 1; + // Executed trades update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message SubaccountOrdersListRequest { + // subaccount ID to filter orders for specific subaccount + string subaccount_id = 1; + // Market ID to filter orders for specific market + string market_id = 2; +} + +message SubaccountOrdersListResponse { + // List of derivative orders + repeated DerivativeLimitOrder orders = 1; +} + +message SubaccountTradesListRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // Filter trades by market ID + string market_id = 2; + // Filter by execution type of trades + string execution_type = 3; + // Filter by direction trades + string direction = 4; +} + +message SubaccountTradesListResponse { + // List of derivative market trades + repeated DerivativeTrade trades = 1; +} diff --git a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc_grpc.pb.go b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc_grpc.pb.go new file mode 100644 index 00000000..ae05cf1f --- /dev/null +++ b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc_grpc.pb.go @@ -0,0 +1,633 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package injective_derivative_exchange_rpcpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InjectiveDerivativeExchangeRPCClient is the client API for InjectiveDerivativeExchangeRPC 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. +type InjectiveDerivativeExchangeRPCClient interface { + // Markets gets a list of Derivative Markets + Markets(ctx context.Context, in *MarketsRequest, opts ...grpc.CallOption) (*MarketsResponse, error) + // Market gets details of a single derivative market + Market(ctx context.Context, in *MarketRequest, opts ...grpc.CallOption) (*MarketResponse, error) + // StreamMarket streams live updates of selected derivative markets + StreamMarket(ctx context.Context, in *StreamMarketRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamMarketClient, error) + // Orderbook gets the Orderbook of a Derivative Market + Orderbook(ctx context.Context, in *OrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) + // StreamOrderbook streams live updates of selected derivative market orderbook. + StreamOrderbook(ctx context.Context, in *StreamOrderbookRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamOrderbookClient, error) + // DerivativeLimitOrders gets the limit orders of a Derivative Market. + Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error) + // Positions gets the positions for a trader. + Positions(ctx context.Context, in *PositionsRequest, opts ...grpc.CallOption) (*PositionsResponse, error) + // StreamOrders streams updates to individual orders of a Derivative Market. + StreamOrders(ctx context.Context, in *StreamOrdersRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) + // Trades gets the trades of a Derivative Market. + Trades(ctx context.Context, in *TradesRequest, opts ...grpc.CallOption) (*TradesResponse, error) + // StreamTrades streams newly executed trades from Derivative Market. + StreamTrades(ctx context.Context, in *StreamTradesRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamTradesClient, error) + // SubaccountOrdersList lists orders posted from this subaccount. + SubaccountOrdersList(ctx context.Context, in *SubaccountOrdersListRequest, opts ...grpc.CallOption) (*SubaccountOrdersListResponse, error) + // SubaccountTradesList gets a list of derivatives trades executed by this + // subaccount. + SubaccountTradesList(ctx context.Context, in *SubaccountTradesListRequest, opts ...grpc.CallOption) (*SubaccountTradesListResponse, error) +} + +type injectiveDerivativeExchangeRPCClient struct { + cc grpc.ClientConnInterface +} + +func NewInjectiveDerivativeExchangeRPCClient(cc grpc.ClientConnInterface) InjectiveDerivativeExchangeRPCClient { + return &injectiveDerivativeExchangeRPCClient{cc} +} + +func (c *injectiveDerivativeExchangeRPCClient) Markets(ctx context.Context, in *MarketsRequest, opts ...grpc.CallOption) (*MarketsResponse, error) { + out := new(MarketsResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Markets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) Market(ctx context.Context, in *MarketRequest, opts ...grpc.CallOption) (*MarketResponse, error) { + out := new(MarketResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Market", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) StreamMarket(ctx context.Context, in *StreamMarketRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamMarketClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveDerivativeExchangeRPC_ServiceDesc.Streams[0], "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamMarket", opts...) + if err != nil { + return nil, err + } + x := &injectiveDerivativeExchangeRPCStreamMarketClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveDerivativeExchangeRPC_StreamMarketClient interface { + Recv() (*StreamMarketResponse, error) + grpc.ClientStream +} + +type injectiveDerivativeExchangeRPCStreamMarketClient struct { + grpc.ClientStream +} + +func (x *injectiveDerivativeExchangeRPCStreamMarketClient) Recv() (*StreamMarketResponse, error) { + m := new(StreamMarketResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) Orderbook(ctx context.Context, in *OrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) { + out := new(OrderbookResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Orderbook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) StreamOrderbook(ctx context.Context, in *StreamOrderbookRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamOrderbookClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveDerivativeExchangeRPC_ServiceDesc.Streams[1], "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamOrderbook", opts...) + if err != nil { + return nil, err + } + x := &injectiveDerivativeExchangeRPCStreamOrderbookClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveDerivativeExchangeRPC_StreamOrderbookClient interface { + Recv() (*StreamOrderbookResponse, error) + grpc.ClientStream +} + +type injectiveDerivativeExchangeRPCStreamOrderbookClient struct { + grpc.ClientStream +} + +func (x *injectiveDerivativeExchangeRPCStreamOrderbookClient) Recv() (*StreamOrderbookResponse, error) { + m := new(StreamOrderbookResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error) { + out := new(OrdersResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Orders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) Positions(ctx context.Context, in *PositionsRequest, opts ...grpc.CallOption) (*PositionsResponse, error) { + out := new(PositionsResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Positions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) StreamOrders(ctx context.Context, in *StreamOrdersRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveDerivativeExchangeRPC_ServiceDesc.Streams[2], "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamOrders", opts...) + if err != nil { + return nil, err + } + x := &injectiveDerivativeExchangeRPCStreamOrdersClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveDerivativeExchangeRPC_StreamOrdersClient interface { + Recv() (*StreamOrdersResponse, error) + grpc.ClientStream +} + +type injectiveDerivativeExchangeRPCStreamOrdersClient struct { + grpc.ClientStream +} + +func (x *injectiveDerivativeExchangeRPCStreamOrdersClient) Recv() (*StreamOrdersResponse, error) { + m := new(StreamOrdersResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) Trades(ctx context.Context, in *TradesRequest, opts ...grpc.CallOption) (*TradesResponse, error) { + out := new(TradesResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Trades", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) StreamTrades(ctx context.Context, in *StreamTradesRequest, opts ...grpc.CallOption) (InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveDerivativeExchangeRPC_ServiceDesc.Streams[3], "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamTrades", opts...) + if err != nil { + return nil, err + } + x := &injectiveDerivativeExchangeRPCStreamTradesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveDerivativeExchangeRPC_StreamTradesClient interface { + Recv() (*StreamTradesResponse, error) + grpc.ClientStream +} + +type injectiveDerivativeExchangeRPCStreamTradesClient struct { + grpc.ClientStream +} + +func (x *injectiveDerivativeExchangeRPCStreamTradesClient) Recv() (*StreamTradesResponse, error) { + m := new(StreamTradesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) SubaccountOrdersList(ctx context.Context, in *SubaccountOrdersListRequest, opts ...grpc.CallOption) (*SubaccountOrdersListResponse, error) { + out := new(SubaccountOrdersListResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/SubaccountOrdersList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveDerivativeExchangeRPCClient) SubaccountTradesList(ctx context.Context, in *SubaccountTradesListRequest, opts ...grpc.CallOption) (*SubaccountTradesListResponse, error) { + out := new(SubaccountTradesListResponse) + err := c.cc.Invoke(ctx, "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/SubaccountTradesList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InjectiveDerivativeExchangeRPCServer is the server API for InjectiveDerivativeExchangeRPC service. +// All implementations must embed UnimplementedInjectiveDerivativeExchangeRPCServer +// for forward compatibility +type InjectiveDerivativeExchangeRPCServer interface { + // Markets gets a list of Derivative Markets + Markets(context.Context, *MarketsRequest) (*MarketsResponse, error) + // Market gets details of a single derivative market + Market(context.Context, *MarketRequest) (*MarketResponse, error) + // StreamMarket streams live updates of selected derivative markets + StreamMarket(*StreamMarketRequest, InjectiveDerivativeExchangeRPC_StreamMarketServer) error + // Orderbook gets the Orderbook of a Derivative Market + Orderbook(context.Context, *OrderbookRequest) (*OrderbookResponse, error) + // StreamOrderbook streams live updates of selected derivative market orderbook. + StreamOrderbook(*StreamOrderbookRequest, InjectiveDerivativeExchangeRPC_StreamOrderbookServer) error + // DerivativeLimitOrders gets the limit orders of a Derivative Market. + Orders(context.Context, *OrdersRequest) (*OrdersResponse, error) + // Positions gets the positions for a trader. + Positions(context.Context, *PositionsRequest) (*PositionsResponse, error) + // StreamOrders streams updates to individual orders of a Derivative Market. + StreamOrders(*StreamOrdersRequest, InjectiveDerivativeExchangeRPC_StreamOrdersServer) error + // Trades gets the trades of a Derivative Market. + Trades(context.Context, *TradesRequest) (*TradesResponse, error) + // StreamTrades streams newly executed trades from Derivative Market. + StreamTrades(*StreamTradesRequest, InjectiveDerivativeExchangeRPC_StreamTradesServer) error + // SubaccountOrdersList lists orders posted from this subaccount. + SubaccountOrdersList(context.Context, *SubaccountOrdersListRequest) (*SubaccountOrdersListResponse, error) + // SubaccountTradesList gets a list of derivatives trades executed by this + // subaccount. + SubaccountTradesList(context.Context, *SubaccountTradesListRequest) (*SubaccountTradesListResponse, error) + mustEmbedUnimplementedInjectiveDerivativeExchangeRPCServer() +} + +// UnimplementedInjectiveDerivativeExchangeRPCServer must be embedded to have forward compatible implementations. +type UnimplementedInjectiveDerivativeExchangeRPCServer struct { +} + +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Markets(context.Context, *MarketsRequest) (*MarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Markets not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Market(context.Context, *MarketRequest) (*MarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Market not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) StreamMarket(*StreamMarketRequest, InjectiveDerivativeExchangeRPC_StreamMarketServer) error { + return status.Errorf(codes.Unimplemented, "method StreamMarket not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Orderbook(context.Context, *OrderbookRequest) (*OrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orderbook not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) StreamOrderbook(*StreamOrderbookRequest, InjectiveDerivativeExchangeRPC_StreamOrderbookServer) error { + return status.Errorf(codes.Unimplemented, "method StreamOrderbook not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Orders(context.Context, *OrdersRequest) (*OrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orders not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Positions(context.Context, *PositionsRequest) (*PositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Positions not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) StreamOrders(*StreamOrdersRequest, InjectiveDerivativeExchangeRPC_StreamOrdersServer) error { + return status.Errorf(codes.Unimplemented, "method StreamOrders not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) Trades(context.Context, *TradesRequest) (*TradesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Trades not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) StreamTrades(*StreamTradesRequest, InjectiveDerivativeExchangeRPC_StreamTradesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamTrades not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) SubaccountOrdersList(context.Context, *SubaccountOrdersListRequest) (*SubaccountOrdersListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountOrdersList not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) SubaccountTradesList(context.Context, *SubaccountTradesListRequest) (*SubaccountTradesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountTradesList not implemented") +} +func (UnimplementedInjectiveDerivativeExchangeRPCServer) mustEmbedUnimplementedInjectiveDerivativeExchangeRPCServer() { +} + +// UnsafeInjectiveDerivativeExchangeRPCServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InjectiveDerivativeExchangeRPCServer will +// result in compilation errors. +type UnsafeInjectiveDerivativeExchangeRPCServer interface { + mustEmbedUnimplementedInjectiveDerivativeExchangeRPCServer() +} + +func RegisterInjectiveDerivativeExchangeRPCServer(s grpc.ServiceRegistrar, srv InjectiveDerivativeExchangeRPCServer) { + s.RegisterService(&InjectiveDerivativeExchangeRPC_ServiceDesc, srv) +} + +func _InjectiveDerivativeExchangeRPC_Markets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Markets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Markets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Markets(ctx, req.(*MarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_Market_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Market(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Market", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Market(ctx, req.(*MarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_StreamMarket_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamMarketRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveDerivativeExchangeRPCServer).StreamMarket(m, &injectiveDerivativeExchangeRPCStreamMarketServer{stream}) +} + +type InjectiveDerivativeExchangeRPC_StreamMarketServer interface { + Send(*StreamMarketResponse) error + grpc.ServerStream +} + +type injectiveDerivativeExchangeRPCStreamMarketServer struct { + grpc.ServerStream +} + +func (x *injectiveDerivativeExchangeRPCStreamMarketServer) Send(m *StreamMarketResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveDerivativeExchangeRPC_Orderbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Orderbook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Orderbook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Orderbook(ctx, req.(*OrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_StreamOrderbook_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamOrderbookRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveDerivativeExchangeRPCServer).StreamOrderbook(m, &injectiveDerivativeExchangeRPCStreamOrderbookServer{stream}) +} + +type InjectiveDerivativeExchangeRPC_StreamOrderbookServer interface { + Send(*StreamOrderbookResponse) error + grpc.ServerStream +} + +type injectiveDerivativeExchangeRPCStreamOrderbookServer struct { + grpc.ServerStream +} + +func (x *injectiveDerivativeExchangeRPCStreamOrderbookServer) Send(m *StreamOrderbookResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveDerivativeExchangeRPC_Orders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Orders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Orders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Orders(ctx, req.(*OrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_Positions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Positions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Positions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Positions(ctx, req.(*PositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_StreamOrders_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamOrdersRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveDerivativeExchangeRPCServer).StreamOrders(m, &injectiveDerivativeExchangeRPCStreamOrdersServer{stream}) +} + +type InjectiveDerivativeExchangeRPC_StreamOrdersServer interface { + Send(*StreamOrdersResponse) error + grpc.ServerStream +} + +type injectiveDerivativeExchangeRPCStreamOrdersServer struct { + grpc.ServerStream +} + +func (x *injectiveDerivativeExchangeRPCStreamOrdersServer) Send(m *StreamOrdersResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveDerivativeExchangeRPC_Trades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TradesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).Trades(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/Trades", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).Trades(ctx, req.(*TradesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_StreamTrades_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamTradesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveDerivativeExchangeRPCServer).StreamTrades(m, &injectiveDerivativeExchangeRPCStreamTradesServer{stream}) +} + +type InjectiveDerivativeExchangeRPC_StreamTradesServer interface { + Send(*StreamTradesResponse) error + grpc.ServerStream +} + +type injectiveDerivativeExchangeRPCStreamTradesServer struct { + grpc.ServerStream +} + +func (x *injectiveDerivativeExchangeRPCStreamTradesServer) Send(m *StreamTradesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveDerivativeExchangeRPC_SubaccountOrdersList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountOrdersListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).SubaccountOrdersList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/SubaccountOrdersList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).SubaccountOrdersList(ctx, req.(*SubaccountOrdersListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveDerivativeExchangeRPC_SubaccountTradesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountTradesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveDerivativeExchangeRPCServer).SubaccountTradesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/SubaccountTradesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveDerivativeExchangeRPCServer).SubaccountTradesList(ctx, req.(*SubaccountTradesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InjectiveDerivativeExchangeRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveDerivativeExchangeRPC service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InjectiveDerivativeExchangeRPC_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC", + HandlerType: (*InjectiveDerivativeExchangeRPCServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Markets", + Handler: _InjectiveDerivativeExchangeRPC_Markets_Handler, + }, + { + MethodName: "Market", + Handler: _InjectiveDerivativeExchangeRPC_Market_Handler, + }, + { + MethodName: "Orderbook", + Handler: _InjectiveDerivativeExchangeRPC_Orderbook_Handler, + }, + { + MethodName: "Orders", + Handler: _InjectiveDerivativeExchangeRPC_Orders_Handler, + }, + { + MethodName: "Positions", + Handler: _InjectiveDerivativeExchangeRPC_Positions_Handler, + }, + { + MethodName: "Trades", + Handler: _InjectiveDerivativeExchangeRPC_Trades_Handler, + }, + { + MethodName: "SubaccountOrdersList", + Handler: _InjectiveDerivativeExchangeRPC_SubaccountOrdersList_Handler, + }, + { + MethodName: "SubaccountTradesList", + Handler: _InjectiveDerivativeExchangeRPC_SubaccountTradesList_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamMarket", + Handler: _InjectiveDerivativeExchangeRPC_StreamMarket_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamOrderbook", + Handler: _InjectiveDerivativeExchangeRPC_StreamOrderbook_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamOrders", + Handler: _InjectiveDerivativeExchangeRPC_StreamOrders_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamTrades", + Handler: _InjectiveDerivativeExchangeRPC_StreamTrades_Handler, + ServerStreams: true, + }, + }, + Metadata: "injective_derivative_exchange_rpc.proto", +} diff --git a/exchange/exchange_rpc/client/client.go b/exchange/exchange_rpc/client/client.go new file mode 100644 index 00000000..488d2622 --- /dev/null +++ b/exchange/exchange_rpc/client/client.go @@ -0,0 +1,131 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveExchangeRPC gRPC client +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_exchange_rpc/pb" + goagrpc "goa.design/goa/v3/grpc" + goapb "goa.design/goa/v3/grpc/pb" + goa "goa.design/goa/v3/pkg" + "google.golang.org/grpc" +) + +// Client lists the service endpoint gRPC clients. +type Client struct { + grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient + opts []grpc.CallOption +} + +// NewClient instantiates gRPC client for all the InjectiveExchangeRPC service +// servers. +func NewClient(cc *grpc.ClientConn, opts ...grpc.CallOption) *Client { + return &Client{ + grpccli: injective_exchange_rpcpb.NewInjectiveExchangeRPCClient(cc), + opts: opts, + } +} + +// Ping calls the "Ping" function in +// injective_exchange_rpcpb.InjectiveExchangeRPCClient interface. +func (c *Client) Ping() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildPingFunc(c.grpccli, c.opts...), + nil, + nil) + res, err := inv.Invoke(ctx, v) + if err != nil { + return nil, goa.Fault(err.Error()) + } + return res, nil + } +} + +// Version calls the "Version" function in +// injective_exchange_rpcpb.InjectiveExchangeRPCClient interface. +func (c *Client) Version() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildVersionFunc(c.grpccli, c.opts...), + nil, + DecodeVersionResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + return nil, goa.Fault(err.Error()) + } + return res, nil + } +} + +// GetTx calls the "GetTx" function in +// injective_exchange_rpcpb.InjectiveExchangeRPCClient interface. +func (c *Client) GetTx() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildGetTxFunc(c.grpccli, c.opts...), + EncodeGetTxRequest, + DecodeGetTxResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// PrepareTx calls the "PrepareTx" function in +// injective_exchange_rpcpb.InjectiveExchangeRPCClient interface. +func (c *Client) PrepareTx() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildPrepareTxFunc(c.grpccli, c.opts...), + EncodePrepareTxRequest, + DecodePrepareTxResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// BroadcastTx calls the "BroadcastTx" function in +// injective_exchange_rpcpb.InjectiveExchangeRPCClient interface. +func (c *Client) BroadcastTx() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildBroadcastTxFunc(c.grpccli, c.opts...), + EncodeBroadcastTxRequest, + DecodeBroadcastTxResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} diff --git a/exchange/exchange_rpc/client/encode_decode.go b/exchange/exchange_rpc/client/encode_decode.go new file mode 100644 index 00000000..558fb142 --- /dev/null +++ b/exchange/exchange_rpc/client/encode_decode.go @@ -0,0 +1,168 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveExchangeRPC gRPC client encoders and decoders +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_exchange_rpc/pb" + injectiveexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_exchange_rpc" + goagrpc "goa.design/goa/v3/grpc" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// BuildPingFunc builds the remote method to invoke for "InjectiveExchangeRPC" +// service "ping" endpoint. +func BuildPingFunc(grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Ping(ctx, reqpb.(*injective_exchange_rpcpb.PingRequest), opts...) + } + return grpccli.Ping(ctx, &injective_exchange_rpcpb.PingRequest{}, opts...) + } +} + +// BuildVersionFunc builds the remote method to invoke for +// "InjectiveExchangeRPC" service "version" endpoint. +func BuildVersionFunc(grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Version(ctx, reqpb.(*injective_exchange_rpcpb.VersionRequest), opts...) + } + return grpccli.Version(ctx, &injective_exchange_rpcpb.VersionRequest{}, opts...) + } +} + +// DecodeVersionResponse decodes responses from the InjectiveExchangeRPC +// version endpoint. +func DecodeVersionResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_exchange_rpcpb.VersionResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "version", "*injective_exchange_rpcpb.VersionResponse", v) + } + res := NewVersionResult(message) + return res, nil +} + +// BuildGetTxFunc builds the remote method to invoke for "InjectiveExchangeRPC" +// service "getTx" endpoint. +func BuildGetTxFunc(grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.GetTx(ctx, reqpb.(*injective_exchange_rpcpb.GetTxRequest), opts...) + } + return grpccli.GetTx(ctx, &injective_exchange_rpcpb.GetTxRequest{}, opts...) + } +} + +// EncodeGetTxRequest encodes requests sent to InjectiveExchangeRPC getTx +// endpoint. +func EncodeGetTxRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveexchangerpc.GetTxPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "getTx", "*injectiveexchangerpc.GetTxPayload", v) + } + return NewGetTxRequest(payload), nil +} + +// DecodeGetTxResponse decodes responses from the InjectiveExchangeRPC getTx +// endpoint. +func DecodeGetTxResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_exchange_rpcpb.GetTxResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "getTx", "*injective_exchange_rpcpb.GetTxResponse", v) + } + if err := ValidateGetTxResponse(message); err != nil { + return nil, err + } + res := NewGetTxResult(message) + return res, nil +} + +// BuildPrepareTxFunc builds the remote method to invoke for +// "InjectiveExchangeRPC" service "prepareTx" endpoint. +func BuildPrepareTxFunc(grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.PrepareTx(ctx, reqpb.(*injective_exchange_rpcpb.PrepareTxRequest), opts...) + } + return grpccli.PrepareTx(ctx, &injective_exchange_rpcpb.PrepareTxRequest{}, opts...) + } +} + +// EncodePrepareTxRequest encodes requests sent to InjectiveExchangeRPC +// prepareTx endpoint. +func EncodePrepareTxRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveexchangerpc.PrepareTxPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "prepareTx", "*injectiveexchangerpc.PrepareTxPayload", v) + } + return NewPrepareTxRequest(payload), nil +} + +// DecodePrepareTxResponse decodes responses from the InjectiveExchangeRPC +// prepareTx endpoint. +func DecodePrepareTxResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_exchange_rpcpb.PrepareTxResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "prepareTx", "*injective_exchange_rpcpb.PrepareTxResponse", v) + } + res := NewPrepareTxResult(message) + return res, nil +} + +// BuildBroadcastTxFunc builds the remote method to invoke for +// "InjectiveExchangeRPC" service "broadcastTx" endpoint. +func BuildBroadcastTxFunc(grpccli injective_exchange_rpcpb.InjectiveExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.BroadcastTx(ctx, reqpb.(*injective_exchange_rpcpb.BroadcastTxRequest), opts...) + } + return grpccli.BroadcastTx(ctx, &injective_exchange_rpcpb.BroadcastTxRequest{}, opts...) + } +} + +// EncodeBroadcastTxRequest encodes requests sent to InjectiveExchangeRPC +// broadcastTx endpoint. +func EncodeBroadcastTxRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectiveexchangerpc.BroadcastTxPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "broadcastTx", "*injectiveexchangerpc.BroadcastTxPayload", v) + } + return NewBroadcastTxRequest(payload), nil +} + +// DecodeBroadcastTxResponse decodes responses from the InjectiveExchangeRPC +// broadcastTx endpoint. +func DecodeBroadcastTxResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_exchange_rpcpb.BroadcastTxResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveExchangeRPC", "broadcastTx", "*injective_exchange_rpcpb.BroadcastTxResponse", v) + } + if err := ValidateBroadcastTxResponse(message); err != nil { + return nil, err + } + res := NewBroadcastTxResult(message) + return res, nil +} diff --git a/exchange/exchange_rpc/client/types.go b/exchange/exchange_rpc/client/types.go new file mode 100644 index 00000000..3839f78b --- /dev/null +++ b/exchange/exchange_rpc/client/types.go @@ -0,0 +1,240 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveExchangeRPC gRPC client types +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + injective_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_exchange_rpc/pb" + injectiveexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_exchange_rpc" + goa "goa.design/goa/v3/pkg" +) + +// NewPingRequest builds the gRPC request type from the payload of the "ping" +// endpoint of the "InjectiveExchangeRPC" service. +func NewPingRequest() *injective_exchange_rpcpb.PingRequest { + message := &injective_exchange_rpcpb.PingRequest{} + return message +} + +// NewVersionRequest builds the gRPC request type from the payload of the +// "version" endpoint of the "InjectiveExchangeRPC" service. +func NewVersionRequest() *injective_exchange_rpcpb.VersionRequest { + message := &injective_exchange_rpcpb.VersionRequest{} + return message +} + +// NewVersionResult builds the result type of the "version" endpoint of the +// "InjectiveExchangeRPC" service from the gRPC response type. +func NewVersionResult(message *injective_exchange_rpcpb.VersionResponse) *injectiveexchangerpc.VersionResult { + result := &injectiveexchangerpc.VersionResult{ + Version: message.Version, + } + if message.MetaData != nil { + result.MetaData = make(map[string]string, len(message.MetaData)) + for key, val := range message.MetaData { + tk := key + tv := val + result.MetaData[tk] = tv + } + } + return result +} + +// NewGetTxRequest builds the gRPC request type from the payload of the "getTx" +// endpoint of the "InjectiveExchangeRPC" service. +func NewGetTxRequest(payload *injectiveexchangerpc.GetTxPayload) *injective_exchange_rpcpb.GetTxRequest { + message := &injective_exchange_rpcpb.GetTxRequest{ + Hash: payload.Hash, + } + return message +} + +// NewGetTxResult builds the result type of the "getTx" endpoint of the +// "InjectiveExchangeRPC" service from the gRPC response type. +func NewGetTxResult(message *injective_exchange_rpcpb.GetTxResponse) *injectiveexchangerpc.TxResult { + result := &injectiveexchangerpc.TxResult{ + TxHash: message.TxHash, + Codespace: message.Codespace, + Code: message.Code, + Data: message.Data, + RawLog: message.RawLog, + } + if message.Height != 0 { + result.Height = &message.Height + } + if message.Index != 0 { + result.Index = &message.Index + } + if message.Timestamp != "" { + result.Timestamp = &message.Timestamp + } + return result +} + +// NewPrepareTxRequest builds the gRPC request type from the payload of the +// "prepareTx" endpoint of the "InjectiveExchangeRPC" service. +func NewPrepareTxRequest(payload *injectiveexchangerpc.PrepareTxPayload) *injective_exchange_rpcpb.PrepareTxRequest { + message := &injective_exchange_rpcpb.PrepareTxRequest{ + ChainId: payload.ChainID, + SignerAddress: payload.SignerAddress, + } + if payload.Sequence != nil { + message.Sequence = *payload.Sequence + } + if payload.Memo != nil { + message.Memo = *payload.Memo + } + if payload.TimeoutHeight != nil { + message.TimeoutHeight = *payload.TimeoutHeight + } + if payload.Fee != nil { + message.Fee = svcInjectiveexchangerpcCosmosTxFeeToInjectiveExchangeRpcpbCosmosTxFee(payload.Fee) + } + if payload.Msgs != nil { + message.Msgs = make([][]byte, len(payload.Msgs)) + for i, val := range payload.Msgs { + message.Msgs[i] = val + } + } + return message +} + +// NewPrepareTxResult builds the result type of the "prepareTx" endpoint of the +// "InjectiveExchangeRPC" service from the gRPC response type. +func NewPrepareTxResult(message *injective_exchange_rpcpb.PrepareTxResponse) *injectiveexchangerpc.PrepareTxResult { + result := &injectiveexchangerpc.PrepareTxResult{ + Data: message.Data, + Sequence: message.Sequence, + SignMode: message.SignMode, + PubKeyType: message.PubKeyType, + } + return result +} + +// NewBroadcastTxRequest builds the gRPC request type from the payload of the +// "broadcastTx" endpoint of the "InjectiveExchangeRPC" service. +func NewBroadcastTxRequest(payload *injectiveexchangerpc.BroadcastTxPayload) *injective_exchange_rpcpb.BroadcastTxRequest { + message := &injective_exchange_rpcpb.BroadcastTxRequest{ + ChainId: payload.ChainID, + Tx: payload.Tx, + Signature: payload.Signature, + Mode: payload.Mode, + } + if payload.Msgs != nil { + message.Msgs = make([][]byte, len(payload.Msgs)) + for i, val := range payload.Msgs { + message.Msgs[i] = val + } + } + if payload.PubKey != nil { + message.PubKey = svcInjectiveexchangerpcCosmosPubKeyToInjectiveExchangeRpcpbCosmosPubKey(payload.PubKey) + } + return message +} + +// NewBroadcastTxResult builds the result type of the "broadcastTx" endpoint of +// the "InjectiveExchangeRPC" service from the gRPC response type. +func NewBroadcastTxResult(message *injective_exchange_rpcpb.BroadcastTxResponse) *injectiveexchangerpc.TxResult { + result := &injectiveexchangerpc.TxResult{ + TxHash: message.TxHash, + Codespace: message.Codespace, + Code: message.Code, + Data: message.Data, + RawLog: message.RawLog, + } + if message.Height != 0 { + result.Height = &message.Height + } + if message.Index != 0 { + result.Index = &message.Index + } + if message.Timestamp != "" { + result.Timestamp = &message.Timestamp + } + return result +} + +// ValidateGetTxResponse runs the validations defined on GetTxResponse. +func ValidateGetTxResponse(message *injective_exchange_rpcpb.GetTxResponse) (err error) { + if message.Data == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("data", "message")) + } + return +} + +// ValidateBroadcastTxResponse runs the validations defined on +// BroadcastTxResponse. +func ValidateBroadcastTxResponse(message *injective_exchange_rpcpb.BroadcastTxResponse) (err error) { + if message.Data == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("data", "message")) + } + return +} + +// protobufInjectiveExchangeRpcpbCosmosTxFeeToInjectiveexchangerpcCosmosTxFee +// builds a value of type *injectiveexchangerpc.CosmosTxFee from a value of +// type *injective_exchange_rpcpb.CosmosTxFee. +func protobufInjectiveExchangeRpcpbCosmosTxFeeToInjectiveexchangerpcCosmosTxFee(v *injective_exchange_rpcpb.CosmosTxFee) *injectiveexchangerpc.CosmosTxFee { + res := &injectiveexchangerpc.CosmosTxFee{ + Gas: v.Gas, + } + if v.Amounts != nil { + res.Amounts = make([]*injectiveexchangerpc.CosmosCoin, len(v.Amounts)) + for i, val := range v.Amounts { + res.Amounts[i] = &injectiveexchangerpc.CosmosCoin{ + Denom: val.Denom, + Amount: val.Amount, + } + } + } + + return res +} + +// svcInjectiveexchangerpcCosmosTxFeeToInjectiveExchangeRpcpbCosmosTxFee builds +// a value of type *injective_exchange_rpcpb.CosmosTxFee from a value of type +// *injectiveexchangerpc.CosmosTxFee. +func svcInjectiveexchangerpcCosmosTxFeeToInjectiveExchangeRpcpbCosmosTxFee(v *injectiveexchangerpc.CosmosTxFee) *injective_exchange_rpcpb.CosmosTxFee { + res := &injective_exchange_rpcpb.CosmosTxFee{ + Gas: v.Gas, + } + if v.Amounts != nil { + res.Amounts = make([]*injective_exchange_rpcpb.CosmosCoin, len(v.Amounts)) + for i, val := range v.Amounts { + res.Amounts[i] = &injective_exchange_rpcpb.CosmosCoin{ + Denom: val.Denom, + Amount: val.Amount, + } + } + } + + return res +} + +// protobufInjectiveExchangeRpcpbCosmosPubKeyToInjectiveexchangerpcCosmosPubKey +// builds a value of type *injectiveexchangerpc.CosmosPubKey from a value of +// type *injective_exchange_rpcpb.CosmosPubKey. +func protobufInjectiveExchangeRpcpbCosmosPubKeyToInjectiveexchangerpcCosmosPubKey(v *injective_exchange_rpcpb.CosmosPubKey) *injectiveexchangerpc.CosmosPubKey { + res := &injectiveexchangerpc.CosmosPubKey{ + Type: v.Type, + Key: v.Key, + } + + return res +} + +// svcInjectiveexchangerpcCosmosPubKeyToInjectiveExchangeRpcpbCosmosPubKey +// builds a value of type *injective_exchange_rpcpb.CosmosPubKey from a value +// of type *injectiveexchangerpc.CosmosPubKey. +func svcInjectiveexchangerpcCosmosPubKeyToInjectiveExchangeRpcpbCosmosPubKey(v *injectiveexchangerpc.CosmosPubKey) *injective_exchange_rpcpb.CosmosPubKey { + res := &injective_exchange_rpcpb.CosmosPubKey{ + Type: v.Type, + Key: v.Key, + } + + return res +} diff --git a/exchange/exchange_rpc/pb/injective_exchange_rpc.pb.go b/exchange/exchange_rpc/pb/injective_exchange_rpc.pb.go new file mode 100644 index 00000000..68e6c038 --- /dev/null +++ b/exchange/exchange_rpc/pb/injective_exchange_rpc.pb.go @@ -0,0 +1,1281 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 +// source: injective_exchange_rpc.proto + +package injective_exchange_rpcpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{0} +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{1} +} + +type VersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VersionRequest) Reset() { + *x = VersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionRequest) ProtoMessage() {} + +func (x *VersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. +func (*VersionRequest) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{2} +} + +type VersionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // injective-exchange code version. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Additional meta data. + MetaData map[string]string `protobuf:"bytes,2,rep,name=meta_data,json=metaData,proto3" json:"meta_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *VersionResponse) Reset() { + *x = VersionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionResponse) ProtoMessage() {} + +func (x *VersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. +func (*VersionResponse) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{3} +} + +func (x *VersionResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *VersionResponse) GetMetaData() map[string]string { + if x != nil { + return x.MetaData + } + return nil +} + +type GetTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Transaction hash in hex without 0x prefix (Cosmos-like). + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (x *GetTxRequest) Reset() { + *x = GetTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTxRequest) ProtoMessage() {} + +func (x *GetTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTxRequest.ProtoReflect.Descriptor instead. +func (*GetTxRequest) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{4} +} + +func (x *GetTxRequest) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +type GetTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Hex-encoded Tendermint transaction hash + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + // The block height + Height int64 `protobuf:"zigzag64,2,opt,name=height,proto3" json:"height,omitempty"` + // Tx index in the block + Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` + // Namespace for the resp code + Codespace string `protobuf:"bytes,4,opt,name=codespace,proto3" json:"codespace,omitempty"` + // Response code + Code uint32 `protobuf:"varint,5,opt,name=code,proto3" json:"code,omitempty"` + // Result bytes, if any + Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` + // The output of the application's logger (raw string). May be + // non-deterministic. + RawLog string `protobuf:"bytes,7,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` + // Time of the previous block. + Timestamp string `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *GetTxResponse) Reset() { + *x = GetTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTxResponse) ProtoMessage() {} + +func (x *GetTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTxResponse.ProtoReflect.Descriptor instead. +func (*GetTxResponse) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{5} +} + +func (x *GetTxResponse) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *GetTxResponse) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *GetTxResponse) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *GetTxResponse) GetCodespace() string { + if x != nil { + return x.Codespace + } + return "" +} + +func (x *GetTxResponse) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *GetTxResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *GetTxResponse) GetRawLog() string { + if x != nil { + return x.RawLog + } + return "" +} + +func (x *GetTxResponse) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +type PrepareTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify chainID for the target tx + ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Specify Ethereum address of a signer + SignerAddress string `protobuf:"bytes,2,opt,name=signer_address,json=signerAddress,proto3" json:"signer_address,omitempty"` + // Account sequence number (nonce) of signer + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Textual memo information to attach with tx + Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` + // Block height until which the transaction is valid. + TimeoutHeight uint64 `protobuf:"varint,5,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + // Transaction fee details. + Fee *CosmosTxFee `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` + // List of Cosmos proto3-encoded Msgs to include in a single tx + Msgs [][]byte `protobuf:"bytes,7,rep,name=msgs,proto3" json:"msgs,omitempty"` +} + +func (x *PrepareTxRequest) Reset() { + *x = PrepareTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrepareTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepareTxRequest) ProtoMessage() {} + +func (x *PrepareTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepareTxRequest.ProtoReflect.Descriptor instead. +func (*PrepareTxRequest) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{6} +} + +func (x *PrepareTxRequest) GetChainId() uint64 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *PrepareTxRequest) GetSignerAddress() string { + if x != nil { + return x.SignerAddress + } + return "" +} + +func (x *PrepareTxRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *PrepareTxRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *PrepareTxRequest) GetTimeoutHeight() uint64 { + if x != nil { + return x.TimeoutHeight + } + return 0 +} + +func (x *PrepareTxRequest) GetFee() *CosmosTxFee { + if x != nil { + return x.Fee + } + return nil +} + +func (x *PrepareTxRequest) GetMsgs() [][]byte { + if x != nil { + return x.Msgs + } + return nil +} + +type CosmosTxFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of coins for the fee + Amounts []*CosmosCoin `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` + // Transaction gas limit + Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` +} + +func (x *CosmosTxFee) Reset() { + *x = CosmosTxFee{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CosmosTxFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CosmosTxFee) ProtoMessage() {} + +func (x *CosmosTxFee) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CosmosTxFee.ProtoReflect.Descriptor instead. +func (*CosmosTxFee) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{7} +} + +func (x *CosmosTxFee) GetAmounts() []*CosmosCoin { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *CosmosTxFee) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +type CosmosCoin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Coin denominator + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // Coin amount (big int) + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *CosmosCoin) Reset() { + *x = CosmosCoin{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CosmosCoin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CosmosCoin) ProtoMessage() {} + +func (x *CosmosCoin) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CosmosCoin.ProtoReflect.Descriptor instead. +func (*CosmosCoin) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{8} +} + +func (x *CosmosCoin) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *CosmosCoin) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type PrepareTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // EIP712-compatible message suitable for signing with eth_signTypedData_v4 + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Account tx sequence (nonce) + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Sign mode for the resulting tx + SignMode string `protobuf:"bytes,3,opt,name=sign_mode,json=signMode,proto3" json:"sign_mode,omitempty"` + // Specify proto-URL of a public key, which defines the signature format + PubKeyType string `protobuf:"bytes,4,opt,name=pub_key_type,json=pubKeyType,proto3" json:"pub_key_type,omitempty"` +} + +func (x *PrepareTxResponse) Reset() { + *x = PrepareTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrepareTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepareTxResponse) ProtoMessage() {} + +func (x *PrepareTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepareTxResponse.ProtoReflect.Descriptor instead. +func (*PrepareTxResponse) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{9} +} + +func (x *PrepareTxResponse) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *PrepareTxResponse) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *PrepareTxResponse) GetSignMode() string { + if x != nil { + return x.SignMode + } + return "" +} + +func (x *PrepareTxResponse) GetPubKeyType() string { + if x != nil { + return x.PubKeyType + } + return "" +} + +type BroadcastTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify Web3 chainID (from prepateTx) for the target Tx + ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Amino-encoded Tx JSON data (except Msgs) + Tx []byte `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"` + // List of Cosmos proto3-encoded Msgs from tx + Msgs [][]byte `protobuf:"bytes,3,rep,name=msgs,proto3" json:"msgs,omitempty"` + // Specify ethsecp256k1 pubkey of the signer + PubKey *CosmosPubKey `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + // Hex-encoded ethsecp256k1 signature bytes + Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + // Broadcast mode + Mode string `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode,omitempty"` +} + +func (x *BroadcastTxRequest) Reset() { + *x = BroadcastTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BroadcastTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BroadcastTxRequest) ProtoMessage() {} + +func (x *BroadcastTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BroadcastTxRequest.ProtoReflect.Descriptor instead. +func (*BroadcastTxRequest) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{10} +} + +func (x *BroadcastTxRequest) GetChainId() uint64 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *BroadcastTxRequest) GetTx() []byte { + if x != nil { + return x.Tx + } + return nil +} + +func (x *BroadcastTxRequest) GetMsgs() [][]byte { + if x != nil { + return x.Msgs + } + return nil +} + +func (x *BroadcastTxRequest) GetPubKey() *CosmosPubKey { + if x != nil { + return x.PubKey + } + return nil +} + +func (x *BroadcastTxRequest) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *BroadcastTxRequest) GetMode() string { + if x != nil { + return x.Mode + } + return "" +} + +type CosmosPubKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pubkey type URL + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Hex-encoded string of the public key + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *CosmosPubKey) Reset() { + *x = CosmosPubKey{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CosmosPubKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CosmosPubKey) ProtoMessage() {} + +func (x *CosmosPubKey) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CosmosPubKey.ProtoReflect.Descriptor instead. +func (*CosmosPubKey) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{11} +} + +func (x *CosmosPubKey) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *CosmosPubKey) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type BroadcastTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Hex-encoded Tendermint transaction hash + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + // The block height + Height int64 `protobuf:"zigzag64,2,opt,name=height,proto3" json:"height,omitempty"` + // Tx index in the block + Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` + // Namespace for the resp code + Codespace string `protobuf:"bytes,4,opt,name=codespace,proto3" json:"codespace,omitempty"` + // Response code + Code uint32 `protobuf:"varint,5,opt,name=code,proto3" json:"code,omitempty"` + // Result bytes, if any + Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` + // The output of the application's logger (raw string). May be + // non-deterministic. + RawLog string `protobuf:"bytes,7,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` + // Time of the previous block. + Timestamp string `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *BroadcastTxResponse) Reset() { + *x = BroadcastTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_exchange_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BroadcastTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BroadcastTxResponse) ProtoMessage() {} + +func (x *BroadcastTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_exchange_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BroadcastTxResponse.ProtoReflect.Descriptor instead. +func (*BroadcastTxResponse) Descriptor() ([]byte, []int) { + return file_injective_exchange_rpc_proto_rawDescGZIP(), []int{12} +} + +func (x *BroadcastTxResponse) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *BroadcastTxResponse) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *BroadcastTxResponse) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *BroadcastTxResponse) GetCodespace() string { + if x != nil { + return x.Codespace + } + return "" +} + +func (x *BroadcastTxResponse) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *BroadcastTxResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *BroadcastTxResponse) GetRawLog() string { + if x != nil { + return x.RawLog + } + return "" +} + +func (x *BroadcastTxResponse) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +var File_injective_exchange_rpc_proto protoreflect.FileDescriptor + +var file_injective_exchange_rpc_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbc, 0x01, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0xd3, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, + 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x61, 0x77, + 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4c, + 0x6f, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0xf6, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x54, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x35, + 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x54, 0x78, 0x46, 0x65, 0x65, + 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0x5d, 0x0a, 0x0b, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x54, 0x78, 0x46, 0x65, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x07, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, + 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x12, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x74, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6d, + 0x73, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x12, + 0x3d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, + 0x22, 0x34, 0x0a, 0x0c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xd9, 0x01, 0x0a, 0x13, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x72, + 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, + 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x32, 0xe5, 0x03, 0x0a, 0x14, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x50, 0x43, 0x12, 0x51, 0x0a, 0x04, 0x50, + 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, + 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x05, 0x47, 0x65, + 0x74, 0x54, 0x78, 0x12, 0x24, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x60, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x54, 0x78, 0x12, 0x28, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x54, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0b, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, + 0x78, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1b, 0x5a, 0x19, 0x2f, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_injective_exchange_rpc_proto_rawDescOnce sync.Once + file_injective_exchange_rpc_proto_rawDescData = file_injective_exchange_rpc_proto_rawDesc +) + +func file_injective_exchange_rpc_proto_rawDescGZIP() []byte { + file_injective_exchange_rpc_proto_rawDescOnce.Do(func() { + file_injective_exchange_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_injective_exchange_rpc_proto_rawDescData) + }) + return file_injective_exchange_rpc_proto_rawDescData +} + +var file_injective_exchange_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_injective_exchange_rpc_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: injective_exchange_rpc.PingRequest + (*PingResponse)(nil), // 1: injective_exchange_rpc.PingResponse + (*VersionRequest)(nil), // 2: injective_exchange_rpc.VersionRequest + (*VersionResponse)(nil), // 3: injective_exchange_rpc.VersionResponse + (*GetTxRequest)(nil), // 4: injective_exchange_rpc.GetTxRequest + (*GetTxResponse)(nil), // 5: injective_exchange_rpc.GetTxResponse + (*PrepareTxRequest)(nil), // 6: injective_exchange_rpc.PrepareTxRequest + (*CosmosTxFee)(nil), // 7: injective_exchange_rpc.CosmosTxFee + (*CosmosCoin)(nil), // 8: injective_exchange_rpc.CosmosCoin + (*PrepareTxResponse)(nil), // 9: injective_exchange_rpc.PrepareTxResponse + (*BroadcastTxRequest)(nil), // 10: injective_exchange_rpc.BroadcastTxRequest + (*CosmosPubKey)(nil), // 11: injective_exchange_rpc.CosmosPubKey + (*BroadcastTxResponse)(nil), // 12: injective_exchange_rpc.BroadcastTxResponse + nil, // 13: injective_exchange_rpc.VersionResponse.MetaDataEntry +} +var file_injective_exchange_rpc_proto_depIdxs = []int32{ + 13, // 0: injective_exchange_rpc.VersionResponse.meta_data:type_name -> injective_exchange_rpc.VersionResponse.MetaDataEntry + 7, // 1: injective_exchange_rpc.PrepareTxRequest.fee:type_name -> injective_exchange_rpc.CosmosTxFee + 8, // 2: injective_exchange_rpc.CosmosTxFee.amounts:type_name -> injective_exchange_rpc.CosmosCoin + 11, // 3: injective_exchange_rpc.BroadcastTxRequest.pub_key:type_name -> injective_exchange_rpc.CosmosPubKey + 0, // 4: injective_exchange_rpc.InjectiveExchangeRPC.Ping:input_type -> injective_exchange_rpc.PingRequest + 2, // 5: injective_exchange_rpc.InjectiveExchangeRPC.Version:input_type -> injective_exchange_rpc.VersionRequest + 4, // 6: injective_exchange_rpc.InjectiveExchangeRPC.GetTx:input_type -> injective_exchange_rpc.GetTxRequest + 6, // 7: injective_exchange_rpc.InjectiveExchangeRPC.PrepareTx:input_type -> injective_exchange_rpc.PrepareTxRequest + 10, // 8: injective_exchange_rpc.InjectiveExchangeRPC.BroadcastTx:input_type -> injective_exchange_rpc.BroadcastTxRequest + 1, // 9: injective_exchange_rpc.InjectiveExchangeRPC.Ping:output_type -> injective_exchange_rpc.PingResponse + 3, // 10: injective_exchange_rpc.InjectiveExchangeRPC.Version:output_type -> injective_exchange_rpc.VersionResponse + 5, // 11: injective_exchange_rpc.InjectiveExchangeRPC.GetTx:output_type -> injective_exchange_rpc.GetTxResponse + 9, // 12: injective_exchange_rpc.InjectiveExchangeRPC.PrepareTx:output_type -> injective_exchange_rpc.PrepareTxResponse + 12, // 13: injective_exchange_rpc.InjectiveExchangeRPC.BroadcastTx:output_type -> injective_exchange_rpc.BroadcastTxResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_injective_exchange_rpc_proto_init() } +func file_injective_exchange_rpc_proto_init() { + if File_injective_exchange_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_injective_exchange_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CosmosTxFee); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CosmosCoin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CosmosPubKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_exchange_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_injective_exchange_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_injective_exchange_rpc_proto_goTypes, + DependencyIndexes: file_injective_exchange_rpc_proto_depIdxs, + MessageInfos: file_injective_exchange_rpc_proto_msgTypes, + }.Build() + File_injective_exchange_rpc_proto = out.File + file_injective_exchange_rpc_proto_rawDesc = nil + file_injective_exchange_rpc_proto_goTypes = nil + file_injective_exchange_rpc_proto_depIdxs = nil +} diff --git a/exchange/exchange_rpc/pb/injective_exchange_rpc.proto b/exchange/exchange_rpc/pb/injective_exchange_rpc.proto new file mode 100644 index 00000000..68c4f22b --- /dev/null +++ b/exchange/exchange_rpc/pb/injective_exchange_rpc.proto @@ -0,0 +1,151 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +syntax = "proto3"; + +package injective_exchange_rpc; + +option go_package = "/injective_exchange_rpcpb"; + +// InjectiveExchangeRPC defines gRPC API of an Injective Exchange service. +service InjectiveExchangeRPC { + // Endpoint for checking server health. + rpc Ping (PingRequest) returns (PingResponse); + // Returns injective-exchange version. + rpc Version (VersionRequest) returns (VersionResponse); + // GetTx gets transaction details by hash. + rpc GetTx (GetTxRequest) returns (GetTxResponse); + // PrepareTx generates a Web3-signable body for a Cosmos transaction + rpc PrepareTx (PrepareTxRequest) returns (PrepareTxResponse); + // BroadcastTx broadcasts a signed Web3 transaction + rpc BroadcastTx (BroadcastTxRequest) returns (BroadcastTxResponse); +} + +message PingRequest { +} + +message PingResponse { +} + +message VersionRequest { +} + +message VersionResponse { + // injective-exchange code version. + string version = 1; + // Additional meta data. + map meta_data = 2; +} + +message GetTxRequest { + // Transaction hash in hex without 0x prefix (Cosmos-like). + string hash = 1; +} + +message GetTxResponse { + // Hex-encoded Tendermint transaction hash + string tx_hash = 1; + // The block height + sint64 height = 2; + // Tx index in the block + uint32 index = 3; + // Namespace for the resp code + string codespace = 4; + // Response code + uint32 code = 5; + // Result bytes, if any + bytes data = 6; + // The output of the application's logger (raw string). May be +// non-deterministic. + string raw_log = 7; + // Time of the previous block. + string timestamp = 8; +} + +message PrepareTxRequest { + // Specify chainID for the target tx + uint64 chain_id = 1; + // Specify Ethereum address of a signer + string signer_address = 2; + // Account sequence number (nonce) of signer + uint64 sequence = 3; + // Textual memo information to attach with tx + string memo = 4; + // Block height until which the transaction is valid. + uint64 timeout_height = 5; + // Transaction fee details. + CosmosTxFee fee = 6; + // List of Cosmos proto3-encoded Msgs to include in a single tx + repeated bytes msgs = 7; +} + +message CosmosTxFee { + // List of coins for the fee + repeated CosmosCoin amounts = 1; + // Transaction gas limit + uint64 gas = 2; +} + +message CosmosCoin { + // Coin denominator + string denom = 1; + // Coin amount (big int) + string amount = 2; +} + +message PrepareTxResponse { + // EIP712-compatible message suitable for signing with eth_signTypedData_v4 + string data = 1; + // Account tx sequence (nonce) + uint64 sequence = 2; + // Sign mode for the resulting tx + string sign_mode = 3; + // Specify proto-URL of a public key, which defines the signature format + string pub_key_type = 4; +} + +message BroadcastTxRequest { + // Specify Web3 chainID (from prepateTx) for the target Tx + uint64 chain_id = 1; + // Amino-encoded Tx JSON data (except Msgs) + bytes tx = 2; + // List of Cosmos proto3-encoded Msgs from tx + repeated bytes msgs = 3; + // Specify ethsecp256k1 pubkey of the signer + CosmosPubKey pub_key = 4; + // Hex-encoded ethsecp256k1 signature bytes + string signature = 5; + // Broadcast mode + string mode = 6; +} + +message CosmosPubKey { + // Pubkey type URL + string type = 1; + // Hex-encoded string of the public key + string key = 2; +} + +message BroadcastTxResponse { + // Hex-encoded Tendermint transaction hash + string tx_hash = 1; + // The block height + sint64 height = 2; + // Tx index in the block + uint32 index = 3; + // Namespace for the resp code + string codespace = 4; + // Response code + uint32 code = 5; + // Result bytes, if any + bytes data = 6; + // The output of the application's logger (raw string). May be +// non-deterministic. + string raw_log = 7; + // Time of the previous block. + string timestamp = 8; +} diff --git a/exchange/exchange_rpc/pb/injective_exchange_rpc_grpc.pb.go b/exchange/exchange_rpc/pb/injective_exchange_rpc_grpc.pb.go new file mode 100644 index 00000000..ae01dad1 --- /dev/null +++ b/exchange/exchange_rpc/pb/injective_exchange_rpc_grpc.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package injective_exchange_rpcpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InjectiveExchangeRPCClient is the client API for InjectiveExchangeRPC 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. +type InjectiveExchangeRPCClient interface { + // Endpoint for checking server health. + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + // Returns injective-exchange version. + Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) + // GetTx gets transaction details by hash. + GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) + // PrepareTx generates a Web3-signable body for a Cosmos transaction + PrepareTx(ctx context.Context, in *PrepareTxRequest, opts ...grpc.CallOption) (*PrepareTxResponse, error) + // BroadcastTx broadcasts a signed Web3 transaction + BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) +} + +type injectiveExchangeRPCClient struct { + cc grpc.ClientConnInterface +} + +func NewInjectiveExchangeRPCClient(cc grpc.ClientConnInterface) InjectiveExchangeRPCClient { + return &injectiveExchangeRPCClient{cc} +} + +func (c *injectiveExchangeRPCClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, "/injective_exchange_rpc.InjectiveExchangeRPC/Ping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveExchangeRPCClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + out := new(VersionResponse) + err := c.cc.Invoke(ctx, "/injective_exchange_rpc.InjectiveExchangeRPC/Version", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveExchangeRPCClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) { + out := new(GetTxResponse) + err := c.cc.Invoke(ctx, "/injective_exchange_rpc.InjectiveExchangeRPC/GetTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveExchangeRPCClient) PrepareTx(ctx context.Context, in *PrepareTxRequest, opts ...grpc.CallOption) (*PrepareTxResponse, error) { + out := new(PrepareTxResponse) + err := c.cc.Invoke(ctx, "/injective_exchange_rpc.InjectiveExchangeRPC/PrepareTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveExchangeRPCClient) BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) { + out := new(BroadcastTxResponse) + err := c.cc.Invoke(ctx, "/injective_exchange_rpc.InjectiveExchangeRPC/BroadcastTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InjectiveExchangeRPCServer is the server API for InjectiveExchangeRPC service. +// All implementations must embed UnimplementedInjectiveExchangeRPCServer +// for forward compatibility +type InjectiveExchangeRPCServer interface { + // Endpoint for checking server health. + Ping(context.Context, *PingRequest) (*PingResponse, error) + // Returns injective-exchange version. + Version(context.Context, *VersionRequest) (*VersionResponse, error) + // GetTx gets transaction details by hash. + GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) + // PrepareTx generates a Web3-signable body for a Cosmos transaction + PrepareTx(context.Context, *PrepareTxRequest) (*PrepareTxResponse, error) + // BroadcastTx broadcasts a signed Web3 transaction + BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error) + mustEmbedUnimplementedInjectiveExchangeRPCServer() +} + +// UnimplementedInjectiveExchangeRPCServer must be embedded to have forward compatible implementations. +type UnimplementedInjectiveExchangeRPCServer struct { +} + +func (UnimplementedInjectiveExchangeRPCServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedInjectiveExchangeRPCServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") +} +func (UnimplementedInjectiveExchangeRPCServer) GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") +} +func (UnimplementedInjectiveExchangeRPCServer) PrepareTx(context.Context, *PrepareTxRequest) (*PrepareTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PrepareTx not implemented") +} +func (UnimplementedInjectiveExchangeRPCServer) BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") +} +func (UnimplementedInjectiveExchangeRPCServer) mustEmbedUnimplementedInjectiveExchangeRPCServer() {} + +// UnsafeInjectiveExchangeRPCServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InjectiveExchangeRPCServer will +// result in compilation errors. +type UnsafeInjectiveExchangeRPCServer interface { + mustEmbedUnimplementedInjectiveExchangeRPCServer() +} + +func RegisterInjectiveExchangeRPCServer(s grpc.ServiceRegistrar, srv InjectiveExchangeRPCServer) { + s.RegisterService(&InjectiveExchangeRPC_ServiceDesc, srv) +} + +func _InjectiveExchangeRPC_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveExchangeRPCServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_exchange_rpc.InjectiveExchangeRPC/Ping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveExchangeRPCServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveExchangeRPC_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveExchangeRPCServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_exchange_rpc.InjectiveExchangeRPC/Version", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveExchangeRPCServer).Version(ctx, req.(*VersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveExchangeRPC_GetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveExchangeRPCServer).GetTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_exchange_rpc.InjectiveExchangeRPC/GetTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveExchangeRPCServer).GetTx(ctx, req.(*GetTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveExchangeRPC_PrepareTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PrepareTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveExchangeRPCServer).PrepareTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_exchange_rpc.InjectiveExchangeRPC/PrepareTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveExchangeRPCServer).PrepareTx(ctx, req.(*PrepareTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveExchangeRPC_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BroadcastTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveExchangeRPCServer).BroadcastTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_exchange_rpc.InjectiveExchangeRPC/BroadcastTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveExchangeRPCServer).BroadcastTx(ctx, req.(*BroadcastTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InjectiveExchangeRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveExchangeRPC service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InjectiveExchangeRPC_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "injective_exchange_rpc.InjectiveExchangeRPC", + HandlerType: (*InjectiveExchangeRPCServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _InjectiveExchangeRPC_Ping_Handler, + }, + { + MethodName: "Version", + Handler: _InjectiveExchangeRPC_Version_Handler, + }, + { + MethodName: "GetTx", + Handler: _InjectiveExchangeRPC_GetTx_Handler, + }, + { + MethodName: "PrepareTx", + Handler: _InjectiveExchangeRPC_PrepareTx_Handler, + }, + { + MethodName: "BroadcastTx", + Handler: _InjectiveExchangeRPC_BroadcastTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "injective_exchange_rpc.proto", +} diff --git a/exchange/spot_exchange_rpc/client/client.go b/exchange/spot_exchange_rpc/client/client.go new file mode 100644 index 00000000..92aea517 --- /dev/null +++ b/exchange/spot_exchange_rpc/client/client.go @@ -0,0 +1,358 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveSpotExchangeRPC gRPC client +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_spot_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_spot_exchange_rpc/pb" + injectivespotexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_spot_exchange_rpc" + goagrpc "goa.design/goa/v3/grpc" + goapb "goa.design/goa/v3/grpc/pb" + goa "goa.design/goa/v3/pkg" + "google.golang.org/grpc" +) + +// Client lists the service endpoint gRPC clients. +type Client struct { + grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient + opts []grpc.CallOption +} + +// StreamMarketsClientStream implements the +// injectivespotexchangerpc.StreamMarketsClientStream interface. +type StreamMarketsClientStream struct { + stream injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamMarketsClient +} + +// StreamOrderbookClientStream implements the +// injectivespotexchangerpc.StreamOrderbookClientStream interface. +type StreamOrderbookClientStream struct { + stream injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamOrderbookClient +} + +// StreamOrdersClientStream implements the +// injectivespotexchangerpc.StreamOrdersClientStream interface. +type StreamOrdersClientStream struct { + stream injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamOrdersClient +} + +// StreamTradesClientStream implements the +// injectivespotexchangerpc.StreamTradesClientStream interface. +type StreamTradesClientStream struct { + stream injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamTradesClient +} + +// NewClient instantiates gRPC client for all the InjectiveSpotExchangeRPC +// service servers. +func NewClient(cc *grpc.ClientConn, opts ...grpc.CallOption) *Client { + return &Client{ + grpccli: injective_spot_exchange_rpcpb.NewInjectiveSpotExchangeRPCClient(cc), + opts: opts, + } +} + +// Markets calls the "Markets" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) Markets() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildMarketsFunc(c.grpccli, c.opts...), + EncodeMarketsRequest, + DecodeMarketsResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Market calls the "Market" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) Market() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildMarketFunc(c.grpccli, c.opts...), + EncodeMarketRequest, + DecodeMarketResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamMarkets calls the "StreamMarkets" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) StreamMarkets() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamMarketsFunc(c.grpccli, c.opts...), + EncodeStreamMarketsRequest, + DecodeStreamMarketsResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Orderbook calls the "Orderbook" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) Orderbook() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildOrderbookFunc(c.grpccli, c.opts...), + EncodeOrderbookRequest, + DecodeOrderbookResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamOrderbook calls the "StreamOrderbook" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) StreamOrderbook() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamOrderbookFunc(c.grpccli, c.opts...), + EncodeStreamOrderbookRequest, + DecodeStreamOrderbookResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Orders calls the "Orders" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) Orders() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildOrdersFunc(c.grpccli, c.opts...), + EncodeOrdersRequest, + DecodeOrdersResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamOrders calls the "StreamOrders" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) StreamOrders() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamOrdersFunc(c.grpccli, c.opts...), + EncodeStreamOrdersRequest, + DecodeStreamOrdersResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Trades calls the "Trades" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) Trades() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildTradesFunc(c.grpccli, c.opts...), + EncodeTradesRequest, + DecodeTradesResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// StreamTrades calls the "StreamTrades" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) StreamTrades() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildStreamTradesFunc(c.grpccli, c.opts...), + EncodeStreamTradesRequest, + DecodeStreamTradesResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountOrdersList calls the "SubaccountOrdersList" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) SubaccountOrdersList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountOrdersListFunc(c.grpccli, c.opts...), + EncodeSubaccountOrdersListRequest, + DecodeSubaccountOrdersListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// SubaccountTradesList calls the "SubaccountTradesList" function in +// injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient interface. +func (c *Client) SubaccountTradesList() goa.Endpoint { + return func(ctx context.Context, v interface{}) (interface{}, error) { + inv := goagrpc.NewInvoker( + BuildSubaccountTradesListFunc(c.grpccli, c.opts...), + EncodeSubaccountTradesListRequest, + DecodeSubaccountTradesListResponse) + res, err := inv.Invoke(ctx, v) + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return nil, goagrpc.NewServiceError(message) + default: + return nil, goa.Fault(err.Error()) + } + } + return res, nil + } +} + +// Recv reads instances of +// "injective_spot_exchange_rpcpb.StreamMarketsResponse" from the +// "streamMarkets" endpoint gRPC stream. +func (s *StreamMarketsClientStream) Recv() (*injectivespotexchangerpc.StreamMarketsResult, error) { + var res *injectivespotexchangerpc.StreamMarketsResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamMarketsResponse(v); err != nil { + return res, err + } + return NewStreamMarketsResult(v), nil +} + +// Recv reads instances of +// "injective_spot_exchange_rpcpb.StreamOrderbookResponse" from the +// "streamOrderbook" endpoint gRPC stream. +func (s *StreamOrderbookClientStream) Recv() (*injectivespotexchangerpc.StreamOrderbookResult, error) { + var res *injectivespotexchangerpc.StreamOrderbookResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamOrderbookResponse(v); err != nil { + return res, err + } + return NewStreamOrderbookResult(v), nil +} + +// Recv reads instances of "injective_spot_exchange_rpcpb.StreamOrdersResponse" +// from the "streamOrders" endpoint gRPC stream. +func (s *StreamOrdersClientStream) Recv() (*injectivespotexchangerpc.StreamOrdersResult, error) { + var res *injectivespotexchangerpc.StreamOrdersResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamOrdersResponse(v); err != nil { + return res, err + } + return NewStreamOrdersResult(v), nil +} + +// Recv reads instances of "injective_spot_exchange_rpcpb.StreamTradesResponse" +// from the "streamTrades" endpoint gRPC stream. +func (s *StreamTradesClientStream) Recv() (*injectivespotexchangerpc.StreamTradesResult, error) { + var res *injectivespotexchangerpc.StreamTradesResult + v, err := s.stream.Recv() + if err != nil { + return res, err + } + if err = ValidateStreamTradesResponse(v); err != nil { + return res, err + } + return NewStreamTradesResult(v), nil +} diff --git a/exchange/spot_exchange_rpc/client/encode_decode.go b/exchange/spot_exchange_rpc/client/encode_decode.go new file mode 100644 index 00000000..43b09479 --- /dev/null +++ b/exchange/spot_exchange_rpc/client/encode_decode.go @@ -0,0 +1,412 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveSpotExchangeRPC gRPC client encoders and decoders +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "context" + + injective_spot_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_spot_exchange_rpc/pb" + injectivespotexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_spot_exchange_rpc" + goagrpc "goa.design/goa/v3/grpc" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// BuildMarketsFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "markets" endpoint. +func BuildMarketsFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Markets(ctx, reqpb.(*injective_spot_exchange_rpcpb.MarketsRequest), opts...) + } + return grpccli.Markets(ctx, &injective_spot_exchange_rpcpb.MarketsRequest{}, opts...) + } +} + +// EncodeMarketsRequest encodes requests sent to InjectiveSpotExchangeRPC +// markets endpoint. +func EncodeMarketsRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.MarketsPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "markets", "*injectivespotexchangerpc.MarketsPayload", v) + } + return NewMarketsRequest(payload), nil +} + +// DecodeMarketsResponse decodes responses from the InjectiveSpotExchangeRPC +// markets endpoint. +func DecodeMarketsResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.MarketsResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "markets", "*injective_spot_exchange_rpcpb.MarketsResponse", v) + } + if err := ValidateMarketsResponse(message); err != nil { + return nil, err + } + res := NewMarketsResult(message) + return res, nil +} + +// BuildMarketFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "market" endpoint. +func BuildMarketFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Market(ctx, reqpb.(*injective_spot_exchange_rpcpb.MarketRequest), opts...) + } + return grpccli.Market(ctx, &injective_spot_exchange_rpcpb.MarketRequest{}, opts...) + } +} + +// EncodeMarketRequest encodes requests sent to InjectiveSpotExchangeRPC market +// endpoint. +func EncodeMarketRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.MarketPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "market", "*injectivespotexchangerpc.MarketPayload", v) + } + return NewMarketRequest(payload), nil +} + +// DecodeMarketResponse decodes responses from the InjectiveSpotExchangeRPC +// market endpoint. +func DecodeMarketResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.MarketResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "market", "*injective_spot_exchange_rpcpb.MarketResponse", v) + } + if err := ValidateMarketResponse(message); err != nil { + return nil, err + } + res := NewMarketResult(message) + return res, nil +} + +// BuildStreamMarketsFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "streamMarkets" endpoint. +func BuildStreamMarketsFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamMarkets(ctx, reqpb.(*injective_spot_exchange_rpcpb.StreamMarketsRequest), opts...) + } + return grpccli.StreamMarkets(ctx, &injective_spot_exchange_rpcpb.StreamMarketsRequest{}, opts...) + } +} + +// EncodeStreamMarketsRequest encodes requests sent to InjectiveSpotExchangeRPC +// streamMarkets endpoint. +func EncodeStreamMarketsRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.StreamMarketsPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "streamMarkets", "*injectivespotexchangerpc.StreamMarketsPayload", v) + } + return NewStreamMarketsRequest(payload), nil +} + +// DecodeStreamMarketsResponse decodes responses from the +// InjectiveSpotExchangeRPC streamMarkets endpoint. +func DecodeStreamMarketsResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamMarketsClientStream{ + stream: v.(injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamMarketsClient), + }, nil +} + +// BuildOrderbookFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "orderbook" endpoint. +func BuildOrderbookFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Orderbook(ctx, reqpb.(*injective_spot_exchange_rpcpb.OrderbookRequest), opts...) + } + return grpccli.Orderbook(ctx, &injective_spot_exchange_rpcpb.OrderbookRequest{}, opts...) + } +} + +// EncodeOrderbookRequest encodes requests sent to InjectiveSpotExchangeRPC +// orderbook endpoint. +func EncodeOrderbookRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.OrderbookPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "orderbook", "*injectivespotexchangerpc.OrderbookPayload", v) + } + return NewOrderbookRequest(payload), nil +} + +// DecodeOrderbookResponse decodes responses from the InjectiveSpotExchangeRPC +// orderbook endpoint. +func DecodeOrderbookResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.OrderbookResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "orderbook", "*injective_spot_exchange_rpcpb.OrderbookResponse", v) + } + if err := ValidateOrderbookResponse(message); err != nil { + return nil, err + } + res := NewOrderbookResult(message) + return res, nil +} + +// BuildStreamOrderbookFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "streamOrderbook" endpoint. +func BuildStreamOrderbookFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamOrderbook(ctx, reqpb.(*injective_spot_exchange_rpcpb.StreamOrderbookRequest), opts...) + } + return grpccli.StreamOrderbook(ctx, &injective_spot_exchange_rpcpb.StreamOrderbookRequest{}, opts...) + } +} + +// EncodeStreamOrderbookRequest encodes requests sent to +// InjectiveSpotExchangeRPC streamOrderbook endpoint. +func EncodeStreamOrderbookRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.StreamOrderbookPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "streamOrderbook", "*injectivespotexchangerpc.StreamOrderbookPayload", v) + } + return NewStreamOrderbookRequest(payload), nil +} + +// DecodeStreamOrderbookResponse decodes responses from the +// InjectiveSpotExchangeRPC streamOrderbook endpoint. +func DecodeStreamOrderbookResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamOrderbookClientStream{ + stream: v.(injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamOrderbookClient), + }, nil +} + +// BuildOrdersFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "orders" endpoint. +func BuildOrdersFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Orders(ctx, reqpb.(*injective_spot_exchange_rpcpb.OrdersRequest), opts...) + } + return grpccli.Orders(ctx, &injective_spot_exchange_rpcpb.OrdersRequest{}, opts...) + } +} + +// EncodeOrdersRequest encodes requests sent to InjectiveSpotExchangeRPC orders +// endpoint. +func EncodeOrdersRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SpotLimitOrdersFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "orders", "*injectivespotexchangerpc.SpotLimitOrdersFilter", v) + } + return NewOrdersRequest(payload), nil +} + +// DecodeOrdersResponse decodes responses from the InjectiveSpotExchangeRPC +// orders endpoint. +func DecodeOrdersResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.OrdersResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "orders", "*injective_spot_exchange_rpcpb.OrdersResponse", v) + } + if err := ValidateOrdersResponse(message); err != nil { + return nil, err + } + res := NewOrdersResult(message) + return res, nil +} + +// BuildStreamOrdersFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "streamOrders" endpoint. +func BuildStreamOrdersFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamOrders(ctx, reqpb.(*injective_spot_exchange_rpcpb.StreamOrdersRequest), opts...) + } + return grpccli.StreamOrders(ctx, &injective_spot_exchange_rpcpb.StreamOrdersRequest{}, opts...) + } +} + +// EncodeStreamOrdersRequest encodes requests sent to InjectiveSpotExchangeRPC +// streamOrders endpoint. +func EncodeStreamOrdersRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SpotLimitOrdersFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "streamOrders", "*injectivespotexchangerpc.SpotLimitOrdersFilter", v) + } + return NewStreamOrdersRequest(payload), nil +} + +// DecodeStreamOrdersResponse decodes responses from the +// InjectiveSpotExchangeRPC streamOrders endpoint. +func DecodeStreamOrdersResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamOrdersClientStream{ + stream: v.(injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamOrdersClient), + }, nil +} + +// BuildTradesFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "trades" endpoint. +func BuildTradesFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.Trades(ctx, reqpb.(*injective_spot_exchange_rpcpb.TradesRequest), opts...) + } + return grpccli.Trades(ctx, &injective_spot_exchange_rpcpb.TradesRequest{}, opts...) + } +} + +// EncodeTradesRequest encodes requests sent to InjectiveSpotExchangeRPC trades +// endpoint. +func EncodeTradesRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SpotTradesFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "trades", "*injectivespotexchangerpc.SpotTradesFilter", v) + } + return NewTradesRequest(payload), nil +} + +// DecodeTradesResponse decodes responses from the InjectiveSpotExchangeRPC +// trades endpoint. +func DecodeTradesResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.TradesResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "trades", "*injective_spot_exchange_rpcpb.TradesResponse", v) + } + if err := ValidateTradesResponse(message); err != nil { + return nil, err + } + res := NewTradesResult(message) + return res, nil +} + +// BuildStreamTradesFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "streamTrades" endpoint. +func BuildStreamTradesFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.StreamTrades(ctx, reqpb.(*injective_spot_exchange_rpcpb.StreamTradesRequest), opts...) + } + return grpccli.StreamTrades(ctx, &injective_spot_exchange_rpcpb.StreamTradesRequest{}, opts...) + } +} + +// EncodeStreamTradesRequest encodes requests sent to InjectiveSpotExchangeRPC +// streamTrades endpoint. +func EncodeStreamTradesRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SpotTradesFilter) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "streamTrades", "*injectivespotexchangerpc.SpotTradesFilter", v) + } + return NewStreamTradesRequest(payload), nil +} + +// DecodeStreamTradesResponse decodes responses from the +// InjectiveSpotExchangeRPC streamTrades endpoint. +func DecodeStreamTradesResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + return &StreamTradesClientStream{ + stream: v.(injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPC_StreamTradesClient), + }, nil +} + +// BuildSubaccountOrdersListFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "subaccountOrdersList" endpoint. +func BuildSubaccountOrdersListFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountOrdersList(ctx, reqpb.(*injective_spot_exchange_rpcpb.SubaccountOrdersListRequest), opts...) + } + return grpccli.SubaccountOrdersList(ctx, &injective_spot_exchange_rpcpb.SubaccountOrdersListRequest{}, opts...) + } +} + +// EncodeSubaccountOrdersListRequest encodes requests sent to +// InjectiveSpotExchangeRPC subaccountOrdersList endpoint. +func EncodeSubaccountOrdersListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SubaccountOrdersListPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "subaccountOrdersList", "*injectivespotexchangerpc.SubaccountOrdersListPayload", v) + } + return NewSubaccountOrdersListRequest(payload), nil +} + +// DecodeSubaccountOrdersListResponse decodes responses from the +// InjectiveSpotExchangeRPC subaccountOrdersList endpoint. +func DecodeSubaccountOrdersListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.SubaccountOrdersListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "subaccountOrdersList", "*injective_spot_exchange_rpcpb.SubaccountOrdersListResponse", v) + } + if err := ValidateSubaccountOrdersListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountOrdersListResult(message) + return res, nil +} + +// BuildSubaccountTradesListFunc builds the remote method to invoke for +// "InjectiveSpotExchangeRPC" service "subaccountTradesList" endpoint. +func BuildSubaccountTradesListFunc(grpccli injective_spot_exchange_rpcpb.InjectiveSpotExchangeRPCClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc { + return func(ctx context.Context, reqpb interface{}, opts ...grpc.CallOption) (interface{}, error) { + for _, opt := range cliopts { + opts = append(opts, opt) + } + if reqpb != nil { + return grpccli.SubaccountTradesList(ctx, reqpb.(*injective_spot_exchange_rpcpb.SubaccountTradesListRequest), opts...) + } + return grpccli.SubaccountTradesList(ctx, &injective_spot_exchange_rpcpb.SubaccountTradesListRequest{}, opts...) + } +} + +// EncodeSubaccountTradesListRequest encodes requests sent to +// InjectiveSpotExchangeRPC subaccountTradesList endpoint. +func EncodeSubaccountTradesListRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error) { + payload, ok := v.(*injectivespotexchangerpc.SubaccountTradesListPayload) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "subaccountTradesList", "*injectivespotexchangerpc.SubaccountTradesListPayload", v) + } + return NewSubaccountTradesListRequest(payload), nil +} + +// DecodeSubaccountTradesListResponse decodes responses from the +// InjectiveSpotExchangeRPC subaccountTradesList endpoint. +func DecodeSubaccountTradesListResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error) { + message, ok := v.(*injective_spot_exchange_rpcpb.SubaccountTradesListResponse) + if !ok { + return nil, goagrpc.ErrInvalidType("InjectiveSpotExchangeRPC", "subaccountTradesList", "*injective_spot_exchange_rpcpb.SubaccountTradesListResponse", v) + } + if err := ValidateSubaccountTradesListResponse(message); err != nil { + return nil, err + } + res := NewSubaccountTradesListResult(message) + return res, nil +} diff --git a/exchange/spot_exchange_rpc/client/types.go b/exchange/spot_exchange_rpc/client/types.go new file mode 100644 index 00000000..e1a4f864 --- /dev/null +++ b/exchange/spot_exchange_rpc/client/types.go @@ -0,0 +1,1016 @@ +// Code generated by goa v3.3.1, DO NOT EDIT. +// +// InjectiveSpotExchangeRPC gRPC client types +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +package client + +import ( + "unicode/utf8" + + injective_spot_exchange_rpcpb "github.com/InjectiveLabs/injective-exchange/api/gen/grpc/injective_spot_exchange_rpc/pb" + injectivespotexchangerpc "github.com/InjectiveLabs/injective-exchange/api/gen/injective_spot_exchange_rpc" + goa "goa.design/goa/v3/pkg" +) + +// NewMarketsRequest builds the gRPC request type from the payload of the +// "markets" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewMarketsRequest(payload *injectivespotexchangerpc.MarketsPayload) *injective_spot_exchange_rpcpb.MarketsRequest { + message := &injective_spot_exchange_rpcpb.MarketsRequest{ + MarketStatus: payload.MarketStatus, + } + if payload.BaseDenom != nil { + message.BaseDenom = *payload.BaseDenom + } + if payload.QuoteDenom != nil { + message.QuoteDenom = *payload.QuoteDenom + } + return message +} + +// NewMarketsResult builds the result type of the "markets" endpoint of the +// "InjectiveSpotExchangeRPC" service from the gRPC response type. +func NewMarketsResult(message *injective_spot_exchange_rpcpb.MarketsResponse) *injectivespotexchangerpc.MarketsResult { + result := &injectivespotexchangerpc.MarketsResult{} + if message.Markets != nil { + result.Markets = make([]*injectivespotexchangerpc.SpotMarketInfo, len(message.Markets)) + for i, val := range message.Markets { + result.Markets[i] = &injectivespotexchangerpc.SpotMarketInfo{ + MarketID: val.MarketId, + MarketStatus: val.MarketStatus, + Ticker: val.Ticker, + BaseDenom: val.BaseDenom, + QuoteDenom: val.QuoteDenom, + MakerFeeRate: val.MakerFeeRate, + TakerFeeRate: val.TakerFeeRate, + ServiceProviderFee: val.ServiceProviderFee, + MaxPriceScaleDecimals: val.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: val.MaxQuantityScaleDecimals, + } + if val.BaseTokenMeta != nil { + result.Markets[i].BaseTokenMeta = protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta(val.BaseTokenMeta) + } + if val.QuoteTokenMeta != nil { + result.Markets[i].QuoteTokenMeta = protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta(val.QuoteTokenMeta) + } + if val.MaxPriceScaleDecimals == 0 { + result.Markets[i].MaxPriceScaleDecimals = 6 + } + if val.MaxQuantityScaleDecimals == 0 { + result.Markets[i].MaxQuantityScaleDecimals = 6 + } + } + } + return result +} + +// NewMarketRequest builds the gRPC request type from the payload of the +// "market" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewMarketRequest(payload *injectivespotexchangerpc.MarketPayload) *injective_spot_exchange_rpcpb.MarketRequest { + message := &injective_spot_exchange_rpcpb.MarketRequest{ + MarketId: payload.MarketID, + } + return message +} + +// NewMarketResult builds the result type of the "market" endpoint of the +// "InjectiveSpotExchangeRPC" service from the gRPC response type. +func NewMarketResult(message *injective_spot_exchange_rpcpb.MarketResponse) *injectivespotexchangerpc.MarketResult { + result := &injectivespotexchangerpc.MarketResult{} + if message.Market != nil { + result.Market = protobufInjectiveSpotExchangeRpcpbSpotMarketInfoToInjectivespotexchangerpcSpotMarketInfo(message.Market) + } + return result +} + +// NewStreamMarketsRequest builds the gRPC request type from the payload of the +// "streamMarkets" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewStreamMarketsRequest(payload *injectivespotexchangerpc.StreamMarketsPayload) *injective_spot_exchange_rpcpb.StreamMarketsRequest { + message := &injective_spot_exchange_rpcpb.StreamMarketsRequest{} + if payload.MarketIds != nil { + message.MarketIds = make([]string, len(payload.MarketIds)) + for i, val := range payload.MarketIds { + message.MarketIds[i] = val + } + } + return message +} + +func NewStreamMarketsResult(v *injective_spot_exchange_rpcpb.StreamMarketsResponse) *injectivespotexchangerpc.StreamMarketsResult { + result := &injectivespotexchangerpc.StreamMarketsResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Market != nil { + result.Market = protobufInjectiveSpotExchangeRpcpbSpotMarketInfoToInjectivespotexchangerpcSpotMarketInfo(v.Market) + } + return result +} + +// NewOrderbookRequest builds the gRPC request type from the payload of the +// "orderbook" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewOrderbookRequest(payload *injectivespotexchangerpc.OrderbookPayload) *injective_spot_exchange_rpcpb.OrderbookRequest { + message := &injective_spot_exchange_rpcpb.OrderbookRequest{ + MarketId: payload.MarketID, + } + return message +} + +// NewOrderbookResult builds the result type of the "orderbook" endpoint of the +// "InjectiveSpotExchangeRPC" service from the gRPC response type. +func NewOrderbookResult(message *injective_spot_exchange_rpcpb.OrderbookResponse) *injectivespotexchangerpc.OrderbookResult { + result := &injectivespotexchangerpc.OrderbookResult{} + if message.Orderbook != nil { + result.Orderbook = protobufInjectiveSpotExchangeRpcpbSpotLimitOrderbookToInjectivespotexchangerpcSpotLimitOrderbook(message.Orderbook) + } + return result +} + +// NewStreamOrderbookRequest builds the gRPC request type from the payload of +// the "streamOrderbook" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewStreamOrderbookRequest(payload *injectivespotexchangerpc.StreamOrderbookPayload) *injective_spot_exchange_rpcpb.StreamOrderbookRequest { + message := &injective_spot_exchange_rpcpb.StreamOrderbookRequest{ + MarketId: payload.MarketID, + } + return message +} + +func NewStreamOrderbookResult(v *injective_spot_exchange_rpcpb.StreamOrderbookResponse) *injectivespotexchangerpc.StreamOrderbookResult { + result := &injectivespotexchangerpc.StreamOrderbookResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Orderbook != nil { + result.Orderbook = protobufInjectiveSpotExchangeRpcpbSpotLimitOrderbookToInjectivespotexchangerpcSpotLimitOrderbook(v.Orderbook) + } + return result +} + +// NewOrdersRequest builds the gRPC request type from the payload of the +// "orders" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewOrdersRequest(payload *injectivespotexchangerpc.SpotLimitOrdersFilter) *injective_spot_exchange_rpcpb.OrdersRequest { + message := &injective_spot_exchange_rpcpb.OrdersRequest{ + MarketId: payload.MarketID, + } + if payload.OrderType != nil { + message.OrderType = *payload.OrderType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +// NewOrdersResult builds the result type of the "orders" endpoint of the +// "InjectiveSpotExchangeRPC" service from the gRPC response type. +func NewOrdersResult(message *injective_spot_exchange_rpcpb.OrdersResponse) *injectivespotexchangerpc.OrdersResult { + result := &injectivespotexchangerpc.OrdersResult{} + if message.Orders != nil { + result.Orders = make([]*injectivespotexchangerpc.SpotLimitOrder, len(message.Orders)) + for i, val := range message.Orders { + result.Orders[i] = &injectivespotexchangerpc.SpotLimitOrder{ + OrderHash: val.OrderHash, + OrderType: val.OrderType, + MarketID: val.MarketId, + SubaccountID: val.SubaccountId, + Price: val.Price, + Quantity: val.Quantity, + UnfilledQuantity: val.UnfilledQuantity, + TriggerPrice: val.TriggerPrice, + FeeRecipient: val.FeeRecipient, + State: val.State, + CreatedAt: val.CreatedAt, + } + if val.UpdatedAt != 0 { + result.Orders[i].UpdatedAt = &val.UpdatedAt + } + } + } + return result +} + +// NewStreamOrdersRequest builds the gRPC request type from the payload of the +// "streamOrders" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewStreamOrdersRequest(payload *injectivespotexchangerpc.SpotLimitOrdersFilter) *injective_spot_exchange_rpcpb.StreamOrdersRequest { + message := &injective_spot_exchange_rpcpb.StreamOrdersRequest{ + MarketId: payload.MarketID, + } + if payload.OrderType != nil { + message.OrderType = *payload.OrderType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +func NewStreamOrdersResult(v *injective_spot_exchange_rpcpb.StreamOrdersResponse) *injectivespotexchangerpc.StreamOrdersResult { + result := &injectivespotexchangerpc.StreamOrdersResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Order != nil { + result.Order = protobufInjectiveSpotExchangeRpcpbSpotLimitOrderToInjectivespotexchangerpcSpotLimitOrder(v.Order) + } + return result +} + +// NewTradesRequest builds the gRPC request type from the payload of the +// "trades" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewTradesRequest(payload *injectivespotexchangerpc.SpotTradesFilter) *injective_spot_exchange_rpcpb.TradesRequest { + message := &injective_spot_exchange_rpcpb.TradesRequest{ + MarketId: payload.MarketID, + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.ExecutionSide != nil { + message.ExecutionSide = *payload.ExecutionSide + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +// NewTradesResult builds the result type of the "trades" endpoint of the +// "InjectiveSpotExchangeRPC" service from the gRPC response type. +func NewTradesResult(message *injective_spot_exchange_rpcpb.TradesResponse) *injectivespotexchangerpc.TradesResult { + result := &injectivespotexchangerpc.TradesResult{} + if message.Trades != nil { + result.Trades = make([]*injectivespotexchangerpc.SpotTrade, len(message.Trades)) + for i, val := range message.Trades { + result.Trades[i] = &injectivespotexchangerpc.SpotTrade{ + OrderHash: val.OrderHash, + SubaccountID: val.SubaccountId, + MarketID: val.MarketId, + TradeExecutionType: val.TradeExecutionType, + TradeDirection: val.TradeDirection, + Fee: val.Fee, + ExecutedAt: val.ExecutedAt, + } + if val.Price != nil { + result.Trades[i].Price = protobufInjectiveSpotExchangeRpcpbPriceLevelToInjectivespotexchangerpcPriceLevel(val.Price) + } + } + } + return result +} + +// NewStreamTradesRequest builds the gRPC request type from the payload of the +// "streamTrades" endpoint of the "InjectiveSpotExchangeRPC" service. +func NewStreamTradesRequest(payload *injectivespotexchangerpc.SpotTradesFilter) *injective_spot_exchange_rpcpb.StreamTradesRequest { + message := &injective_spot_exchange_rpcpb.StreamTradesRequest{ + MarketId: payload.MarketID, + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.ExecutionSide != nil { + message.ExecutionSide = *payload.ExecutionSide + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + if payload.SubaccountID != nil { + message.SubaccountId = *payload.SubaccountID + } + return message +} + +func NewStreamTradesResult(v *injective_spot_exchange_rpcpb.StreamTradesResponse) *injectivespotexchangerpc.StreamTradesResult { + result := &injectivespotexchangerpc.StreamTradesResult{ + OperationType: v.OperationType, + Timestamp: v.Timestamp, + } + if v.Trade != nil { + result.Trade = protobufInjectiveSpotExchangeRpcpbSpotTradeToInjectivespotexchangerpcSpotTrade(v.Trade) + } + return result +} + +// NewSubaccountOrdersListRequest builds the gRPC request type from the payload +// of the "subaccountOrdersList" endpoint of the "InjectiveSpotExchangeRPC" +// service. +func NewSubaccountOrdersListRequest(payload *injectivespotexchangerpc.SubaccountOrdersListPayload) *injective_spot_exchange_rpcpb.SubaccountOrdersListRequest { + message := &injective_spot_exchange_rpcpb.SubaccountOrdersListRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.MarketID != nil { + message.MarketId = *payload.MarketID + } + return message +} + +// NewSubaccountOrdersListResult builds the result type of the +// "subaccountOrdersList" endpoint of the "InjectiveSpotExchangeRPC" service +// from the gRPC response type. +func NewSubaccountOrdersListResult(message *injective_spot_exchange_rpcpb.SubaccountOrdersListResponse) *injectivespotexchangerpc.SubaccountOrdersListResult { + result := &injectivespotexchangerpc.SubaccountOrdersListResult{} + if message.Orders != nil { + result.Orders = make([]*injectivespotexchangerpc.SpotLimitOrder, len(message.Orders)) + for i, val := range message.Orders { + result.Orders[i] = &injectivespotexchangerpc.SpotLimitOrder{ + OrderHash: val.OrderHash, + OrderType: val.OrderType, + MarketID: val.MarketId, + SubaccountID: val.SubaccountId, + Price: val.Price, + Quantity: val.Quantity, + UnfilledQuantity: val.UnfilledQuantity, + TriggerPrice: val.TriggerPrice, + FeeRecipient: val.FeeRecipient, + State: val.State, + CreatedAt: val.CreatedAt, + } + if val.UpdatedAt != 0 { + result.Orders[i].UpdatedAt = &val.UpdatedAt + } + } + } + return result +} + +// NewSubaccountTradesListRequest builds the gRPC request type from the payload +// of the "subaccountTradesList" endpoint of the "InjectiveSpotExchangeRPC" +// service. +func NewSubaccountTradesListRequest(payload *injectivespotexchangerpc.SubaccountTradesListPayload) *injective_spot_exchange_rpcpb.SubaccountTradesListRequest { + message := &injective_spot_exchange_rpcpb.SubaccountTradesListRequest{ + SubaccountId: payload.SubaccountID, + } + if payload.MarketID != nil { + message.MarketId = *payload.MarketID + } + if payload.ExecutionType != nil { + message.ExecutionType = *payload.ExecutionType + } + if payload.Direction != nil { + message.Direction = *payload.Direction + } + return message +} + +// NewSubaccountTradesListResult builds the result type of the +// "subaccountTradesList" endpoint of the "InjectiveSpotExchangeRPC" service +// from the gRPC response type. +func NewSubaccountTradesListResult(message *injective_spot_exchange_rpcpb.SubaccountTradesListResponse) *injectivespotexchangerpc.SubaccountTradesListResult { + result := &injectivespotexchangerpc.SubaccountTradesListResult{} + if message.Trades != nil { + result.Trades = make([]*injectivespotexchangerpc.SpotTrade, len(message.Trades)) + for i, val := range message.Trades { + result.Trades[i] = &injectivespotexchangerpc.SpotTrade{ + OrderHash: val.OrderHash, + SubaccountID: val.SubaccountId, + MarketID: val.MarketId, + TradeExecutionType: val.TradeExecutionType, + TradeDirection: val.TradeDirection, + Fee: val.Fee, + ExecutedAt: val.ExecutedAt, + } + if val.Price != nil { + result.Trades[i].Price = protobufInjectiveSpotExchangeRpcpbPriceLevelToInjectivespotexchangerpcPriceLevel(val.Price) + } + } + } + return result +} + +// ValidateMarketsResponse runs the validations defined on MarketsResponse. +func ValidateMarketsResponse(message *injective_spot_exchange_rpcpb.MarketsResponse) (err error) { + for _, e := range message.Markets { + if e != nil { + if err2 := ValidateSpotMarketInfo(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSpotMarketInfo runs the validations defined on SpotMarketInfo. +func ValidateSpotMarketInfo(message *injective_spot_exchange_rpcpb.SpotMarketInfo) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + if !(message.MarketStatus == "active" || message.MarketStatus == "paused" || message.MarketStatus == "suspended" || message.MarketStatus == "demolished" || message.MarketStatus == "expired") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.marketStatus", message.MarketStatus, []interface{}{"active", "paused", "suspended", "demolished", "expired"})) + } + if message.BaseTokenMeta != nil { + if err2 := ValidateTokenMeta(message.BaseTokenMeta); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if message.QuoteTokenMeta != nil { + if err2 := ValidateTokenMeta(message.QuoteTokenMeta); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.makerFeeRate", message.MakerFeeRate, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.MakerFeeRate) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.makerFeeRate", message.MakerFeeRate, utf8.RuneCountInString(message.MakerFeeRate), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.takerFeeRate", message.TakerFeeRate, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.TakerFeeRate) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.takerFeeRate", message.TakerFeeRate, utf8.RuneCountInString(message.TakerFeeRate), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.serviceProviderFee", message.ServiceProviderFee, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.ServiceProviderFee) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.serviceProviderFee", message.ServiceProviderFee, utf8.RuneCountInString(message.ServiceProviderFee), 100, false)) + } + return +} + +// ValidateTokenMeta runs the validations defined on TokenMeta. +func ValidateTokenMeta(message *injective_spot_exchange_rpcpb.TokenMeta) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.address", message.Address, "^0x[0-9a-fA-F]{40}$")) + if utf8.RuneCountInString(message.Address) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.address", message.Address, utf8.RuneCountInString(message.Address), 42, true)) + } + if utf8.RuneCountInString(message.Address) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.address", message.Address, utf8.RuneCountInString(message.Address), 42, false)) + } + if utf8.RuneCountInString(message.Symbol) > 16 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.symbol", message.Symbol, utf8.RuneCountInString(message.Symbol), 16, false)) + } + if message.Logo != "" { + if utf8.RuneCountInString(message.Logo) > 256 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.logo", message.Logo, utf8.RuneCountInString(message.Logo), 256, false)) + } + } + if message.Decimals < 0 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.decimals", message.Decimals, 0, true)) + } + if message.Decimals > 18 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.decimals", message.Decimals, 18, false)) + } + return +} + +// ValidateMarketResponse runs the validations defined on MarketResponse. +func ValidateMarketResponse(message *injective_spot_exchange_rpcpb.MarketResponse) (err error) { + if message.Market != nil { + if err2 := ValidateSpotMarketInfo(message.Market); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateStreamMarketsResponse runs the validations defined on +// StreamMarketsResponse. +func ValidateStreamMarketsResponse(message *injective_spot_exchange_rpcpb.StreamMarketsResponse) (err error) { + if message.Market == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("market", "message")) + } + if message.Market != nil { + if err2 := ValidateSpotMarketInfo(message.Market); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "replace", "update", "invalidate"})) + } + return +} + +// ValidateOrderbookResponse runs the validations defined on OrderbookResponse. +func ValidateOrderbookResponse(message *injective_spot_exchange_rpcpb.OrderbookResponse) (err error) { + if message.Orderbook != nil { + if err2 := ValidateSpotLimitOrderbook(message.Orderbook); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + +// ValidateSpotLimitOrderbook runs the validations defined on +// SpotLimitOrderbook. +func ValidateSpotLimitOrderbook(message *injective_spot_exchange_rpcpb.SpotLimitOrderbook) (err error) { + for _, e := range message.Buys { + if e != nil { + if err2 := ValidatePriceLevel(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + for _, e := range message.Sells { + if e != nil { + if err2 := ValidatePriceLevel(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidatePriceLevel runs the validations defined on PriceLevel. +func ValidatePriceLevel(message *injective_spot_exchange_rpcpb.PriceLevel) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.price", message.Price, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Price) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.price", message.Price, utf8.RuneCountInString(message.Price), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.quantity", message.Quantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Quantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.quantity", message.Quantity, utf8.RuneCountInString(message.Quantity), 100, false)) + } + return +} + +// ValidateStreamOrderbookResponse runs the validations defined on +// StreamOrderbookResponse. +func ValidateStreamOrderbookResponse(message *injective_spot_exchange_rpcpb.StreamOrderbookResponse) (err error) { + if message.Orderbook == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("orderbook", "message")) + } + if message.Orderbook != nil { + if err2 := ValidateSpotLimitOrderbook(message.Orderbook); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "replace", "update", "invalidate"})) + } + return +} + +// ValidateOrdersResponse runs the validations defined on OrdersResponse. +func ValidateOrdersResponse(message *injective_spot_exchange_rpcpb.OrdersResponse) (err error) { + for _, e := range message.Orders { + if e != nil { + if err2 := ValidateSpotLimitOrder(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSpotLimitOrder runs the validations defined on SpotLimitOrder. +func ValidateSpotLimitOrder(message *injective_spot_exchange_rpcpb.SpotLimitOrder) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("message.orderHash", message.OrderHash, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.OrderHash) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, true)) + } + if utf8.RuneCountInString(message.OrderHash) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, false)) + } + if !(message.OrderType == "buy" || message.OrderType == "sell" || message.OrderType == "stop_buy" || message.OrderType == "stop_sell" || message.OrderType == "take_buy" || message.OrderType == "take_sell") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.orderType", message.OrderType, []interface{}{"buy", "sell", "stop_buy", "stop_sell", "take_buy", "take_sell"})) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.price", message.Price, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Price) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.price", message.Price, utf8.RuneCountInString(message.Price), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.quantity", message.Quantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Quantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.quantity", message.Quantity, utf8.RuneCountInString(message.Quantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.unfilledQuantity", message.UnfilledQuantity, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.UnfilledQuantity) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.unfilledQuantity", message.UnfilledQuantity, utf8.RuneCountInString(message.UnfilledQuantity), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.triggerPrice", message.TriggerPrice, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.TriggerPrice) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.triggerPrice", message.TriggerPrice, utf8.RuneCountInString(message.TriggerPrice), 100, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.feeRecipient", message.FeeRecipient, "^inj1[0-9a-zA-Z]{38}$")) + if utf8.RuneCountInString(message.FeeRecipient) < 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.feeRecipient", message.FeeRecipient, utf8.RuneCountInString(message.FeeRecipient), 42, true)) + } + if utf8.RuneCountInString(message.FeeRecipient) > 42 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.feeRecipient", message.FeeRecipient, utf8.RuneCountInString(message.FeeRecipient), 42, false)) + } + if !(message.State == "unfilled" || message.State == "filled" || message.State == "canceled") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.state", message.State, []interface{}{"unfilled", "filled", "canceled"})) + } + return +} + +// ValidateStreamOrdersResponse runs the validations defined on +// StreamOrdersResponse. +func ValidateStreamOrdersResponse(message *injective_spot_exchange_rpcpb.StreamOrdersResponse) (err error) { + if message.Order == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("order", "message")) + } + if message.Order != nil { + if err2 := ValidateSpotLimitOrder(message.Order); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "replace" || message.OperationType == "update" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "replace", "update", "invalidate"})) + } + return +} + +// ValidateTradesResponse runs the validations defined on TradesResponse. +func ValidateTradesResponse(message *injective_spot_exchange_rpcpb.TradesResponse) (err error) { + for _, e := range message.Trades { + if e != nil { + if err2 := ValidateSpotTrade(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSpotTrade runs the validations defined on SpotTrade. +func ValidateSpotTrade(message *injective_spot_exchange_rpcpb.SpotTrade) (err error) { + if message.Price == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("price", "message")) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.orderHash", message.OrderHash, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.OrderHash) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, true)) + } + if utf8.RuneCountInString(message.OrderHash) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.orderHash", message.OrderHash, utf8.RuneCountInString(message.OrderHash), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.subaccountId", message.SubaccountId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.SubaccountId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, true)) + } + if utf8.RuneCountInString(message.SubaccountId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.subaccountId", message.SubaccountId, utf8.RuneCountInString(message.SubaccountId), 66, false)) + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.marketId", message.MarketId, "^0x[0-9a-fA-F]{64}$")) + if utf8.RuneCountInString(message.MarketId) < 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, true)) + } + if utf8.RuneCountInString(message.MarketId) > 66 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.marketId", message.MarketId, utf8.RuneCountInString(message.MarketId), 66, false)) + } + if !(message.TradeExecutionType == "market" || message.TradeExecutionType == "limitFill" || message.TradeExecutionType == "limitMatchRestingOrder" || message.TradeExecutionType == "limitMatchNewOrder") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.tradeExecutionType", message.TradeExecutionType, []interface{}{"market", "limitFill", "limitMatchRestingOrder", "limitMatchNewOrder"})) + } + if !(message.TradeDirection == "buy" || message.TradeDirection == "sell") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.tradeDirection", message.TradeDirection, []interface{}{"buy", "sell"})) + } + if message.Price != nil { + if err2 := ValidatePriceLevel(message.Price); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + err = goa.MergeErrors(err, goa.ValidatePattern("message.fee", message.Fee, "^\\d+(\\.\\d+)?$")) + if utf8.RuneCountInString(message.Fee) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.fee", message.Fee, utf8.RuneCountInString(message.Fee), 100, false)) + } + return +} + +// ValidateStreamTradesResponse runs the validations defined on +// StreamTradesResponse. +func ValidateStreamTradesResponse(message *injective_spot_exchange_rpcpb.StreamTradesResponse) (err error) { + if message.Trade == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("trade", "message")) + } + if message.Trade != nil { + if err2 := ValidateSpotTrade(message.Trade); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if !(message.OperationType == "insert" || message.OperationType == "invalidate") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.operationType", message.OperationType, []interface{}{"insert", "invalidate"})) + } + return +} + +// ValidateSubaccountOrdersListResponse runs the validations defined on +// SubaccountOrdersListResponse. +func ValidateSubaccountOrdersListResponse(message *injective_spot_exchange_rpcpb.SubaccountOrdersListResponse) (err error) { + for _, e := range message.Orders { + if e != nil { + if err2 := ValidateSpotLimitOrder(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateSubaccountTradesListResponse runs the validations defined on +// SubaccountTradesListResponse. +func ValidateSubaccountTradesListResponse(message *injective_spot_exchange_rpcpb.SubaccountTradesListResponse) (err error) { + for _, e := range message.Trades { + if e != nil { + if err2 := ValidateSpotTrade(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// svcInjectivespotexchangerpcTokenMetaToInjectiveSpotExchangeRpcpbTokenMeta +// builds a value of type *injective_spot_exchange_rpcpb.TokenMeta from a value +// of type *injectivespotexchangerpc.TokenMeta. +func svcInjectivespotexchangerpcTokenMetaToInjectiveSpotExchangeRpcpbTokenMeta(v *injectivespotexchangerpc.TokenMeta) *injective_spot_exchange_rpcpb.TokenMeta { + if v == nil { + return nil + } + res := &injective_spot_exchange_rpcpb.TokenMeta{ + Name: v.Name, + Address: v.Address, + Symbol: v.Symbol, + Decimals: int32(v.Decimals), + UpdatedAt: v.UpdatedAt, + } + if v.Logo != nil { + res.Logo = *v.Logo + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta +// builds a value of type *injectivespotexchangerpc.TokenMeta from a value of +// type *injective_spot_exchange_rpcpb.TokenMeta. +func protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta(v *injective_spot_exchange_rpcpb.TokenMeta) *injectivespotexchangerpc.TokenMeta { + if v == nil { + return nil + } + res := &injectivespotexchangerpc.TokenMeta{ + Name: v.Name, + Address: v.Address, + Symbol: v.Symbol, + Decimals: int(v.Decimals), + UpdatedAt: v.UpdatedAt, + } + if v.Logo != "" { + res.Logo = &v.Logo + } + + return res +} + +// svcInjectivespotexchangerpcSpotMarketInfoToInjectiveSpotExchangeRpcpbSpotMarketInfo +// builds a value of type *injective_spot_exchange_rpcpb.SpotMarketInfo from a +// value of type *injectivespotexchangerpc.SpotMarketInfo. +func svcInjectivespotexchangerpcSpotMarketInfoToInjectiveSpotExchangeRpcpbSpotMarketInfo(v *injectivespotexchangerpc.SpotMarketInfo) *injective_spot_exchange_rpcpb.SpotMarketInfo { + if v == nil { + return nil + } + res := &injective_spot_exchange_rpcpb.SpotMarketInfo{ + MarketId: v.MarketID, + MarketStatus: v.MarketStatus, + Ticker: v.Ticker, + BaseDenom: v.BaseDenom, + QuoteDenom: v.QuoteDenom, + MakerFeeRate: v.MakerFeeRate, + TakerFeeRate: v.TakerFeeRate, + ServiceProviderFee: v.ServiceProviderFee, + MaxPriceScaleDecimals: v.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: v.MaxQuantityScaleDecimals, + } + if v.BaseTokenMeta != nil { + res.BaseTokenMeta = svcInjectivespotexchangerpcTokenMetaToInjectiveSpotExchangeRpcpbTokenMeta(v.BaseTokenMeta) + } + if v.QuoteTokenMeta != nil { + res.QuoteTokenMeta = svcInjectivespotexchangerpcTokenMetaToInjectiveSpotExchangeRpcpbTokenMeta(v.QuoteTokenMeta) + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbSpotMarketInfoToInjectivespotexchangerpcSpotMarketInfo +// builds a value of type *injectivespotexchangerpc.SpotMarketInfo from a value +// of type *injective_spot_exchange_rpcpb.SpotMarketInfo. +func protobufInjectiveSpotExchangeRpcpbSpotMarketInfoToInjectivespotexchangerpcSpotMarketInfo(v *injective_spot_exchange_rpcpb.SpotMarketInfo) *injectivespotexchangerpc.SpotMarketInfo { + if v == nil { + return nil + } + res := &injectivespotexchangerpc.SpotMarketInfo{ + MarketID: v.MarketId, + MarketStatus: v.MarketStatus, + Ticker: v.Ticker, + BaseDenom: v.BaseDenom, + QuoteDenom: v.QuoteDenom, + MakerFeeRate: v.MakerFeeRate, + TakerFeeRate: v.TakerFeeRate, + ServiceProviderFee: v.ServiceProviderFee, + MaxPriceScaleDecimals: v.MaxPriceScaleDecimals, + MaxQuantityScaleDecimals: v.MaxQuantityScaleDecimals, + } + if v.BaseTokenMeta != nil { + res.BaseTokenMeta = protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta(v.BaseTokenMeta) + } + if v.QuoteTokenMeta != nil { + res.QuoteTokenMeta = protobufInjectiveSpotExchangeRpcpbTokenMetaToInjectivespotexchangerpcTokenMeta(v.QuoteTokenMeta) + } + if v.MaxPriceScaleDecimals == 0 { + res.MaxPriceScaleDecimals = 6 + } + if v.MaxQuantityScaleDecimals == 0 { + res.MaxQuantityScaleDecimals = 6 + } + + return res +} + +// svcInjectivespotexchangerpcSpotLimitOrderbookToInjectiveSpotExchangeRpcpbSpotLimitOrderbook +// builds a value of type *injective_spot_exchange_rpcpb.SpotLimitOrderbook +// from a value of type *injectivespotexchangerpc.SpotLimitOrderbook. +func svcInjectivespotexchangerpcSpotLimitOrderbookToInjectiveSpotExchangeRpcpbSpotLimitOrderbook(v *injectivespotexchangerpc.SpotLimitOrderbook) *injective_spot_exchange_rpcpb.SpotLimitOrderbook { + if v == nil { + return nil + } + res := &injective_spot_exchange_rpcpb.SpotLimitOrderbook{} + if v.Buys != nil { + res.Buys = make([]*injective_spot_exchange_rpcpb.PriceLevel, len(v.Buys)) + for i, val := range v.Buys { + res.Buys[i] = &injective_spot_exchange_rpcpb.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + if v.Sells != nil { + res.Sells = make([]*injective_spot_exchange_rpcpb.PriceLevel, len(v.Sells)) + for i, val := range v.Sells { + res.Sells[i] = &injective_spot_exchange_rpcpb.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbSpotLimitOrderbookToInjectivespotexchangerpcSpotLimitOrderbook +// builds a value of type *injectivespotexchangerpc.SpotLimitOrderbook from a +// value of type *injective_spot_exchange_rpcpb.SpotLimitOrderbook. +func protobufInjectiveSpotExchangeRpcpbSpotLimitOrderbookToInjectivespotexchangerpcSpotLimitOrderbook(v *injective_spot_exchange_rpcpb.SpotLimitOrderbook) *injectivespotexchangerpc.SpotLimitOrderbook { + if v == nil { + return nil + } + res := &injectivespotexchangerpc.SpotLimitOrderbook{} + if v.Buys != nil { + res.Buys = make([]*injectivespotexchangerpc.PriceLevel, len(v.Buys)) + for i, val := range v.Buys { + res.Buys[i] = &injectivespotexchangerpc.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + if v.Sells != nil { + res.Sells = make([]*injectivespotexchangerpc.PriceLevel, len(v.Sells)) + for i, val := range v.Sells { + res.Sells[i] = &injectivespotexchangerpc.PriceLevel{ + Price: val.Price, + Quantity: val.Quantity, + Timestamp: val.Timestamp, + } + } + } + + return res +} + +// svcInjectivespotexchangerpcSpotLimitOrderToInjectiveSpotExchangeRpcpbSpotLimitOrder +// builds a value of type *injective_spot_exchange_rpcpb.SpotLimitOrder from a +// value of type *injectivespotexchangerpc.SpotLimitOrder. +func svcInjectivespotexchangerpcSpotLimitOrderToInjectiveSpotExchangeRpcpbSpotLimitOrder(v *injectivespotexchangerpc.SpotLimitOrder) *injective_spot_exchange_rpcpb.SpotLimitOrder { + res := &injective_spot_exchange_rpcpb.SpotLimitOrder{ + OrderHash: v.OrderHash, + OrderType: v.OrderType, + MarketId: v.MarketID, + SubaccountId: v.SubaccountID, + Price: v.Price, + Quantity: v.Quantity, + UnfilledQuantity: v.UnfilledQuantity, + TriggerPrice: v.TriggerPrice, + FeeRecipient: v.FeeRecipient, + State: v.State, + CreatedAt: v.CreatedAt, + } + if v.UpdatedAt != nil { + res.UpdatedAt = *v.UpdatedAt + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbSpotLimitOrderToInjectivespotexchangerpcSpotLimitOrder +// builds a value of type *injectivespotexchangerpc.SpotLimitOrder from a value +// of type *injective_spot_exchange_rpcpb.SpotLimitOrder. +func protobufInjectiveSpotExchangeRpcpbSpotLimitOrderToInjectivespotexchangerpcSpotLimitOrder(v *injective_spot_exchange_rpcpb.SpotLimitOrder) *injectivespotexchangerpc.SpotLimitOrder { + res := &injectivespotexchangerpc.SpotLimitOrder{ + OrderHash: v.OrderHash, + OrderType: v.OrderType, + MarketID: v.MarketId, + SubaccountID: v.SubaccountId, + Price: v.Price, + Quantity: v.Quantity, + UnfilledQuantity: v.UnfilledQuantity, + TriggerPrice: v.TriggerPrice, + FeeRecipient: v.FeeRecipient, + State: v.State, + CreatedAt: v.CreatedAt, + } + if v.UpdatedAt != 0 { + res.UpdatedAt = &v.UpdatedAt + } + + return res +} + +// svcInjectivespotexchangerpcPriceLevelToInjectiveSpotExchangeRpcpbPriceLevel +// builds a value of type *injective_spot_exchange_rpcpb.PriceLevel from a +// value of type *injectivespotexchangerpc.PriceLevel. +func svcInjectivespotexchangerpcPriceLevelToInjectiveSpotExchangeRpcpbPriceLevel(v *injectivespotexchangerpc.PriceLevel) *injective_spot_exchange_rpcpb.PriceLevel { + res := &injective_spot_exchange_rpcpb.PriceLevel{ + Price: v.Price, + Quantity: v.Quantity, + Timestamp: v.Timestamp, + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbPriceLevelToInjectivespotexchangerpcPriceLevel +// builds a value of type *injectivespotexchangerpc.PriceLevel from a value of +// type *injective_spot_exchange_rpcpb.PriceLevel. +func protobufInjectiveSpotExchangeRpcpbPriceLevelToInjectivespotexchangerpcPriceLevel(v *injective_spot_exchange_rpcpb.PriceLevel) *injectivespotexchangerpc.PriceLevel { + res := &injectivespotexchangerpc.PriceLevel{ + Price: v.Price, + Quantity: v.Quantity, + Timestamp: v.Timestamp, + } + + return res +} + +// svcInjectivespotexchangerpcSpotTradeToInjectiveSpotExchangeRpcpbSpotTrade +// builds a value of type *injective_spot_exchange_rpcpb.SpotTrade from a value +// of type *injectivespotexchangerpc.SpotTrade. +func svcInjectivespotexchangerpcSpotTradeToInjectiveSpotExchangeRpcpbSpotTrade(v *injectivespotexchangerpc.SpotTrade) *injective_spot_exchange_rpcpb.SpotTrade { + res := &injective_spot_exchange_rpcpb.SpotTrade{ + OrderHash: v.OrderHash, + SubaccountId: v.SubaccountID, + MarketId: v.MarketID, + TradeExecutionType: v.TradeExecutionType, + TradeDirection: v.TradeDirection, + Fee: v.Fee, + ExecutedAt: v.ExecutedAt, + } + if v.Price != nil { + res.Price = svcInjectivespotexchangerpcPriceLevelToInjectiveSpotExchangeRpcpbPriceLevel(v.Price) + } + + return res +} + +// protobufInjectiveSpotExchangeRpcpbSpotTradeToInjectivespotexchangerpcSpotTrade +// builds a value of type *injectivespotexchangerpc.SpotTrade from a value of +// type *injective_spot_exchange_rpcpb.SpotTrade. +func protobufInjectiveSpotExchangeRpcpbSpotTradeToInjectivespotexchangerpcSpotTrade(v *injective_spot_exchange_rpcpb.SpotTrade) *injectivespotexchangerpc.SpotTrade { + res := &injectivespotexchangerpc.SpotTrade{ + OrderHash: v.OrderHash, + SubaccountID: v.SubaccountId, + MarketID: v.MarketId, + TradeExecutionType: v.TradeExecutionType, + TradeDirection: v.TradeDirection, + Fee: v.Fee, + ExecutedAt: v.ExecutedAt, + } + if v.Price != nil { + res.Price = protobufInjectiveSpotExchangeRpcpbPriceLevelToInjectivespotexchangerpcPriceLevel(v.Price) + } + + return res +} diff --git a/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.go b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.go new file mode 100644 index 00000000..c18ddba2 --- /dev/null +++ b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.go @@ -0,0 +1,2773 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveSpotExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 +// source: injective_spot_exchange_rpc.proto + +package injective_spot_exchange_rpcpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MarketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Filter by market status + MarketStatus string `protobuf:"bytes,1,opt,name=market_status,json=marketStatus,proto3" json:"market_status,omitempty"` + // Filter by the Coin denomination of the base currency + BaseDenom string `protobuf:"bytes,2,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + // Filter by the Coin denomination of the quote currency + QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` +} + +func (x *MarketsRequest) Reset() { + *x = MarketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketsRequest) ProtoMessage() {} + +func (x *MarketsRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketsRequest.ProtoReflect.Descriptor instead. +func (*MarketsRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{0} +} + +func (x *MarketsRequest) GetMarketStatus() string { + if x != nil { + return x.MarketStatus + } + return "" +} + +func (x *MarketsRequest) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *MarketsRequest) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +type MarketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Spot Markets list + Markets []*SpotMarketInfo `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (x *MarketsResponse) Reset() { + *x = MarketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketsResponse) ProtoMessage() {} + +func (x *MarketsResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketsResponse.ProtoReflect.Descriptor instead. +func (*MarketsResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{1} +} + +func (x *MarketsResponse) GetMarkets() []*SpotMarketInfo { + if x != nil { + return x.Markets + } + return nil +} + +type SpotMarketInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SpotMarket ID is keccak265(baseDenom || quoteDenom) + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The status of the market + MarketStatus string `protobuf:"bytes,2,opt,name=market_status,json=marketStatus,proto3" json:"market_status,omitempty"` + // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote + // asset. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Coin denom used for the base asset. + BaseDenom string `protobuf:"bytes,4,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + // Token metadata for base asset, only for Ethereum-based assets + BaseTokenMeta *TokenMeta `protobuf:"bytes,5,opt,name=base_token_meta,json=baseTokenMeta,proto3" json:"base_token_meta,omitempty"` + // Coin denom used for the quote asset. + QuoteDenom string `protobuf:"bytes,6,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Token metadata for quote asset, only for Ethereum-based assets + QuoteTokenMeta *TokenMeta `protobuf:"bytes,7,opt,name=quote_token_meta,json=quoteTokenMeta,proto3" json:"quote_token_meta,omitempty"` + // Defines the fee percentage makers pay when trading (in quote asset) + MakerFeeRate string `protobuf:"bytes,8,opt,name=maker_fee_rate,json=makerFeeRate,proto3" json:"maker_fee_rate,omitempty"` + // Defines the fee percentage takers pay when trading (in quote asset) + TakerFeeRate string `protobuf:"bytes,9,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` + // Percentage of the transaction fee shared with the service provider + ServiceProviderFee string `protobuf:"bytes,10,opt,name=service_provider_fee,json=serviceProviderFee,proto3" json:"service_provider_fee,omitempty"` + // Defines the maximum amount of decimal places that each order's price cannot + // exceed + MaxPriceScaleDecimals uint32 `protobuf:"varint,11,opt,name=max_price_scale_decimals,json=maxPriceScaleDecimals,proto3" json:"max_price_scale_decimals,omitempty"` + // Defines the maximum amount of decimal places that each order's quantity + // cannot exceed + MaxQuantityScaleDecimals uint32 `protobuf:"varint,12,opt,name=max_quantity_scale_decimals,json=maxQuantityScaleDecimals,proto3" json:"max_quantity_scale_decimals,omitempty"` +} + +func (x *SpotMarketInfo) Reset() { + *x = SpotMarketInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpotMarketInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpotMarketInfo) ProtoMessage() {} + +func (x *SpotMarketInfo) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpotMarketInfo.ProtoReflect.Descriptor instead. +func (*SpotMarketInfo) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{2} +} + +func (x *SpotMarketInfo) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *SpotMarketInfo) GetMarketStatus() string { + if x != nil { + return x.MarketStatus + } + return "" +} + +func (x *SpotMarketInfo) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *SpotMarketInfo) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *SpotMarketInfo) GetBaseTokenMeta() *TokenMeta { + if x != nil { + return x.BaseTokenMeta + } + return nil +} + +func (x *SpotMarketInfo) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +func (x *SpotMarketInfo) GetQuoteTokenMeta() *TokenMeta { + if x != nil { + return x.QuoteTokenMeta + } + return nil +} + +func (x *SpotMarketInfo) GetMakerFeeRate() string { + if x != nil { + return x.MakerFeeRate + } + return "" +} + +func (x *SpotMarketInfo) GetTakerFeeRate() string { + if x != nil { + return x.TakerFeeRate + } + return "" +} + +func (x *SpotMarketInfo) GetServiceProviderFee() string { + if x != nil { + return x.ServiceProviderFee + } + return "" +} + +func (x *SpotMarketInfo) GetMaxPriceScaleDecimals() uint32 { + if x != nil { + return x.MaxPriceScaleDecimals + } + return 0 +} + +func (x *SpotMarketInfo) GetMaxQuantityScaleDecimals() uint32 { + if x != nil { + return x.MaxQuantityScaleDecimals + } + return 0 +} + +type TokenMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Token full name + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Token Ethereum contract address + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Token symbol short name + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // URL to the logo image + Logo string `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"` + // Token decimals + Decimals int32 `protobuf:"zigzag32,5,opt,name=decimals,proto3" json:"decimals,omitempty"` + // Token metadata fetched timestamp in UNIX millis. + UpdatedAt int64 `protobuf:"zigzag64,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *TokenMeta) Reset() { + *x = TokenMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenMeta) ProtoMessage() {} + +func (x *TokenMeta) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenMeta.ProtoReflect.Descriptor instead. +func (*TokenMeta) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{3} +} + +func (x *TokenMeta) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TokenMeta) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TokenMeta) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenMeta) GetLogo() string { + if x != nil { + return x.Logo + } + return "" +} + +func (x *TokenMeta) GetDecimals() int32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *TokenMeta) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +type MarketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *MarketRequest) Reset() { + *x = MarketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketRequest) ProtoMessage() {} + +func (x *MarketRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketRequest.ProtoReflect.Descriptor instead. +func (*MarketRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{4} +} + +func (x *MarketRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type MarketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Info about particular spot market + Market *SpotMarketInfo `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` +} + +func (x *MarketResponse) Reset() { + *x = MarketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketResponse) ProtoMessage() {} + +func (x *MarketResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketResponse.ProtoReflect.Descriptor instead. +func (*MarketResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{5} +} + +func (x *MarketResponse) GetMarket() *SpotMarketInfo { + if x != nil { + return x.Market + } + return nil +} + +type StreamMarketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of market IDs for updates streaming, empty means 'ALL' spot markets + MarketIds []string `protobuf:"bytes,1,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (x *StreamMarketsRequest) Reset() { + *x = StreamMarketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMarketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMarketsRequest) ProtoMessage() {} + +func (x *StreamMarketsRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMarketsRequest.ProtoReflect.Descriptor instead. +func (*StreamMarketsRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{6} +} + +func (x *StreamMarketsRequest) GetMarketIds() []string { + if x != nil { + return x.MarketIds + } + return nil +} + +type StreamMarketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Info about particular spot market + Market *SpotMarketInfo `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // Update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamMarketsResponse) Reset() { + *x = StreamMarketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMarketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMarketsResponse) ProtoMessage() {} + +func (x *StreamMarketsResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMarketsResponse.ProtoReflect.Descriptor instead. +func (*StreamMarketsResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{7} +} + +func (x *StreamMarketsResponse) GetMarket() *SpotMarketInfo { + if x != nil { + return x.Market + } + return nil +} + +func (x *StreamMarketsResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamMarketsResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type OrderbookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *OrderbookRequest) Reset() { + *x = OrderbookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderbookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderbookRequest) ProtoMessage() {} + +func (x *OrderbookRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderbookRequest.ProtoReflect.Descriptor instead. +func (*OrderbookRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{8} +} + +func (x *OrderbookRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type OrderbookResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Orderbook of a particular spot market + Orderbook *SpotLimitOrderbook `protobuf:"bytes,1,opt,name=orderbook,proto3" json:"orderbook,omitempty"` +} + +func (x *OrderbookResponse) Reset() { + *x = OrderbookResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderbookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderbookResponse) ProtoMessage() {} + +func (x *OrderbookResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderbookResponse.ProtoReflect.Descriptor instead. +func (*OrderbookResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{9} +} + +func (x *OrderbookResponse) GetOrderbook() *SpotLimitOrderbook { + if x != nil { + return x.Orderbook + } + return nil +} + +type SpotLimitOrderbook struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Array of price levels for buys + Buys []*PriceLevel `protobuf:"bytes,1,rep,name=buys,proto3" json:"buys,omitempty"` + // Array of price levels for sells + Sells []*PriceLevel `protobuf:"bytes,2,rep,name=sells,proto3" json:"sells,omitempty"` +} + +func (x *SpotLimitOrderbook) Reset() { + *x = SpotLimitOrderbook{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpotLimitOrderbook) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpotLimitOrderbook) ProtoMessage() {} + +func (x *SpotLimitOrderbook) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpotLimitOrderbook.ProtoReflect.Descriptor instead. +func (*SpotLimitOrderbook) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{10} +} + +func (x *SpotLimitOrderbook) GetBuys() []*PriceLevel { + if x != nil { + return x.Buys + } + return nil +} + +func (x *SpotLimitOrderbook) GetSells() []*PriceLevel { + if x != nil { + return x.Sells + } + return nil +} + +type PriceLevel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Price number of the price level. + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + // Quantity of the price level. + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + // Price level last updated timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *PriceLevel) Reset() { + *x = PriceLevel{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PriceLevel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriceLevel) ProtoMessage() {} + +func (x *PriceLevel) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PriceLevel.ProtoReflect.Descriptor instead. +func (*PriceLevel) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{11} +} + +func (x *PriceLevel) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PriceLevel) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PriceLevel) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type StreamOrderbookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Market ID for orderbook updates streaming + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *StreamOrderbookRequest) Reset() { + *x = StreamOrderbookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrderbookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrderbookRequest) ProtoMessage() {} + +func (x *StreamOrderbookRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrderbookRequest.ProtoReflect.Descriptor instead. +func (*StreamOrderbookRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{12} +} + +func (x *StreamOrderbookRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type StreamOrderbookResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Orderbook of a Spot Market + Orderbook *SpotLimitOrderbook `protobuf:"bytes,1,opt,name=orderbook,proto3" json:"orderbook,omitempty"` + // Order update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamOrderbookResponse) Reset() { + *x = StreamOrderbookResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrderbookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrderbookResponse) ProtoMessage() {} + +func (x *StreamOrderbookResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrderbookResponse.ProtoReflect.Descriptor instead. +func (*StreamOrderbookResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{13} +} + +func (x *StreamOrderbookResponse) GetOrderbook() *SpotLimitOrderbook { + if x != nil { + return x.Orderbook + } + return nil +} + +func (x *StreamOrderbookResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamOrderbookResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type OrdersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Look for specific order type + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // Look for specific trade direction of an order + Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + // Look for specific subaccountId of an order + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *OrdersRequest) Reset() { + *x = OrdersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrdersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrdersRequest) ProtoMessage() {} + +func (x *OrdersRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrdersRequest.ProtoReflect.Descriptor instead. +func (*OrdersRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{14} +} + +func (x *OrdersRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *OrdersRequest) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *OrdersRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *OrdersRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type OrdersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of spot market orders + Orders []*SpotLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (x *OrdersResponse) Reset() { + *x = OrdersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrdersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrdersResponse) ProtoMessage() {} + +func (x *OrdersResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrdersResponse.ProtoReflect.Descriptor instead. +func (*OrdersResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{15} +} + +func (x *OrdersResponse) GetOrders() []*SpotLimitOrder { + if x != nil { + return x.Orders + } + return nil +} + +type SpotLimitOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Hash of the order + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // The type of the order + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // SpotMarket ID is keccak265(baseDenom || quoteDenom) + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The subaccountId that this order belongs to + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Price of the order + Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` + // Quantity of the order + Quantity string `protobuf:"bytes,6,opt,name=quantity,proto3" json:"quantity,omitempty"` + // The amount of the quantity remaining unfilled + UnfilledQuantity string `protobuf:"bytes,7,opt,name=unfilled_quantity,json=unfilledQuantity,proto3" json:"unfilled_quantity,omitempty"` + // Trigger price is the trigger price used by stop/take orders + TriggerPrice string `protobuf:"bytes,8,opt,name=trigger_price,json=triggerPrice,proto3" json:"trigger_price,omitempty"` + // Fee recipient address + FeeRecipient string `protobuf:"bytes,9,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty"` + // Order state + State string `protobuf:"bytes,10,opt,name=state,proto3" json:"state,omitempty"` + // Order committed timestamp in UNIX millis. + CreatedAt int64 `protobuf:"zigzag64,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Order updated timestamp in UNIX millis. + UpdatedAt int64 `protobuf:"zigzag64,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *SpotLimitOrder) Reset() { + *x = SpotLimitOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpotLimitOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpotLimitOrder) ProtoMessage() {} + +func (x *SpotLimitOrder) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpotLimitOrder.ProtoReflect.Descriptor instead. +func (*SpotLimitOrder) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{16} +} + +func (x *SpotLimitOrder) GetOrderHash() string { + if x != nil { + return x.OrderHash + } + return "" +} + +func (x *SpotLimitOrder) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *SpotLimitOrder) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *SpotLimitOrder) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SpotLimitOrder) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *SpotLimitOrder) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *SpotLimitOrder) GetUnfilledQuantity() string { + if x != nil { + return x.UnfilledQuantity + } + return "" +} + +func (x *SpotLimitOrder) GetTriggerPrice() string { + if x != nil { + return x.TriggerPrice + } + return "" +} + +func (x *SpotLimitOrder) GetFeeRecipient() string { + if x != nil { + return x.FeeRecipient + } + return "" +} + +func (x *SpotLimitOrder) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *SpotLimitOrder) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *SpotLimitOrder) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +type StreamOrdersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Look for specific order type + OrderType string `protobuf:"bytes,2,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + // Look for specific trade direction of an order + Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + // Look for specific subaccountId of an order + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *StreamOrdersRequest) Reset() { + *x = StreamOrdersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrdersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrdersRequest) ProtoMessage() {} + +func (x *StreamOrdersRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrdersRequest.ProtoReflect.Descriptor instead. +func (*StreamOrdersRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{17} +} + +func (x *StreamOrdersRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *StreamOrdersRequest) GetOrderType() string { + if x != nil { + return x.OrderType + } + return "" +} + +func (x *StreamOrdersRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *StreamOrdersRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type StreamOrdersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Updated market order + Order *SpotLimitOrder `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` + // Order update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamOrdersResponse) Reset() { + *x = StreamOrdersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamOrdersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamOrdersResponse) ProtoMessage() {} + +func (x *StreamOrdersResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamOrdersResponse.ProtoReflect.Descriptor instead. +func (*StreamOrdersResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{18} +} + +func (x *StreamOrdersResponse) GetOrder() *SpotLimitOrder { + if x != nil { + return x.Order + } + return nil +} + +func (x *StreamOrdersResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamOrdersResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type TradesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of the trade + ExecutionType string `protobuf:"bytes,2,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by execution side of the trade + ExecutionSide string `protobuf:"bytes,3,opt,name=execution_side,json=executionSide,proto3" json:"execution_side,omitempty"` + // Filter by direction the trade + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,5,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *TradesRequest) Reset() { + *x = TradesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradesRequest) ProtoMessage() {} + +func (x *TradesRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradesRequest.ProtoReflect.Descriptor instead. +func (*TradesRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{19} +} + +func (x *TradesRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *TradesRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *TradesRequest) GetExecutionSide() string { + if x != nil { + return x.ExecutionSide + } + return "" +} + +func (x *TradesRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *TradesRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type TradesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Trades of a Spot Market + Trades []*SpotTrade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (x *TradesResponse) Reset() { + *x = TradesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TradesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradesResponse) ProtoMessage() {} + +func (x *TradesResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradesResponse.ProtoReflect.Descriptor instead. +func (*TradesResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{20} +} + +func (x *TradesResponse) GetTrades() []*SpotTrade { + if x != nil { + return x.Trades + } + return nil +} + +type SpotTrade struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maker order hash. + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // The subaccountId that executed the trade + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // The ID of the market that this trade is in + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The execution type of the trade + TradeExecutionType string `protobuf:"bytes,4,opt,name=trade_execution_type,json=tradeExecutionType,proto3" json:"trade_execution_type,omitempty"` + // The direction the trade + TradeDirection string `protobuf:"bytes,5,opt,name=trade_direction,json=tradeDirection,proto3" json:"trade_direction,omitempty"` + // Price level at which trade has been executed + Price *PriceLevel `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"` + // The fee associated with the trade (base asset denom) + Fee string `protobuf:"bytes,7,opt,name=fee,proto3" json:"fee,omitempty"` + // Timestamp of trade execution in UNIX millis + ExecutedAt int64 `protobuf:"zigzag64,8,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` +} + +func (x *SpotTrade) Reset() { + *x = SpotTrade{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpotTrade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpotTrade) ProtoMessage() {} + +func (x *SpotTrade) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpotTrade.ProtoReflect.Descriptor instead. +func (*SpotTrade) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{21} +} + +func (x *SpotTrade) GetOrderHash() string { + if x != nil { + return x.OrderHash + } + return "" +} + +func (x *SpotTrade) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SpotTrade) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *SpotTrade) GetTradeExecutionType() string { + if x != nil { + return x.TradeExecutionType + } + return "" +} + +func (x *SpotTrade) GetTradeDirection() string { + if x != nil { + return x.TradeDirection + } + return "" +} + +func (x *SpotTrade) GetPrice() *PriceLevel { + if x != nil { + return x.Price + } + return nil +} + +func (x *SpotTrade) GetFee() string { + if x != nil { + return x.Fee + } + return "" +} + +func (x *SpotTrade) GetExecutedAt() int64 { + if x != nil { + return x.ExecutedAt + } + return 0 +} + +type StreamTradesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MarketId of the market's orderbook we want to fetch + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of the trade + ExecutionType string `protobuf:"bytes,2,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by execution side of the trade + ExecutionSide string `protobuf:"bytes,3,opt,name=execution_side,json=executionSide,proto3" json:"execution_side,omitempty"` + // Filter by direction the trade + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,5,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (x *StreamTradesRequest) Reset() { + *x = StreamTradesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTradesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTradesRequest) ProtoMessage() {} + +func (x *StreamTradesRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTradesRequest.ProtoReflect.Descriptor instead. +func (*StreamTradesRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{22} +} + +func (x *StreamTradesRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *StreamTradesRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *StreamTradesRequest) GetExecutionSide() string { + if x != nil { + return x.ExecutionSide + } + return "" +} + +func (x *StreamTradesRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *StreamTradesRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +type StreamTradesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // New spot market trade + Trade *SpotTrade `protobuf:"bytes,1,opt,name=trade,proto3" json:"trade,omitempty"` + // Executed trades update type + OperationType string `protobuf:"bytes,2,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"` + // Operation timestamp in UNIX millis. + Timestamp int64 `protobuf:"zigzag64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *StreamTradesResponse) Reset() { + *x = StreamTradesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTradesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTradesResponse) ProtoMessage() {} + +func (x *StreamTradesResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTradesResponse.ProtoReflect.Descriptor instead. +func (*StreamTradesResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{23} +} + +func (x *StreamTradesResponse) GetTrade() *SpotTrade { + if x != nil { + return x.Trade + } + return nil +} + +func (x *StreamTradesResponse) GetOperationType() string { + if x != nil { + return x.OperationType + } + return "" +} + +func (x *StreamTradesResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SubaccountOrdersListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // subaccount ID to filter orders for specific subaccount + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Market ID to filter orders for specific market + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (x *SubaccountOrdersListRequest) Reset() { + *x = SubaccountOrdersListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountOrdersListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountOrdersListRequest) ProtoMessage() {} + +func (x *SubaccountOrdersListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountOrdersListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountOrdersListRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{24} +} + +func (x *SubaccountOrdersListRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountOrdersListRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +type SubaccountOrdersListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of spot orders + Orders []*SpotLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (x *SubaccountOrdersListResponse) Reset() { + *x = SubaccountOrdersListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountOrdersListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountOrdersListResponse) ProtoMessage() {} + +func (x *SubaccountOrdersListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountOrdersListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountOrdersListResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{25} +} + +func (x *SubaccountOrdersListResponse) GetOrders() []*SpotLimitOrder { + if x != nil { + return x.Orders + } + return nil +} + +type SubaccountTradesListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SubaccountId of the trader we want to get the trades from + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // Filter trades by market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Filter by execution type of trades + ExecutionType string `protobuf:"bytes,3,opt,name=execution_type,json=executionType,proto3" json:"execution_type,omitempty"` + // Filter by direction trades + Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` +} + +func (x *SubaccountTradesListRequest) Reset() { + *x = SubaccountTradesListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountTradesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountTradesListRequest) ProtoMessage() {} + +func (x *SubaccountTradesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountTradesListRequest.ProtoReflect.Descriptor instead. +func (*SubaccountTradesListRequest) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{26} +} + +func (x *SubaccountTradesListRequest) GetSubaccountId() string { + if x != nil { + return x.SubaccountId + } + return "" +} + +func (x *SubaccountTradesListRequest) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *SubaccountTradesListRequest) GetExecutionType() string { + if x != nil { + return x.ExecutionType + } + return "" +} + +func (x *SubaccountTradesListRequest) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +type SubaccountTradesListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of spot market trades + Trades []*SpotTrade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (x *SubaccountTradesListResponse) Reset() { + *x = SubaccountTradesListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubaccountTradesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubaccountTradesListResponse) ProtoMessage() {} + +func (x *SubaccountTradesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_injective_spot_exchange_rpc_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubaccountTradesListResponse.ProtoReflect.Descriptor instead. +func (*SubaccountTradesListResponse) Descriptor() ([]byte, []int) { + return file_injective_spot_exchange_rpc_proto_rawDescGZIP(), []int{27} +} + +func (x *SubaccountTradesListResponse) GetTrades() []*SpotTrade { + if x != nil { + return x.Trades + } + return nil +} + +var File_injective_spot_exchange_rpc_proto protoreflect.FileDescriptor + +var file_injective_spot_exchange_rpc_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x22, 0x75, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, + 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x58, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x22, 0xc2, 0x04, 0x0a, 0x0e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x4e, 0x0a, + 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0d, + 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1f, 0x0a, + 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x50, + 0x0a, 0x10, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x0e, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, + 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x37, + 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, + 0x65, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x15, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x44, + 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x71, + 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x64, 0x65, + 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x6d, 0x61, + 0x78, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x44, 0x65, + 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, + 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, + 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x2c, 0x0a, 0x0d, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x22, 0x35, + 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, + 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x2f, 0x0a, 0x10, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x11, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4d, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, + 0x6f, 0x6f, 0x6b, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x90, + 0x01, 0x0a, 0x12, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x3b, 0x0a, 0x04, 0x62, 0x75, 0x79, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x62, 0x75, + 0x79, 0x73, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, + 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x73, 0x65, 0x6c, 0x6c, + 0x73, 0x22, 0x5c, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x35, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, + 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x8d, + 0x03, 0x0a, 0x0e, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x5f, + 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x75, 0x6e, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, + 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x94, + 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9e, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0xb9, 0x02, 0x0a, 0x09, 0x53, 0x70, 0x6f, + 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x72, 0x61, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x64, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, + 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x66, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5f, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa4, 0x01, 0x0a, + 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x5e, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x32, 0x99, 0x0a, 0x0a, 0x18, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x53, 0x70, 0x6f, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x50, 0x43, + 0x12, 0x64, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, + 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x0d, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x6a, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x12, 0x2d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, + 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7e, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, + 0x6f, 0x6b, 0x12, 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x61, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x75, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x06, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x0c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x38, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x38, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x20, 0x5a, 0x1e, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, + 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_injective_spot_exchange_rpc_proto_rawDescOnce sync.Once + file_injective_spot_exchange_rpc_proto_rawDescData = file_injective_spot_exchange_rpc_proto_rawDesc +) + +func file_injective_spot_exchange_rpc_proto_rawDescGZIP() []byte { + file_injective_spot_exchange_rpc_proto_rawDescOnce.Do(func() { + file_injective_spot_exchange_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_injective_spot_exchange_rpc_proto_rawDescData) + }) + return file_injective_spot_exchange_rpc_proto_rawDescData +} + +var file_injective_spot_exchange_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_injective_spot_exchange_rpc_proto_goTypes = []interface{}{ + (*MarketsRequest)(nil), // 0: injective_spot_exchange_rpc.MarketsRequest + (*MarketsResponse)(nil), // 1: injective_spot_exchange_rpc.MarketsResponse + (*SpotMarketInfo)(nil), // 2: injective_spot_exchange_rpc.SpotMarketInfo + (*TokenMeta)(nil), // 3: injective_spot_exchange_rpc.TokenMeta + (*MarketRequest)(nil), // 4: injective_spot_exchange_rpc.MarketRequest + (*MarketResponse)(nil), // 5: injective_spot_exchange_rpc.MarketResponse + (*StreamMarketsRequest)(nil), // 6: injective_spot_exchange_rpc.StreamMarketsRequest + (*StreamMarketsResponse)(nil), // 7: injective_spot_exchange_rpc.StreamMarketsResponse + (*OrderbookRequest)(nil), // 8: injective_spot_exchange_rpc.OrderbookRequest + (*OrderbookResponse)(nil), // 9: injective_spot_exchange_rpc.OrderbookResponse + (*SpotLimitOrderbook)(nil), // 10: injective_spot_exchange_rpc.SpotLimitOrderbook + (*PriceLevel)(nil), // 11: injective_spot_exchange_rpc.PriceLevel + (*StreamOrderbookRequest)(nil), // 12: injective_spot_exchange_rpc.StreamOrderbookRequest + (*StreamOrderbookResponse)(nil), // 13: injective_spot_exchange_rpc.StreamOrderbookResponse + (*OrdersRequest)(nil), // 14: injective_spot_exchange_rpc.OrdersRequest + (*OrdersResponse)(nil), // 15: injective_spot_exchange_rpc.OrdersResponse + (*SpotLimitOrder)(nil), // 16: injective_spot_exchange_rpc.SpotLimitOrder + (*StreamOrdersRequest)(nil), // 17: injective_spot_exchange_rpc.StreamOrdersRequest + (*StreamOrdersResponse)(nil), // 18: injective_spot_exchange_rpc.StreamOrdersResponse + (*TradesRequest)(nil), // 19: injective_spot_exchange_rpc.TradesRequest + (*TradesResponse)(nil), // 20: injective_spot_exchange_rpc.TradesResponse + (*SpotTrade)(nil), // 21: injective_spot_exchange_rpc.SpotTrade + (*StreamTradesRequest)(nil), // 22: injective_spot_exchange_rpc.StreamTradesRequest + (*StreamTradesResponse)(nil), // 23: injective_spot_exchange_rpc.StreamTradesResponse + (*SubaccountOrdersListRequest)(nil), // 24: injective_spot_exchange_rpc.SubaccountOrdersListRequest + (*SubaccountOrdersListResponse)(nil), // 25: injective_spot_exchange_rpc.SubaccountOrdersListResponse + (*SubaccountTradesListRequest)(nil), // 26: injective_spot_exchange_rpc.SubaccountTradesListRequest + (*SubaccountTradesListResponse)(nil), // 27: injective_spot_exchange_rpc.SubaccountTradesListResponse +} +var file_injective_spot_exchange_rpc_proto_depIdxs = []int32{ + 2, // 0: injective_spot_exchange_rpc.MarketsResponse.markets:type_name -> injective_spot_exchange_rpc.SpotMarketInfo + 3, // 1: injective_spot_exchange_rpc.SpotMarketInfo.base_token_meta:type_name -> injective_spot_exchange_rpc.TokenMeta + 3, // 2: injective_spot_exchange_rpc.SpotMarketInfo.quote_token_meta:type_name -> injective_spot_exchange_rpc.TokenMeta + 2, // 3: injective_spot_exchange_rpc.MarketResponse.market:type_name -> injective_spot_exchange_rpc.SpotMarketInfo + 2, // 4: injective_spot_exchange_rpc.StreamMarketsResponse.market:type_name -> injective_spot_exchange_rpc.SpotMarketInfo + 10, // 5: injective_spot_exchange_rpc.OrderbookResponse.orderbook:type_name -> injective_spot_exchange_rpc.SpotLimitOrderbook + 11, // 6: injective_spot_exchange_rpc.SpotLimitOrderbook.buys:type_name -> injective_spot_exchange_rpc.PriceLevel + 11, // 7: injective_spot_exchange_rpc.SpotLimitOrderbook.sells:type_name -> injective_spot_exchange_rpc.PriceLevel + 10, // 8: injective_spot_exchange_rpc.StreamOrderbookResponse.orderbook:type_name -> injective_spot_exchange_rpc.SpotLimitOrderbook + 16, // 9: injective_spot_exchange_rpc.OrdersResponse.orders:type_name -> injective_spot_exchange_rpc.SpotLimitOrder + 16, // 10: injective_spot_exchange_rpc.StreamOrdersResponse.order:type_name -> injective_spot_exchange_rpc.SpotLimitOrder + 21, // 11: injective_spot_exchange_rpc.TradesResponse.trades:type_name -> injective_spot_exchange_rpc.SpotTrade + 11, // 12: injective_spot_exchange_rpc.SpotTrade.price:type_name -> injective_spot_exchange_rpc.PriceLevel + 21, // 13: injective_spot_exchange_rpc.StreamTradesResponse.trade:type_name -> injective_spot_exchange_rpc.SpotTrade + 16, // 14: injective_spot_exchange_rpc.SubaccountOrdersListResponse.orders:type_name -> injective_spot_exchange_rpc.SpotLimitOrder + 21, // 15: injective_spot_exchange_rpc.SubaccountTradesListResponse.trades:type_name -> injective_spot_exchange_rpc.SpotTrade + 0, // 16: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Markets:input_type -> injective_spot_exchange_rpc.MarketsRequest + 4, // 17: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Market:input_type -> injective_spot_exchange_rpc.MarketRequest + 6, // 18: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamMarkets:input_type -> injective_spot_exchange_rpc.StreamMarketsRequest + 8, // 19: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Orderbook:input_type -> injective_spot_exchange_rpc.OrderbookRequest + 12, // 20: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamOrderbook:input_type -> injective_spot_exchange_rpc.StreamOrderbookRequest + 14, // 21: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Orders:input_type -> injective_spot_exchange_rpc.OrdersRequest + 17, // 22: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamOrders:input_type -> injective_spot_exchange_rpc.StreamOrdersRequest + 19, // 23: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Trades:input_type -> injective_spot_exchange_rpc.TradesRequest + 22, // 24: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamTrades:input_type -> injective_spot_exchange_rpc.StreamTradesRequest + 24, // 25: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.SubaccountOrdersList:input_type -> injective_spot_exchange_rpc.SubaccountOrdersListRequest + 26, // 26: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.SubaccountTradesList:input_type -> injective_spot_exchange_rpc.SubaccountTradesListRequest + 1, // 27: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Markets:output_type -> injective_spot_exchange_rpc.MarketsResponse + 5, // 28: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Market:output_type -> injective_spot_exchange_rpc.MarketResponse + 7, // 29: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamMarkets:output_type -> injective_spot_exchange_rpc.StreamMarketsResponse + 9, // 30: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Orderbook:output_type -> injective_spot_exchange_rpc.OrderbookResponse + 13, // 31: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamOrderbook:output_type -> injective_spot_exchange_rpc.StreamOrderbookResponse + 15, // 32: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Orders:output_type -> injective_spot_exchange_rpc.OrdersResponse + 18, // 33: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamOrders:output_type -> injective_spot_exchange_rpc.StreamOrdersResponse + 20, // 34: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.Trades:output_type -> injective_spot_exchange_rpc.TradesResponse + 23, // 35: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.StreamTrades:output_type -> injective_spot_exchange_rpc.StreamTradesResponse + 25, // 36: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.SubaccountOrdersList:output_type -> injective_spot_exchange_rpc.SubaccountOrdersListResponse + 27, // 37: injective_spot_exchange_rpc.InjectiveSpotExchangeRPC.SubaccountTradesList:output_type -> injective_spot_exchange_rpc.SubaccountTradesListResponse + 27, // [27:38] is the sub-list for method output_type + 16, // [16:27] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_injective_spot_exchange_rpc_proto_init() } +func file_injective_spot_exchange_rpc_proto_init() { + if File_injective_spot_exchange_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_injective_spot_exchange_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpotMarketInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMarketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMarketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderbookRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderbookResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpotLimitOrderbook); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PriceLevel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrderbookRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrderbookResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpotLimitOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamOrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpotTrade); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTradesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTradesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountOrdersListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountOrdersListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountTradesListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_injective_spot_exchange_rpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubaccountTradesListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_injective_spot_exchange_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 28, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_injective_spot_exchange_rpc_proto_goTypes, + DependencyIndexes: file_injective_spot_exchange_rpc_proto_depIdxs, + MessageInfos: file_injective_spot_exchange_rpc_proto_msgTypes, + }.Build() + File_injective_spot_exchange_rpc_proto = out.File + file_injective_spot_exchange_rpc_proto_rawDesc = nil + file_injective_spot_exchange_rpc_proto_goTypes = nil + file_injective_spot_exchange_rpc_proto_depIdxs = nil +} diff --git a/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto new file mode 100644 index 00000000..e1f2030e --- /dev/null +++ b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto @@ -0,0 +1,311 @@ +// Code generated with goa v3.3.1, DO NOT EDIT. +// +// InjectiveSpotExchangeRPC protocol buffer definition +// +// Command: +// $ goa gen github.com/InjectiveLabs/injective-exchange/api/design -o ../ + +syntax = "proto3"; + +package injective_spot_exchange_rpc; + +option go_package = "/injective_spot_exchange_rpcpb"; + +// InjectiveSpotExchangeRPC defines gRPC API of Spot Exchange provider. +service InjectiveSpotExchangeRPC { + // Get a list of Spot Markets + rpc Markets (MarketsRequest) returns (MarketsResponse); + // Get details of a single spot market + rpc Market (MarketRequest) returns (MarketResponse); + // Stream live updates of selected spot markets + rpc StreamMarkets (StreamMarketsRequest) returns (stream StreamMarketsResponse); + // Orderbook of a Spot Market + rpc Orderbook (OrderbookRequest) returns (OrderbookResponse); + // Stream live updates of selected spot market orderbook + rpc StreamOrderbook (StreamOrderbookRequest) returns (stream StreamOrderbookResponse); + // Orders of a Spot Market + rpc Orders (OrdersRequest) returns (OrdersResponse); + // Stream updates to individual orders of a Spot Market + rpc StreamOrders (StreamOrdersRequest) returns (stream StreamOrdersResponse); + // Trades of a Spot Market + rpc Trades (TradesRequest) returns (TradesResponse); + // Stream newly executed trades from Spot Market + rpc StreamTrades (StreamTradesRequest) returns (stream StreamTradesResponse); + // List orders posted from this subaccount + rpc SubaccountOrdersList (SubaccountOrdersListRequest) returns (SubaccountOrdersListResponse); + // List trades executed by this subaccount + rpc SubaccountTradesList (SubaccountTradesListRequest) returns (SubaccountTradesListResponse); +} + +message MarketsRequest { + // Filter by market status + string market_status = 1; + // Filter by the Coin denomination of the base currency + string base_denom = 2; + // Filter by the Coin denomination of the quote currency + string quote_denom = 3; +} + +message MarketsResponse { + // Spot Markets list + repeated SpotMarketInfo markets = 1; +} + +message SpotMarketInfo { + // SpotMarket ID is keccak265(baseDenom || quoteDenom) + string market_id = 1; + // The status of the market + string market_status = 2; + // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote +// asset. + string ticker = 3; + // Coin denom used for the base asset. + string base_denom = 4; + // Token metadata for base asset, only for Ethereum-based assets + TokenMeta base_token_meta = 5; + // Coin denom used for the quote asset. + string quote_denom = 6; + // Token metadata for quote asset, only for Ethereum-based assets + TokenMeta quote_token_meta = 7; + // Defines the fee percentage makers pay when trading (in quote asset) + string maker_fee_rate = 8; + // Defines the fee percentage takers pay when trading (in quote asset) + string taker_fee_rate = 9; + // Percentage of the transaction fee shared with the service provider + string service_provider_fee = 10; + // Defines the maximum amount of decimal places that each order's price cannot +// exceed + uint32 max_price_scale_decimals = 11; + // Defines the maximum amount of decimal places that each order's quantity +// cannot exceed + uint32 max_quantity_scale_decimals = 12; +} + +message TokenMeta { + // Token full name + string name = 1; + // Token Ethereum contract address + string address = 2; + // Token symbol short name + string symbol = 3; + // URL to the logo image + string logo = 4; + // Token decimals + sint32 decimals = 5; + // Token metadata fetched timestamp in UNIX millis. + sint64 updated_at = 6; +} + +message MarketRequest { + // MarketId of the market we want to fetch + string market_id = 1; +} + +message MarketResponse { + // Info about particular spot market + SpotMarketInfo market = 1; +} + +message StreamMarketsRequest { + // List of market IDs for updates streaming, empty means 'ALL' spot markets + repeated string market_ids = 1; +} + +message StreamMarketsResponse { + // Info about particular spot market + SpotMarketInfo market = 1; + // Update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message OrderbookRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; +} + +message OrderbookResponse { + // Orderbook of a particular spot market + SpotLimitOrderbook orderbook = 1; +} + +message SpotLimitOrderbook { + // Array of price levels for buys + repeated PriceLevel buys = 1; + // Array of price levels for sells + repeated PriceLevel sells = 2; +} + +message PriceLevel { + // Price number of the price level. + string price = 1; + // Quantity of the price level. + string quantity = 2; + // Price level last updated timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message StreamOrderbookRequest { + // Market ID for orderbook updates streaming + string market_id = 1; +} + +message StreamOrderbookResponse { + // Orderbook of a Spot Market + SpotLimitOrderbook orderbook = 1; + // Order update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message OrdersRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Look for specific order type + string order_type = 2; + // Look for specific trade direction of an order + string direction = 3; + // Look for specific subaccountId of an order + string subaccount_id = 4; +} + +message OrdersResponse { + // List of spot market orders + repeated SpotLimitOrder orders = 1; +} + +message SpotLimitOrder { + // Hash of the order + string order_hash = 1; + // The type of the order + string order_type = 2; + // SpotMarket ID is keccak265(baseDenom || quoteDenom) + string market_id = 3; + // The subaccountId that this order belongs to + string subaccount_id = 4; + // Price of the order + string price = 5; + // Quantity of the order + string quantity = 6; + // The amount of the quantity remaining unfilled + string unfilled_quantity = 7; + // Trigger price is the trigger price used by stop/take orders + string trigger_price = 8; + // Fee recipient address + string fee_recipient = 9; + // Order state + string state = 10; + // Order committed timestamp in UNIX millis. + sint64 created_at = 11; + // Order updated timestamp in UNIX millis. + sint64 updated_at = 12; +} + +message StreamOrdersRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Look for specific order type + string order_type = 2; + // Look for specific trade direction of an order + string direction = 3; + // Look for specific subaccountId of an order + string subaccount_id = 4; +} + +message StreamOrdersResponse { + // Updated market order + SpotLimitOrder order = 1; + // Order update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message TradesRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Filter by execution type of the trade + string execution_type = 2; + // Filter by execution side of the trade + string execution_side = 3; + // Filter by direction the trade + string direction = 4; + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 5; +} + +message TradesResponse { + // Trades of a Spot Market + repeated SpotTrade trades = 1; +} + +message SpotTrade { + // Maker order hash. + string order_hash = 1; + // The subaccountId that executed the trade + string subaccount_id = 2; + // The ID of the market that this trade is in + string market_id = 3; + // The execution type of the trade + string trade_execution_type = 4; + // The direction the trade + string trade_direction = 5; + // Price level at which trade has been executed + PriceLevel price = 6; + // The fee associated with the trade (base asset denom) + string fee = 7; + // Timestamp of trade execution in UNIX millis + sint64 executed_at = 8; +} + +message StreamTradesRequest { + // MarketId of the market's orderbook we want to fetch + string market_id = 1; + // Filter by execution type of the trade + string execution_type = 2; + // Filter by execution side of the trade + string execution_side = 3; + // Filter by direction the trade + string direction = 4; + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 5; +} + +message StreamTradesResponse { + // New spot market trade + SpotTrade trade = 1; + // Executed trades update type + string operation_type = 2; + // Operation timestamp in UNIX millis. + sint64 timestamp = 3; +} + +message SubaccountOrdersListRequest { + // subaccount ID to filter orders for specific subaccount + string subaccount_id = 1; + // Market ID to filter orders for specific market + string market_id = 2; +} + +message SubaccountOrdersListResponse { + // List of spot orders + repeated SpotLimitOrder orders = 1; +} + +message SubaccountTradesListRequest { + // SubaccountId of the trader we want to get the trades from + string subaccount_id = 1; + // Filter trades by market ID + string market_id = 2; + // Filter by execution type of trades + string execution_type = 3; + // Filter by direction trades + string direction = 4; +} + +message SubaccountTradesListResponse { + // List of spot market trades + repeated SpotTrade trades = 1; +} diff --git a/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc_grpc.pb.go b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc_grpc.pb.go new file mode 100644 index 00000000..cdf4b493 --- /dev/null +++ b/exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc_grpc.pb.go @@ -0,0 +1,593 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package injective_spot_exchange_rpcpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InjectiveSpotExchangeRPCClient is the client API for InjectiveSpotExchangeRPC 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. +type InjectiveSpotExchangeRPCClient interface { + // Get a list of Spot Markets + Markets(ctx context.Context, in *MarketsRequest, opts ...grpc.CallOption) (*MarketsResponse, error) + // Get details of a single spot market + Market(ctx context.Context, in *MarketRequest, opts ...grpc.CallOption) (*MarketResponse, error) + // Stream live updates of selected spot markets + StreamMarkets(ctx context.Context, in *StreamMarketsRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamMarketsClient, error) + // Orderbook of a Spot Market + Orderbook(ctx context.Context, in *OrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) + // Stream live updates of selected spot market orderbook + StreamOrderbook(ctx context.Context, in *StreamOrderbookRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamOrderbookClient, error) + // Orders of a Spot Market + Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error) + // Stream updates to individual orders of a Spot Market + StreamOrders(ctx context.Context, in *StreamOrdersRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamOrdersClient, error) + // Trades of a Spot Market + Trades(ctx context.Context, in *TradesRequest, opts ...grpc.CallOption) (*TradesResponse, error) + // Stream newly executed trades from Spot Market + StreamTrades(ctx context.Context, in *StreamTradesRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamTradesClient, error) + // List orders posted from this subaccount + SubaccountOrdersList(ctx context.Context, in *SubaccountOrdersListRequest, opts ...grpc.CallOption) (*SubaccountOrdersListResponse, error) + // List trades executed by this subaccount + SubaccountTradesList(ctx context.Context, in *SubaccountTradesListRequest, opts ...grpc.CallOption) (*SubaccountTradesListResponse, error) +} + +type injectiveSpotExchangeRPCClient struct { + cc grpc.ClientConnInterface +} + +func NewInjectiveSpotExchangeRPCClient(cc grpc.ClientConnInterface) InjectiveSpotExchangeRPCClient { + return &injectiveSpotExchangeRPCClient{cc} +} + +func (c *injectiveSpotExchangeRPCClient) Markets(ctx context.Context, in *MarketsRequest, opts ...grpc.CallOption) (*MarketsResponse, error) { + out := new(MarketsResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Markets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) Market(ctx context.Context, in *MarketRequest, opts ...grpc.CallOption) (*MarketResponse, error) { + out := new(MarketResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Market", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) StreamMarkets(ctx context.Context, in *StreamMarketsRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamMarketsClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveSpotExchangeRPC_ServiceDesc.Streams[0], "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamMarkets", opts...) + if err != nil { + return nil, err + } + x := &injectiveSpotExchangeRPCStreamMarketsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveSpotExchangeRPC_StreamMarketsClient interface { + Recv() (*StreamMarketsResponse, error) + grpc.ClientStream +} + +type injectiveSpotExchangeRPCStreamMarketsClient struct { + grpc.ClientStream +} + +func (x *injectiveSpotExchangeRPCStreamMarketsClient) Recv() (*StreamMarketsResponse, error) { + m := new(StreamMarketsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveSpotExchangeRPCClient) Orderbook(ctx context.Context, in *OrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) { + out := new(OrderbookResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Orderbook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) StreamOrderbook(ctx context.Context, in *StreamOrderbookRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamOrderbookClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveSpotExchangeRPC_ServiceDesc.Streams[1], "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrderbook", opts...) + if err != nil { + return nil, err + } + x := &injectiveSpotExchangeRPCStreamOrderbookClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveSpotExchangeRPC_StreamOrderbookClient interface { + Recv() (*StreamOrderbookResponse, error) + grpc.ClientStream +} + +type injectiveSpotExchangeRPCStreamOrderbookClient struct { + grpc.ClientStream +} + +func (x *injectiveSpotExchangeRPCStreamOrderbookClient) Recv() (*StreamOrderbookResponse, error) { + m := new(StreamOrderbookResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveSpotExchangeRPCClient) Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error) { + out := new(OrdersResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Orders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) StreamOrders(ctx context.Context, in *StreamOrdersRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamOrdersClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveSpotExchangeRPC_ServiceDesc.Streams[2], "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrders", opts...) + if err != nil { + return nil, err + } + x := &injectiveSpotExchangeRPCStreamOrdersClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveSpotExchangeRPC_StreamOrdersClient interface { + Recv() (*StreamOrdersResponse, error) + grpc.ClientStream +} + +type injectiveSpotExchangeRPCStreamOrdersClient struct { + grpc.ClientStream +} + +func (x *injectiveSpotExchangeRPCStreamOrdersClient) Recv() (*StreamOrdersResponse, error) { + m := new(StreamOrdersResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveSpotExchangeRPCClient) Trades(ctx context.Context, in *TradesRequest, opts ...grpc.CallOption) (*TradesResponse, error) { + out := new(TradesResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Trades", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) StreamTrades(ctx context.Context, in *StreamTradesRequest, opts ...grpc.CallOption) (InjectiveSpotExchangeRPC_StreamTradesClient, error) { + stream, err := c.cc.NewStream(ctx, &InjectiveSpotExchangeRPC_ServiceDesc.Streams[3], "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamTrades", opts...) + if err != nil { + return nil, err + } + x := &injectiveSpotExchangeRPCStreamTradesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InjectiveSpotExchangeRPC_StreamTradesClient interface { + Recv() (*StreamTradesResponse, error) + grpc.ClientStream +} + +type injectiveSpotExchangeRPCStreamTradesClient struct { + grpc.ClientStream +} + +func (x *injectiveSpotExchangeRPCStreamTradesClient) Recv() (*StreamTradesResponse, error) { + m := new(StreamTradesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *injectiveSpotExchangeRPCClient) SubaccountOrdersList(ctx context.Context, in *SubaccountOrdersListRequest, opts ...grpc.CallOption) (*SubaccountOrdersListResponse, error) { + out := new(SubaccountOrdersListResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/SubaccountOrdersList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *injectiveSpotExchangeRPCClient) SubaccountTradesList(ctx context.Context, in *SubaccountTradesListRequest, opts ...grpc.CallOption) (*SubaccountTradesListResponse, error) { + out := new(SubaccountTradesListResponse) + err := c.cc.Invoke(ctx, "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/SubaccountTradesList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InjectiveSpotExchangeRPCServer is the server API for InjectiveSpotExchangeRPC service. +// All implementations must embed UnimplementedInjectiveSpotExchangeRPCServer +// for forward compatibility +type InjectiveSpotExchangeRPCServer interface { + // Get a list of Spot Markets + Markets(context.Context, *MarketsRequest) (*MarketsResponse, error) + // Get details of a single spot market + Market(context.Context, *MarketRequest) (*MarketResponse, error) + // Stream live updates of selected spot markets + StreamMarkets(*StreamMarketsRequest, InjectiveSpotExchangeRPC_StreamMarketsServer) error + // Orderbook of a Spot Market + Orderbook(context.Context, *OrderbookRequest) (*OrderbookResponse, error) + // Stream live updates of selected spot market orderbook + StreamOrderbook(*StreamOrderbookRequest, InjectiveSpotExchangeRPC_StreamOrderbookServer) error + // Orders of a Spot Market + Orders(context.Context, *OrdersRequest) (*OrdersResponse, error) + // Stream updates to individual orders of a Spot Market + StreamOrders(*StreamOrdersRequest, InjectiveSpotExchangeRPC_StreamOrdersServer) error + // Trades of a Spot Market + Trades(context.Context, *TradesRequest) (*TradesResponse, error) + // Stream newly executed trades from Spot Market + StreamTrades(*StreamTradesRequest, InjectiveSpotExchangeRPC_StreamTradesServer) error + // List orders posted from this subaccount + SubaccountOrdersList(context.Context, *SubaccountOrdersListRequest) (*SubaccountOrdersListResponse, error) + // List trades executed by this subaccount + SubaccountTradesList(context.Context, *SubaccountTradesListRequest) (*SubaccountTradesListResponse, error) + mustEmbedUnimplementedInjectiveSpotExchangeRPCServer() +} + +// UnimplementedInjectiveSpotExchangeRPCServer must be embedded to have forward compatible implementations. +type UnimplementedInjectiveSpotExchangeRPCServer struct { +} + +func (UnimplementedInjectiveSpotExchangeRPCServer) Markets(context.Context, *MarketsRequest) (*MarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Markets not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) Market(context.Context, *MarketRequest) (*MarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Market not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) StreamMarkets(*StreamMarketsRequest, InjectiveSpotExchangeRPC_StreamMarketsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamMarkets not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) Orderbook(context.Context, *OrderbookRequest) (*OrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orderbook not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) StreamOrderbook(*StreamOrderbookRequest, InjectiveSpotExchangeRPC_StreamOrderbookServer) error { + return status.Errorf(codes.Unimplemented, "method StreamOrderbook not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) Orders(context.Context, *OrdersRequest) (*OrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orders not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) StreamOrders(*StreamOrdersRequest, InjectiveSpotExchangeRPC_StreamOrdersServer) error { + return status.Errorf(codes.Unimplemented, "method StreamOrders not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) Trades(context.Context, *TradesRequest) (*TradesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Trades not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) StreamTrades(*StreamTradesRequest, InjectiveSpotExchangeRPC_StreamTradesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamTrades not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) SubaccountOrdersList(context.Context, *SubaccountOrdersListRequest) (*SubaccountOrdersListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountOrdersList not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) SubaccountTradesList(context.Context, *SubaccountTradesListRequest) (*SubaccountTradesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountTradesList not implemented") +} +func (UnimplementedInjectiveSpotExchangeRPCServer) mustEmbedUnimplementedInjectiveSpotExchangeRPCServer() { +} + +// UnsafeInjectiveSpotExchangeRPCServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InjectiveSpotExchangeRPCServer will +// result in compilation errors. +type UnsafeInjectiveSpotExchangeRPCServer interface { + mustEmbedUnimplementedInjectiveSpotExchangeRPCServer() +} + +func RegisterInjectiveSpotExchangeRPCServer(s grpc.ServiceRegistrar, srv InjectiveSpotExchangeRPCServer) { + s.RegisterService(&InjectiveSpotExchangeRPC_ServiceDesc, srv) +} + +func _InjectiveSpotExchangeRPC_Markets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).Markets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Markets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).Markets(ctx, req.(*MarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_Market_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).Market(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Market", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).Market(ctx, req.(*MarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_StreamMarkets_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamMarketsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveSpotExchangeRPCServer).StreamMarkets(m, &injectiveSpotExchangeRPCStreamMarketsServer{stream}) +} + +type InjectiveSpotExchangeRPC_StreamMarketsServer interface { + Send(*StreamMarketsResponse) error + grpc.ServerStream +} + +type injectiveSpotExchangeRPCStreamMarketsServer struct { + grpc.ServerStream +} + +func (x *injectiveSpotExchangeRPCStreamMarketsServer) Send(m *StreamMarketsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveSpotExchangeRPC_Orderbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).Orderbook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Orderbook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).Orderbook(ctx, req.(*OrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_StreamOrderbook_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamOrderbookRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveSpotExchangeRPCServer).StreamOrderbook(m, &injectiveSpotExchangeRPCStreamOrderbookServer{stream}) +} + +type InjectiveSpotExchangeRPC_StreamOrderbookServer interface { + Send(*StreamOrderbookResponse) error + grpc.ServerStream +} + +type injectiveSpotExchangeRPCStreamOrderbookServer struct { + grpc.ServerStream +} + +func (x *injectiveSpotExchangeRPCStreamOrderbookServer) Send(m *StreamOrderbookResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveSpotExchangeRPC_Orders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).Orders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Orders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).Orders(ctx, req.(*OrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_StreamOrders_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamOrdersRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveSpotExchangeRPCServer).StreamOrders(m, &injectiveSpotExchangeRPCStreamOrdersServer{stream}) +} + +type InjectiveSpotExchangeRPC_StreamOrdersServer interface { + Send(*StreamOrdersResponse) error + grpc.ServerStream +} + +type injectiveSpotExchangeRPCStreamOrdersServer struct { + grpc.ServerStream +} + +func (x *injectiveSpotExchangeRPCStreamOrdersServer) Send(m *StreamOrdersResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveSpotExchangeRPC_Trades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TradesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).Trades(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/Trades", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).Trades(ctx, req.(*TradesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_StreamTrades_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamTradesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InjectiveSpotExchangeRPCServer).StreamTrades(m, &injectiveSpotExchangeRPCStreamTradesServer{stream}) +} + +type InjectiveSpotExchangeRPC_StreamTradesServer interface { + Send(*StreamTradesResponse) error + grpc.ServerStream +} + +type injectiveSpotExchangeRPCStreamTradesServer struct { + grpc.ServerStream +} + +func (x *injectiveSpotExchangeRPCStreamTradesServer) Send(m *StreamTradesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InjectiveSpotExchangeRPC_SubaccountOrdersList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountOrdersListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).SubaccountOrdersList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/SubaccountOrdersList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).SubaccountOrdersList(ctx, req.(*SubaccountOrdersListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InjectiveSpotExchangeRPC_SubaccountTradesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubaccountTradesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InjectiveSpotExchangeRPCServer).SubaccountTradesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/SubaccountTradesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InjectiveSpotExchangeRPCServer).SubaccountTradesList(ctx, req.(*SubaccountTradesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InjectiveSpotExchangeRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveSpotExchangeRPC service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InjectiveSpotExchangeRPC_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "injective_spot_exchange_rpc.InjectiveSpotExchangeRPC", + HandlerType: (*InjectiveSpotExchangeRPCServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Markets", + Handler: _InjectiveSpotExchangeRPC_Markets_Handler, + }, + { + MethodName: "Market", + Handler: _InjectiveSpotExchangeRPC_Market_Handler, + }, + { + MethodName: "Orderbook", + Handler: _InjectiveSpotExchangeRPC_Orderbook_Handler, + }, + { + MethodName: "Orders", + Handler: _InjectiveSpotExchangeRPC_Orders_Handler, + }, + { + MethodName: "Trades", + Handler: _InjectiveSpotExchangeRPC_Trades_Handler, + }, + { + MethodName: "SubaccountOrdersList", + Handler: _InjectiveSpotExchangeRPC_SubaccountOrdersList_Handler, + }, + { + MethodName: "SubaccountTradesList", + Handler: _InjectiveSpotExchangeRPC_SubaccountTradesList_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamMarkets", + Handler: _InjectiveSpotExchangeRPC_StreamMarkets_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamOrderbook", + Handler: _InjectiveSpotExchangeRPC_StreamOrderbook_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamOrders", + Handler: _InjectiveSpotExchangeRPC_StreamOrders_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamTrades", + Handler: _InjectiveSpotExchangeRPC_StreamTrades_Handler, + ServerStreams: true, + }, + }, + Metadata: "injective_spot_exchange_rpc.proto", +}