Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protojs): add gRPC clients via connect-es #171

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions packages/protojs/src/nibiru/epochs/v1/query_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// @generated by protoc-gen-connect-es v0.10.1 with parameter "target=ts"
// @generated from file nibiru/epochs/v1/query.proto (package nibiru.epochs.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import {
QueryCurrentEpochRequest,
QueryCurrentEpochResponse,
QueryEpochsInfoRequest,
QueryEpochsInfoResponse,
} from "./query_pb.js"
import { MethodKind } from "@bufbuild/protobuf"

/**
* Query defines the gRPC querier service.
*
* @generated from service nibiru.epochs.v1.Query
*/
export const Query = {
typeName: "nibiru.epochs.v1.Query",
methods: {
/**
* EpochInfos provide running epochInfos
*
* @generated from rpc nibiru.epochs.v1.Query.EpochInfos
*/
epochInfos: {
name: "EpochInfos",
I: QueryEpochsInfoRequest,
O: QueryEpochsInfoResponse,
kind: MethodKind.Unary,
},
/**
* CurrentEpoch provide current epoch of specified identifier
*
* @generated from rpc nibiru.epochs.v1.Query.CurrentEpoch
*/
currentEpoch: {
name: "CurrentEpoch",
I: QueryCurrentEpochRequest,
O: QueryCurrentEpochResponse,
kind: MethodKind.Unary,
},
},
} as const
98 changes: 98 additions & 0 deletions packages/protojs/src/nibiru/inflation/v1/query_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// @generated by protoc-gen-connect-es v0.10.1 with parameter "target=ts"
// @generated from file nibiru/inflation/v1/query.proto (package nibiru.inflation.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import {
QueryCirculatingSupplyRequest,
QueryCirculatingSupplyResponse,
QueryEpochMintProvisionRequest,
QueryEpochMintProvisionResponse,
QueryInflationRateRequest,
QueryInflationRateResponse,
QueryParamsRequest,
QueryParamsResponse,
QueryPeriodRequest,
QueryPeriodResponse,
QuerySkippedEpochsRequest,
QuerySkippedEpochsResponse,
} from "./query_pb.js"
import { MethodKind } from "@bufbuild/protobuf"

/**
* Query provides defines the gRPC querier service.
*
* @generated from service nibiru.inflation.v1.Query
*/
export const Query = {
typeName: "nibiru.inflation.v1.Query",
methods: {
/**
* Period retrieves current period.
*
* @generated from rpc nibiru.inflation.v1.Query.Period
*/
period: {
name: "Period",
I: QueryPeriodRequest,
O: QueryPeriodResponse,
kind: MethodKind.Unary,
},
/**
* EpochMintProvision retrieves current minting epoch provision value.
*
* @generated from rpc nibiru.inflation.v1.Query.EpochMintProvision
*/
epochMintProvision: {
name: "EpochMintProvision",
I: QueryEpochMintProvisionRequest,
O: QueryEpochMintProvisionResponse,
kind: MethodKind.Unary,
},
/**
* SkippedEpochs retrieves the total number of skipped epochs.
*
* @generated from rpc nibiru.inflation.v1.Query.SkippedEpochs
*/
skippedEpochs: {
name: "SkippedEpochs",
I: QuerySkippedEpochsRequest,
O: QuerySkippedEpochsResponse,
kind: MethodKind.Unary,
},
/**
* CirculatingSupply retrieves the total number of tokens that are in
* circulation (i.e. excluding unvested tokens).
*
* @generated from rpc nibiru.inflation.v1.Query.CirculatingSupply
*/
circulatingSupply: {
name: "CirculatingSupply",
I: QueryCirculatingSupplyRequest,
O: QueryCirculatingSupplyResponse,
kind: MethodKind.Unary,
},
/**
* InflationRate retrieves the inflation rate of the current period.
*
* @generated from rpc nibiru.inflation.v1.Query.InflationRate
*/
inflationRate: {
name: "InflationRate",
I: QueryInflationRateRequest,
O: QueryInflationRateResponse,
kind: MethodKind.Unary,
},
/**
* Params retrieves the total set of minting parameters.
*
* @generated from rpc nibiru.inflation.v1.Query.Params
*/
params: {
name: "Params",
I: QueryParamsRequest,
O: QueryParamsResponse,
kind: MethodKind.Unary,
},
},
} as const
173 changes: 173 additions & 0 deletions packages/protojs/src/nibiru/oracle/v1/query_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
// @generated by protoc-gen-connect-es v0.10.1 with parameter "target=ts"
// @generated from file nibiru/oracle/v1/query.proto (package nibiru.oracle.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import {
QueryActivesRequest,
QueryActivesResponse,
QueryAggregatePrevoteRequest,
QueryAggregatePrevoteResponse,
QueryAggregatePrevotesRequest,
QueryAggregatePrevotesResponse,
QueryAggregateVoteRequest,
QueryAggregateVoteResponse,
QueryAggregateVotesRequest,
QueryAggregateVotesResponse,
QueryExchangeRateRequest,
QueryExchangeRateResponse,
QueryExchangeRatesRequest,
QueryExchangeRatesResponse,
QueryFeederDelegationRequest,
QueryFeederDelegationResponse,
QueryMissCounterRequest,
QueryMissCounterResponse,
QueryParamsRequest,
QueryParamsResponse,
QueryVoteTargetsRequest,
QueryVoteTargetsResponse,
} from "./query_pb.js"
import { MethodKind } from "@bufbuild/protobuf"

/**
* Query defines the gRPC querier service.
*
* @generated from service nibiru.oracle.v1.Query
*/
export const Query = {
typeName: "nibiru.oracle.v1.Query",
methods: {
/**
* ExchangeRate returns exchange rate of a pair
*
* @generated from rpc nibiru.oracle.v1.Query.ExchangeRate
*/
exchangeRate: {
name: "ExchangeRate",
I: QueryExchangeRateRequest,
O: QueryExchangeRateResponse,
kind: MethodKind.Unary,
},
/**
* ExchangeRateTwap returns twap exchange rate of a pair
*
* @generated from rpc nibiru.oracle.v1.Query.ExchangeRateTwap
*/
exchangeRateTwap: {
name: "ExchangeRateTwap",
I: QueryExchangeRateRequest,
O: QueryExchangeRateResponse,
kind: MethodKind.Unary,
},
/**
* ExchangeRates returns exchange rates of all pairs
*
* @generated from rpc nibiru.oracle.v1.Query.ExchangeRates
*/
exchangeRates: {
name: "ExchangeRates",
I: QueryExchangeRatesRequest,
O: QueryExchangeRatesResponse,
kind: MethodKind.Unary,
},
/**
* Actives returns all active pairs
*
* @generated from rpc nibiru.oracle.v1.Query.Actives
*/
actives: {
name: "Actives",
I: QueryActivesRequest,
O: QueryActivesResponse,
kind: MethodKind.Unary,
},
/**
* VoteTargets returns all vote target for pairs
*
* @generated from rpc nibiru.oracle.v1.Query.VoteTargets
*/
voteTargets: {
name: "VoteTargets",
I: QueryVoteTargetsRequest,
O: QueryVoteTargetsResponse,
kind: MethodKind.Unary,
},
/**
* FeederDelegation returns feeder delegation of a validator
*
* @generated from rpc nibiru.oracle.v1.Query.FeederDelegation
*/
feederDelegation: {
name: "FeederDelegation",
I: QueryFeederDelegationRequest,
O: QueryFeederDelegationResponse,
kind: MethodKind.Unary,
},
/**
* MissCounter returns oracle miss counter of a validator
*
* @generated from rpc nibiru.oracle.v1.Query.MissCounter
*/
missCounter: {
name: "MissCounter",
I: QueryMissCounterRequest,
O: QueryMissCounterResponse,
kind: MethodKind.Unary,
},
/**
* AggregatePrevote returns an aggregate prevote of a validator
*
* @generated from rpc nibiru.oracle.v1.Query.AggregatePrevote
*/
aggregatePrevote: {
name: "AggregatePrevote",
I: QueryAggregatePrevoteRequest,
O: QueryAggregatePrevoteResponse,
kind: MethodKind.Unary,
},
/**
* AggregatePrevotes returns aggregate prevotes of all validators
*
* @generated from rpc nibiru.oracle.v1.Query.AggregatePrevotes
*/
aggregatePrevotes: {
name: "AggregatePrevotes",
I: QueryAggregatePrevotesRequest,
O: QueryAggregatePrevotesResponse,
kind: MethodKind.Unary,
},
/**
* AggregateVote returns an aggregate vote of a validator
*
* @generated from rpc nibiru.oracle.v1.Query.AggregateVote
*/
aggregateVote: {
name: "AggregateVote",
I: QueryAggregateVoteRequest,
O: QueryAggregateVoteResponse,
kind: MethodKind.Unary,
},
/**
* AggregateVotes returns aggregate votes of all validators
*
* @generated from rpc nibiru.oracle.v1.Query.AggregateVotes
*/
aggregateVotes: {
name: "AggregateVotes",
I: QueryAggregateVotesRequest,
O: QueryAggregateVotesResponse,
kind: MethodKind.Unary,
},
/**
* Params queries all parameters.
*
* @generated from rpc nibiru.oracle.v1.Query.Params
*/
params: {
name: "Params",
I: QueryParamsRequest,
O: QueryParamsResponse,
kind: MethodKind.Unary,
},
},
} as const
62 changes: 62 additions & 0 deletions packages/protojs/src/nibiru/oracle/v1/tx_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// @generated by protoc-gen-connect-es v0.10.1 with parameter "target=ts"
// @generated from file nibiru/oracle/v1/tx.proto (package nibiru.oracle.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import {
MsgAggregateExchangeRatePrevote,
MsgAggregateExchangeRatePrevoteResponse,
MsgAggregateExchangeRateVote,
MsgAggregateExchangeRateVoteResponse,
MsgDelegateFeedConsent,
MsgDelegateFeedConsentResponse,
} from "./tx_pb.js"
import { MethodKind } from "@bufbuild/protobuf"

/**
* Msg defines the oracle Msg service.
*
* @generated from service nibiru.oracle.v1.Msg
*/
export const Msg = {
typeName: "nibiru.oracle.v1.Msg",
methods: {
/**
* AggregateExchangeRatePrevote defines a method for submitting
* aggregate exchange rate prevote
*
* @generated from rpc nibiru.oracle.v1.Msg.AggregateExchangeRatePrevote
*/
aggregateExchangeRatePrevote: {
name: "AggregateExchangeRatePrevote",
I: MsgAggregateExchangeRatePrevote,
O: MsgAggregateExchangeRatePrevoteResponse,
kind: MethodKind.Unary,
},
/**
* AggregateExchangeRateVote defines a method for submitting
* aggregate exchange rate vote
*
* @generated from rpc nibiru.oracle.v1.Msg.AggregateExchangeRateVote
*/
aggregateExchangeRateVote: {
name: "AggregateExchangeRateVote",
I: MsgAggregateExchangeRateVote,
O: MsgAggregateExchangeRateVoteResponse,
kind: MethodKind.Unary,
},
/**
* DelegateFeedConsent defines a method for delegating oracle voting rights
* to another address known as a price feeder.
* See https://github.com/NibiruChain/pricefeeder.
*
* @generated from rpc nibiru.oracle.v1.Msg.DelegateFeedConsent
*/
delegateFeedConsent: {
name: "DelegateFeedConsent",
I: MsgDelegateFeedConsent,
O: MsgDelegateFeedConsentResponse,
kind: MethodKind.Unary,
},
},
} as const
Loading