injective_insurance_rpcpb

package
v0.0.0-...-3792732 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package injective_insurance_rpcpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_injective_insurance_rpc_proto protoreflect.FileDescriptor
View Source
var InjectiveInsuranceRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "injective_insurance_rpc.InjectiveInsuranceRPC",
	HandlerType: (*InjectiveInsuranceRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Funds",
			Handler:    _InjectiveInsuranceRPC_Funds_Handler,
		},
		{
			MethodName: "Redemptions",
			Handler:    _InjectiveInsuranceRPC_Redemptions_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "injective_insurance_rpc.proto",
}

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

Functions

func RegisterInjectiveInsuranceRPCHandler

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

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

func RegisterInjectiveInsuranceRPCHandlerClient

func RegisterInjectiveInsuranceRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InjectiveInsuranceRPCClient) error

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

func RegisterInjectiveInsuranceRPCHandlerFromEndpoint

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

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

func RegisterInjectiveInsuranceRPCHandlerServer

func RegisterInjectiveInsuranceRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InjectiveInsuranceRPCServer) error

RegisterInjectiveInsuranceRPCHandlerServer registers the http handlers for service InjectiveInsuranceRPC to "mux". UnaryRPC :call InjectiveInsuranceRPCServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInjectiveInsuranceRPCHandlerFromEndpoint instead.

func RegisterInjectiveInsuranceRPCServer

func RegisterInjectiveInsuranceRPCServer(s grpc.ServiceRegistrar, srv InjectiveInsuranceRPCServer)

Types

type FundsRequest

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

func (*FundsRequest) Descriptor deprecated

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

Deprecated: Use FundsRequest.ProtoReflect.Descriptor instead.

func (*FundsRequest) ProtoMessage

func (*FundsRequest) ProtoMessage()

func (*FundsRequest) ProtoReflect

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

func (*FundsRequest) Reset

func (x *FundsRequest) Reset()

func (*FundsRequest) String

func (x *FundsRequest) String() string

type FundsResponse

type FundsResponse struct {
	Funds []*InsuranceFund `protobuf:"bytes,1,rep,name=funds,proto3" json:"funds,omitempty"`
	// contains filtered or unexported fields
}

func (*FundsResponse) Descriptor deprecated

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

Deprecated: Use FundsResponse.ProtoReflect.Descriptor instead.

func (*FundsResponse) GetFunds

func (x *FundsResponse) GetFunds() []*InsuranceFund

func (*FundsResponse) ProtoMessage

func (*FundsResponse) ProtoMessage()

func (*FundsResponse) ProtoReflect

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

func (*FundsResponse) Reset

func (x *FundsResponse) Reset()

func (*FundsResponse) String

func (x *FundsResponse) String() string

type InjectiveInsuranceRPCClient

type InjectiveInsuranceRPCClient interface {
	// Funds lists all insurance funds.
	Funds(ctx context.Context, in *FundsRequest, opts ...grpc.CallOption) (*FundsResponse, error)
	// PendingRedemptions lists all pending redemptions according to a filter
	Redemptions(ctx context.Context, in *RedemptionsRequest, opts ...grpc.CallOption) (*RedemptionsResponse, error)
}

InjectiveInsuranceRPCClient is the client API for InjectiveInsuranceRPC 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 InjectiveInsuranceRPCServer

type InjectiveInsuranceRPCServer interface {
	// Funds lists all insurance funds.
	Funds(context.Context, *FundsRequest) (*FundsResponse, error)
	// PendingRedemptions lists all pending redemptions according to a filter
	Redemptions(context.Context, *RedemptionsRequest) (*RedemptionsResponse, error)
	// contains filtered or unexported methods
}

InjectiveInsuranceRPCServer is the server API for InjectiveInsuranceRPC service. All implementations must embed UnimplementedInjectiveInsuranceRPCServer for forward compatibility

type InsuranceFund

type InsuranceFund struct {

	// Ticker of the derivative market.
	MarketTicker string `protobuf:"bytes,1,opt,name=market_ticker,json=marketTicker,proto3" json:"market_ticker,omitempty"`
	// Derivative Market ID
	MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	// Coin denom used for the underwriting of the insurance fund.
	DepositDenom string `protobuf:"bytes,3,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"`
	// Pool token denom
	PoolTokenDenom string `protobuf:"bytes,4,opt,name=pool_token_denom,json=poolTokenDenom,proto3" json:"pool_token_denom,omitempty"`
	// Redemption notice period duration in seconds.
	RedemptionNoticePeriodDuration int64  `` /* 158-byte string literal not displayed */
	Balance                        string `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance,omitempty"`
	TotalShare                     string `protobuf:"bytes,7,opt,name=total_share,json=totalShare,proto3" json:"total_share,omitempty"`
	// Oracle base currency
	OracleBase string `protobuf:"bytes,8,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"`
	// Oracle quote currency
	OracleQuote string `protobuf:"bytes,9,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"`
	// Oracle Type
	OracleType string `protobuf:"bytes,10,opt,name=oracle_type,json=oracleType,proto3" json:"oracle_type,omitempty"`
	// Defines the expiry, if any
	Expiry int64 `protobuf:"zigzag64,11,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// Token metadata for the deposit asset, only for Ethereum-based assets
	DepositTokenMeta *TokenMeta `protobuf:"bytes,12,opt,name=deposit_token_meta,json=depositTokenMeta,proto3" json:"deposit_token_meta,omitempty"`
	// contains filtered or unexported fields
}

func (*InsuranceFund) Descriptor deprecated

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

Deprecated: Use InsuranceFund.ProtoReflect.Descriptor instead.

func (*InsuranceFund) GetBalance

func (x *InsuranceFund) GetBalance() string

func (*InsuranceFund) GetDepositDenom

func (x *InsuranceFund) GetDepositDenom() string

func (*InsuranceFund) GetDepositTokenMeta

func (x *InsuranceFund) GetDepositTokenMeta() *TokenMeta

func (*InsuranceFund) GetExpiry

func (x *InsuranceFund) GetExpiry() int64

func (*InsuranceFund) GetMarketId

func (x *InsuranceFund) GetMarketId() string

func (*InsuranceFund) GetMarketTicker

func (x *InsuranceFund) GetMarketTicker() string

func (*InsuranceFund) GetOracleBase

func (x *InsuranceFund) GetOracleBase() string

func (*InsuranceFund) GetOracleQuote

func (x *InsuranceFund) GetOracleQuote() string

func (*InsuranceFund) GetOracleType

func (x *InsuranceFund) GetOracleType() string

func (*InsuranceFund) GetPoolTokenDenom

func (x *InsuranceFund) GetPoolTokenDenom() string

func (*InsuranceFund) GetRedemptionNoticePeriodDuration

func (x *InsuranceFund) GetRedemptionNoticePeriodDuration() int64

func (*InsuranceFund) GetTotalShare

func (x *InsuranceFund) GetTotalShare() string

func (*InsuranceFund) ProtoMessage

func (*InsuranceFund) ProtoMessage()

func (*InsuranceFund) ProtoReflect

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

func (*InsuranceFund) Reset

func (x *InsuranceFund) Reset()

func (*InsuranceFund) String

func (x *InsuranceFund) String() string

type RedemptionSchedule

type RedemptionSchedule struct {

	// Redemption ID.
	RedemptionId uint64 `protobuf:"varint,1,opt,name=redemption_id,json=redemptionId,proto3" json:"redemption_id,omitempty"`
	// Status of the redemption. Either pending or disbursed.
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// Account address of the redemption owner
	Redeemer string `protobuf:"bytes,3,opt,name=redeemer,proto3" json:"redeemer,omitempty"`
	// Claimable redemption time in seconds
	ClaimableRedemptionTime int64 `` /* 135-byte string literal not displayed */
	// Amount of pool tokens being redeemed.
	RedemptionAmount string `protobuf:"bytes,5,opt,name=redemption_amount,json=redemptionAmount,proto3" json:"redemption_amount,omitempty"`
	// Pool token denom being redeemed.
	RedemptionDenom string `protobuf:"bytes,6,opt,name=redemption_denom,json=redemptionDenom,proto3" json:"redemption_denom,omitempty"`
	// Redemption request time in unix milliseconds.
	RequestedAt int64 `protobuf:"zigzag64,7,opt,name=requested_at,json=requestedAt,proto3" json:"requested_at,omitempty"`
	// Amount of quote tokens disbursed
	DisbursedAmount string `protobuf:"bytes,8,opt,name=disbursed_amount,json=disbursedAmount,proto3" json:"disbursed_amount,omitempty"`
	// Denom of the quote tokens disbursed
	DisbursedDenom string `protobuf:"bytes,9,opt,name=disbursed_denom,json=disbursedDenom,proto3" json:"disbursed_denom,omitempty"`
	// Redemption disbursement time in unix milliseconds.
	DisbursedAt int64 `protobuf:"zigzag64,10,opt,name=disbursed_at,json=disbursedAt,proto3" json:"disbursed_at,omitempty"`
	// contains filtered or unexported fields
}

func (*RedemptionSchedule) Descriptor deprecated

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

Deprecated: Use RedemptionSchedule.ProtoReflect.Descriptor instead.

func (*RedemptionSchedule) GetClaimableRedemptionTime

func (x *RedemptionSchedule) GetClaimableRedemptionTime() int64

func (*RedemptionSchedule) GetDisbursedAmount

func (x *RedemptionSchedule) GetDisbursedAmount() string

func (*RedemptionSchedule) GetDisbursedAt

func (x *RedemptionSchedule) GetDisbursedAt() int64

func (*RedemptionSchedule) GetDisbursedDenom

func (x *RedemptionSchedule) GetDisbursedDenom() string

func (*RedemptionSchedule) GetRedeemer

func (x *RedemptionSchedule) GetRedeemer() string

func (*RedemptionSchedule) GetRedemptionAmount

func (x *RedemptionSchedule) GetRedemptionAmount() string

func (*RedemptionSchedule) GetRedemptionDenom

func (x *RedemptionSchedule) GetRedemptionDenom() string

func (*RedemptionSchedule) GetRedemptionId

func (x *RedemptionSchedule) GetRedemptionId() uint64

func (*RedemptionSchedule) GetRequestedAt

func (x *RedemptionSchedule) GetRequestedAt() int64

func (*RedemptionSchedule) GetStatus

func (x *RedemptionSchedule) GetStatus() string

func (*RedemptionSchedule) ProtoMessage

func (*RedemptionSchedule) ProtoMessage()

func (*RedemptionSchedule) ProtoReflect

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

func (*RedemptionSchedule) Reset

func (x *RedemptionSchedule) Reset()

func (*RedemptionSchedule) String

func (x *RedemptionSchedule) String() string

type RedemptionsRequest

type RedemptionsRequest struct {

	// Account address of the redemption owner
	Redeemer string `protobuf:"bytes,1,opt,name=redeemer,proto3" json:"redeemer,omitempty"`
	// Denom of the insurance pool token.
	RedemptionDenom string `protobuf:"bytes,2,opt,name=redemption_denom,json=redemptionDenom,proto3" json:"redemption_denom,omitempty"`
	// Status of the redemption. Either pending or disbursed.
	Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*RedemptionsRequest) Descriptor deprecated

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

Deprecated: Use RedemptionsRequest.ProtoReflect.Descriptor instead.

func (*RedemptionsRequest) GetRedeemer

func (x *RedemptionsRequest) GetRedeemer() string

func (*RedemptionsRequest) GetRedemptionDenom

func (x *RedemptionsRequest) GetRedemptionDenom() string

func (*RedemptionsRequest) GetStatus

func (x *RedemptionsRequest) GetStatus() string

func (*RedemptionsRequest) ProtoMessage

func (*RedemptionsRequest) ProtoMessage()

func (*RedemptionsRequest) ProtoReflect

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

func (*RedemptionsRequest) Reset

func (x *RedemptionsRequest) Reset()

func (*RedemptionsRequest) String

func (x *RedemptionsRequest) String() string

type RedemptionsResponse

type RedemptionsResponse struct {
	RedemptionSchedules []*RedemptionSchedule `protobuf:"bytes,1,rep,name=redemption_schedules,json=redemptionSchedules,proto3" json:"redemption_schedules,omitempty"`
	// contains filtered or unexported fields
}

func (*RedemptionsResponse) Descriptor deprecated

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

Deprecated: Use RedemptionsResponse.ProtoReflect.Descriptor instead.

func (*RedemptionsResponse) GetRedemptionSchedules

func (x *RedemptionsResponse) GetRedemptionSchedules() []*RedemptionSchedule

func (*RedemptionsResponse) ProtoMessage

func (*RedemptionsResponse) ProtoMessage()

func (*RedemptionsResponse) ProtoReflect

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

func (*RedemptionsResponse) Reset

func (x *RedemptionsResponse) Reset()

func (*RedemptionsResponse) String

func (x *RedemptionsResponse) String() string

type TokenMeta

type TokenMeta struct {

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

func (*TokenMeta) Descriptor deprecated

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

Deprecated: Use TokenMeta.ProtoReflect.Descriptor instead.

func (*TokenMeta) GetAddress

func (x *TokenMeta) GetAddress() string

func (*TokenMeta) GetDecimals

func (x *TokenMeta) GetDecimals() int32
func (x *TokenMeta) GetLogo() string

func (*TokenMeta) GetName

func (x *TokenMeta) GetName() string

func (*TokenMeta) GetSymbol

func (x *TokenMeta) GetSymbol() string

func (*TokenMeta) GetUpdatedAt

func (x *TokenMeta) GetUpdatedAt() int64

func (*TokenMeta) ProtoMessage

func (*TokenMeta) ProtoMessage()

func (*TokenMeta) ProtoReflect

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

func (*TokenMeta) Reset

func (x *TokenMeta) Reset()

func (*TokenMeta) String

func (x *TokenMeta) String() string

type UnimplementedInjectiveInsuranceRPCServer

type UnimplementedInjectiveInsuranceRPCServer struct {
}

UnimplementedInjectiveInsuranceRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedInjectiveInsuranceRPCServer) Funds

func (UnimplementedInjectiveInsuranceRPCServer) Redemptions

type UnsafeInjectiveInsuranceRPCServer

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

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

Jump to

Keyboard shortcuts

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