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: eth protos #366

Merged
merged 13 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
permissions:
contents: write
issues: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-ts-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
env:
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
VALIDATOR_ADDRESS: ${{ secrets.VALIDATOR_ADDRESS }}
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
LCD_ENDPOINT: "http://127.0.0.1:1317"
GRPC_ENDPOINT: "127.0.0.1:9090"
TENDERMINT_RPC_ENDPOINT: "http://127.0.0.1:26657"
Expand Down
93 changes: 0 additions & 93 deletions QUERIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,99 +135,6 @@ liquidations(
limit: Int): [Liquidations]
```

## markPriceCandles

TODO docs

```graphql
markPriceCandles(
where: MarkPriceCandlesFilter
order: MarkPriceCandlesOrder
orderDesc: Boolean
limit: Int): [MarkPriceCandles]
```

#### In English

- The above code block means that there is a query function called `markPriceCandles` with four arguments, `where`, `order`, `orderDesc`, and `limit`, that returns `[MarkPriceCandles]`.
- The `[MarkPriceCandles]` type means that "list of `MarkPriceCandles` objects".

#### `MarkPriceCandles`

```graphql
type MarkPriceCandles {
pair: String
open: Int
close: Int
low: Int
high: Int
period: Float
periodStartTs: DateTime
}
```

ANKI `Boolean` in GraphQL means `true` or `false`.

The `where` parameter has options for filtering based on conditions for each field. The filter condition must match the type of the corresponding field. Examples include:

```graphql
where: { pairEq: "ubtc:unusd" }
where: { lowGt: 100 }
where: { periodStartTsLt: "2023-02-22" }
```

Every field, e.g. `pair`, `open`, `close`, `period`, has filter options. In the case of `MarkPriceCandles`, every field has methods for:

- `=` : `Eq` : equals
- `>` : `Gt` : greater than
- `<` : `Lt` : less than
- `>=` : `Gte` : greater than or equal
- `<=` : `Lte` : less than or equal

Except, `pair`, which only has the `pairEq` method.

### `order: MarkPriceCandlesOrder`

```graphql
markPriceCandles(
where: MarkPriceCandlesFilter
order: MarkPriceCandlesOrder
orderDesc: Boolean
limit: Int): [MarkPriceCandles]
```

```graphql
type MarkPriceCandlesOrder {
pair
open
close
low
high
period
period_start_ts
}
```

This means we can use one of these values with the `order` argument in the query like follows:

```graphql
order: pair
order: close
order: period_start_ts
```

## markPrices

TODO docs

```graphql
markPrices(
where: MarkPricesFilter
order: MarkPricesOrder
orderDesc: Boolean
limit: Int): [MarkPrices]
```

## oraclePrices

TODO docs
Expand Down
2 changes: 1 addition & 1 deletion nibiru
Submodule nibiru updated 159 files
Loading
Loading