Skip to content
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
23 changes: 23 additions & 0 deletions .gitbook/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,29 @@
"jp/developers-native/examples/token-factory",
"jp/developers-native/examples/wasm"
]
},
{
"group": "チェーンのクエリ",
"pages": [
"jp/developers-native/query-chain/index",
"jp/developers-native/query-chain/auction",
"jp/developers-native/query-chain/auth",
"jp/developers-native/query-chain/bank",
"jp/developers-native/query-chain/distribution",
"jp/developers-native/query-chain/exchange",
"jp/developers-native/query-chain/governance",
"jp/developers-native/query-chain/ibc",
"jp/developers-native/query-chain/mint",
"jp/developers-native/query-chain/insurance-funds",
"jp/developers-native/query-chain/oracle",
"jp/developers-native/query-chain/peggy",
"jp/developers-native/query-chain/permissions",
"jp/developers-native/query-chain/staking",
"jp/developers-native/query-chain/tendermint",
"jp/developers-native/query-chain/wasm",
"jp/developers-native/query-chain/wasmx",
"jp/developers-native/query-chain/token-factory"
]
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion .gitbook/jp/developers-native/examples/bank.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bank
updatedAt: "2025-11-28"
---

Bankモジュールは、アカウント間のマルチアセットコイン転送の処理、および特定の種類のアカウント(特にvestingアカウントのdelegate/undelegate)で異なる動作が必要な特殊な擬似転送のトラッキングを担当します。残高を変更しなければならない他のモジュールとのセキュアなやり取りのために、さまざまな機能を持つ複数のインターフェースを公開しています。
Bankモジュールは、アカウント間のマルチアセットコイン転送の処理、および特定の種類のアカウント(特にvestingアカウントのdelegate/undelegate)で異なる動作が必要な特殊な擬似転送のトラッキングを担当します。残高を変更する必要がある他のモジュールと安全にやり取りするために、さまざまな機能を持つ複数のインターフェースを公開しています。

加えて、Bankモジュールはアプリケーションで使用されるすべてのアセットの総供給量をトラッキングし、クエリのサポートを提供します。

Expand Down
4 changes: 2 additions & 2 deletions .gitbook/jp/developers-native/examples/exchange.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ const txHash = await new MsgBroadcasterWithPk({
console.log(txHash);
```

このメッセージはチェーン上のspot注文をバッチでキャンセルするために使用されます

### MsgBatchCancelDerivativeOrders

このメッセージはチェーン上のspot注文をバッチでキャンセルするために使用されます

```ts
import { Network } from "@injectivelabs/networks";
import { MsgBroadcasterWithPk } from "@injectivelabs/sdk-ts/core/tx";
Expand Down
2 changes: 1 addition & 1 deletion .gitbook/jp/developers-native/examples/feegrant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updatedAt: "2025-11-28"

### MsgGrantAllowance

fee allowance grantは`MsgGrantAllowance`メッセージを使用して作成されます。すでに(granter, grantee)ペアに対するgrantが存在する場合、新しいgrantで以前のものが上書きされます
fee allowance grantは`MsgGrantAllowance`メッセージを使用して作成されます。すでに (granter, grantee) ペアに対するgrantが存在する場合、新しいgrantによって以前のgrantは上書きされます

```ts
import { Network } from "@injectivelabs/networks";
Expand Down
2 changes: 1 addition & 1 deletion .gitbook/jp/developers-native/examples/governance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Governance
updatedAt: "2025-12-23"
---

Injectiveはコミュニティ運営のブロックチェーンであり、INJをステーキングしているユーザーはブロックチェーンに関するgovernanceに参加できます。Injectiveプログラムへの修正、技術アップグレード、またはInjectiveエコシステム全体に影響を与えるその他のInjective関連の変更について、Proposalを提出できます。
Injectiveはコミュニティ主導のブロックチェーンであり、INJをステーキングしているユーザーはブロックチェーンのgovernanceに参加できます。Injectiveプログラムへの修正、技術アップグレード、またはInjectiveエコシステム全体に影響を与えるその他のInjective関連の変更について、Proposalを提出できます。

作成する各Proposalに対して、少なくとも1 INJのデポジットが必要です。これはあなたがInjectiveコミュニティのアクティブな参加者であり、Proposalの作成とプロトコルのガバナンスに資格があることを確認するためです。Proposalが投票ステージに進むには、500 INJのデポジットが必要です。500 INJを自身でデポジットすることもできますし、コミュニティと協力してまとめてデポジットすることもできます。

Expand Down
4 changes: 2 additions & 2 deletions .gitbook/jp/developers-native/examples/token-factory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ console.log(txHash);

### MsgBurn

adminはtoken factoryの供給量をバーンできます。それ以外のすべての人は、このメッセージを使用して自分の資金のみをバーンできます
adminは、token factoryトークンの供給量をバーンできます。それ以外のユーザーは、このメッセージを使用して自身の資金のみをバーンできます

```ts
import { Network } from "@injectivelabs/networks";
Expand Down Expand Up @@ -111,7 +111,7 @@ console.log(txHash);

### MsgSetDenomMetadata

特定のdenomへのメタデータの設定はdenomのadminのみが許可されます。bankモジュール内のdenomメタデータを上書きできます。
特定のdenomに対するメタデータの設定は、そのdenomのadminのみが実行できます。このメッセージを使用することで、bankモジュール内のdenomメタデータを上書きできます。

```ts
import { Network } from "@injectivelabs/networks";
Expand Down
50 changes: 50 additions & 0 deletions .gitbook/jp/developers-native/query-chain/auction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Auction
updatedAt: "2025-12-23"
---

チェーン上のauctionモジュールをクエリするためのコードスニペット例。

## gRPCを使用する

### auction periodなどのモジュールパラメータを取得する

```ts
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { ChainGrpcAuctionApi } from "@injectivelabs/sdk-ts/client/chain";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcAuctionApi = new ChainGrpcAuctionApi(endpoints.grpc);

const moduleParams = await chainGrpcAuctionApi.fetchModuleParams();

console.log(moduleParams);
```

### 現在のauctionの状態(最新のラウンドなど)を取得する

```ts
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { ChainGrpcAuctionApi } from "@injectivelabs/sdk-ts/client/chain";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcAuctionApi = new ChainGrpcAuctionApi(endpoints.grpc);

const latestAuctionModuleState = await chainGrpcAuctionApi.fetchModuleState();

console.log(latestAuctionModuleState);
```

### 現在のauction basketを取得し、最高入札者や入札額などの情報を取得する

```ts
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { ChainGrpcAuctionApi } from "@injectivelabs/sdk-ts/client/chain";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcAuctionApi = new ChainGrpcAuctionApi(endpoints.grpc);

const currentBasket = await chainGrpcAuctionApi.fetchCurrentBasket();

console.log(currentBasket);
```
92 changes: 92 additions & 0 deletions .gitbook/jp/developers-native/query-chain/auth.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: Auth
updatedAt: "2025-12-23"
---

チェーン上のauthモジュールをクエリするためのコードスニペット例。

## gRPCを使用する

### memoの最大文字数やトランザクション署名の上限などのパラメータを取得する

```ts
import { ChainGrpcAuthApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoints.grpc);

const moduleParams = await chainGrpcAuthApi.fetchModuleParams();

console.log(moduleParams);
```

### injective addressに紐づくアカウント詳細(address、sequence、pub_keyなど)を取得する

```ts
import { ChainGrpcAuthApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoints.grpc);
const injectiveAddress = "inj...";

const accountDetailsResponse = await chainGrpcAuthApi.fetchAccount(
injectiveAddress
);

console.log(accountDetailsResponse);
```

### チェーン上のアカウント一覧を取得する

```ts
import { PaginationOption } from '@injectivelabs/sdk-ts/types'
import { ChainGrpcAuthApi } from '@injectivelabs/sdk-ts/client/chain'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'

const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoints.grpc)
const injectiveAddress = 'inj...'
const pagination = {...} as PaginationOption

const accounts = await chainGrpcAuthApi.fetchAccounts(/* optional pagination params*/)

console.log(accounts)
```

## HTTP RESTを使用する

### injective addressに紐づくアカウント詳細(address、sequence、pub_keyなど)を取得する

```ts
import { ChainRestAuthApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestAuthApi = new ChainRestAuthApi(endpoints.rest);
const injectiveAddress = "inj...";

const accountDetailsResponse = await chainRestAuthApi.fetchAccount(
injectiveAddress
);

console.log(accountDetailsResponse);
```

#### injective addressからcosmos addressを取得する

```ts
import { ChainRestAuthApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestAuthApi = new ChainRestAuthApi(endpoints.rest);
const injectiveAddress = "inj...";

const cosmosAddress = await chainRestAuthApi.fetchCosmosAccount(
injectiveAddress
);

console.log(cosmosAddress);
```
112 changes: 112 additions & 0 deletions .gitbook/jp/developers-native/query-chain/bank.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: Bank
updatedAt: "2025-12-23"
---

bankモジュール関連のデータをチェーンからクエリするためのコードスニペット例。

## gRPCを使用する

### bankモジュールのパラメータを取得する

```ts line highlight={2}
import { ChainGrpcBankApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.grpc);

const moduleParams = await chainGrpcBankApi.fetchModuleParams();

console.log(moduleParams);
```

### injective addressの残高を取得する

```ts
import { ChainGrpcBankApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.grpc);

const injectiveAddress = "inj...";

const balances = await chainGrpcBankApi.fetchBalances(injectiveAddress);

console.log(balances);
```

### base denomごとのcosmos addressの残高を取得する

```ts
import { ChainGrpcBankApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.grpc);

const cosmosAddress = "cosmos1..."; /* example is using Cosmos Hub */
const denom = "uatom";

const balance = await chainGrpcBankApi.fetchBalance({
accountAddress: cosmosAddress,
denom,
});

console.log(balance);
```

### チェーン上の総供給量を取得する

```ts
import { PaginationOption } from '@injectivelabs/sdk-ts/types'
import { ChainGrpcBankApi } from '@injectivelabs/sdk-ts/client/chain'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'

const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.grpc)

const pagination = {...} as PaginationOption

const totalSupply = await chainGrpcBankApi.fetchTotalSupply(
pagination /* optional pagination parameter */
)

console.log(totalSupply)
```

## HTTP RESTを使用する

### アドレスの残高を取得する

```ts
import { ChainRestBankApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestBankApi = new ChainRestBankApi(endpoints.rest);

const injectiveAddress = "inj...";

const balances = await chainRestBankApi.fetchBalances(injectiveAddress);

console.log(balances);
```

### base denomごとのcosmos addressの残高を取得する

```ts
import { ChainRestBankApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestBankApi = new ChainRestBankApi(endpoints.rest);

const cosmosAddress = "cosmos..."; /* example is using Cosmos Hub */
const denom = "uatom";

const balance = await chainRestBankApi.fetchBalance(cosmosAddress, denom);

console.log(balance);
```
Loading