diff --git a/packages/nibijs/docs/classes/CustomChain.md b/packages/nibijs/docs/classes/CustomChain.md index 04ac12ad..6808b9d9 100644 --- a/packages/nibijs/docs/classes/CustomChain.md +++ b/packages/nibijs/docs/classes/CustomChain.md @@ -48,8 +48,8 @@ export const chain = new CustomChain({ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :---------------------------------------------- | | `chainIdParts` | [`ChainIdParts`](../interfaces/ChainIdParts.md) | #### Defined in @@ -72,7 +72,7 @@ chainId: identifier for the chain [chain/chain.ts:57](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L57) -___ +--- ### chainIdParts @@ -82,7 +82,7 @@ ___ [chain/chain.ts:64](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L64) -___ +--- ### chainName @@ -98,7 +98,7 @@ chainName: the name of the chain to display to the user [chain/chain.ts:58](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L58) -___ +--- ### endptGrpc @@ -114,7 +114,7 @@ endptGrpc: endpoint for the gRPC gateway. Usually on port 9090. [chain/chain.ts:61](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L61) -___ +--- ### endptRest @@ -130,7 +130,7 @@ endptRest: endpoint for the REST server. Also, the LCD endpoint. [chain/chain.ts:60](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L60) -___ +--- ### endptTm @@ -146,11 +146,11 @@ endptTm: endpoint for the Tendermint RPC server. Usually on port 26657. [chain/chain.ts:59](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L59) -___ +--- ### feeDenom -• `Readonly` **feeDenom**: ``"unibi"`` +• `Readonly` **feeDenom**: `"unibi"` feeDenom: the denomination of the fee to be paid for transactions. @@ -176,7 +176,7 @@ feeDenom: the denomination of the fee to be paid for transactions. [chain/chain.ts:90](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L90) -___ +--- ### fromChainId @@ -184,8 +184,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :-------- | :------- | | `chainId` | `string` | #### Returns diff --git a/packages/nibijs/docs/classes/MsgFactory.md b/packages/nibijs/docs/classes/MsgFactory.md index 5d141c48..a726b08c 100644 --- a/packages/nibijs/docs/classes/MsgFactory.md +++ b/packages/nibijs/docs/classes/MsgFactory.md @@ -29,7 +29,7 @@ [msg/index.ts:6](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/index.ts#L6) -___ +--- ### spot diff --git a/packages/nibijs/docs/classes/NibiruQuerier.md b/packages/nibijs/docs/classes/NibiruQuerier.md index 74929de2..c3077733 100644 --- a/packages/nibijs/docs/classes/NibiruQuerier.md +++ b/packages/nibijs/docs/classes/NibiruQuerier.md @@ -46,11 +46,11 @@ const querier = await NibiruQuerier.connect(chain.endptTm) #### Parameters -| Name | Type | -| :------ | :------ | -| `tmClient` | `Tendermint37Client` | -| `options` | `StargateClientOptions` | -| `wasmClient` | `CosmWasmClient` | +| Name | Type | +| :----------- | :---------------------- | +| `tmClient` | `Tendermint37Client` | +| `options` | `StargateClientOptions` | +| `wasmClient` | `CosmWasmClient` | #### Overrides @@ -70,7 +70,7 @@ StargateClient.constructor [query/query.ts:53](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L53) -___ +--- ### tm @@ -80,7 +80,7 @@ ___ [query/query.ts:55](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L55) -___ +--- ### wasmClient @@ -100,6 +100,7 @@ getTxByHash: Query a transaction (tx) using its hexadecial encoded tx hash. A tx hash uniquely identifies a tx on the blockchain. The hex-encoded tx hash is: + - An unambiguous representation of the SHA-256 cryptographic hash in the consensus layer. - Well-suited for human-facing applications, as it is easier to work with @@ -107,8 +108,8 @@ The hex-encoded tx hash is: #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---------- | :------- | | `txHashHex` | `string` | #### Returns @@ -118,7 +119,8 @@ The hex-encoded tx hash is: **`Example`** ```ts -const txHash = "7A919F2CC9A51B139444F7D8E84A46EEF307E839C6CA914C1A1C594FEF5C1562" +const txHash = + "7A919F2CC9A51B139444F7D8E84A46EEF307E839C6CA914C1A1C594FEF5C1562" const txRespResult = await getTxByHash(txHash) ``` @@ -126,7 +128,7 @@ const txRespResult = await getTxByHash(txHash) [query/query.ts:122](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L122) -___ +--- ### getTxByHashBytes @@ -137,8 +139,8 @@ A tx hash uniquely identifies a tx on the blockchain. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :----------- | | `txHash` | `Uint8Array` | #### Returns @@ -153,7 +155,7 @@ getTxByHash - Equivalent query using the hex-encoded tx hash string. [query/query.ts:136](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L136) -___ +--- ### waitForHeight @@ -161,8 +163,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :------- | | `height` | `number` | #### Returns @@ -173,7 +175,7 @@ ___ [query/query.ts:92](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L92) -___ +--- ### waitForNextBlock @@ -187,7 +189,7 @@ ___ [query/query.ts:100](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/query.ts#L100) -___ +--- ### connect @@ -195,10 +197,10 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | -| `endpoint` | `string` | -| `options` | `StargateClientOptions` | +| Name | Type | +| :--------- | :---------------------- | +| `endpoint` | `string` | +| `options` | `StargateClientOptions` | #### Returns diff --git a/packages/nibijs/docs/classes/NibiruTxClient.md b/packages/nibijs/docs/classes/NibiruTxClient.md index c014bb49..fce67952 100644 --- a/packages/nibijs/docs/classes/NibiruTxClient.md +++ b/packages/nibijs/docs/classes/NibiruTxClient.md @@ -33,12 +33,12 @@ #### Parameters -| Name | Type | -| :------ | :------ | -| `tmClient` | `Tendermint37Client` | -| `signer` | `OfflineSigner` | -| `options` | `SigningStargateClientOptions` | -| `wasm` | `SigningCosmWasmClient` | +| Name | Type | +| :--------- | :----------------------------- | +| `tmClient` | `Tendermint37Client` | +| `signer` | `OfflineSigner` | +| `options` | `SigningStargateClientOptions` | +| `wasm` | `SigningCosmWasmClient` | #### Overrides @@ -58,7 +58,7 @@ SigningStargateClient.constructor [tx/txClient.ts:38](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/txClient.ts#L38) -___ +--- ### wasmClient @@ -76,8 +76,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :------- | | `height` | `number` | #### Returns @@ -88,7 +88,7 @@ ___ [tx/txClient.ts:94](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/txClient.ts#L94) -___ +--- ### waitForNextBlock @@ -102,7 +102,7 @@ ___ [tx/txClient.ts:102](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/txClient.ts#L102) -___ +--- ### connectWithSigner @@ -110,11 +110,11 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | -| `endpoint` | `string` | -| `signer` | `OfflineSigner` | -| `options` | `SigningStargateClientOptions` | +| Name | Type | +| :------------ | :----------------------------- | +| `endpoint` | `string` | +| `signer` | `OfflineSigner` | +| `options` | `SigningStargateClientOptions` | | `wasmOptions` | `SigningCosmWasmClientOptions` | #### Returns diff --git a/packages/nibijs/docs/classes/PerpMsgFactory.md b/packages/nibijs/docs/classes/PerpMsgFactory.md index 07453c34..9b174e2b 100644 --- a/packages/nibijs/docs/classes/PerpMsgFactory.md +++ b/packages/nibijs/docs/classes/PerpMsgFactory.md @@ -41,8 +41,8 @@ Returns a 'TxMessage' for adding margin to a position #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :---- | :------------- | :-------------------- | | `msg` | `MsgAddMargin` | Message to add margin | #### Returns @@ -57,7 +57,7 @@ Returns a 'TxMessage' for adding margin to a position [msg/perp.ts:124](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L124) -___ +--- ### closePosition @@ -65,8 +65,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :----------------- | | `msg` | `MsgClosePosition` | #### Returns @@ -77,7 +77,7 @@ ___ [msg/perp.ts:161](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L161) -___ +--- ### donateToPerpEF @@ -85,8 +85,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :------------------------- | | `msg` | `MsgDonateToEcosystemFund` | #### Returns @@ -97,7 +97,7 @@ ___ [msg/perp.ts:175](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L175) -___ +--- ### liquidate @@ -105,8 +105,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :------------------ | | `msg` | `MsgMultiLiquidate` | #### Returns @@ -117,7 +117,7 @@ ___ [msg/perp.ts:131](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L131) -___ +--- ### openPosition @@ -125,15 +125,15 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | -| `msg` | `Object` | -| `msg.baseAssetAmountLimit?` | `number` | -| `msg.goLong` | `boolean` | -| `msg.leverage` | `number` | -| `msg.pair` | `string` | -| `msg.quoteAssetAmount` | `number` | -| `msg.sender` | `string` | +| Name | Type | +| :-------------------------- | :-------- | +| `msg` | `Object` | +| `msg.baseAssetAmountLimit?` | `number` | +| `msg.goLong` | `boolean` | +| `msg.leverage` | `number` | +| `msg.pair` | `string` | +| `msg.quoteAssetAmount` | `number` | +| `msg.sender` | `string` | #### Returns @@ -143,7 +143,7 @@ ___ [msg/perp.ts:138](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L138) -___ +--- ### partialClosePosition @@ -151,8 +151,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :---------------- | | `msg` | `MsgPartialClose` | #### Returns @@ -163,7 +163,7 @@ ___ [msg/perp.ts:168](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L168) -___ +--- ### removeMargin @@ -171,8 +171,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :---------------- | | `msg` | `MsgRemoveMargin` | #### Returns diff --git a/packages/nibijs/docs/classes/Result.md b/packages/nibijs/docs/classes/Result.md index b516a785..555c678e 100644 --- a/packages/nibijs/docs/classes/Result.md +++ b/packages/nibijs/docs/classes/Result.md @@ -39,8 +39,8 @@ if (res.isOk()) { ## Type parameters | Name | -| :------ | -| `T` | +| :--- | +| `T` | ## Table of contents @@ -69,16 +69,16 @@ if (res.isOk()) { #### Type parameters | Name | -| :------ | -| `T` | +| :--- | +| `T` | #### Parameters -| Name | Type | -| :------ | :------ | -| `«destructured»` | `Object` | -| › `err?` | `unknown` | -| › `ok?` | `T` | +| Name | Type | +| :--------------- | :-------- | +| `«destructured»` | `Object` | +| › `err?` | `unknown` | +| › `ok?` | `T` | #### Defined in @@ -94,7 +94,7 @@ if (res.isOk()) { [result.ts:32](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/result.ts#L32) -___ +--- ### ok @@ -118,7 +118,7 @@ ___ [result.ts:44](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/result.ts#L44) -___ +--- ### isOk @@ -132,7 +132,7 @@ ___ [result.ts:45](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/result.ts#L45) -___ +--- ### ofSafeExec @@ -143,13 +143,13 @@ Constructor for "Result" using the return value of the input function. #### Type parameters | Name | -| :------ | -| `Y` | +| :--- | +| `Y` | #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--- | :-------------------------- | | `fn` | (...`args`: `any`[]) => `Y` | #### Returns @@ -160,7 +160,7 @@ Constructor for "Result" using the return value of the input function. [result.ts:48](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/result.ts#L48) -___ +--- ### ofSafeExecAsync @@ -171,13 +171,13 @@ Constructor for "Result" using the return value of the input async function. #### Type parameters | Name | -| :------ | -| `Y` | +| :--- | +| `Y` | #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--- | :-------------------- | | `fn` | () => `Promise`<`Y`\> | #### Returns diff --git a/packages/nibijs/docs/classes/SpotMsgFactory.md b/packages/nibijs/docs/classes/SpotMsgFactory.md index e283ea79..5916e35c 100644 --- a/packages/nibijs/docs/classes/SpotMsgFactory.md +++ b/packages/nibijs/docs/classes/SpotMsgFactory.md @@ -29,8 +29,8 @@ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :-------------- | | `msg` | `MsgCreatePool` | #### Returns @@ -41,7 +41,7 @@ [msg/spot.ts:61](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L61) -___ +--- ### exitPool @@ -49,8 +49,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--------------- | :------------ | | `«destructured»` | `MsgExitPool` | #### Returns @@ -61,7 +61,7 @@ ___ [msg/spot.ts:91](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L91) -___ +--- ### joinPool @@ -69,8 +69,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--------------- | :------------ | | `«destructured»` | `MsgJoinPool` | #### Returns @@ -81,7 +81,7 @@ ___ [msg/spot.ts:74](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L74) -___ +--- ### swapAssets @@ -89,8 +89,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--------------- | :-------------- | | `«destructured»` | `MsgSwapAssets` | #### Returns diff --git a/packages/nibijs/docs/classes/StableSwap.md b/packages/nibijs/docs/classes/StableSwap.md index 4cd86952..bd97042e 100644 --- a/packages/nibijs/docs/classes/StableSwap.md +++ b/packages/nibijs/docs/classes/StableSwap.md @@ -46,11 +46,11 @@ Constructor: #### Parameters -| Name | Type | -| :------ | :------ | -| `Amplification` | `BigNumber` | +| Name | Type | +| :----------------- | :------------ | +| `Amplification` | `BigNumber` | | `totalTokenSupply` | `BigNumber`[] | -| `fee` | `BigNumber` | +| `fee` | `BigNumber` | #### Defined in @@ -66,7 +66,7 @@ Constructor: [stableswap/stableswap.ts:20](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L20) -___ +--- ### fee @@ -76,7 +76,7 @@ ___ [stableswap/stableswap.ts:23](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L23) -___ +--- ### totalTokenSupply @@ -86,7 +86,7 @@ ___ [stableswap/stableswap.ts:21](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L21) -___ +--- ### totalTokensInPool @@ -105,7 +105,7 @@ ___ D() D invariant calculation in non-overflowing integer operations iteratively -A * sum(x_i) * n**n + D = A * D * n**n + D**(n+1) / (n**n * prod(x_i)) +A _ sum(x_i) _ n**n + D = A _ D _ n**n + D**(n+1) / (n**n \* prod(x_i)) #### Returns @@ -119,7 +119,7 @@ StableSwap [stableswap/stableswap.ts:54](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L54) -___ +--- ### exchange @@ -129,11 +129,11 @@ exchange() runs a theorhetical Curve StableSwap model to determine impact on tok #### Parameters -| Name | Type | -| :------ | :------ | -| `fromIndex` | `number` | -| `toIndex` | `number` | -| `dx` | `BigNumber` | +| Name | Type | +| :---------- | :---------- | +| `fromIndex` | `number` | +| `toIndex` | `number` | +| `dx` | `BigNumber` | #### Returns @@ -147,7 +147,7 @@ StableSwap [stableswap/stableswap.ts:143](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L143) -___ +--- ### xp @@ -167,7 +167,7 @@ StableSwap [stableswap/stableswap.ts:41](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/stableswap/stableswap.ts#L41) -___ +--- ### y @@ -178,18 +178,18 @@ y() Calculate x[j] if one makes x[i] = x Done by solving quadratic equation iteratively. - x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n+1)/(n ** (2 * n) * prod' * A) - x_1**2 + b*x_1 = c +x_1**2 + x1 * (sum' - (A*n**n - 1) _ D / (A _ n**n)) = D ** (n+1)/(n ** (2 _ n) _ prod' \* A) +x_1**2 + b\*x_1 = c - x_1 = (x_1**2 + c) / (2*x_1 + b) +x_1 = (x_1\**2 + c) / (2*x_1 + b) #### Parameters -| Name | Type | -| :------ | :------ | -| `fromIndex` | `number` | -| `toIndex` | `number` | -| `x` | `BigNumber` | +| Name | Type | +| :---------- | :---------- | +| `fromIndex` | `number` | +| `toIndex` | `number` | +| `x` | `BigNumber` | #### Returns diff --git a/packages/nibijs/docs/enums/BECH32_PREFIX.md b/packages/nibijs/docs/enums/BECH32_PREFIX.md index 9ad7d357..721e0162 100644 --- a/packages/nibijs/docs/enums/BECH32_PREFIX.md +++ b/packages/nibijs/docs/enums/BECH32_PREFIX.md @@ -1,23 +1,23 @@ -[NibiJS Documentation - v0.21.43](../intro.md) / [Exports](../modules.md) / BECH32\_PREFIX +[NibiJS Documentation - v0.21.43](../intro.md) / [Exports](../modules.md) / BECH32_PREFIX -# Enumeration: BECH32\_PREFIX +# Enumeration: BECH32_PREFIX ## Table of contents ### Enumeration Members - [ADDR](BECH32_PREFIX.md#addr) -- [ADDR\_VAL](BECH32_PREFIX.md#addr_val) -- [ADDR\_VALCONS](BECH32_PREFIX.md#addr_valcons) +- [ADDR_VAL](BECH32_PREFIX.md#addr_val) +- [ADDR_VALCONS](BECH32_PREFIX.md#addr_valcons) - [PUB](BECH32_PREFIX.md#pub) -- [PUB\_VAL](BECH32_PREFIX.md#pub_val) -- [PUB\_VALCONS](BECH32_PREFIX.md#pub_valcons) +- [PUB_VAL](BECH32_PREFIX.md#pub_val) +- [PUB_VALCONS](BECH32_PREFIX.md#pub_valcons) ## Enumeration Members ### ADDR -• **ADDR** = ``"nibi"`` +• **ADDR** = `"nibi"` ADDR defines the Bech32 prefix of an account address @@ -25,11 +25,11 @@ ADDR defines the Bech32 prefix of an account address [tx/signer.ts:6](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L6) -___ +--- -### ADDR\_VAL +### ADDR_VAL -• **ADDR\_VAL** = ``"nibivaloper"`` +• **ADDR_VAL** = `"nibivaloper"` ADDR_VAL defines the Bech32 prefix of an validator's operator address @@ -37,11 +37,11 @@ ADDR_VAL defines the Bech32 prefix of an validator's operator address [tx/signer.ts:8](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L8) -___ +--- -### ADDR\_VALCONS +### ADDR_VALCONS -• **ADDR\_VALCONS** = ``"nibivalcons"`` +• **ADDR_VALCONS** = `"nibivalcons"` ADDR_VALCONS defines the Bech32 prefix of a consensus node address @@ -49,11 +49,11 @@ ADDR_VALCONS defines the Bech32 prefix of a consensus node address [tx/signer.ts:10](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L10) -___ +--- ### PUB -• **PUB** = ``"nibipub"`` +• **PUB** = `"nibipub"` PUB defines the Bech32 prefix of an account's public key @@ -61,11 +61,11 @@ PUB defines the Bech32 prefix of an account's public key [tx/signer.ts:12](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L12) -___ +--- -### PUB\_VAL +### PUB_VAL -• **PUB\_VAL** = ``"nibivaloperpub"`` +• **PUB_VAL** = `"nibivaloperpub"` PUB_VAL defines the Bech32 prefix of an validator's operator public key @@ -73,11 +73,11 @@ PUB_VAL defines the Bech32 prefix of an validator's operator public key [tx/signer.ts:14](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L14) -___ +--- -### PUB\_VALCONS +### PUB_VALCONS -• **PUB\_VALCONS** = ``"nibivalconspub"`` +• **PUB_VALCONS** = `"nibivalconspub"` PUB_VALCONS defines the Bech32 prefix of a consensus node public key diff --git a/packages/nibijs/docs/enums/Signer.md b/packages/nibijs/docs/enums/Signer.md index 296838cc..27469c8f 100644 --- a/packages/nibijs/docs/enums/Signer.md +++ b/packages/nibijs/docs/enums/Signer.md @@ -13,17 +13,17 @@ ### Direct -• **Direct** = ``"direct"`` +• **Direct** = `"direct"` #### Defined in [tx/signer.ts:53](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L53) -___ +--- ### Keplr -• **Keplr** = ``"keplr"`` +• **Keplr** = `"keplr"` #### Defined in diff --git a/packages/nibijs/docs/interfaces/ABCIEvent.md b/packages/nibijs/docs/interfaces/ABCIEvent.md index 3d357986..17d87164 100644 --- a/packages/nibijs/docs/interfaces/ABCIEvent.md +++ b/packages/nibijs/docs/interfaces/ABCIEvent.md @@ -25,7 +25,7 @@ key-value strings of arbitrary data. [tx/event.ts:23](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/event.ts#L23) -___ +--- ### type diff --git a/packages/nibijs/docs/interfaces/Chain.md b/packages/nibijs/docs/interfaces/Chain.md index 31acb025..684d5056 100644 --- a/packages/nibijs/docs/interfaces/Chain.md +++ b/packages/nibijs/docs/interfaces/Chain.md @@ -40,7 +40,7 @@ chainId: identifier for the chain [chain/chain.ts:21](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L21) -___ +--- ### chainName @@ -52,7 +52,7 @@ chainName: the name of the chain to display to the user [chain/chain.ts:23](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L23) -___ +--- ### endptGrpc @@ -64,7 +64,7 @@ endptGrpc: endpoint for the gRPC gateway. Usually on port 9090. [chain/chain.ts:19](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L19) -___ +--- ### endptRest @@ -76,7 +76,7 @@ endptRest: endpoint for the REST server. Also, the LCD endpoint. [chain/chain.ts:17](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L17) -___ +--- ### endptTm @@ -88,7 +88,7 @@ endptTm: endpoint for the Tendermint RPC server. Usually on port 26657. [chain/chain.ts:15](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L15) -___ +--- ### feeDenom diff --git a/packages/nibijs/docs/interfaces/ChainIdParts.md b/packages/nibijs/docs/interfaces/ChainIdParts.md index a133f934..45153af2 100644 --- a/packages/nibijs/docs/interfaces/ChainIdParts.md +++ b/packages/nibijs/docs/interfaces/ChainIdParts.md @@ -10,7 +10,9 @@ deduced from `ChainIdParts`. ```ts let chain: ChainIdParts = { - shortName: "cataclysm", number: 1, mainnet: true, + shortName: "cataclysm", + number: 1, + mainnet: true, } chain = { prefix: "nibiru", shortName: "testnet", number: 1 } ``` @@ -34,7 +36,7 @@ chain = { prefix: "nibiru", shortName: "testnet", number: 1 } [chain/chain.ts:41](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L41) -___ +--- ### number @@ -44,7 +46,7 @@ ___ [chain/chain.ts:40](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L40) -___ +--- ### prefix @@ -54,7 +56,7 @@ ___ [chain/chain.ts:38](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L38) -___ +--- ### shortName diff --git a/packages/nibijs/docs/interfaces/EpochsExtension.md b/packages/nibijs/docs/interfaces/EpochsExtension.md index b09f7ab6..7f98db99 100644 --- a/packages/nibijs/docs/interfaces/EpochsExtension.md +++ b/packages/nibijs/docs/interfaces/EpochsExtension.md @@ -12,7 +12,7 @@ ### epochs -• `Readonly` **epochs**: `Readonly`<{ `currentEpoch`: (`args`: { `identifier`: `string` }) => `Promise`<`QueryCurrentEpochResponse`\> ; `epochsInfo`: () => `Promise`<`QueryEpochsInfoResponse`\> }\> +• `Readonly` **epochs**: `Readonly`<{ `currentEpoch`: (`args`: { `identifier`: `string` }) => `Promise`<`QueryCurrentEpochResponse`\> ; `epochsInfo`: () => `Promise`<`QueryEpochsInfoResponse`\> }\> #### Defined in diff --git a/packages/nibijs/docs/interfaces/EventAttribute.md b/packages/nibijs/docs/interfaces/EventAttribute.md index f4dfe993..e1dd2e4b 100644 --- a/packages/nibijs/docs/interfaces/EventAttribute.md +++ b/packages/nibijs/docs/interfaces/EventAttribute.md @@ -21,7 +21,7 @@ EventAttribute: A single key-value pair of event data for an ABCI event. [tx/event.ts:5](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/event.ts#L5) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/InflationExtension.md b/packages/nibijs/docs/interfaces/InflationExtension.md index fe3bd34d..02f8e648 100644 --- a/packages/nibijs/docs/interfaces/InflationExtension.md +++ b/packages/nibijs/docs/interfaces/InflationExtension.md @@ -12,7 +12,7 @@ ### inflation -• `Readonly` **inflation**: `Readonly`<{ `circulatingSupply`: () => `Promise`<`QueryCirculatingSupplyResponse`\> ; `epochMintProvision`: () => `Promise`<`QueryEpochMintProvisionResponse`\> ; `inflationRate`: () => `Promise`<`QueryInflationRateResponse`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `period`: () => `Promise`<`QueryPeriodResponse`\> ; `skippedEpochs`: () => `Promise`<`QuerySkippedEpochsResponse`\> }\> +• `Readonly` **inflation**: `Readonly`<{ `circulatingSupply`: () => `Promise`<`QueryCirculatingSupplyResponse`\> ; `epochMintProvision`: () => `Promise`<`QueryEpochMintProvisionResponse`\> ; `inflationRate`: () => `Promise`<`QueryInflationRateResponse`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `period`: () => `Promise`<`QueryPeriodResponse`\> ; `skippedEpochs`: () => `Promise`<`QuerySkippedEpochsResponse`\> }\> #### Defined in diff --git a/packages/nibijs/docs/interfaces/MsgAddMarginEncodeObject.md b/packages/nibijs/docs/interfaces/MsgAddMarginEncodeObject.md index 9bf77cdb..0edc08df 100644 --- a/packages/nibijs/docs/interfaces/MsgAddMarginEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgAddMarginEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:37](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L37) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgClosePositionEncodeObject.md b/packages/nibijs/docs/interfaces/MsgClosePositionEncodeObject.md index 79587b61..138c91a9 100644 --- a/packages/nibijs/docs/interfaces/MsgClosePositionEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgClosePositionEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:73](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L73) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgCreatePoolEncodeObject.md b/packages/nibijs/docs/interfaces/MsgCreatePoolEncodeObject.md index f0507c4a..c1285c38 100644 --- a/packages/nibijs/docs/interfaces/MsgCreatePoolEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgCreatePoolEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/spot.ts:27](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L27) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgDonateToEcosystemFundEncodeObject.md b/packages/nibijs/docs/interfaces/MsgDonateToEcosystemFundEncodeObject.md index ec3adfda..e42cf5d6 100644 --- a/packages/nibijs/docs/interfaces/MsgDonateToEcosystemFundEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgDonateToEcosystemFundEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:82](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L82) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgExitPoolEncodeObject.md b/packages/nibijs/docs/interfaces/MsgExitPoolEncodeObject.md index f161f0c1..f5cd1a16 100644 --- a/packages/nibijs/docs/interfaces/MsgExitPoolEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgExitPoolEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/spot.ts:43](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L43) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgJoinPoolEncodeObject.md b/packages/nibijs/docs/interfaces/MsgJoinPoolEncodeObject.md index ae6fc8be..fe4bb1ff 100644 --- a/packages/nibijs/docs/interfaces/MsgJoinPoolEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgJoinPoolEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/spot.ts:35](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L35) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgMultiLiquidateEncodeObject.md b/packages/nibijs/docs/interfaces/MsgMultiLiquidateEncodeObject.md index 1ad81cb0..ea93c33d 100644 --- a/packages/nibijs/docs/interfaces/MsgMultiLiquidateEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgMultiLiquidateEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:55](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L55) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgOpenPositionEncodeObject.md b/packages/nibijs/docs/interfaces/MsgOpenPositionEncodeObject.md index 4b135b25..671e9478 100644 --- a/packages/nibijs/docs/interfaces/MsgOpenPositionEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgOpenPositionEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:64](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L64) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgPartialCloseEncodeObject.md b/packages/nibijs/docs/interfaces/MsgPartialCloseEncodeObject.md index 118e8b90..36b8879d 100644 --- a/packages/nibijs/docs/interfaces/MsgPartialCloseEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgPartialCloseEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:93](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L93) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgRemoveMarginEncodeObject.md b/packages/nibijs/docs/interfaces/MsgRemoveMarginEncodeObject.md index 741bff41..92543a42 100644 --- a/packages/nibijs/docs/interfaces/MsgRemoveMarginEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgRemoveMarginEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/perp.ts:46](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L46) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/MsgSwapAssetsEncodeObject.md b/packages/nibijs/docs/interfaces/MsgSwapAssetsEncodeObject.md index 39cfbc9b..c90c551e 100644 --- a/packages/nibijs/docs/interfaces/MsgSwapAssetsEncodeObject.md +++ b/packages/nibijs/docs/interfaces/MsgSwapAssetsEncodeObject.md @@ -29,7 +29,7 @@ EncodeObject.typeUrl [msg/spot.ts:51](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L51) -___ +--- ### value diff --git a/packages/nibijs/docs/interfaces/OracleExtension.md b/packages/nibijs/docs/interfaces/OracleExtension.md index c5ec38f5..310b5656 100644 --- a/packages/nibijs/docs/interfaces/OracleExtension.md +++ b/packages/nibijs/docs/interfaces/OracleExtension.md @@ -12,7 +12,7 @@ ### oracle -• **oracle**: `Readonly`<{ `actives`: () => `Promise`<`QueryActivesResponse`\> ; `aggregatePrevote`: (`oracle`: `string`) => `Promise`<`undefined` \| `AggregateExchangeRatePrevote`\> ; `aggregatePrevotes`: () => `Promise`<`AggregateExchangeRatePrevote`[]\> ; `aggregateVote`: (`oracle`: `string`) => `Promise`<`undefined` \| `AggregateExchangeRateVote`\> ; `aggregateVotes`: () => `Promise`<`AggregateExchangeRateVote`[]\> ; `exchangeRate`: (`pair`: `string`) => `Promise`<`number`\> ; `exchangeRates`: () => `Promise`<`ExchangeRatesMap`\> ; `feeder`: (`oracle`: `string`) => `Promise`<`string`\> ; `missCount`: (`oracle`: `string`) => `Promise`<`number`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `voteTargets`: () => `Promise`<`string`[]\> }\> +• **oracle**: `Readonly`<{ `actives`: () => `Promise`<`QueryActivesResponse`\> ; `aggregatePrevote`: (`oracle`: `string`) => `Promise`<`undefined` \| `AggregateExchangeRatePrevote`\> ; `aggregatePrevotes`: () => `Promise`<`AggregateExchangeRatePrevote`[]\> ; `aggregateVote`: (`oracle`: `string`) => `Promise`<`undefined` \| `AggregateExchangeRateVote`\> ; `aggregateVotes`: () => `Promise`<`AggregateExchangeRateVote`[]\> ; `exchangeRate`: (`pair`: `string`) => `Promise`<`number`\> ; `exchangeRates`: () => `Promise`<`ExchangeRatesMap`\> ; `feeder`: (`oracle`: `string`) => `Promise`<`string`\> ; `missCount`: (`oracle`: `string`) => `Promise`<`number`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `voteTargets`: () => `Promise`<`string`[]\> }\> #### Defined in diff --git a/packages/nibijs/docs/interfaces/PageRequest.md b/packages/nibijs/docs/interfaces/PageRequest.md index 38c7ea93..bb73c827 100644 --- a/packages/nibijs/docs/interfaces/PageRequest.md +++ b/packages/nibijs/docs/interfaces/PageRequest.md @@ -27,7 +27,7 @@ PageRequest • **countTotal**: `boolean` -count_total is set to true to indicate that the result set should include +count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. @@ -36,7 +36,7 @@ is set. [query/spot.ts:252](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L252) -___ +--- ### key @@ -50,7 +50,7 @@ should be set. [query/spot.ts:234](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L234) -___ +--- ### limit @@ -63,7 +63,7 @@ If left empty it will default to a value to be set by each app. [query/spot.ts:245](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L245) -___ +--- ### offset @@ -77,7 +77,7 @@ be set. [query/spot.ts:240](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L240) -___ +--- ### reverse diff --git a/packages/nibijs/docs/interfaces/PerpExtension.md b/packages/nibijs/docs/interfaces/PerpExtension.md index 1a4a75da..1455400a 100644 --- a/packages/nibijs/docs/interfaces/PerpExtension.md +++ b/packages/nibijs/docs/interfaces/PerpExtension.md @@ -12,7 +12,7 @@ ### perp -• **perp**: `Readonly`<{ `markets`: () => `Promise`<`QueryMarketsResponse`\> ; `moduleAccounts`: () => `Promise`<`QueryModuleAccountsResponse`\> ; `position`: (`args`: { `pair`: `string` ; `trader`: `string` }) => `Promise`<`QueryPositionResponse`\> ; `positions`: (`args`: { `trader`: `string` }) => `Promise`<`QueryPositionsResponse`\> }\> +• **perp**: `Readonly`<{ `markets`: () => `Promise`<`QueryMarketsResponse`\> ; `moduleAccounts`: () => `Promise`<`QueryModuleAccountsResponse`\> ; `position`: (`args`: { `pair`: `string` ; `trader`: `string` }) => `Promise`<`QueryPositionResponse`\> ; `positions`: (`args`: { `trader`: `string` }) => `Promise`<`QueryPositionsResponse`\> }\> #### Defined in diff --git a/packages/nibijs/docs/interfaces/SpotExtension.md b/packages/nibijs/docs/interfaces/SpotExtension.md index eda348d8..fe9e7e77 100644 --- a/packages/nibijs/docs/interfaces/SpotExtension.md +++ b/packages/nibijs/docs/interfaces/SpotExtension.md @@ -12,7 +12,7 @@ ### spot -• **spot**: `Readonly`<{ `estimateExitExactAmountIn`: (`poolId`: `number`, `poolSharesIn`: `number`) => `Promise`<`QueryExitExactAmountInResponse`\> ; `estimateExitExactAmountOut`: (`poolId`: `number`) => `Promise`<`QueryExitExactAmountOutResponse`\> ; `estimateJoinExactAmountIn`: (`poolId`: `number`, `tokensIn`: `Coin`[]) => `Promise`<`QueryJoinExactAmountInResponse`\> ; `estimateJoinExactAmountOut`: (`poolId`: `number`) => `Promise`<`QueryJoinExactAmountOutResponse`\> ; `estimateSwapExactAmountIn`: (`poolId`: `number`, `tokenOutDenom`: `string`, `tokenIn?`: `Coin`) => `Promise`<`QuerySwapExactAmountInResponse`\> ; `estimateSwapExactAmountOut`: (`poolId`: `number`, `tokenInDenom`: `string`, `tokenOut?`: `Coin`) => `Promise`<`QuerySwapExactAmountOutResponse`\> ; `numPools`: () => `Promise`<`QueryNumPoolsResponse`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `pool`: (`poolId`: `number`) => `Promise`<`QueryPoolResponse`\> ; `poolNumber`: () => `Promise`<`QueryPoolNumberResponse`\> ; `poolParams`: (`poolId`: `number`) => `Promise`<`QueryPoolParamsResponse`\> ; `pools`: (`pagination?`: [`PageRequest`](PageRequest.md)) => `Promise`<`QueryPoolsResponse`\> ; `spotPrice`: (`poolId`: `number`, `tokenInDenom`: `string`, `tokenOutDenom`: `string`) => `Promise`<`QuerySpotPriceResponse`\> ; `totalLiquidity`: () => `Promise`<`QueryTotalLiquidityResponse`\> ; `totalPoolLiquidity`: (`poolId`: `number`) => `Promise`<`QueryTotalPoolLiquidityResponse`\> ; `totalShares`: (`poolId`: `number`) => `Promise`<`QueryTotalSharesResponse`\> }\> +• **spot**: `Readonly`<{ `estimateExitExactAmountIn`: (`poolId`: `number`, `poolSharesIn`: `number`) => `Promise`<`QueryExitExactAmountInResponse`\> ; `estimateExitExactAmountOut`: (`poolId`: `number`) => `Promise`<`QueryExitExactAmountOutResponse`\> ; `estimateJoinExactAmountIn`: (`poolId`: `number`, `tokensIn`: `Coin`[]) => `Promise`<`QueryJoinExactAmountInResponse`\> ; `estimateJoinExactAmountOut`: (`poolId`: `number`) => `Promise`<`QueryJoinExactAmountOutResponse`\> ; `estimateSwapExactAmountIn`: (`poolId`: `number`, `tokenOutDenom`: `string`, `tokenIn?`: `Coin`) => `Promise`<`QuerySwapExactAmountInResponse`\> ; `estimateSwapExactAmountOut`: (`poolId`: `number`, `tokenInDenom`: `string`, `tokenOut?`: `Coin`) => `Promise`<`QuerySwapExactAmountOutResponse`\> ; `numPools`: () => `Promise`<`QueryNumPoolsResponse`\> ; `params`: () => `Promise`<`QueryParamsResponse`\> ; `pool`: (`poolId`: `number`) => `Promise`<`QueryPoolResponse`\> ; `poolNumber`: () => `Promise`<`QueryPoolNumberResponse`\> ; `poolParams`: (`poolId`: `number`) => `Promise`<`QueryPoolParamsResponse`\> ; `pools`: (`pagination?`: [`PageRequest`](PageRequest.md)) => `Promise`<`QueryPoolsResponse`\> ; `spotPrice`: (`poolId`: `number`, `tokenInDenom`: `string`, `tokenOutDenom`: `string`) => `Promise`<`QuerySpotPriceResponse`\> ; `totalLiquidity`: () => `Promise`<`QueryTotalLiquidityResponse`\> ; `totalPoolLiquidity`: (`poolId`: `number`) => `Promise`<`QueryTotalPoolLiquidityResponse`\> ; `totalShares`: (`poolId`: `number`) => `Promise`<`QueryTotalSharesResponse`\> }\> #### Defined in diff --git a/packages/nibijs/docs/interfaces/SudoExtension.md b/packages/nibijs/docs/interfaces/SudoExtension.md index 4f290112..cab8b898 100644 --- a/packages/nibijs/docs/interfaces/SudoExtension.md +++ b/packages/nibijs/docs/interfaces/SudoExtension.md @@ -12,7 +12,7 @@ ### sudo -• `Readonly` **sudo**: `Readonly`<{ `querySudoers`: () => `Promise`<`QuerySudoersResponse`\> }\> +• `Readonly` **sudo**: `Readonly`<{ `querySudoers`: () => `Promise`<`QuerySudoersResponse`\> }\> #### Defined in diff --git a/packages/nibijs/docs/modules.md b/packages/nibijs/docs/modules.md index 1f1302cd..0a384c6c 100644 --- a/packages/nibijs/docs/modules.md +++ b/packages/nibijs/docs/modules.md @@ -6,7 +6,7 @@ ### Enumerations -- [BECH32\_PREFIX](enums/BECH32_PREFIX.md) +- [BECH32_PREFIX](enums/BECH32_PREFIX.md) - [Signer](enums/Signer.md) ### Classes @@ -58,14 +58,14 @@ ### Variables - [ERR](modules.md#err) -- [INT\_MULT](modules.md#int_mult) +- [INT_MULT](modules.md#int_mult) - [Localnet](modules.md#localnet) - [Msg](modules.md#msg) -- [PERP\_MSG\_TYPE\_URLS](modules.md#perp_msg_type_urls) -- [SPOT\_MSG\_TYPE\_URLS](modules.md#spot_msg_type_urls) -- [TEST\_ADDRESS](modules.md#test_address) -- [TEST\_CHAIN](modules.md#test_chain) -- [TEST\_MNEMONIC](modules.md#test_mnemonic) +- [PERP_MSG_TYPE_URLS](modules.md#perp_msg_type_urls) +- [SPOT_MSG_TYPE_URLS](modules.md#spot_msg_type_urls) +- [TEST_ADDRESS](modules.md#test_address) +- [TEST_CHAIN](modules.md#test_chain) +- [TEST_MNEMONIC](modules.md#test_mnemonic) - [nibiruRegistryTypes](modules.md#nibiruregistrytypes) - [perpTypes](modules.md#perptypes) - [spotTypes](modules.md#spottypes) @@ -139,27 +139,27 @@ #### Type declaration -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------ | :------- | | `collections` | `string` | -| `noPrices` | `string` | -| `sequence` | `string` | +| `noPrices` | `string` | +| `sequence` | `string` | #### Defined in [testutil.ts:19](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L19) -___ +--- -### INT\_MULT +### INT_MULT -• `Const` **INT\_MULT**: ``1000000`` +• `Const` **INT_MULT**: `1000000` #### Defined in [chain/parse.ts:2](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/parse.ts#L2) -___ +--- ### Localnet @@ -174,7 +174,7 @@ controllable, isolated development environment for testing purposes. [chain/chain.ts:102](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L102) -___ +--- ### Msg @@ -184,52 +184,52 @@ ___ [msg/index.ts:9](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/index.ts#L9) -___ +--- -### PERP\_MSG\_TYPE\_URLS +### PERP_MSG_TYPE_URLS -• `Const` **PERP\_MSG\_TYPE\_URLS**: `Object` +• `Const` **PERP_MSG_TYPE_URLS**: `Object` #### Type declaration -| Name | Type | -| :------ | :------ | -| `MsgAddMargin` | `string` | -| `MsgClosePosition` | `string` | +| Name | Type | +| :------------------------- | :------- | +| `MsgAddMargin` | `string` | +| `MsgClosePosition` | `string` | | `MsgDonateToEcosystemFund` | `string` | -| `MsgMarketOrder` | `string` | -| `MsgMultiLiquidate` | `string` | -| `MsgPartialClose` | `string` | -| `MsgRemoveMargin` | `string` | +| `MsgMarketOrder` | `string` | +| `MsgMultiLiquidate` | `string` | +| `MsgPartialClose` | `string` | +| `MsgRemoveMargin` | `string` | #### Defined in [msg/perp.ts:16](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L16) -___ +--- -### SPOT\_MSG\_TYPE\_URLS +### SPOT_MSG_TYPE_URLS -• `Const` **SPOT\_MSG\_TYPE\_URLS**: `Object` +• `Const` **SPOT_MSG_TYPE_URLS**: `Object` #### Type declaration -| Name | Type | -| :------ | :------ | +| Name | Type | +| :-------------- | :------- | | `MsgCreatePool` | `string` | -| `MsgExitPool` | `string` | -| `MsgJoinPool` | `string` | +| `MsgExitPool` | `string` | +| `MsgJoinPool` | `string` | | `MsgSwapAssets` | `string` | #### Defined in [msg/spot.ts:12](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L12) -___ +--- -### TEST\_ADDRESS +### TEST_ADDRESS -• `Const` **TEST\_ADDRESS**: `string` +• `Const` **TEST_ADDRESS**: `string` Address for the wallet of the default validator on localnet" @@ -237,11 +237,11 @@ Address for the wallet of the default validator on localnet" [testutil.ts:16](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L16) -___ +--- -### TEST\_CHAIN +### TEST_CHAIN -• `Const` **TEST\_CHAIN**: [`Chain`](interfaces/Chain.md) = `Localnet` +• `Const` **TEST_CHAIN**: [`Chain`](interfaces/Chain.md) = `Localnet` TEST_CHAIN: Alias for Localnet. @@ -253,11 +253,11 @@ Localnet [testutil.ts:8](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L8) -___ +--- -### TEST\_MNEMONIC +### TEST_MNEMONIC -• `Const` **TEST\_MNEMONIC**: `string` +• `Const` **TEST_MNEMONIC**: `string` Mnemonic for the wallet of the default validator on localnet" @@ -265,7 +265,7 @@ Mnemonic for the wallet of the default validator on localnet" [testutil.ts:11](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L11) -___ +--- ### nibiruRegistryTypes @@ -275,7 +275,7 @@ ___ [tx/txClient.ts:31](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/txClient.ts#L31) -___ +--- ### perpTypes @@ -285,7 +285,7 @@ ___ [msg/perp.ts:26](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L26) -___ +--- ### spotTypes @@ -307,8 +307,8 @@ dev team to live-test new features before official public release. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------ | :------- | | `chainNumber` | `number` | #### Returns @@ -319,7 +319,7 @@ dev team to live-test new features before official public release. [chain/chain.ts:141](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L141) -___ +--- ### IncentivizedTestnet @@ -327,9 +327,9 @@ ___ #### Parameters -| Name | Type | Default value | -| :------ | :------ | :------ | -| `chainNumber` | `number` | `1` | +| Name | Type | Default value | +| :------------ | :------- | :------------ | +| `chainNumber` | `number` | `1` | #### Returns @@ -348,7 +348,7 @@ Testnet - Permanent Nibiru public test network. [chain/chain.ts:123](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L123) -___ +--- ### Mainnet @@ -360,9 +360,9 @@ Mainnet: "Chain" configuration for the Nibiru "mainnet". #### Parameters -| Name | Type | Default value | -| :------ | :------ | :------ | -| `chainNumber` | `number` | `1` | +| Name | Type | Default value | +| :------------ | :------- | :------------ | +| `chainNumber` | `number` | `1` | #### Returns @@ -372,7 +372,7 @@ Mainnet: "Chain" configuration for the Nibiru "mainnet". [chain/chain.ts:152](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L152) -___ +--- ### Testnet @@ -392,9 +392,9 @@ arguments are passed. #### Parameters -| Name | Type | Default value | -| :------ | :------ | :------ | -| `chainNumber` | `number` | `1` | +| Name | Type | Default value | +| :------------ | :------- | :------------ | +| `chainNumber` | `number` | `1` | #### Returns @@ -404,7 +404,7 @@ arguments are passed. [chain/chain.ts:123](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L123) -___ +--- ### assert @@ -415,10 +415,10 @@ an "AssertionError" is thrown with an optional custom message. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `condition` | `boolean` | The condition to test. | -| `message?` | `string` | Optional. A custom error message to display if the assertion fails. | +| Name | Type | Description | +| :---------- | :-------- | :------------------------------------------------------------------ | +| `condition` | `boolean` | The condition to test. | +| `message?` | `string` | Optional. A custom error message to display if the assertion fails. | #### Returns @@ -430,7 +430,7 @@ an "AssertionError" is thrown with an optional custom message. [chain/types.ts:14](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/types.ts#L14) -___ +--- ### assertExpectedError @@ -444,9 +444,9 @@ expectation that the error message is contained within the list of acceptable er #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `err` | `unknown` | The error object to be tested. | +| Name | Type | Description | +| :--------- | :--------- | :-------------------------------------------- | +| `err` | `unknown` | The error object to be tested. | | `okErrors` | `string`[] | An array of acceptable error message strings. | #### Returns @@ -457,7 +457,7 @@ expectation that the error message is contained within the list of acceptable er [testutil.ts:100](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L100) -___ +--- ### assertHasEventType @@ -469,10 +469,10 @@ contained in `events`. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventType` | `string` | The event type to look for in the array of events. | -| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | An array of ABCIEvent objects to be tested. | +| Name | Type | Description | +| :---------- | :--------------------------------------- | :------------------------------------------------- | +| `eventType` | `string` | The event type to look for in the array of events. | +| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | An array of ABCIEvent objects to be tested. | #### Returns @@ -482,7 +482,7 @@ contained in `events`. [testutil.ts:82](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L82) -___ +--- ### assertHasMsgType @@ -493,10 +493,10 @@ Asserts that a list of ABCIEvents contains a specific type of `TxMsg`. This #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `msgType` | `string` | TxMsg type to look for within the event attributes. | -| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | set of events over which we're searching. | +| Name | Type | Description | +| :-------- | :--------------------------------------- | :-------------------------------------------------- | +| `msgType` | `string` | TxMsg type to look for within the event attributes. | +| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | set of events over which we're searching. | #### Returns @@ -506,7 +506,7 @@ Asserts that a list of ABCIEvents contains a specific type of `TxMsg`. This [testutil.ts:63](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L63) -___ +--- ### assertValidBlock @@ -516,9 +516,9 @@ assertValidBlock: Performs runtime type validation on a CometBFT "Block". #### Parameters -| Name | Type | -| :------ | :------ | -| `block` | `Block` | +| Name | Type | +| :------ | :----------------------------- | +| `block` | `Block` | | `chain` | [`Chain`](interfaces/Chain.md) | #### Returns @@ -529,7 +529,7 @@ assertValidBlock: Performs runtime type validation on a CometBFT "Block". [testutil.ts:49](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L49) -___ +--- ### assertValidBlockFromJsonRpc @@ -539,8 +539,8 @@ Validates that block queried via the JSON RPC client has the expected fields. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---------- | :---- | | `blockJson` | `any` | #### Returns @@ -551,7 +551,7 @@ Validates that block queried via the JSON RPC client has the expected fields. [testutil.ts:26](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/testutil.ts#L26) -___ +--- ### bytesToHex @@ -569,8 +569,8 @@ Thus, a byte value of 9 is represented as "09". #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--- | :----------- | | `bz` | `Uint8Array` | #### Returns @@ -581,7 +581,7 @@ Thus, a byte value of 9 is represented as "09". [hash.ts:14](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/hash.ts#L14) -___ +--- ### chainToParts @@ -591,8 +591,8 @@ Converts a Chain object to its constituent parts. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :------ | :----------------------------- | :------------- | | `chain` | [`Chain`](interfaces/Chain.md) | a Chain object | #### Returns @@ -605,7 +605,7 @@ a ChainIdParts object [chain/chain.ts:186](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L186) -___ +--- ### eventToMap @@ -615,8 +615,8 @@ eventToMap: Converts an ABCIEvent into an EventMap. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :------------------------------------- | | `event` | [`ABCIEvent`](interfaces/ABCIEvent.md) | #### Returns @@ -627,7 +627,7 @@ eventToMap: Converts an ABCIEvent into an EventMap. [tx/event.ts:44](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/event.ts#L44) -___ +--- ### faucetUrlFromChain @@ -637,8 +637,8 @@ Constructs a faucet URL from a Chain object. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :------ | :----------------------------- | :------------- | | `chain` | [`Chain`](interfaces/Chain.md) | a Chain object | #### Returns @@ -649,7 +649,7 @@ Constructs a faucet URL from a Chain object. [chain/useFaucet.ts:59](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/useFaucet.ts#L59) -___ +--- ### findEvent @@ -660,10 +660,10 @@ events of known type are present. #### Parameters -| Name | Type | -| :------ | :------ | -| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | -| `eventType` | `string` | +| Name | Type | +| :---------- | :--------------------------------------- | +| `events` | [`ABCIEvent`](interfaces/ABCIEvent.md)[] | +| `eventType` | `string` | #### Returns @@ -673,7 +673,7 @@ events of known type are present. [tx/event.ts:54](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/event.ts#L54) -___ +--- ### fromSdkDec @@ -696,8 +696,8 @@ the human-readbale Dec. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :------- | | `sdkDec` | `string` | #### Returns @@ -706,14 +706,14 @@ the human-readbale Dec. **`See`** - - TxMessage // from nibijs/src/tx - - toSdkDec +- TxMessage // from nibijs/src/tx +- toSdkDec #### Defined in [chain/parse.ts:113](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/parse.ts#L113) -___ +--- ### fromSdkInt @@ -721,8 +721,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :------- | | `intStr` | `string` | #### Returns @@ -733,7 +733,7 @@ ___ [chain/parse.ts:166](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/parse.ts#L166) -___ +--- ### getRegistry @@ -747,7 +747,7 @@ ___ [tx/signer.ts:19](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L19) -___ +--- ### hexToBytes @@ -756,13 +756,13 @@ ___ Converts a hexadecimal-encoded string into a Uint8Array. The hexadecimal string must have an even length, as each byte is represented -by two hex digits. Each of hex digit 2-tuples (ranging from 00 to FF) is +by two hex digits. Each of hex digit 2-tuples (ranging from 00 to FF) is converted to a single byte ranging from 0 to 255. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :---- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `hex` | `string` | The hexadecimal string to be decoded. If the string has an odd length or contains non-hexadecimal characters, the function returns an error wrapped in a Result object rather than throwing. | #### Returns @@ -776,11 +776,11 @@ error result if the input is invalid. ```ts // Successful decoding -const result = hexToBytes("7A919F2CC9A51B139444F7D8E84A46EE"); +const result = hexToBytes("7A919F2CC9A51B139444F7D8E84A46EE") if (result.isOk()) { - console.log(result.ok); // Uint8Array of bytes + console.log(result.ok) // Uint8Array of bytes } else { - console.error(result.err); // Error + console.error(result.err) // Error } ``` @@ -788,11 +788,11 @@ if (result.isOk()) { ```ts // Error handling for invalid hex string -const result = hexToBytes("7G919F"); +const result = hexToBytes("7G919F") if (result.isOk()) { - console.log(result.ok); + console.log(result.ok) } else { - console.error(result.err.message); + console.error(result.err.message) // "HexError: non-hex characters detected in hex: 7G919F" } ``` @@ -801,7 +801,7 @@ if (result.isOk()) { [hash.ts:51](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/hash.ts#L51) -___ +--- ### isMsgAddMarginEncodeObject @@ -809,8 +809,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -821,7 +821,7 @@ ___ [msg/perp.ts:41](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L41) -___ +--- ### isMsgClosePositionEncodeObject @@ -829,8 +829,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -841,7 +841,7 @@ ___ [msg/perp.ts:77](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L77) -___ +--- ### isMsgCreatePoolEncodeObject @@ -849,8 +849,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -861,7 +861,7 @@ ___ [msg/spot.ts:31](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L31) -___ +--- ### isMsgDonateToEcosystemFundEncodeObject @@ -869,8 +869,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -881,7 +881,7 @@ ___ [msg/perp.ts:86](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L86) -___ +--- ### isMsgExitPoolEncodeObject @@ -889,8 +889,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -901,7 +901,7 @@ ___ [msg/spot.ts:47](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L47) -___ +--- ### isMsgJoinPoolEncodeObject @@ -909,8 +909,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -921,7 +921,7 @@ ___ [msg/spot.ts:39](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L39) -___ +--- ### isMsgMultiLiquidateEncodeObject @@ -929,8 +929,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -941,7 +941,7 @@ ___ [msg/perp.ts:59](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L59) -___ +--- ### isMsgOpenPositionEncodeObject @@ -949,8 +949,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -961,7 +961,7 @@ ___ [msg/perp.ts:68](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L68) -___ +--- ### isMsgPartialCloseEncodeObject @@ -969,8 +969,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -981,7 +981,7 @@ ___ [msg/perp.ts:97](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L97) -___ +--- ### isMsgRemoveMarginEncodeObject @@ -989,8 +989,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -1001,7 +1001,7 @@ ___ [msg/perp.ts:50](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/perp.ts#L50) -___ +--- ### isMsgSwapAssetsEncodeObject @@ -1009,8 +1009,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------- | :------------- | | `encodeObject` | `EncodeObject` | #### Returns @@ -1021,7 +1021,7 @@ ___ [msg/spot.ts:55](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/msg/spot.ts#L55) -___ +--- ### isRestEndptLive @@ -1032,8 +1032,8 @@ the network and endpoint are active. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :----------------------------- | | `chain` | [`Chain`](interfaces/Chain.md) | #### Returns @@ -1044,7 +1044,7 @@ the network and endpoint are active. [chain/chain.ts:176](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L176) -___ +--- ### newCoinMapFromCoins @@ -1052,8 +1052,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :---------------- | | `coins` | readonly `Coin`[] | #### Returns @@ -1064,7 +1064,7 @@ ___ [chain/types.ts:32](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/types.ts#L32) -___ +--- ### newRandomWallet @@ -1074,10 +1074,10 @@ Generates a new wallet with a BIP39 mnemonic of length 24. #### Parameters -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `length?` | ``12`` \| ``15`` \| ``18`` \| ``21`` \| ``24`` | `undefined` | (optional) The number of words in the mnemonic (12, 15, 18, 21 or 24). | -| `prefix` | [`BECH32_PREFIX`](enums/BECH32_PREFIX.md) | `BECH32_PREFIX.ADDR` | (optional) Bech32 address prefix. Defaults to "nibi". | +| Name | Type | Default value | Description | +| :-------- | :---------------------------------------- | :------------------- | :--------------------------------------------------------------------- | +| `length?` | `12` \| `15` \| `18` \| `21` \| `24` | `undefined` | (optional) The number of words in the mnemonic (12, 15, 18, 21 or 24). | +| `prefix` | [`BECH32_PREFIX`](enums/BECH32_PREFIX.md) | `BECH32_PREFIX.ADDR` | (optional) Bech32 address prefix. Defaults to "nibi". | #### Returns @@ -1091,7 +1091,7 @@ A wallet for protobuf based signing using SIGN_MODE_DIRECT. [tx/signer.ts:45](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L45) -___ +--- ### newSignerFromMnemonic @@ -1101,10 +1101,10 @@ Creates a wallet from the given BIP39 mnemonic. #### Parameters -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `mnemonic` | `string` | `undefined` | | -| `prefix` | [`BECH32_PREFIX`](enums/BECH32_PREFIX.md) | `BECH32_PREFIX.ADDR` | (optional) Bech32 address prefix. Defaults to "nibi". | +| Name | Type | Default value | Description | +| :--------- | :---------------------------------------- | :------------------- | :---------------------------------------------------- | +| `mnemonic` | `string` | `undefined` | | +| `prefix` | [`BECH32_PREFIX`](enums/BECH32_PREFIX.md) | `BECH32_PREFIX.ADDR` | (optional) Bech32 address prefix. Defaults to "nibi". | #### Returns @@ -1118,7 +1118,7 @@ A wallet for protobuf based signing using SIGN_MODE_DIRECT [tx/signer.ts:29](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/signer.ts#L29) -___ +--- ### parseError @@ -1130,8 +1130,8 @@ have type "Error" since it's perfectly valid to throw strings or `undefined`. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :---- | | `err` | `any` | #### Returns @@ -1142,7 +1142,7 @@ have type "Error" since it's perfectly valid to throw strings or `undefined`. [result.ts:75](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/result.ts#L75) -___ +--- ### parseEventLogs @@ -1153,8 +1153,8 @@ from a tx response. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------- | :------------------ | | `txResp` | `DeliverTxResponse` | #### Returns @@ -1172,7 +1172,7 @@ const eventLogs = parseEventLogs(txResp) [tx/event.ts:67](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/tx/event.ts#L67) -___ +--- ### queryChainIdWithRest @@ -1180,8 +1180,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :----------------------------- | | `chain` | [`Chain`](interfaces/Chain.md) | #### Returns @@ -1192,7 +1192,7 @@ ___ [chain/chain.ts:159](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/chain.ts#L159) -___ +--- ### setupEpochsExtension @@ -1200,8 +1200,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1212,7 +1212,7 @@ ___ [query/epochs.ts:19](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/epochs.ts#L19) -___ +--- ### setupInflationExtension @@ -1220,8 +1220,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1232,7 +1232,7 @@ ___ [query/inflation.ts:29](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/inflation.ts#L29) -___ +--- ### setupOracleExtension @@ -1240,8 +1240,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1252,7 +1252,7 @@ ___ [query/oracle.ts:91](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/oracle.ts#L91) -___ +--- ### setupPerpExtension @@ -1260,8 +1260,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1272,7 +1272,7 @@ ___ [query/perp.ts:45](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/perp.ts#L45) -___ +--- ### setupSpotExtension @@ -1280,8 +1280,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1292,7 +1292,7 @@ ___ [query/spot.ts:102](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L102) -___ +--- ### setupSudoExtension @@ -1300,8 +1300,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :----- | :------------ | | `base` | `QueryClient` | #### Returns @@ -1312,7 +1312,7 @@ ___ [query/sudo.ts:14](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/sudo.ts#L14) -___ +--- ### toSdkDec @@ -1326,19 +1326,19 @@ provided than the precision, 18. ref: Reimplementation of cosmos-sdk/types/decimal.go Valid inputs must come in the form: - (-) integer digits (.) fractional digits +(-) integer digits (.) fractional digits Examples of acceptable input include: - -123.456 - 456.7890 - 345 - -456789 +-123.456 +456.7890 +345 +-456789 CONTRACT - This function does not mutate the input str. #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :------- | | `dec` | `string` | #### Returns @@ -1346,7 +1346,7 @@ CONTRACT - This function does not mutate the input str. `string` - Protobuf string for an sdk.Dec, which is -represented by its underlying "big.Int". + represented by its underlying "big.Int". **`See`** @@ -1359,7 +1359,7 @@ sdk.Dec protobuf string into a number. [chain/parse.ts:30](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/parse.ts#L30) -___ +--- ### toSdkInt @@ -1367,9 +1367,9 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | -| `i` | `number` | +| Name | Type | +| :--- | :------- | +| `i` | `number` | #### Returns @@ -1379,7 +1379,7 @@ ___ [chain/parse.ts:164](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/chain/parse.ts#L164) -___ +--- ### transformPool @@ -1387,8 +1387,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :--- | :----- | | `p?` | `Pool` | #### Returns @@ -1399,7 +1399,7 @@ ___ [query/spot.ts:49](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L49) -___ +--- ### transformPoolParams @@ -1407,8 +1407,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :---- | :----------- | | `pp?` | `PoolParams` | #### Returns @@ -1419,7 +1419,7 @@ ___ [query/spot.ts:41](https://github.com/NibiruChain/ts-sdk/blob/cacf9b9/packages/nibijs/src/query/spot.ts#L41) -___ +--- ### useFaucet @@ -1429,16 +1429,16 @@ Sends 11 NIBI, 100 NUSD, and 100 USDT to the given address from the testnet fauc #### Parameters -| Name | Type | -| :------ | :------ | -| `«destructured»` | `Object` | -| › `address` | `string` | -| › `amts?` | `Object` | -| › `amts.nibi` | `number` | -| › `amts.nusd` | `number` | -| › `amts.usdt` | `number` | -| › `chain` | [`Chain`](interfaces/Chain.md) | -| › `grecaptcha` | `string` | +| Name | Type | +| :--------------- | :----------------------------- | +| `«destructured»` | `Object` | +| › `address` | `string` | +| › `amts?` | `Object` | +| › `amts.nibi` | `number` | +| › `amts.nusd` | `number` | +| › `amts.usdt` | `number` | +| › `chain` | [`Chain`](interfaces/Chain.md) | +| › `grecaptcha` | `string` | #### Returns diff --git a/packages/nibijs/src/chain/chain.ts b/packages/nibijs/src/chain/chain.ts index 80c686c6..9bd490b2 100644 --- a/packages/nibijs/src/chain/chain.ts +++ b/packages/nibijs/src/chain/chain.ts @@ -17,6 +17,10 @@ export interface Chain { endptRest: string /** endptGrpc: endpoint for the gRPC gateway. Usually on port 9090. */ endptGrpc: string + /** endptHm: endpoint for the heart monitor. */ + endptHm: string + /** endptWs: endpoint for the web socket. */ + endptWs: string /** chainId: identifier for the chain */ chainId: string /** chainName: the name of the chain to display to the user */ @@ -59,6 +63,8 @@ export class CustomChain implements Chain { public readonly endptTm: string public readonly endptRest: string public readonly endptGrpc: string + public readonly endptHm: string + public readonly endptWs: string public readonly feeDenom = "unibi" private readonly chainIdParts: ChainIdParts @@ -75,6 +81,8 @@ export class CustomChain implements Chain { this.endptTm = `https://rpc${chainEndpt}.nibiru.fi` this.endptRest = `https://lcd${chainEndpt}.nibiru.fi` this.endptGrpc = `grpc${chainEndpt}.nibiru.fi` + this.endptHm = `https://hm-graphql${chainEndpt}/query` + this.endptWs = `wss://hm-graphql${chainEndpt}/query` } public static fromChainId(chainId: string): Chain { @@ -103,6 +111,8 @@ export const Localnet: Chain = { endptTm: "http://127.0.0.1:26657", endptRest: "http://127.0.0.1:1317", endptGrpc: "http://127.0.0.1:9090", + endptHm: "http://127.0.0.1:443/query", + endptWs: "ws://127.0.0.1:443/query", chainId: "nibiru-localnet-0", chainName: "Nibiru Localnet (Default)", feeDenom: "unibi", @@ -157,11 +167,11 @@ export const Mainnet = (chainNumber: number = 1) => }) export const queryChainIdWithRest = async ( - chain: Chain, + chain: Chain ): Promise> => { const queryChainId = async (chain: Chain): Promise => { const response = await fetch( - `${chain.endptRest}/cosmos/base/tendermint/v1beta1/node_info`, + `${chain.endptRest}/cosmos/base/tendermint/v1beta1/node_info` ) const nodeInfo: { default_node_info: { network: string } } = await response.json() diff --git a/packages/nibijs/src/test/chain.test.ts b/packages/nibijs/src/test/chain.test.ts index 4d81ed26..6e66314a 100644 --- a/packages/nibijs/src/test/chain.test.ts +++ b/packages/nibijs/src/test/chain.test.ts @@ -33,14 +33,22 @@ describe("chain/chain", () => { const expectCreatedChain = ( result: CustomChain, - prefix: string, + shortName: string, num: number ) => { - expect(result.chainId).toEqual(`nibiru-${prefix}-${num}`) - expect(result.chainName).toEqual(`nibiru-${prefix}-${num}`) - expect(result.endptGrpc).toEqual(`grpc.${prefix}-${num}.nibiru.fi`) - expect(result.endptRest).toEqual(`https://lcd.${prefix}-${num}.nibiru.fi`) - expect(result.endptTm).toEqual(`https://rpc.${prefix}-${num}.nibiru.fi`) + expect(result.chainId).toEqual(`nibiru-${shortName}-${num}`) + expect(result.chainName).toEqual(`nibiru-${shortName}-${num}`) + expect(result.endptGrpc).toEqual(`grpc.${shortName}-${num}.nibiru.fi`) + expect(result.endptRest).toEqual( + `https://lcd.${shortName}-${num}.nibiru.fi` + ) + expect(result.endptTm).toEqual(`https://rpc.${shortName}-${num}.nibiru.fi`) + expect(result.endptHm).toEqual( + `https://hm-graphql.${shortName}-${num}.nibiru.fi/query` + ) + expect(result.endptWs).toEqual( + `wss://hm-graphql.${shortName}-${num}.nibiru.fi/query` + ) expect(result.feeDenom).toEqual(`unibi`) } @@ -65,6 +73,8 @@ describe("chain/chain", () => { expect(result.endptGrpc).toEqual(`grpc.nibiru.fi`) expect(result.endptRest).toEqual(`https://lcd.nibiru.fi`) expect(result.endptTm).toEqual(`https://rpc.nibiru.fi`) + expect(result.endptHm).toEqual(`https://hm-graphql.nibiru.fi/query`) + expect(result.endptWs).toEqual(`wss://hm-graphql.nibiru.fi/query`) expect(result.feeDenom).toEqual(`unibi`) }) @@ -79,6 +89,8 @@ describe("chain/chain", () => { endptTm: "", endptRest: "", endptGrpc: "", + endptHm: "", + endptWs: "", chainId: "chain-id", chainName: "inactive-chain", feeDenom: "unibi",