Skip to content

Commit

Permalink
inj vue doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Dec 17, 2024
1 parent c38a44d commit d018a7d
Show file tree
Hide file tree
Showing 2 changed files with 358 additions and 19 deletions.
34 changes: 17 additions & 17 deletions libs/injective-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ npm install injective-react

```js
import { createQueryRpc } from "@interchainjs/cosmos/utils";
import { createGetAllBalances } from "injectivejs/cosmos/bank/v1beta1/query.rpc.func";
import { createGetExchangeBalances } from "injectivejs/injective/exchange/v1beta1/query.rpc.func";
import { createGetAllBalances } from "injective-react/cosmos/bank/v1beta1/query.rpc.func";
import { createGetExchangeBalances } from "injective-react/injective/exchange/v1beta1/query.rpc.func";

{ getRpcEndpoint } = useChain("osmosis");

Expand Down Expand Up @@ -82,13 +82,13 @@ import {
createDeposit,
createLiquidatePosition,
createActivateStakeGrant,
} from "injectivejs/injective/exchange/v1beta1/tx.rpc.func";
} from "injective-react/injective/exchange/v1beta1/tx.rpc.func";
```

#### Auction Messages

```js
import { createBid } from "injectivejs/injective/auction/v1beta1/tx.rpc.func";
import { createBid } from "injective-react/injective/auction/v1beta1/tx.rpc.func";
```

#### Exchange Messages
Expand Down Expand Up @@ -130,7 +130,7 @@ import {
createUpdateParams,
createUpdateSpotMarket,
createWithdraw,
} from "injectivejs/injective/exchange/v1beta1/tx.rpc.func";
} from "injective-react/injective/exchange/v1beta1/tx.rpc.func";
```

#### Insurance Messages
Expand All @@ -140,7 +140,7 @@ import {
createCreateInsuranceFund,
createRequestRedemption,
createUnderwrite,
} from "injectivejs/injective/insurance/v1beta1/tx.rpc.func";
} from "injective-react/injective/insurance/v1beta1/tx.rpc.func";
```

#### OCR Messages
Expand All @@ -155,7 +155,7 @@ import {
createTransmit,
createUpdateFeed,
createWithdrawFeedRewardPool,
} from "injectivejs/injective/ocr/v1beta1/tx.rpc.func";
} from "injective-react/injective/ocr/v1beta1/tx.rpc.func";
```

#### Oracle Messages
Expand All @@ -169,7 +169,7 @@ import {
createRelayPythPrices,
createRelayStorkMessage,
createRequestBandIBCRates,
} from "injectivejs/injective/oracle/v1beta1/tx.rpc.func";
} from "injective-react/injective/oracle/v1beta1/tx.rpc.func";
```

#### Peggy Messages
Expand All @@ -189,7 +189,7 @@ import {
createValsetConfirm,
createValsetUpdateClaim,
createWithdrawClaim,
} from "injectivejs/injective/peggy/v1/msgs.rpc.func";
} from "injective-react/injective/peggy/v1/msgs.rpc.func";
```

#### CosmWasm Messages
Expand All @@ -212,13 +212,13 @@ import {
createUpdateInstantiateConfig,
createAddCodeUploadParamsAddresses,
createStoreAndMigrateContract,
} from "injectivejs/cosmwasm/wasm/v1/tx.rpc.func";
} from "injective-react/cosmwasm/wasm/v1/tx.rpc.func";
```

#### IBC Messages

```js
import { createTransfer } from "injectivejs/ibc/applications/transfer/v1/tx.rpc.func";
import { createTransfer } from "injective-react/ibc/applications/transfer/v1/tx.rpc.func";
```

#### Cosmos Messages
Expand All @@ -228,35 +228,35 @@ import {
createFundCommunityPool,
createCommunityPoolSpend,
createDepositValidatorRewardsPool,
} from "injectivejs/cosmos/distribution/v1beta1/tx.rpc.func";
} from "injective-react/cosmos/distribution/v1beta1/tx.rpc.func";

import {
createSend,
createMultiSend,
} from "injectivejs/cosmos/bank/v1beta1/tx.rpc.func";
} from "injective-react/cosmos/bank/v1beta1/tx.rpc.func";

import {
createDelegate,
createUndelegate,
createCancelUnbondingDelegation,
createCreateValidator,
} from "injectivejs/cosmos/staking/v1beta1/tx.rpc.func";
} from "injective-react/cosmos/staking/v1beta1/tx.rpc.func";

import {
createDeposit,
createSubmitProposal,
createVote,
createVoteWeighted,
} from "injectivejs/cosmos/gov/v1beta1/tx.rpc.func";
} from "injective-react/cosmos/gov/v1beta1/tx.rpc.func";
```

### Tx Hooks

You can use the hooks for every query and tx messages:

```js
import { useDelegate } from "interchainjs/cosmos/staking/v1beta1/tx.rpc.func";
import { useGetValidators } from "interchainjs/cosmos/staking/v1beta1/query.rpc.func";
import { useDelegate } from "injective-react/cosmos/staking/v1beta1/tx.rpc.func";
import { useGetValidators } from "injective-react/cosmos/staking/v1beta1/query.rpc.func";

const {
data,
Expand Down
Loading

0 comments on commit d018a7d

Please sign in to comment.