Skip to content

Commit

Permalink
refactor(nibijs)!: inherit from StargateClient directly (#111)
Browse files Browse the repository at this point in the history
* refactor: use cosmjs extensions

* refactor: replace queryCmd with inherited StargateClient

* chore: re-generate docs

* fix: tests broken by change

* chore: remove unused file

* fix: use better operator for waiting for next block
  • Loading branch information
k-yang authored Mar 23, 2023
1 parent 5e91b24 commit 8dede40
Show file tree
Hide file tree
Showing 31 changed files with 383 additions and 1,051 deletions.
26 changes: 13 additions & 13 deletions packages/nibijs/docs/classes/CustomChain.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[NibiJS Documentation - v0.19.2](../intro.md) / [Exports](../modules.md) / CustomChain
[NibiJS Documentation - v0.19.5](../intro.md) / [Exports](../modules.md) / CustomChain

# Class: CustomChain

Expand Down Expand Up @@ -56,7 +56,7 @@ Chain

#### Defined in

[chain/chain.ts:55](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L55)
[chain/chain.ts:55](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L55)

## Properties

Expand All @@ -72,7 +72,7 @@ chainId: identifier for the chain

#### Defined in

[chain/chain.ts:47](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L47)
[chain/chain.ts:47](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L47)

___

Expand All @@ -82,7 +82,7 @@ ___

#### Defined in

[chain/chain.ts:48](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L48)
[chain/chain.ts:48](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L48)

___

Expand All @@ -96,7 +96,7 @@ ___

#### Defined in

[chain/chain.ts:53](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L53)
[chain/chain.ts:53](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L53)

___

Expand All @@ -112,7 +112,7 @@ endptGrpc: endpoint for the gRPC gateway. Usually on port 9090.

#### Defined in

[chain/chain.ts:51](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L51)
[chain/chain.ts:51](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L51)

___

Expand All @@ -128,7 +128,7 @@ endptRest: endpoint for the REST server. Also, the LCD endpoint.

#### Defined in

[chain/chain.ts:50](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L50)
[chain/chain.ts:50](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L50)

___

Expand All @@ -144,7 +144,7 @@ endptTm: endpoint for the Tendermint RPC server. Usually on port 26657.

#### Defined in

[chain/chain.ts:49](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L49)
[chain/chain.ts:49](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L49)

___

Expand All @@ -158,7 +158,7 @@ ___

#### Defined in

[chain/chain.ts:52](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L52)
[chain/chain.ts:52](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L52)

## Methods

Expand All @@ -172,7 +172,7 @@ ___

#### Defined in

[chain/chain.ts:80](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L80)
[chain/chain.ts:80](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L80)

___

Expand All @@ -186,7 +186,7 @@ ___

#### Defined in

[chain/chain.ts:75](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L75)
[chain/chain.ts:75](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L75)

___

Expand All @@ -200,7 +200,7 @@ ___

#### Defined in

[chain/chain.ts:70](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L70)
[chain/chain.ts:70](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L70)

___

Expand All @@ -220,4 +220,4 @@ ___

#### Defined in

[chain/chain.ts:63](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/chain/chain.ts#L63)
[chain/chain.ts:63](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/chain/chain.ts#L63)
12 changes: 6 additions & 6 deletions packages/nibijs/docs/classes/MsgFactory.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[NibiJS Documentation - v0.19.2](../intro.md) / [Exports](../modules.md) / MsgFactory
[NibiJS Documentation - v0.19.5](../intro.md) / [Exports](../modules.md) / MsgFactory

# Class: MsgFactory

Expand Down Expand Up @@ -30,7 +30,7 @@

#### Defined in

[msg/index.ts:8](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/msg/index.ts#L8)
[msg/index.ts:8](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/msg/index.ts#L8)

___

Expand All @@ -40,7 +40,7 @@ ___

#### Defined in

[msg/index.ts:16](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/msg/index.ts#L16)
[msg/index.ts:16](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/msg/index.ts#L16)

___

Expand All @@ -50,7 +50,7 @@ ___

#### Defined in

[msg/index.ts:12](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/msg/index.ts#L12)
[msg/index.ts:12](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/msg/index.ts#L12)

___

Expand All @@ -60,7 +60,7 @@ ___

#### Defined in

[msg/index.ts:10](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/msg/index.ts#L10)
[msg/index.ts:10](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/msg/index.ts#L10)

___

Expand All @@ -70,4 +70,4 @@ ___

#### Defined in

[msg/index.ts:14](https://github.com/NibiruChain/ts-sdk/blob/3ddfae4/packages/nibijs/src/msg/index.ts#L14)
[msg/index.ts:14](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/msg/index.ts#L14)
115 changes: 115 additions & 0 deletions packages/nibijs/docs/classes/NibiruQueryClient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[NibiJS Documentation - v0.19.5](../intro.md) / [Exports](../modules.md) / NibiruQueryClient

# Class: NibiruQueryClient

## Hierarchy

- `StargateClient`

**`NibiruQueryClient`**

## Table of contents

### Constructors

- [constructor](NibiruQueryClient.md#constructor)

### Properties

- [nibiruExtensions](NibiruQueryClient.md#nibiruextensions)

### Methods

- [waitForHeight](NibiruQueryClient.md#waitforheight)
- [waitForNextBlock](NibiruQueryClient.md#waitfornextblock)
- [connect](NibiruQueryClient.md#connect)

## Constructors

### constructor

`Protected` **new NibiruQueryClient**(`tmClient`, `options`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `tmClient` | `Tendermint34Client` |
| `options` | `StargateClientOptions` |

#### Overrides

StargateClient.constructor

#### Defined in

[query/query.ts:40](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/query/query.ts#L40)

## Properties

### nibiruExtensions

`Readonly` **nibiruExtensions**: [`NibiruExtensions`](../modules.md#nibiruextensions)

#### Defined in

[query/query.ts:30](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/query/query.ts#L30)

## Methods

### waitForHeight

**waitForHeight**(`height`): `Promise`<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `height` | `number` |

#### Returns

`Promise`<`void`\>

#### Defined in

[query/query.ts:55](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/query/query.ts#L55)

___

### waitForNextBlock

**waitForNextBlock**(): `Promise`<`void`\>

#### Returns

`Promise`<`void`\>

#### Defined in

[query/query.ts:63](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/query/query.ts#L63)

___

### connect

`Static` **connect**(`endpoint`, `options?`): `Promise`<[`NibiruQueryClient`](NibiruQueryClient.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `endpoint` | `string` |
| `options` | `StargateClientOptions` |

#### Returns

`Promise`<[`NibiruQueryClient`](NibiruQueryClient.md)\>

#### Overrides

StargateClient.connect

#### Defined in

[query/query.ts:32](https://github.com/NibiruChain/ts-sdk/blob/75477c4/packages/nibijs/src/query/query.ts#L32)
106 changes: 0 additions & 106 deletions packages/nibijs/docs/classes/QueryCmd.md

This file was deleted.

Loading

0 comments on commit 8dede40

Please sign in to comment.