NAV
shell javascript

Twilight Protocol — Full Reference

This page consolidates all Twilight API documentation in a single scrollable view with a unified sidebar and search.

Jump to a section: - Start Here — Networks, endpoints, decision table - Conventions — Pagination, formats, common patterns - Nyks Chain API — LCD REST endpoints - zkOS RPC — Privacy layer - Indexer API — Indexed data & WebSocket


Browse by section: Home · Chain API · zkOS RPC · Indexer API

Start Here

Twilight is a privacy-preserving Bitcoin DeFi protocol built on the Nyks chain (Cosmos SDK). It provides distributed Bitcoin custody, zero-knowledge privacy transfers, and an indexed data layer for querying historical chain activity.

This section helps you choose the right API and get the network details you need.

Prerequisites

All API endpoints are public and require no authentication. You only need an HTTP client (curl, fetch, etc.) to get started.

Quick test:

curl https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/node_info

Which API Should I Use?

Your goal Use Base URL
Query on-chain state (accounts, balances, staking, gov) Nyks Chain (LCD REST) https://lcd.twilight.org
Submit transactions, simulate gas, broadcast txs Nyks Chain (LCD REST) https://lcd.twilight.org
Privacy layer: UTXOs, shielded transfers, burn/mint zkOS RPC https://nykschain.twilight.rest/zkos/
Indexed data: blocks, tx history, search, analytics Indexer API https://indexer.twilight.org/api
Build wallets, trading apps, relayer integrations Client SDK (external) SDK repo

Chain Info

Property Mainnet Testnet
Chain ID nyks nyks-testnet
Bech32 prefix twilight twilight
Denom NYKS, SATS NYKS, SATS

Networks & Endpoints

Network LCD Indexer zkOS
Mainnet lcd.twilight.org indexer.twilight.org nykschain.twilight.rest/zkos
Testnet lcd.twilight.rest (if available) nykschain.twilight.rest/zkos

Typical Developer Workflows

Workflow APIs used
Query account balance LCD REST → GET /cosmos/bank/v1beta1/balances/{address}
Build & broadcast a tx LCD REST → POST /cosmos/tx/v1beta1/simulate, POST /cosmos/tx/v1beta1/txs
Get shielded UTXOs zkOS RPC → getUtxos, getMemoUtxos, getStateUtxos
Submit private transfer zkOS RPC → txCommit
Search blocks / txs by address Indexer API → GET /api/blocks, GET /api/transactions, GET /api/search
Real-time block / tx events Indexer WebSocket → wss://indexer.twilight.org
Build a wallet or trading app Client SDK (Rust)

Conventions

Common patterns across Twilight APIs.

Authentication

No authentication is required for any public query endpoint across all three APIs (Chain LCD, zkOS RPC, Indexer).

HTTP Methods

API Protocol Methods
Chain LCD REST GET for queries, POST for transaction broadcast/simulation
zkOS RPC JSON-RPC 2.0 All requests via POST
Indexer REST GET for queries

Pagination

API Parameters Notes
LCD REST pagination.key, pagination.limit, pagination.offset Use key for cursor-based; offset for page-based
Indexer page, limit Default limit: 20, max: 100

LCD example:

curl "https://lcd.twilight.org/cosmos/staking/v1beta1/validators?pagination.limit=10&pagination.offset=0"

Indexer example:

curl "https://indexer.twilight.org/api/blocks?page=1&limit=20"

Data Formats

Error Responses

Chain LCD returns Cosmos SDK errors:

{
  "code": 3,
  "message": "invalid address: decoding bech32 failed",
  "details": []
}

Indexer returns JSON errors:

{
  "error": "Resource not found"
}

zkOS RPC returns JSON-RPC 2.0 errors:

{
  "jsonrpc": "2.0",
  "error": { "code": -32602, "message": "Invalid params" },
  "id": 1
}

Rate Limiting

API Limit
Indexer 100 requests per 60-second window
Chain LCD No current limit
zkOS RPC No current limit

The Indexer returns 429 Too Many Requests when the limit is exceeded. Retry after the window resets.

Caching

Indexer responses include cache hints per endpoint (noted in each endpoint's documentation). Typical cache TTLs range from 2 seconds for blocks to 60 seconds for statistics.

Indexer vs LCD

Use case Prefer
Authoritative on-chain state LCD REST
Historical queries, search, analytics Indexer API
Real-time events (blocks, txs) Indexer WebSocket
Transaction submission LCD REST or zkOS RPC

Nyks Zkos Module

The zkOS chain module stores the on-chain record of zero-knowledge transactions. Use these LCD endpoints to query mint/burn trading BTC operations, module parameters, and transfer transaction records. For submitting zkOS transactions or querying UTXOs, use the zkOS RPC API instead.

Base URL: https://lcd.twilight.org

No authentication required.


Endpoints

Mint or Burn Trading BTC

curl -X GET https://lcd.twilight.org/twilight-project/nyks/zkos/mint_or_burn_trading_btc/{twilightAddress} \
  -H 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/zkos/mint_or_burn_trading_btc/{twilightAddress}');
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "MintOrBurnTradingBtc": [
    {
      "mintOrBurn": true,
      "btcValue": "1000000",
      "qqAccount": "qqAccount...",
      "encryptScalar": "0xabcdef1234567890...",
      "twilightAddress": "twilight1abc123def456..."
    }
  ]
}

GET /twilight-project/nyks/zkos/mint_or_burn_trading_btc/{twilightAddress}

Queries a list of MintOrBurnTradingBtc items.

Parameters

Name In Type Required Description
twilightAddress path string true The Twilight address to query

Responses

Status Meaning Description
200 OK A successful response
default Default An unexpected error response

Response Schema (200)

Name Type Required Description
mintOrBurn boolean false Whether this is a mint or burn operation
btcValue string(uint64) false The BTC value
qqAccount string false The QQ account address
encryptScalar string false The encrypted scalar
twilightAddress string false The Twilight address

This operation does not require authentication


Get ZKOS Parameters

curl -X GET https://lcd.twilight.org/twilight-project/nyks/zkos/params \
  -H 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/zkos/params');
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "params": {}
}

GET /twilight-project/nyks/zkos/params

Parameters queries the parameters of the module.

Responses

Status Meaning Description
200 OK A successful response
default Default An unexpected error response

Response Schema (200)

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Description
params object false params holds all the parameters of this module

This operation does not require authentication


Get Transfer Transaction

curl -X GET https://lcd.twilight.org/twilight-project/nyks/zkos/transfer_tx/{txId} \
  -H 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/zkos/transfer_tx/{txId}');
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "TransferTx": {
    "txId": "0x1234567890abcdef...",
    "txByteCode": "0x1234567890abcdef...",
    "txFee": "1000000",
    "zkOracleAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/zkos/transfer_tx/{txId}

Queries a list of TransferTx items.

Parameters

Name In Type Required Description
txId path string true The transaction ID to query

Responses

Status Meaning Description
200 OK A successful response
default Default An unexpected error response

Response Schema (200)

Name Type Required Description
txId string false The transaction ID
txByteCode string false The transaction bytecode
txFee string(uint64) false The transaction fee
zkOracleAddress string false The ZK Oracle address

This operation does not require authentication

Twilight BTC Bridge Module

The Bridge module manages the BTC-Twilight bridge, including deposits, withdrawals, sweep/refund transactions, and reserve management. Validators (judges) coordinate multi-signature Bitcoin transactions to move BTC between the Bitcoin network and Twilight. Key concepts: reserves hold BTC in multi-sig addresses, judges are trusted validators that sign bridge transactions, and sweep rounds periodically consolidate reserve UTXOs.

Base URL: https://lcd.twilight.org


BroadcastTxRefund

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_refund/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_refund/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "broadcastRefundMsg": {
    "reserveId": "1000000",
    "roundId": "1000000",
    "signedRefundTx": "0x1234567890abcdef...",
    "judgeAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/bridge/broadcast_tx_refund/{reserveId}/{roundId}

Queries a list of BroadcastTxRefund items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» broadcastRefundMsg object false none none
»» reserveId string(uint64) false none none
»» roundId string(uint64) false none none
»» signedRefundTx string false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


BroadcastTxRefundAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_refund_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_refund_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "BroadcastTxRefundMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signedRefundTx": "0x1234567890abcdef...",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/broadcast_tx_refund_all

Queries a list of BroadcastTxRefundAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» BroadcastTxRefundMsg [object] false none none
»» 6. MsgBroadcastTxRefund object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signedRefundTx string false none none
»»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


BroadcastTxSweep

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_sweep/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_sweep/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "broadcastSweepMsg": {
    "reserveId": "1000000",
    "roundId": "1000000",
    "signedSweepTx": "0x1234567890abcdef...",
    "judgeAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/bridge/broadcast_tx_sweep/{reserveId}/{roundId}

Queries a list of BroadcastTxSweep items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» broadcastSweepMsg object false none none
»» reserveId string(uint64) false none none
»» roundId string(uint64) false none none
»» signedSweepTx string false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


BroadcastTxSweepAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_sweep_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/broadcast_tx_sweep_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "BroadcastTxSweepMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signedSweepTx": "0x1234567890abcdef...",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/broadcast_tx_sweep_all

Queries a list of BroadcastTxSweepAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» BroadcastTxSweepMsg [object] false none none
»» 7. MsgBroadcastTxSweep object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signedSweepTx string false none none
»»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "params": {}
}

GET /twilight-project/nyks/bridge/params

Parameters queries the parameters of the module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params holds all the parameters of this module.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ProposeRefundHashAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/propose_refund_hash_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/propose_refund_hash_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "proposeRefundHashMsg": [
    {
      "refundHash": "0x1234567890abcdef...",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/propose_refund_hash_all

Queries a list of ProposeRefundHashAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» proposeRefundHashMsg [object] false none none
»» refundHash string false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ProposeSweepAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/propose_sweep_address/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/propose_sweep_address/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "proposeSweepAddressMsg": {
    "btcAddress": "0x1234567890abcdef...",
    "btcScript": "btcScript...",
    "reserveId": "1000000",
    "roundId": "1000000",
    "judgeAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/bridge/propose_sweep_address/{reserveId}/{roundId}

Queries a list of ProposeSweepAddress items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» proposeSweepAddressMsg object false none none
»» btcAddress string false none none
»» btcScript string false none none
»» reserveId string(uint64) false none none
»» roundId string(uint64) false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ProposeSweepAddressesAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/propose_sweep_addresses_all/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/propose_sweep_addresses_all/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "proposeSweepAddressMsgs": [
    {
      "btcAddress": "0x1234567890abcdef...",
      "btcScript": "btcScript...",
      "reserveId": "1000000",
      "roundId": "1000000",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/propose_sweep_addresses_all/{limit}

Queries a list of ProposeSweepAddressesAll items.

Parameters

Name In Type Required Description
limit path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» proposeSweepAddressMsgs [object] false none none
»» Sweep messages in order
1. MsgProposeSweepAddress object false none none
»»» btcAddress string false none none
»»» btcScript string false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredBtcDepositAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_address/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_address/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "depositAddress": "0x1234567890abcdef...",
  "twilightDepositAddress": "twilight1abc123def456..."
}

GET /twilight-project/nyks/bridge/registered_btc_deposit_address/{depositAddress}

Queries a list of RegisteredBtcDepositAddress items.

Parameters

Name In Type Required Description
depositAddress path string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» depositAddress string false none none
» twilightDepositAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredBtcDepositAddressByTwilightAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_address_by_twilight_address/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_address_by_twilight_address/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "depositAddress": "0x1234567890abcdef...",
  "twilightDepositAddress": "twilight1abc123def456..."
}

GET /twilight-project/nyks/bridge/registered_btc_deposit_address_by_twilight_address/{twilightDepositAddress}

Queries a list of RegisteredBtcDepositAddressByTwilightAddress items.

Parameters

Name In Type Required Description
twilightDepositAddress path string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» depositAddress string false none none
» twilightDepositAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredBtcDepositAddresses

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_addresses \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_btc_deposit_addresses', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "addresses": [
    {
      "btcDepositAddress": "0x1234567890abcdef...",
      "btcSatoshiTestAmount": "1000000",
      "twilightStakingAmount": "1000000",
      "twilightAddress": "twilight1abc123def456...",
      "isConfirmed": true,
      "CreationTwilightBlockHeight": "CreationTwilightBlockHeight..."
    }
  ]
}

GET /twilight-project/nyks/bridge/registered_btc_deposit_addresses

Queries a list of RegisteredBtcDepositAddresses items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» addresses [object] false none none
»» btcDepositAddress string false none none
»» btcSatoshiTestAmount string(uint64) false none none
»» twilightStakingAmount string(uint64) false none none
»» twilightAddress string false none none
»» isConfirmed boolean false none none
»» CreationTwilightBlockHeight string(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredJudgeAddressByValidatorAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_judge_address_by_validator_address/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_judge_address_by_validator_address/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "judgeAddress": "0x1234567890abcdef...",
  "numOfSigners": "1000000",
  "threshold": "1000000",
  "signerApplicationFee": "1000000",
  "arbitraryData": "arbitraryData...",
  "validatorAddress": "0x1234567890abcdef..."
}

GET /twilight-project/nyks/bridge/registered_judge_address_by_validator_address/{validatorAddress}

Queries a list of RegisteredJudgeAddressByValidatorAddress items.

Parameters

Name In Type Required Description
validatorAddress path string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» judgeAddress string false none none
» numOfSigners string(uint64) false none none
» threshold string(uint64) false none none
» signerApplicationFee string(uint64) false none none
» arbitraryData string false none none
» validatorAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredJudges

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_judges \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_judges', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "Judges": [
    {
      "judgeAddress": "0x1234567890abcdef...",
      "numOfSigners": "1000000",
      "threshold": "1000000",
      "signerApplicationFee": "1000000",
      "fragmentFeeBips": "1000000",
      "arbitraryData": "arbitraryData...",
      "validatorAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/registered_judges

Queries a list of RegisteredJudges items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» Judges [object] false none none
»» judgeAddress string false none none
»» numOfSigners string(uint64) false none none
»» threshold string(uint64) false none none
»» signerApplicationFee string(uint64) false none none
»» fragmentFeeBips string(uint64) false none none
»» arbitraryData string false none none
»» validatorAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RegisteredReserveAddresses

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/registered_reserve_addresses \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/registered_reserve_addresses', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "addresses": [
    {
      "fragmentId": "1000000",
      "reserveScript": "reserveScript...",
      "reserveAddress": "0x1234567890abcdef...",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/registered_reserve_addresses

Queries a list of RegisteredReserveAddresses items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» addresses [object] false none none
»» fragmentId string(uint64) false none none
»» reserveScript string false none none
»» reserveAddress string false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


SignRefund

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/sign_refund/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/sign_refund/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "signRefundMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signerPublicKey": "signerPublicKey...",
      "refundSignature": [
        "item..."
      ],
      "signerAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/sign_refund/{reserveId}/{roundId}

Queries a list of SignRefund items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» signRefundMsg [object] false none none
»» 4. MsgSignRefund object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signerPublicKey string false none none
»»» refundSignature [string] false none none
»»» signerAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


SignRefundAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/sign_refund_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/sign_refund_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "signRefundMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signerPublicKey": "signerPublicKey...",
      "refundSignature": [
        "item..."
      ],
      "signerAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/sign_refund_all

Queries a list of SignRefundAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» signRefundMsg [object] false none none
»» 4. MsgSignRefund object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signerPublicKey string false none none
»»» refundSignature [string] false none none
»»» signerAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


SignSweep

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/sign_sweep/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/sign_sweep/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "signSweepMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signerPublicKey": "signerPublicKey...",
      "sweepSignature": [
        "item..."
      ],
      "signerAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/sign_sweep/{reserveId}/{roundId}

Queries a list of SignSweep items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» signSweepMsg [object] false none none
»» 5. MsgSignSweep object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signerPublicKey string false none none
»»» sweepSignature [string] false none none
»»» signerAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


SignSweepAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/sign_sweep_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/sign_sweep_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "signSweepMsg": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "signerPublicKey": "signerPublicKey...",
      "sweepSignature": [
        "item..."
      ],
      "signerAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/sign_sweep_all

Queries a list of SignSweepAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» signSweepMsg [object] false none none
»» 5. MsgSignSweep object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» signerPublicKey string false none none
»»» sweepSignature [string] false none none
»»» signerAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


UnsignedTxRefund

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_refund/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_refund/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "unsignedTxRefundMsg": {
    "reserveId": "1000000",
    "roundId": "1000000",
    "btcUnsignedRefundTx": "0x1234567890abcdef...",
    "judgeAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/bridge/unsigned_tx_refund/{reserveId}/{roundId}

Queries a list of UnsignedTxRefund items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» unsignedTxRefundMsg object false none none
»» reserveId string(uint64) false none none
»» roundId string(uint64) false none none
»» btcUnsignedRefundTx string false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


UnsignedTxRefundAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_refund_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_refund_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "unsignedTxRefundMsgs": [
    {
      "reserveId": "1000000",
      "roundId": "1000000",
      "btcUnsignedRefundTx": "0x1234567890abcdef...",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/unsigned_tx_refund_all

Queries a list of UnsignedTxRefundAll items.

Parameters

Name In Type Required Description
limit query string(uint64) false none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» unsignedTxRefundMsgs [object] false none none
»» 3. MsgUnsignedTxRefund object false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» btcUnsignedRefundTx string false none none
»»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


UnsignedTxSweep

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_sweep/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_sweep/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "unsignedTxSweepMsg": {
    "txId": "0x1234567890abcdef...",
    "btcUnsignedSweepTx": "0x1234567890abcdef...",
    "reserveId": "1000000",
    "roundId": "1000000",
    "judgeAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/bridge/unsigned_tx_sweep/{reserveId}/{roundId}

Queries a list of UnsignedTxSweep items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» unsignedTxSweepMsg object false none none
»» txId string false none none
»» btcUnsignedSweepTx string false none none
»» reserveId string(uint64) false none none
»» roundId string(uint64) false none none
»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


UnsignedTxSweepAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_sweep_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/unsigned_tx_sweep_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "unsignedTxSweepMsgs": [
    {
      "txId": "0x1234567890abcdef...",
      "btcUnsignedSweepTx": "0x1234567890abcdef...",
      "reserveId": "1000000",
      "roundId": "1000000",
      "judgeAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/bridge/unsigned_tx_sweep_all

Queries a list of UnsignedTxSweepAll items.

Parameters

Name In Type Required Description
limit query string(uint64) false none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» unsignedTxSweepMsgs [object] false none none
»» 2. MsgUnsignedTxSweep object false none none
»»» txId string false none none
»»» btcUnsignedSweepTx string false none none
»»» reserveId string(uint64) false none none
»»» roundId string(uint64) false none none
»»» judgeAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


WithdrawBtcRequestAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/bridge/withdraw_btc_request_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/bridge/withdraw_btc_request_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "withdrawRequest": [
    {
      "withdrawIdentifier": 0,
      "withdrawAddress": "0x1234567890abcdef...",
      "withdrawReserveId": "1000000",
      "withdrawAmount": "1000000",
      "twilightAddress": "twilight1abc123def456...",
      "isConfirmed": true,
      "CreationTwilightBlockHeight": "CreationTwilightBlockHeight..."
    }
  ]
}

GET /twilight-project/nyks/bridge/withdraw_btc_request_all

Queries a list of WithdrawBtcRequestAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» withdrawRequest [object] false none none
»» Chain creates an internal mapping with identifier and bool confirmed object false none none
»»» withdrawIdentifier integer(int64) false none none
»»» withdrawAddress string false none none
»»» withdrawReserveId string(uint64) false none none
»»» withdrawAmount string(uint64) false none none
»»» twilightAddress string false none none
»»» isConfirmed boolean false none none
»»» CreationTwilightBlockHeight string(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Forkscanner Module

The Forks module (Forkscanner) manages validator delegate key mappings. Validators register their BTC oracle address, public key, and zkOS oracle address through this module. These delegate keys are used by the bridge module for BTC chain tip attestation and the zkOS module for oracle operations.

Base URL: https://lcd.twilight.org


DelegateKeysAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/forks/delegate_keys_all \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/forks/delegate_keys_all', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "addresses": [
    {
      "validatorAddress": "0x1234567890abcdef...",
      "btcOracleAddress": "0x1234567890abcdef...",
      "btcPublicKey": "btcPublicKey...",
      "zkOracleAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/forks/delegate_keys_all

Queries a list of DelegateKeysAll items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» addresses [object] false none none
»» validatorAddress string false none none
»» btcOracleAddress string false none none
»» btcPublicKey string false none none
»» zkOracleAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none

This operation does not require authentication

DelegateKeysByBtcOracleAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/forks/delegate_keys_by_btc_oracle_address/{btcOracleAddress} \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/forks/delegate_keys_by_btc_oracle_address/{btcOracleAddress}', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "addresses": {
    "validatorAddress": "0x1234567890abcdef...",
    "btcOracleAddress": "0x1234567890abcdef...",
    "btcPublicKey": "btcPublicKey...",
    "zkOracleAddress": "0x1234567890abcdef..."
  }
}

GET /twilight-project/nyks/forks/delegate_keys_by_btc_oracle_address/{btcOracleAddress}

Queries a list of DelegateKeysByBtcOracleAddress items.

Parameters

Name In Type Required Description
btcOracleAddress path string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» addresses object false none none
»» validatorAddress string false none none
»» btcOracleAddress string false none none
»» btcPublicKey string false none none
»» zkOracleAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none

This operation does not require authentication

Twilight Volt Module

The Volt module manages BTC reserves, fragments (multi-signature key groups), signer applications, clearing accounts, and withdrawal pools. Fragments are groups of validators that collectively control reserve Bitcoin addresses using threshold signatures. Clearing accounts track per-user balances across reserves.

Base URL: https://lcd.twilight.org


BtcReserve

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/btc_reserve \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/btc_reserve', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "BtcReserves": [
    {
      "ReserveId": "1000000",
      "ReserveAddress": "0x1234567890abcdef...",
      "JudgeAddress": "0x1234567890abcdef...",
      "BtcRelayCapacityValue": "1000000",
      "TotalValue": "1000000",
      "PrivatePoolValue": "1000000",
      "PublicValue": "1000000",
      "FeePool": "1000000",
      "UnlockHeight": "1000000",
      "RoundId": "1000000"
    }
  ]
}

GET /twilight-project/nyks/volt/btc_reserve

Queries a list of BtcReserve items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» BtcReserves [object] false none none
»» BtcReserve is a mapping of a validator address to a reserve ID

It holds other values in the reserve struct such as total value, private pool value, public pool value, and the btc relay capacity value|object|false|none|none| |»»» ReserveId|string(uint64)|false|none|none| |»»» ReserveAddress|string|false|none|none| |»»» JudgeAddress|string|false|none|none| |»»» BtcRelayCapacityValue|string(uint64)|false|none|none| |»»» TotalValue|string(uint64)|false|none|none| |»»» PrivatePoolValue|string(uint64)|false|none|none| |»»» PublicValue|string(uint64)|false|none|none| |»»» FeePool|string(uint64)|false|none|none| |»»» UnlockHeight|string(uint64)|false|none|none| |»»» RoundId|string(uint64)|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


BtcWithdrawRequest

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/btc_withdraw_request/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/btc_withdraw_request/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "BtcWithdrawRequest": {
    "withdrawIdentifier": 0,
    "withdrawAddress": "0x1234567890abcdef...",
    "withdrawReserveId": "1000000",
    "withdrawAmount": "1000000",
    "twilightAddress": "twilight1abc123def456...",
    "isConfirmed": true,
    "CreationTwilightBlockHeight": "CreationTwilightBlockHeight..."
  }
}

GET /twilight-project/nyks/volt/btc_withdraw_request/{twilightAddress}

Queries a list of BtcWithdrawRequest items.

Parameters

Name In Type Required Description
twilightAddress path string true none
reserveId query string(uint64) false none
btcAddress query string false none
withdrawAmount query string(uint64) false none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» BtcWithdrawRequest object false none none
»» withdrawIdentifier integer(int64) false none none
»» withdrawAddress string false none none
»» withdrawReserveId string(uint64) false none none
»» withdrawAmount string(uint64) false none none
»» twilightAddress string false none none
»» isConfirmed boolean false none none
»» CreationTwilightBlockHeight string(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ClearingAccount

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/clearing_account/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/clearing_account/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "ClearingAccount": {
    "TwilightAddress": "twilight1abc123def456...",
    "BtcDepositAddress": "0x1234567890abcdef...",
    "BtcDepositAddressIdentifier": 0,
    "BtcWithdrawAddress": "0x1234567890abcdef...",
    "BtcWithdrawAddressIdentifier": 0,
    "ReserveAccountBalances": [
      {
        "ReserveId": "1000000",
        "Amount": "1000000"
      }
    ]
  }
}

GET /twilight-project/nyks/volt/clearing_account/{twilightAddress}

Queries a list of ClearingAccount items.

Parameters

Name In Type Required Description
twilightAddress path string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ClearingAccount object false none none
»» TwilightAddress string false none none
»» BtcDepositAddress string false none none
»» BtcDepositAddressIdentifier integer(int64) false none none
»» BtcWithdrawAddress string false none none
»» BtcWithdrawAddressIdentifier integer(int64) false none none
»» ReserveAccountBalances [object] false none none
»»» ReserveId string(uint64) false none none
»»» Amount string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


FragmentById

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/fragment_by_id/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/fragment_by_id/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "Fragment": {
    "FragmentId": "1000000",
    "FragmentStatus": true,
    "JudgeAddress": "0x1234567890abcdef...",
    "JudgeStatus": true,
    "Signers": [
      {
        "FragmentID": "1000000",
        "SignerAddress": "0x1234567890abcdef...",
        "SignerStatus": true
      }
    ],
    "SignerApplicationFee": "1000000",
    "Threshold": "1000000",
    "FeePool": "1000000",
    "FragmentFeeBips": "1000000",
    "arbitraryData": "arbitraryData...",
    "ReserveIds": [
      "1000000"
    ]
  }
}

GET /twilight-project/nyks/volt/fragment_by_id/{fragmentId}

Queries a list of FragmentById items.

Parameters

Name In Type Required Description
fragmentId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» Fragment object false none none
»» FragmentId string(uint64) false none none
»» FragmentStatus boolean false none none
»» JudgeAddress string false none none
»» JudgeStatus boolean false none none
»» Signers [object] false none none
»»» FragmentID string(uint64) false none none
»»» SignerAddress string false none none
»»» SignerStatus boolean false none none
»»» SignerBtcPublicKey string false none none
»»» SignerApplicationFee string(uint64) false none none
»»» SignerFeeBips string(uint64) false none none
»» SignerApplicationFee string(uint64) false none none
»» Threshold string(uint64) false none none
»» FeePool string(uint64) false none none
»» FragmentFeeBips string(uint64) false none none
»» arbitraryData string false none none
»» ReserveIds [string] false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


GetAllFragments

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/get_all_fragments \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/get_all_fragments', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "Fragments": [
    {
      "FragmentId": "1000000",
      "FragmentStatus": true,
      "JudgeAddress": "0x1234567890abcdef...",
      "JudgeStatus": true,
      "Signers": [
        {
          "FragmentID": "1000000",
          "SignerAddress": "0x1234567890abcdef...",
          "SignerStatus": true
        }
      ],
      "SignerApplicationFee": "1000000",
      "Threshold": "1000000",
      "FeePool": "1000000",
      "FragmentFeeBips": "1000000",
      "arbitraryData": "arbitraryData...",
      "ReserveIds": [
        "1000000"
      ]
    }
  ]
}

GET /twilight-project/nyks/volt/get_all_fragments

Queries a list of GetAllFragments items.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» Fragments [object] false none none
»» FragmentId string(uint64) false none none
»» FragmentStatus boolean false none none
»» JudgeAddress string false none none
»» JudgeStatus boolean false none none
»» Signers [object] false none none
»»» FragmentID string(uint64) false none none
»»» SignerAddress string false none none
»»» SignerStatus boolean false none none
»»» SignerBtcPublicKey string false none none
»»» SignerApplicationFee string(uint64) false none none
»»» SignerFeeBips string(uint64) false none none
»» SignerApplicationFee string(uint64) false none none
»» Threshold string(uint64) false none none
»» FeePool string(uint64) false none none
»» FragmentFeeBips string(uint64) false none none
»» arbitraryData string false none none
»» ReserveIds [string] false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "params": {}
}

GET /twilight-project/nyks/volt/params

Parameters queries the parameters of the module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params holds all the parameters of this module.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


RefundTxSnapshot

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/refund_tx_snapshot/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/refund_tx_snapshot/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "RefundTxSnapshot": {
    "ReserveId": "1000000",
    "RoundId": "1000000",
    "refundAccounts": [
      {
        "Amount": "1000000",
        "BtcDepositAddress": "0x1234567890abcdef...",
        "BtcDepositAddressIdentifier": 0
      }
    ],
    "EndBlockerHeightTwilight": "EndBlockerHeightTwilight..."
  }
}

GET /twilight-project/nyks/volt/refund_tx_snapshot/{reserveId}/{roundId}

Queries a list of RefundTxSnapshot items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» RefundTxSnapshot object false none none
»» ReserveId string(uint64) false none none
»» RoundId string(uint64) false none none
»» refundAccounts [object] false none none
»»» RefundTxSnap is used to keep a mapping of the last refund transaction for a reserve object false none none
»»»» Amount string(uint64) false none none
»»»» BtcDepositAddress string false none none
»»»» BtcDepositAddressIdentifier integer(int64) false none none
»» EndBlockerHeightTwilight string(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ReserveClearingAccountsAll

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/reserve_clearing_accounts_all/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/reserve_clearing_accounts_all/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "ReserveClearingAccountsAll": [
    {
      "TwilightAddress": "twilight1abc123def456...",
      "BtcDepositAddress": "0x1234567890abcdef...",
      "BtcDepositAddressIdentifier": 0,
      "BtcWithdrawAddress": "0x1234567890abcdef...",
      "BtcWithdrawAddressIdentifier": 0,
      "ReserveAccountBalances": [
        {
          "ReserveId": "1000000",
          "Amount": "1000000"
        }
      ]
    }
  ]
}

GET /twilight-project/nyks/volt/reserve_clearing_accounts_all/{reserveId}

Queries a list of ReserveClearingAccountsAll items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ReserveClearingAccountsAll [object] false none none
»» ClearingAccount is used to keep a mapping of how a user's addresses and its reserve account balances object false none none
»»» TwilightAddress string false none none
»»» BtcDepositAddress string false none none
»»» BtcDepositAddressIdentifier integer(int64) false none none
»»» BtcWithdrawAddress string false none none
»»» BtcWithdrawAddressIdentifier integer(int64) false none none
»»» ReserveAccountBalances [object] false none none
»»»» ReserveId string(uint64) false none none
»»»» Amount string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ReserveWithdrawPool

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/reserve_withdraw_pool/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/reserve_withdraw_pool/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "ReserveWithdrawPool": {
    "ReserveID": "1000000",
    "RoundID": "1000000",
    "processingWithdrawIdentifiers": [
      0
    ],
    "queuedWithdrawIdentifiers": [
      0
    ],
    "currentProcessingIndex": 0
  }
}

GET /twilight-project/nyks/volt/reserve_withdraw_pool/{reserveId}

Queries a list of ReserveWithdrawPool items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ReserveWithdrawPool object false none none
»» ReserveID string(uint64) false none none
»» RoundID string(uint64) false none none
»» processingWithdrawIdentifiers [integer] false none none
»» queuedWithdrawIdentifiers [integer] false none none
»» currentProcessingIndex integer(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


ReserveWithdrawSnapshot

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/reserve_withdraw_snapshot/string/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/reserve_withdraw_snapshot/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "ReserveWithdrawSnapshot": {
    "ReserveId": "1000000",
    "RoundId": "1000000",
    "withdrawRequests": [
      {
        "withdrawIdentifier": 0,
        "withdrawAddress": "0x1234567890abcdef...",
        "withdrawAmount": "1000000"
      }
    ],
    "EndBlockerHeightTwilight": "EndBlockerHeightTwilight..."
  }
}

GET /twilight-project/nyks/volt/reserve_withdraw_snapshot/{reserveId}/{roundId}

Queries a list of ReserveWithdrawSnapshot items.

Parameters

Name In Type Required Description
reserveId path string(uint64) true none
roundId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ReserveWithdrawSnapshot object false none none
»» ReserveId string(uint64) false none none
»» RoundId string(uint64) false none none
»» withdrawRequests [object] false none none
»»» WithdrawRequestSnap is a snapshot of the withdraw request object false none none
»»»» withdrawIdentifier integer(int64) false none none
»»»» withdrawAddress string false none none
»»»» withdrawAmount string(uint64) false none none
»» EndBlockerHeightTwilight string(int64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication


SignerApplications

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/volt/signer_applications/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/volt/signer_applications/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "SignerApplications": [
    {
      "applicationId": "1000000",
      "fragmentId": "1000000",
      "applicationFee": "1000000",
      "feeBips": "1000000",
      "btcPubKey": "btcPubKey...",
      "signerAddress": "0x1234567890abcdef..."
    }
  ]
}

GET /twilight-project/nyks/volt/signer_applications/{fragmentId}

Queries a list of SignerApplications items.

Parameters

Name In Type Required Description
fragmentId path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» SignerApplications [object] false none none
»» applicationId string(uint64) false none none
»» fragmentId string(uint64) false none none
»» applicationFee string(uint64) false none none
»» feeBips string(uint64) false none none
»» btcPubKey string false none none
»» signerAddress string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Nyks Auth Module

Accounts

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/auth/v1beta1/accounts \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/auth/v1beta1/accounts', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "accounts": [
    {
      "@type": "@type..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

GET /cosmos/auth/v1beta1/accounts

Accounts returns all the existing accounts

Since: cosmos-sdk 0.43

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

*QueryAccountsResponse is the response type for the Query/Accounts RPC method.

Since: cosmos-sdk 0.43*

Name Type Required Restrictions Description
» accounts [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Account

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/auth/v1beta1/accounts/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/auth/v1beta1/accounts/string', {

> The result from the above endpoint looks like this:

```json
{
  "account": {
    "@type": "@type..."
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/auth/v1beta1/accounts/{address}

Account returns account details based on address.

Parameters

Name In Type Required Description
address path string true address defines the address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAccountResponse is the response type for the Query/Account RPC method.

Name Type Required Restrictions Description
» account object false none account defines the account of the corresponding address.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Params

Code samples


> The result from the above endpoint looks like this:

```json
{
  "params": {
    "max_memo_characters": "1000000",
    "tx_sig_limit": "1000000",
    "tx_size_cost_per_byte": "1000000",
    "sig_verify_cost_ed25519": "1000000",
    "sig_verify_cost_secp256k1": "1000000"
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/auth/v1beta1/params \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/auth/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/auth/v1beta1/params

Params queries all parameters.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is the response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params defines the parameters of the module.
»» max_memo_characters string(uint64) false none none
»» tx_sig_limit string(uint64) false none none
»» tx_size_cost_per_byte string(uint64) false none none
»» sig_verify_cost_ed25519 string(uint64) false none none
»» sig_verify_cost_secp256k1 string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Nyks Bank Module

AllBalances

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/balances/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/balances/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "balances": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

GET /cosmos/bank/v1beta1/balances/{address}

AllBalances queries the balance of all coins for a single account.

Parameters

Name In Type Required Description
address path string true address is the address to query balances for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method.

Name Type Required Restrictions Description
» balances [object] false none balances is the balances of all the coins.
»» denom string false none none
»» amount string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Balance

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/balances/string/by_denom \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/balances/string/by_denom', {

> The result from the above endpoint looks like this:

```json
{
  "balance": {
    "denom": "denom...",
    "amount": "1000"
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/bank/v1beta1/balances/{address}/by_denom

Balance queries the balance of a single coin for a single account.

Parameters

Name In Type Required Description
address path string true address is the address to query balances for.
denom query string false denom is the coin denom to query balances for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryBalanceResponse is the response type for the Query/Balance RPC method.

Name Type Required Restrictions Description
» balance object false none balance is the balance of the coin.
»» denom string false none none
»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

DenomsMetadata

Code samples


> The result from the above endpoint looks like this:

```json
{
  "metadatas": [
    {
      "description": "description...",
      "denom_units": [
        {
          "denom": "denom...",
          "exponent": 0,
          "aliases": [
            "item..."
          ]
        }
      ],
      "base": "base..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/bank/v1beta1/denoms_metadata \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/denoms_metadata', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/denoms_metadata

DenomsMetadata queries the client metadata for all registered coin denominations.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC method.

Name Type Required Restrictions Description
» metadatas [object] false none metadata provides the client information for all the registered tokens.
»» description string false none none
»» denom_units [object] false none none
»»» denom string false none denom represents the string name of the given denom unit (e.g uatom).
»»» exponent integer(int64) false none exponent represents power of 10 exponent that one mustraise the base_denom to in order to equal the given DenomUnit's denom1 denom = 1^exponent base_denom(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' withexponent = 6, thus: 1 atom = 10^6 uatom).
»»» aliases [string] false none none
»» base string false none base represents the base denom (should be the DenomUnit with exponent = 0).
»» display string false none display indicates the suggested denom that should bedisplayed in clients.
»» name string false none Since: cosmos-sdk 0.43
»» symbol string false none symbol is the token symbol usually shown on exchanges (eg: ATOM). This canbe the same as the display.Since: cosmos-sdk 0.43
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

The result from the above endpoint looks like this:

{
  "metadata": {
    "description": "description...",
    "denom_units": [
      {
        "denom": "denom...",
        "exponent": 0,
        "aliases": [
          "item..."
        ]
      }
    ],
    "base": "base...",
    "display": "display...",
    "name": "name...",
    "symbol": "symbol..."
  }
}

This operation does not require authentication

DenomMetadata

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/denoms_metadata/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/denoms_metadata/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/denoms_metadata/{denom}

DenomsMetadata queries the client metadata of a given coin denomination.

Parameters

Name In Type Required Description
denom path string true denom is the coin denom to query the metadata for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC method.

Name Type Required Restrictions Description
» metadata object false none metadata describes and provides all the client information for the requested token.
»» description string false none none
»» denom_units [object] false none none
»»» denom string false none denom represents the string name of the given denom unit (e.g uatom).
»»» exponent integer(int64) false none exponent represents power of 10 exponent that one mustraise the base_denom to in order to equal the given DenomUnit's denom1 denom = 1^exponent base_denom(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' withexponent = 6, thus: 1 atom = 10^6 uatom).
»»» aliases [string] false none none
»» base string false none base represents the base denom (should be the DenomUnit with exponent = 0).
»» display string false none display indicates the suggested denom that should bedisplayed in clients.
»» name string false none Since: cosmos-sdk 0.43
»» symbol string false none symbol is the token symbol usually shown on exchanges (eg: ATOM). This canbe the same as the display.Since: cosmos-sdk 0.43

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "params": {
    "send_enabled": [
      {
        "denom": "denom...",
        "enabled": true
      }
    ],
    "default_send_enabled": true
  }
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|none|

This operation does not require authentication

Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/params

Params queries the parameters of x/bank module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse defines the response type for querying x/bank parameters.

Name Type Required Restrictions Description
» params object false none Params defines the parameters for the bank module.
»» send_enabled [object] false none none

The result from the above endpoint looks like this:

{
  "balances": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

|»»» denom|string|false|none|none| |»»» enabled|boolean|false|none|none| |»» default_send_enabled|boolean|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

SpendableBalances

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/spendable_balances/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/spendable_balances/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/spendable_balances/{address}

SpendableBalances queries the spenable balance of all coins for a single account.

Parameters

Name In Type Required Description
address path string true address is the address to query spendable balances for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

*QuerySpendableBalancesResponse defines the gRPC response structure for querying

The result from the above endpoint looks like this:

{
  "supply": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

an account's spendable balances.*

Name Type Required Restrictions Description
» balances [object] false none balances is the spendable balances of all the coins.
»» denom string false none none
»» amount string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

TotalSupply

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/supply \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/supply', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/supply

TotalSupply queries the total supply of all coins.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline

The result from the above endpoint looks like this:

{
  "amount": {
    "denom": "denom...",
    "amount": "1000"
  }
}

|default|Default|An unexpected error response.|Inline|

Response Schema

Status Code 200

QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method

Name Type Required Restrictions Description
» supply [object] false none none
»» denom string false none none
»» amount string false none none
» pagination object false none pagination defines the pagination in the response.Since: cosmos-sdk 0.43
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

SupplyOf

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/bank/v1beta1/supply/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/bank/v1beta1/supply/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/bank/v1beta1/supply/{denom}

SupplyOf queries the supply of a single coin.

Parameters

Name In Type Required Description
denom path string true denom is the coin denom to query balances for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.

Name Type Required Restrictions Description
» amount object false none amount is the supply of the coin.
»» denom string false none none
»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Nyks Distribution Module

CommunityPool

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/community_pool \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/community_pool', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "pool": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ]
}

GET /cosmos/distribution/v1beta1/community_pool

CommunityPool queries the community pool coins.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method.

Name Type Required Restrictions Description
» pool [object] false none pool defines community pool's coins.
»» denom string false none none
»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

DelegationTotalRewards

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/rewards \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/rewards', {

> The result from the above endpoint looks like this:

```json
{
  "rewards": [
    {
      "validator_address": "0x1234567890abcdef...",
      "reward": [
        {
          "denom": "denom...",
          "amount": "1000"
        }
      ]
    }
  ],
  "total": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ]
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards

DelegationTotalRewards queries the total rewards accrued by a each validator.

Parameters

Name In Type Required Description
delegator_address path string true delegator_address defines the delegator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method.

Name Type Required Restrictions Description
» rewards [object] false none rewards defines all the rewards accrued by a delegator.
»» validator_address string false none none
»» reward [object] false none none
»»» denom string false none none
»»» amount string false none none
» total [object] false none total defines the sum of all the rewards.
»» denom string false none none
»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

DelegationRewards

Code samples


> The result from the above endpoint looks like this:

```json
{
  "rewards": [
    {
      "denom": "denom...",
      "amount": "1000"
    }
  ]
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/rewards/string \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/rewards/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}

DelegationRewards queries the total rewards accrued by a delegation.

Parameters

Name In Type Required Description
delegator_address path string true delegator_address defines the delegator address to query for.
validator_address path string true validator_address defines the validator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method.

Name Type Required Restrictions Description
» rewards [object] false none rewards defines the rewards accrued by a delegation.
»» denom string false none none
»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

The result from the above endpoint looks like this:

{
  "validators": []
}

This operation does not require authentication

DelegatorValidators

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/validators \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/validators', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators

DelegatorValidators queries the validators of a delegator.

Parameters

Name In Type Required Description
delegator_address path string true delegator_address defines the delegator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method.

Name Type Required Restrictions Description
» validators [string] false none validators defines the validators a delegator is delegating for.

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "withdraw_address": "0x1234567890abcdef..."
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|none|

This operation does not require authentication

DelegatorWithdrawAddress

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/withdraw_address \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/delegators/string/withdraw_address', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address

DelegatorWithdrawAddress queries withdraw address of a delegator.

Parameters

Name In Type Required Description
delegator_address path string true delegator_address defines the delegator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method.

The result from the above endpoint looks like this:

{
  "params": {
    "community_tax": "community_tax...",
    "base_proposer_reward": "base_proposer_reward...",
    "bonus_proposer_reward": "bonus_proposer_reward...",
    "withdraw_addr_enabled": true
  }
}
Name Type Required Restrictions Description
» withdraw_address string false none withdraw_address defines the delegator address to query for.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/params

Params queries params of the distribution module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

The result from the above endpoint looks like this:

{
  "commission": {
    "commission": [
      {
        "denom": "denom...",
        "amount": "1000"
      }
    ]
  }
}

QueryParamsResponse is the response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params defines the parameters of the module.
»» community_tax string false none none
»» base_proposer_reward string false none none
»» bonus_proposer_reward string false none none
»» withdraw_addr_enabled boolean false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

ValidatorCommission

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/commission \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/commission', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/validators/{validator_address}/commission

ValidatorCommission queries accumulated commission for a validator.

Parameters

Name In Type Required Description
validator_address path string true validator_address defines the validator address to query for.

Example responses

200 Response

Responses

|Status|Meaning|Description|Schema|

The result from the above endpoint looks like this:

{
  "rewards": {
    "rewards": [
      {
        "denom": "denom...",
        "amount": "1000"
      }
    ]
  }
}

|---|---|---|---| |200|OK|A successful response.|Inline| |default|Default|An unexpected error response.|Inline|

Response Schema

Status Code 200

QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method

Name Type Required Restrictions Description
» commission object false none commission defines the commision the validator received.
»» commission [object] false none none
»»» denom string false none none
»»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

ValidatorOutstandingRewards

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/outstanding_rewards \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/outstanding_rewards', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards

ValidatorOutstandingRewards queries rewards of a validator address.

Parameters

Name In Type Required Description
validator_address path string true validator_address defines the validator address to query for.

The result from the above endpoint looks like this:

{
  "slashes": [
    {
      "validator_period": "1000000",
      "fraction": "fraction..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryValidatorOutstandingRewardsResponse is the response type for the Query/ValidatorOutstandingRewards RPC method.

Name Type Required Restrictions Description
» rewards object false none ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewardsfor a validator inexpensive to track, allows simple sanity checks.
»» rewards [object] false none none
»»» denom string false none none
»»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

ValidatorSlashes

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/slashes \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/distribution/v1beta1/validators/string/slashes', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/distribution/v1beta1/validators/{validator_address}/slashes

ValidatorSlashes queries slash events of a validator.

Parameters

Name In Type Required Description
validator_address path string true validator_address defines the validator address to query for.
starting_height query string(uint64) false starting_height defines the optional starting height to query the slashes.
ending_height query string(uint64) false starting_height defines the optional ending height to query the slashes.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method.

Name Type Required Restrictions Description
» slashes [object] false none slashes defines the slashes the validator received.
»» validator_period string(uint64) false none none
»» fraction string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Nyks Governance Module

Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/params/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/params/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "voting_params": {
    "voting_period": "voting_period..."
  },
  "deposit_params": {
    "min_deposit": [
      {
        "denom": "denom...",
        "amount": "1000"
      }
    ],
    "max_deposit_period": "max_deposit_period..."
  },
  "tally_params": {
    "quorum": "quorum...",
    "threshold": "threshold...",
    "veto_threshold": "veto_threshold..."
  }
}

GET /cosmos/gov/v1beta1/params/{params_type}

Params queries all parameters of the gov module.

Parameters

Name In Type Required Description
params_type path string true params_type defines which parameters to query for, can be one of "voting",

Detailed descriptions

params_type: params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit".

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is the response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» voting_params object false none voting_params defines the parameters related to voting.
»» voting_period string false none Length of the voting period.
» deposit_params object false none deposit_params defines the parameters related to deposit.
»» min_deposit [object] false none Minimum deposit for a proposal to enter voting period.
»»» denom string false none none
»»» amount string false none none
»» max_deposit_period string false none Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months.
» tally_params object false none tally_params defines the parameters related to tally.
»» quorum string(byte) false none Minimum percentage of total stake needed to vote for a result to be considered valid.
»» threshold string(byte) false none Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
»» veto_threshold string(byte) false none Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Proposals

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals', {

> The result from the above endpoint looks like this:

```json
{
  "proposals": [
    {
      "proposal_id": "1000000",
      "content": {
        "@type": "@type..."
      },
      "status": "status..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/gov/v1beta1/proposals

Proposals queries all proposals based on given status.

Parameters

Name In Type Required Description
proposal_status query string false proposal_status defines the status of the proposals.
voter query string false voter defines the voter address for the proposals.
depositor query string false depositor defines the deposit addresses from the proposals.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

proposal_status: proposal_status defines the status of the proposals.

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Enumerated Values

Parameter Value
proposal_status PROPOSAL_STATUS_UNSPECIFIED
proposal_status PROPOSAL_STATUS_DEPOSIT_PERIOD
proposal_status PROPOSAL_STATUS_VOTING_PERIOD
proposal_status PROPOSAL_STATUS_PASSED
proposal_status PROPOSAL_STATUS_REJECTED
proposal_status PROPOSAL_STATUS_FAILED

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryProposalsResponse is the response type for the Query/Proposals RPC method.

Name Type Required Restrictions Description
» proposals [object] false none none
»» proposal_id string(uint64) false none none
»» content object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» status string false none ProposalStatus enumerates the valid statuses of a proposal. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the depositperiod. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the votingperiod. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that haspassed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that hasbeen rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that hasfailed.
»» final_tally_result object false none TallyResult defines a standard tally for a governance proposal.
»»» yes string false none none
»»» abstain string false none none
»»» no string false none none
»»» no_with_veto string false none none
»» submit_time string(date-time) false none none
»» deposit_end_time string(date-time) false none none
»» total_deposit [object] false none none
»»» denom string false none none
»»» amount string false none none
»» voting_start_time string(date-time) false none none
»» voting_end_time string(date-time) false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Enumerated Values

Property Value
status PROPOSAL_STATUS_UNSPECIFIED
status PROPOSAL_STATUS_DEPOSIT_PERIOD
status PROPOSAL_STATUS_VOTING_PERIOD
status PROPOSAL_STATUS_PASSED
status PROPOSAL_STATUS_REJECTED
status PROPOSAL_STATUS_FAILED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Proposal

Code samples


> The result from the above endpoint looks like this:

```json
{
  "proposal": {
    "proposal_id": "1000000",
    "content": {
      "@type": "@type..."
    },
    "status": "status...",
    "final_tally_result": {
      "yes": "yes...",
      "abstain": "abstain...",
      "no": "no..."
    },
    "submit_time": "submit_time...",
    "deposit_end_time": "deposit_end_time...",
    "total_deposit": [
      {
        "denom": "denom...",
        "amount": "1000"
      }
    ],
    "voting_start_time": "voting_start_time...",
    "voting_end_time": "voting_end_time..."
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}

Proposal queries proposal details based on ProposalID.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryProposalResponse is the response type for the Query/Proposal RPC method.

Name Type Required Restrictions Description
» proposal object false none Proposal defines the core field members of a governance proposal.
»» proposal_id string(uint64) false none none
»» content object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» status string false none ProposalStatus enumerates the valid statuses of a proposal. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the depositperiod. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the votingperiod. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that haspassed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that hasbeen rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that hasfailed.
»» final_tally_result object false none TallyResult defines a standard tally for a governance proposal.
»»» yes string false none none
»»» abstain string false none none
»»» no string false none none
»»» no_with_veto string false none none
»» submit_time string(date-time) false none none
»» deposit_end_time string(date-time) false none none
»» total_deposit [object] false none none
»»» denom string false none none
»»» amount string false none none
»» voting_start_time string(date-time) false none none
»» voting_end_time string(date-time) false none none

Enumerated Values

Property Value
status PROPOSAL_STATUS_UNSPECIFIED
status PROPOSAL_STATUS_DEPOSIT_PERIOD
status PROPOSAL_STATUS_VOTING_PERIOD
status PROPOSAL_STATUS_PASSED
status PROPOSAL_STATUS_REJECTED
status PROPOSAL_STATUS_FAILED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "deposits": [
    {
      "proposal_id": "1000000",
      "depositor": "depositor...",
      "amount": [
        {
          "denom": "denom...",
          "amount": "1000"
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

This operation does not require authentication

Deposits

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/deposits \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/deposits', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits

Deposits queries all deposits of a single proposal.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDepositsResponse is the response type for the Query/Deposits RPC method.

Name Type Required Restrictions Description
» deposits [object] false none none
»» proposal_id string(uint64) false none none
»» depositor string false none none
»» amount [object] false none none
»»» denom string false none none
»»» amount string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "deposit": {
    "proposal_id": "1000000",
    "depositor": "depositor...",
    "amount": [
      {
        "denom": "denom...",
        "amount": "1000"
      }
    ]
  }
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

Deposit

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/deposits/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/deposits/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}

Deposit queries single deposit information based proposalID, depositAddr.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.
depositor path string true depositor defines the deposit addresses from the proposals.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDepositResponse is the response type for the Query/Deposit RPC method.

Name Type Required Restrictions Description
» deposit object false none deposit defines the requested deposit.
»» proposal_id string(uint64) false none none
»» depositor string false none none

The result from the above endpoint looks like this:

{
  "tally": {
    "yes": "yes...",
    "abstain": "abstain...",
    "no": "no...",
    "no_with_veto": "no_with_veto..."
  }
}

|»» amount|[object]|false|none|none| |»»» denom|string|false|none|none| |»»» amount|string|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

TallyResult

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/tally \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/tally', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}/tally

TallyResult queries the tally of a proposal vote.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

The result from the above endpoint looks like this:

{
  "votes": [
    {
      "proposal_id": "1000000",
      "voter": "voter...",
      "option": "option..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

QueryTallyResultResponse is the response type for the Query/Tally RPC method.

Name Type Required Restrictions Description
» tally object false none TallyResult defines a standard tally for a governance proposal.
»» yes string false none none
»» abstain string false none none
»» no string false none none
»» no_with_veto string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Votes

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/votes \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/votes', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}/votes

Votes queries votes of a given proposal.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryVotesResponse is the response type for the Query/Votes RPC method.

Name Type Required Restrictions Description
» votes [object] false none votes defined the queried votes.
»» proposal_id string(uint64) false none none
»» voter string false none none
»» option string false none Deprecated: Prefer to use options instead. This field is set in queriesif and only if len(options) == 1 and that option has weight 1. In allother cases, this field will default to VOTE_OPTION_UNSPECIFIED.
»» options [object] false none none
»»» option string false none VoteOption enumerates the valid vote options for a given governance proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
»»» weight string false none none
» pagination object false none pagination defines the pagination in the response.

The result from the above endpoint looks like this:

{
  "vote": {
    "proposal_id": "1000000",
    "voter": "voter...",
    "option": "option...",
    "options": [
      {
        "option": "option...",
        "weight": "weight..."
      }
    ]
  }
}

|»» next_key|string(byte)|false|none|none| |»» total|string(uint64)|false|none|none|

Enumerated Values

Property Value
option VOTE_OPTION_UNSPECIFIED
option VOTE_OPTION_YES
option VOTE_OPTION_ABSTAIN
option VOTE_OPTION_NO
option VOTE_OPTION_NO_WITH_VETO
option VOTE_OPTION_UNSPECIFIED
option VOTE_OPTION_YES
option VOTE_OPTION_ABSTAIN
option VOTE_OPTION_NO
option VOTE_OPTION_NO_WITH_VETO

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Vote

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/votes/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/gov/v1beta1/proposals/string/votes/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}

Vote queries voted information based on proposalID, voterAddr.

Parameters

Name In Type Required Description
proposal_id path string(uint64) true proposal_id defines the unique id of the proposal.
voter path string true voter defines the oter address for the proposals.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryVoteResponse is the response type for the Query/Vote RPC method.

Name Type Required Restrictions Description
» vote object false none vote defined the queried vote.
»» proposal_id string(uint64) false none none
»» voter string false none none
»» option string false none Deprecated: Prefer to use options instead. This field is set in queriesif and only if len(options) == 1 and that option has weight 1. In allother cases, this field will default to VOTE_OPTION_UNSPECIFIED.
»» options [object] false none none
»»» option string false none VoteOption enumerates the valid vote options for a given governance proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
»»» weight string false none none

Enumerated Values

Property Value
option VOTE_OPTION_UNSPECIFIED
option VOTE_OPTION_YES
option VOTE_OPTION_ABSTAIN
option VOTE_OPTION_NO
option VOTE_OPTION_NO_WITH_VETO
option VOTE_OPTION_UNSPECIFIED
option VOTE_OPTION_YES
option VOTE_OPTION_ABSTAIN
option VOTE_OPTION_NO
option VOTE_OPTION_NO_WITH_VETO

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Nyks Slashing Module

Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/slashing/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/slashing/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "params": {
    "signed_blocks_window": "signed_blocks_window...",
    "min_signed_per_window": "min_signed_per_window...",
    "downtime_jail_duration": "downtime_jail_duration...",
    "slash_fraction_double_sign": "slash_fraction_double_sign...",
    "slash_fraction_downtime": "slash_fraction_downtime..."
  }
}

GET /cosmos/slashing/v1beta1/params

Params queries the parameters of slashing module

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is the response type for the Query/Params RPC method

Name Type Required Restrictions Description
» params object false none Params represents the parameters used for by the slashing module.
»» signed_blocks_window string(int64) false none none
»» min_signed_per_window string(byte) false none none
»» downtime_jail_duration string false none none
»» slash_fraction_double_sign string(byte) false none none
»» slash_fraction_downtime string(byte) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

SigningInfos

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/slashing/v1beta1/signing_infos \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/slashing/v1beta1/signing_infos', {

> The result from the above endpoint looks like this:

```json
{
  "info": [
    {
      "address": "0x1234567890abcdef...",
      "start_height": "start_height...",
      "index_offset": "index_offset..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/slashing/v1beta1/signing_infos

SigningInfos queries signing info of all validators

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method

Name Type Required Restrictions Description
» info [object] false none none
»» address string false none none
»» start_height string(int64) false none none
»» index_offset string(int64) false none Index which is incremented each time the validator was a bondedin a block and may have signed a precommit or not. This in conjunction with theSignedBlocksWindow param determines the index in the MissedBlocksBitArray.
»» jailed_until string(date-time) false none Timestamp until which the validator is jailed due to liveness downtime.
»» tombstoned boolean false none Whether or not a validator has been tombstoned (killed out of validator set). It is setonce the validator commits an equivocation or for any other configured misbehiavor.
»» missed_blocks_counter string(int64) false none A counter kept to avoid unnecessary array reads.Note that Sum(MissedBlocksBitArray) always equals MissedBlocksCounter.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

SigningInfo

Code samples


> The result from the above endpoint looks like this:

```json
{
  "val_signing_info": {
    "address": "0x1234567890abcdef...",
    "start_height": "start_height...",
    "index_offset": "index_offset...",
    "jailed_until": "jailed_until...",
    "tombstoned": true,
    "missed_blocks_counter": "missed_blocks_counter..."
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/slashing/v1beta1/signing_infos/string \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/slashing/v1beta1/signing_infos/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/slashing/v1beta1/signing_infos/{cons_address}

SigningInfo queries the signing info of given cons address

Parameters

Name In Type Required Description
cons_address path string true cons_address is the address to query signing info of

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method

Name Type Required Restrictions Description
» val_signing_info object false none ValidatorSigningInfo defines a validator's signing info for monitoring theirliveness activity.
»» address string false none none
»» start_height string(int64) false none none
»» index_offset string(int64) false none Index which is incremented each time the validator was a bondedin a block and may have signed a precommit or not. This in conjunction with theSignedBlocksWindow param determines the index in the MissedBlocksBitArray.
»» jailed_until string(date-time) false none Timestamp until which the validator is jailed due to liveness downtime.
»» tombstoned boolean false none Whether or not a validator has been tombstoned (killed out of validator set). It is setonce the validator commits an equivocation or for any other configured misbehiavor.
»» missed_blocks_counter string(int64) false none A counter kept to avoid unnecessary array reads.Note that Sum(MissedBlocksBitArray) always equals MissedBlocksCounter.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Nyks Staking Module

DelegatorDelegations

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/delegations/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/delegations/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "delegation_responses": [
    {
      "delegation": {
        "delegator_address": "0x1234567890abcdef...",
        "validator_address": "0x1234567890abcdef...",
        "shares": "shares..."
      },
      "balance": {
        "denom": "denom...",
        "amount": "1000"
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

GET /cosmos/staking/v1beta1/delegations/{delegator_addr}

DelegatorDelegations queries all delegations of a given delegator address.

Parameters

Name In Type Required Description
delegator_addr path string true delegator_addr defines the delegator address to query for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method.

Name Type Required Restrictions Description
» delegation_responses [object] false none delegation_responses defines all the delegations' info of a delegator.
»» delegation object false none Delegation represents the bond with tokens held by an account. It isowned by one delegator, and is associated with the voting power of onevalidator.
»»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»»» shares string false none shares define the delegation shares received.
»» balance object false none Coin defines a token with a denomination and an amount.NOTE: The amount field is an Int which implements the custom methodsignatures required by gogoproto.
»»» denom string false none none
»»» amount string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Redelegations

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/redelegations \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/redelegations', {

> The result from the above endpoint looks like this:

```json
{
  "redelegation_responses": [
    {
      "redelegation": {
        "delegator_address": "0x1234567890abcdef...",
        "validator_src_address": "0x1234567890abcdef...",
        "validator_dst_address": "0x1234567890abcdef..."
      },
      "entries": [
        {
          "redelegation_entry": {
            "creation_height": "creation_height...",
            "completion_time": "completion_time...",
            "initial_balance": "initial_balance..."
          },
          "balance": "balance..."
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations

Redelegations queries redelegations of given address.

Parameters

Name In Type Required Description
delegator_addr path string true delegator_addr defines the delegator address to query for.
src_validator_addr query string false src_validator_addr defines the validator address to redelegate from.
dst_validator_addr query string false dst_validator_addr defines the validator address to redelegate to.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryRedelegationsResponse is response type for the Query/Redelegations RPC method.

Name Type Required Restrictions Description
» redelegation_responses [object] false none none
»» redelegation object false none Redelegation contains the list of a particular delegator's redelegating bondsfrom a particular source validator to a particular destination validator.
»»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»»» validator_src_address string false none validator_src_address is the validator redelegation source operator address.
»»» validator_dst_address string false none validator_dst_address is the validator redelegation destination operator address.
»»» entries [object] false none entries are the redelegation entries.redelegation entries
»»»» creation_height string(int64) false none creation_height defines the height which the redelegation took place.
»»»» completion_time string(date-time) false none completion_time defines the unix time for redelegation completion.
»»»» initial_balance string false none initial_balance defines the initial balance when redelegation started.
»»»» shares_dst string false none shares_dst is the amount of destination-validator shares created by redelegation.
»» entries [object] false none none
»»» redelegation_entry object false none RedelegationEntry defines a redelegation object with relevant metadata.
»»»» creation_height string(int64) false none creation_height defines the height which the redelegation took place.
»»»» completion_time string(date-time) false none completion_time defines the unix time for redelegation completion.
»»»» initial_balance string false none initial_balance defines the initial balance when redelegation started.
»»»» shares_dst string false none shares_dst is the amount of destination-validator shares created by redelegation.
»»» balance string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

DelegatorUnbondingDelegations

Code samples


> The result from the above endpoint looks like this:

```json
{
  "unbonding_responses": [
    {
      "delegator_address": "0x1234567890abcdef...",
      "validator_address": "0x1234567890abcdef...",
      "entries": [
        {
          "creation_height": "creation_height...",
          "completion_time": "completion_time...",
          "initial_balance": "initial_balance..."
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/unbonding_delegations \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/unbonding_delegations', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations

DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address.

Parameters

Name In Type Required Description
delegator_addr path string true delegator_addr defines the delegator address to query for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method.

Name Type Required Restrictions Description
» unbonding_responses [object] false none none
»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»» entries [object] false none entries are the unbonding delegation entries.unbonding delegation entries
»»» creation_height string(int64) false none creation_height is the height which the unbonding took place.
»»» completion_time string(date-time) false none completion_time is the unix time for unbonding completion.
»»» initial_balance string false none initial_balance defines the tokens initially scheduled to receive at completion.
»»» balance string false none balance defines the tokens to receive at completion.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "validators": [
    {
      "operator_address": "0x1234567890abcdef...",
      "consensus_pubkey": {
        "@type": "@type..."
      },
      "jailed": true
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

This operation does not require authentication

DelegatorValidators

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/validators \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/validators', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators

DelegatorValidators queries all validators info for given delegator address.

Parameters

Name In Type Required Description
delegator_addr path string true delegator_addr defines the delegator address to query for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method.

Name Type Required Restrictions Description
» validators [object] false none validators defines the the validators' info of a delegator.
»» operator_address string false none operator_address defines the address of the validator's operator; bech encoded in JSON.
»» consensus_pubkey object false none consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» jailed boolean false none jailed defined whether the validator has been jailed from bonded status or not.
»» status string false none status is the validator status (bonded/unbonding/unbonded).
»» tokens string false none tokens define the delegated tokens (incl. self-delegation).
»» delegator_shares string false none delegator_shares defines total shares issued to a validator's delegators.
»» description object false none description defines the description terms for the validator.
»»» moniker string false none moniker defines a human-readable name for the validator.
»»» identity string false none identity defines an optional identity signature (ex. UPort or Keybase).
»»» website string false none website defines an optional website link.
»»» security_contact string false none security_contact defines an optional email for security contact.
»»» details string false none details define other optional details.
»» unbonding_height string(int64) false none unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
»» unbonding_time string(date-time) false none unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
»» commission object false none commission defines the commission parameters.
»»» commission_rates object false none commission_rates defines the initial commission rates to be used for creating a validator.
»»»» rate string false none rate is the commission rate charged to delegators, as a fraction.
»»»» max_rate string false none max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
»»»» max_change_rate string false none max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
»»» update_time string(date-time) false none update_time is the last time the commission rate was changed.
»» min_self_delegation string false none min_self_delegation is the validator's self declared minimum self delegation.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Enumerated Values

Property Value
status BOND_STATUS_UNSPECIFIED
status BOND_STATUS_UNBONDED
status BOND_STATUS_UNBONDING
status BOND_STATUS_BONDED

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "validator": {
    "operator_address": "0x1234567890abcdef...",
    "consensus_pubkey": {
      "@type": "@type..."
    },
    "jailed": true,
    "status": "status...",
    "tokens": "tokens...",
    "delegator_shares": "delegator_shares...",
    "description": {
      "moniker": "moniker...",
      "identity": "0x1234567890abcdef...",
      "website": "website..."
    },
    "unbonding_height": "unbonding_height...",
    "unbonding_time": "unbonding_time...",
    "commission": {
      "commission_rates": {
        "rate": "rate...",
        "max_rate": "max_rate...",
        "max_change_rate": "max_change_rate..."
      },
      "update_time": "update_time..."
    },
    "min_self_delegation": "min_self_delegation..."
  }
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

DelegatorValidator

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/validators/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/delegators/string/validators/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}

DelegatorValidator queries validator info for given delegator validator pair.

Parameters

Name In Type Required Description
delegator_addr path string true delegator_addr defines the delegator address to query for.
validator_addr path string true validator_addr defines the validator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method.

Name Type Required Restrictions Description
» validator object false none validator defines the the validator info.
»» operator_address string false none operator_address defines the address of the validator's operator; bech encoded in JSON.
»» consensus_pubkey object false none consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» jailed boolean false none jailed defined whether the validator has been jailed from bonded status or not.
»» status string false none status is the validator status (bonded/unbonding/unbonded).
»» tokens string false none tokens define the delegated tokens (incl. self-delegation).
»» delegator_shares string false none delegator_shares defines total shares issued to a validator's delegators.
»» description object false none description defines the description terms for the validator.
»»» moniker string false none moniker defines a human-readable name for the validator.
»»» identity string false none identity defines an optional identity signature (ex. UPort or Keybase).
»»» website string false none website defines an optional website link.
»»» security_contact string false none security_contact defines an optional email for security contact.
»»» details string false none details define other optional details.
»» unbonding_height string(int64) false none unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
»» unbonding_time string(date-time) false none unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
»» commission object false none commission defines the commission parameters.
»»» commission_rates object false none commission_rates defines the initial commission rates to be used for creating a validator.
»»»» rate string false none rate is the commission rate charged to delegators, as a fraction.
»»»» max_rate string false none max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
»»»» max_change_rate string false none max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
»»» update_time string(date-time) false none update_time is the last time the commission rate was changed.
»» min_self_delegation string false none min_self_delegation is the validator's self declared minimum self delegation.

Enumerated Values

Property Value
status BOND_STATUS_UNSPECIFIED

The result from the above endpoint looks like this:

{
  "hist": {
    "header": {
      "version": {
        "block": "1000000",
        "app": "1000000"
      },
      "chain_id": "0x1234567890abcdef...",
      "height": "height..."
    },
    "valset": [
      {
        "operator_address": "0x1234567890abcdef...",
        "consensus_pubkey": {
          "@type": "@type..."
        },
        "jailed": true
      }
    ]
  }
}

|status|BOND_STATUS_UNBONDED| |status|BOND_STATUS_UNBONDING| |status|BOND_STATUS_BONDED|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

HistoricalInfo

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/historical_info/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/historical_info/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/historical_info/{height}

HistoricalInfo queries the historical info for given height.

Parameters

Name In Type Required Description
height path string(int64) true height defines at which height to query the historical info.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method.

Name Type Required Restrictions Description
» hist object false none hist defines the historical info at the given height.
»» header object false none Header defines the structure of a Tendermint block header.
»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»» block string(uint64) false none none
»»»» app string(uint64) false none none
»»» chain_id string false none none
»»» height string(int64) false none none
»»» time string(date-time) false none none
»»» last_block_id object false none none
»»»» hash string(byte) false none none
»»»» part_set_header object false none none
»»»»» total integer(int64) false none none
»»»»» hash string(byte) false none none
»»» last_commit_hash string(byte) false none commit from validators from the last block
»»» data_hash string(byte) false none none
»»» validators_hash string(byte) false none validators for the current block
»»» next_validators_hash string(byte) false none none
»»» consensus_hash string(byte) false none none
»»» app_hash string(byte) false none none
»»» last_results_hash string(byte) false none none
»»» evidence_hash string(byte) false none evidence included in the block
»»» proposer_address string(byte) false none none
»» valset [object] false none none
»»» operator_address string false none operator_address defines the address of the validator's operator; bech encoded in JSON.
»»» consensus_pubkey object false none consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
»»»» additionalProperties any false none none
»»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»»» jailed boolean false none jailed defined whether the validator has been jailed from bonded status or not.
»»» status string false none status is the validator status (bonded/unbonding/unbonded).
»»» tokens string false none tokens define the delegated tokens (incl. self-delegation).
»»» delegator_shares string false none delegator_shares defines total shares issued to a validator's delegators.
»»» description object false none description defines the description terms for the validator.
»»»» moniker string false none moniker defines a human-readable name for the validator.
»»»» identity string false none identity defines an optional identity signature (ex. UPort or Keybase).
»»»» website string false none website defines an optional website link.
»»»» security_contact string false none security_contact defines an optional email for security contact.
»»»» details string false none details define other optional details.
»»» unbonding_height string(int64) false none unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
»»» unbonding_time string(date-time) false none unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
»»» commission object false none commission defines the commission parameters.
»»»» commission_rates object false none commission_rates defines the initial commission rates to be used for creating a validator.
»»»»» rate string false none rate is the commission rate charged to delegators, as a fraction.
»»»»» max_rate string false none max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
»»»»» max_change_rate string false none max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
»»»» update_time string(date-time) false none update_time is the last time the commission rate was changed.

The result from the above endpoint looks like this:

{
  "params": {
    "unbonding_time": "unbonding_time...",
    "max_validators": 0,
    "max_entries": 0,
    "historical_entries": 0,
    "bond_denom": "bond_denom..."
  }
}

|»»» min_self_delegation|string|false|none|min_self_delegation is the validator's self declared minimum self delegation.|

Enumerated Values

Property Value
status BOND_STATUS_UNSPECIFIED
status BOND_STATUS_UNBONDED
status BOND_STATUS_UNBONDING
status BOND_STATUS_BONDED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/params

Parameters queries the staking parameters.

Example responses

200 Response

Responses

Status Meaning Description Schema

The result from the above endpoint looks like this:

{
  "pool": {
    "not_bonded_tokens": "not_bonded_tokens...",
    "bonded_tokens": "bonded_tokens..."
  }
}

|200|OK|A successful response.|Inline| |default|Default|An unexpected error response.|Inline|

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params holds all the parameters of this module.
»» unbonding_time string false none unbonding_time is the time duration of unbonding.
»» max_validators integer(int64) false none max_validators is the maximum number of validators.
»» max_entries integer(int64) false none max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
»» historical_entries integer(int64) false none historical_entries is the number of historical entries to persist.
»» bond_denom string false none bond_denom defines the bondable coin denomination.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Pool

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/pool \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/pool', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/pool

The result from the above endpoint looks like this:

{
  "validators": [
    {
      "operator_address": "0x1234567890abcdef...",
      "consensus_pubkey": {
        "@type": "@type..."
      },
      "jailed": true
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

Pool queries the pool info.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPoolResponse is response type for the Query/Pool RPC method.

Name Type Required Restrictions Description
» pool object false none pool defines the pool info.
»» not_bonded_tokens string false none none
»» bonded_tokens string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Validators

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/validators \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators

Validators queries all validators that match the given status.

Parameters

Name In Type Required Description
status query string false status enables to query for validators matching a given status.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryValidatorsResponse is response type for the Query/Validators RPC method

Name Type Required Restrictions Description
» validators [object] false none validators contains all the queried validators.
»» operator_address string false none operator_address defines the address of the validator's operator; bech encoded in JSON.
»» consensus_pubkey object false none consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "validator": {
    "operator_address": "0x1234567890abcdef...",
    "consensus_pubkey": {
      "@type": "@type..."
    },
    "jailed": true,
    "status": "status...",
    "tokens": "tokens...",
    "delegator_shares": "delegator_shares...",
    "description": {
      "moniker": "moniker...",
      "identity": "0x1234567890abcdef...",
      "website": "website..."
    },
    "unbonding_height": "unbonding_height...",
    "unbonding_time": "unbonding_time...",
    "commission": {
      "commission_rates": {
        "rate": "rate...",
        "max_rate": "max_rate...",
        "max_change_rate": "max_change_rate..."
      },
      "update_time": "update_time..."
    },
    "min_self_delegation": "min_self_delegation..."
  }
}

|»» jailed|boolean|false|none|jailed defined whether the validator has been jailed from bonded status or not.| |»» status|string|false|none|status is the validator status (bonded/unbonding/unbonded).| |»» tokens|string|false|none|tokens define the delegated tokens (incl. self-delegation).| |»» delegator_shares|string|false|none|delegator_shares defines total shares issued to a validator's delegators.| |»» description|object|false|none|description defines the description terms for the validator.| |»»» moniker|string|false|none|moniker defines a human-readable name for the validator.| |»»» identity|string|false|none|identity defines an optional identity signature (ex. UPort or Keybase).| |»»» website|string|false|none|website defines an optional website link.| |»»» security_contact|string|false|none|security_contact defines an optional email for security contact.| |»»» details|string|false|none|details define other optional details.| |»» unbonding_height|string(int64)|false|none|unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.| |»» unbonding_time|string(date-time)|false|none|unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.| |»» commission|object|false|none|commission defines the commission parameters.| |»»» commission_rates|object|false|none|commission_rates defines the initial commission rates to be used for creating a validator.| |»»»» rate|string|false|none|rate is the commission rate charged to delegators, as a fraction.| |»»»» max_rate|string|false|none|max_rate defines the maximum commission rate which validator can ever charge, as a fraction.| |»»»» max_change_rate|string|false|none|max_change_rate defines the maximum daily increase of the validator commission, as a fraction.| |»»» update_time|string(date-time)|false|none|update_time is the last time the commission rate was changed.| |»» min_self_delegation|string|false|none|min_self_delegation is the validator's self declared minimum self delegation.| |» pagination|object|false|none|pagination defines the pagination in the response.| |»» next_key|string(byte)|false|none|none| |»» total|string(uint64)|false|none|none|

Enumerated Values

Property Value
status BOND_STATUS_UNSPECIFIED
status BOND_STATUS_UNBONDED
status BOND_STATUS_UNBONDING
status BOND_STATUS_BONDED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Validator

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators/{validator_addr}

Validator queries validator info for given validator address.

Parameters

Name In Type Required Description
validator_addr path string true validator_addr defines the validator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

The result from the above endpoint looks like this:

{
  "delegation_responses": [
    {
      "delegation": {
        "delegator_address": "0x1234567890abcdef...",
        "validator_address": "0x1234567890abcdef...",
        "shares": "shares..."
      },
      "balance": {
        "denom": "denom...",
        "amount": "1000"
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

QueryValidatorResponse is response type for the Query/Validator RPC method

Name Type Required Restrictions Description
» validator object false none validator defines the the validator info.
»» operator_address string false none operator_address defines the address of the validator's operator; bech encoded in JSON.
»» consensus_pubkey object false none consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» jailed boolean false none jailed defined whether the validator has been jailed from bonded status or not.
»» status string false none status is the validator status (bonded/unbonding/unbonded).
»» tokens string false none tokens define the delegated tokens (incl. self-delegation).
»» delegator_shares string false none delegator_shares defines total shares issued to a validator's delegators.
»» description object false none description defines the description terms for the validator.
»»» moniker string false none moniker defines a human-readable name for the validator.
»»» identity string false none identity defines an optional identity signature (ex. UPort or Keybase).
»»» website string false none website defines an optional website link.
»»» security_contact string false none security_contact defines an optional email for security contact.
»»» details string false none details define other optional details.
»» unbonding_height string(int64) false none unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
»» unbonding_time string(date-time) false none unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
»» commission object false none commission defines the commission parameters.
»»» commission_rates object false none commission_rates defines the initial commission rates to be used for creating a validator.
»»»» rate string false none rate is the commission rate charged to delegators, as a fraction.
»»»» max_rate string false none max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
»»»» max_change_rate string false none max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
»»» update_time string(date-time) false none update_time is the last time the commission rate was changed.
»» min_self_delegation string false none min_self_delegation is the validator's self declared minimum self delegation.

Enumerated Values

Property Value
status BOND_STATUS_UNSPECIFIED
status BOND_STATUS_UNBONDED
status BOND_STATUS_UNBONDING
status BOND_STATUS_BONDED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

ValidatorDelegations

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators/{validator_addr}/delegations

ValidatorDelegations queries delegate info for given validator.

Parameters

Name In Type Required Description
validator_addr path string true validator_addr defines the validator address to query for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should

The result from the above endpoint looks like this:

{
  "delegation_response": {
    "delegation": {
      "delegator_address": "0x1234567890abcdef...",
      "validator_address": "0x1234567890abcdef...",
      "shares": "shares..."
    },
    "balance": {
      "denom": "denom...",
      "amount": "1000"
    }
  }
}

be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method

Name Type Required Restrictions Description
» delegation_responses [object] false none none
»» delegation object false none Delegation represents the bond with tokens held by an account. It isowned by one delegator, and is associated with the voting power of onevalidator.
»»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»»» shares string false none shares define the delegation shares received.
»» balance object false none Coin defines a token with a denomination and an amount.NOTE: The amount field is an Int which implements the custom methodsignatures required by gogoproto.
»»» denom string false none none
»»» amount string false none none
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Delegation

Code samples

curl --request GET \

> The result from the above endpoint looks like this:

```json
{
  "unbond": {
    "delegator_address": "0x1234567890abcdef...",
    "validator_address": "0x1234567890abcdef...",
    "entries": [
      {
        "creation_height": "creation_height...",
        "completion_time": "completion_time...",
        "initial_balance": "initial_balance..."
      }
    ]
  }
}

--url https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations/string \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}

Delegation queries delegate info for given validator delegator pair.

Parameters

Name In Type Required Description
validator_addr path string true validator_addr defines the validator address to query for.
delegator_addr path string true delegator_addr defines the delegator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegationResponse is response type for the Query/Delegation RPC method.

Name Type Required Restrictions Description
» delegation_response object false none delegation_responses defines the delegation info of a delegation.
»» delegation object false none Delegation represents the bond with tokens held by an account. It isowned by one delegator, and is associated with the voting power of onevalidator.
»»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»»» shares string false none shares define the delegation shares received.
»» balance object false none Coin defines a token with a denomination and an amount.NOTE: The amount field is an Int which implements the custom methodsignatures required by gogoproto.
»»» denom string false none none
»»» amount string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

UnbondingDelegation

The result from the above endpoint looks like this:

{
  "unbonding_responses": [
    {
      "delegator_address": "0x1234567890abcdef...",
      "validator_address": "0x1234567890abcdef...",
      "entries": [
        {
          "creation_height": "creation_height...",
          "completion_time": "completion_time...",
          "initial_balance": "initial_balance..."
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations/string/unbonding_delegation \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/delegations/string/unbonding_delegation', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation

UnbondingDelegation queries unbonding info for given validator delegator pair.

Parameters

Name In Type Required Description
validator_addr path string true validator_addr defines the validator address to query for.
delegator_addr path string true delegator_addr defines the delegator address to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method.

Name Type Required Restrictions Description
» unbond object false none unbond defines the unbonding information of a delegation.
»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»» entries [object] false none entries are the unbonding delegation entries.unbonding delegation entries
»»» creation_height string(int64) false none creation_height is the height which the unbonding took place.
»»» completion_time string(date-time) false none completion_time is the unix time for unbonding completion.
»»» initial_balance string false none initial_balance defines the tokens initially scheduled to receive at completion.
»»» balance string false none balance defines the tokens to receive at completion.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

ValidatorUnbondingDelegations

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/unbonding_delegations \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/staking/v1beta1/validators/string/unbonding_delegations', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations

ValidatorUnbondingDelegations queries unbonding delegations of a validator.

Parameters

Name In Type Required Description
validator_addr path string true validator_addr defines the validator address to query for.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method.

Name Type Required Restrictions Description
» unbonding_responses [object] false none none
»» delegator_address string false none delegator_address is the bech32-encoded address of the delegator.
»» validator_address string false none validator_address is the bech32-encoded address of the validator.
»» entries [object] false none entries are the unbonding delegation entries.unbonding delegation entries
»»» creation_height string(int64) false none creation_height is the height which the unbonding took place.
»»» completion_time string(date-time) false none completion_time is the unix time for unbonding completion.
»»» initial_balance string false none initial_balance defines the tokens initially scheduled to receive at completion.
»»» balance string false none balance defines the tokens to receive at completion.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Nyks Tendermint Module

CosmosBaseTendermintV1Beta1GetLatestBlock

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/blocks/latest \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/blocks/latest', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "block_id": {
    "hash": "0x1234567890abcdef...",
    "part_set_header": {
      "total": 0,
      "hash": "0x1234567890abcdef..."
    }
  },
  "block": {
    "header": {
      "version": {
        "block": "1000000",
        "app": "1000000"
      },
      "chain_id": "0x1234567890abcdef...",
      "height": "height..."
    },
    "data": {
      "txs": [
        "item..."
      ]
    },
    "evidence": {
      "evidence": [
        {
          "duplicate_vote_evidence": {
            "vote_a": {
              "type": "type...",
              "height": "height...",
              "round": 0
            },
            "vote_b": {
              "type": "type...",
              "height": "height...",
              "round": 0
            },
            "total_voting_power": "total_voting_power..."
          },
          "light_client_attack_evidence": {
            "conflicting_block": {
              "signed_header": {
                "header": {
                  "version": {
                    "block": "1000000",
                    "app": "1000000"
                  },
                  "chain_id": "0x1234567890abcdef...",
                  "height": "height..."
                },
                "commit": {
                  "height": "height...",
                  "round": 0,
                  "block_id": {
                    "hash": "0x1234567890abcdef...",
                    "part_set_header": {
                      "total": 0,
                      "hash": "0x1234567890abcdef..."
                    }
                  }
                }
              },
              "validator_set": {
                "validators": [
                  {
                    "address": "0x1234567890abcdef...",
                    "pub_key": {
                      "ed25519": "ed25519...",
                      "secp256k1": "secp256k1..."
                    },
                    "voting_power": "voting_power..."
                  }
                ],
                "proposer": {
                  "address": "0x1234567890abcdef...",
                  "pub_key": {
                    "ed25519": "ed25519...",
                    "secp256k1": "secp256k1..."
                  },
                  "voting_power": "voting_power..."
                },
                "total_voting_power": "total_voting_power..."
              }
            },
            "common_height": "common_height...",
            "byzantine_validators": [
              {
                "address": "0x1234567890abcdef...",
                "pub_key": {
                  "ed25519": "ed25519...",
                  "secp256k1": "secp256k1..."
                },
                "voting_power": "voting_power..."
              }
            ]
          }
        }
      ]
    }
  }
}

GET /cosmos/base/tendermint/v1beta1/blocks/latest

GetLatestBlock returns the latest block.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.

Name Type Required Restrictions Description
» block_id object false none none
»» hash string(byte) false none none
»» part_set_header object false none none
»»» total integer(int64) false none none
»»» hash string(byte) false none none
» block object false none none
»» header object false none Header defines the structure of a Tendermint block header.
»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»» block string(uint64) false none none
»»»» app string(uint64) false none none
»»» chain_id string false none none
»»» height string(int64) false none none
»»» time string(date-time) false none none
»»» last_block_id object false none none
»»»» hash string(byte) false none none
»»»» part_set_header object false none none
»»»»» total integer(int64) false none none
»»»»» hash string(byte) false none none
»»» last_commit_hash string(byte) false none commit from validators from the last block
»»» data_hash string(byte) false none none
»»» validators_hash string(byte) false none validators for the current block
»»» next_validators_hash string(byte) false none none
»»» consensus_hash string(byte) false none none
»»» app_hash string(byte) false none none
»»» last_results_hash string(byte) false none none
»»» evidence_hash string(byte) false none evidence included in the block
»»» proposer_address string(byte) false none none
»» data object false none none
»»» txs [string] false none Txs that will be applied by state @ block.Height+1.NOTE: not all txs here are valid. We're just agreeing on the order first.This means that block.AppHash does not include these txs.
»» evidence object false none none
»»» evidence [object] false none none
»»»» duplicate_vote_evidence object false none DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
»»»»» vote_a object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»»» height string(int64) false none none
»»»»»» round integer(int32) false none none
»»»»»» block_id object false none zero if vote is nil.
»»»»»»» hash string(byte) false none none
»»»»»»» part_set_header object false none none
»»»»»»»» total integer(int64) false none none
»»»»»»»» hash string(byte) false none none
»»»»»» timestamp string(date-time) false none none
»»»»»» validator_address string(byte) false none none
»»»»»» validator_index integer(int32) false none none
»»»»»» signature string(byte) false none none
»»»»» vote_b object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»»» height string(int64) false none none
»»»»»» round integer(int32) false none none
»»»»»» block_id object false none zero if vote is nil.
»»»»»»» hash string(byte) false none none
»»»»»»» part_set_header object false none none
»»»»»»»» total integer(int64) false none none
»»»»»»»» hash string(byte) false none none
»»»»»» timestamp string(date-time) false none none
»»»»»» validator_address string(byte) false none none
»»»»»» validator_index integer(int32) false none none
»»»»»» signature string(byte) false none none
»»»»» total_voting_power string(int64) false none none
»»»»» validator_power string(int64) false none none
»»»»» timestamp string(date-time) false none none
»»»» light_client_attack_evidence object false none LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
»»»»» conflicting_block object false none none
»»»»»» signed_header object false none none
»»»»»»» header object false none Header defines the structure of a Tendermint block header.
»»»»»»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»»»»»»» block string(uint64) false none none
»»»»»»»»» app string(uint64) false none none
»»»»»»»» chain_id string false none none
»»»»»»»» height string(int64) false none none
»»»»»»»» time string(date-time) false none none
»»»»»»»» last_block_id object false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»»»» part_set_header object false none none
»»»»»»»»»» total integer(int64) false none none
»»»»»»»»»» hash string(byte) false none none
»»»»»»»» last_commit_hash string(byte) false none commit from validators from the last block
»»»»»»»» data_hash string(byte) false none none
»»»»»»»» validators_hash string(byte) false none validators for the current block
»»»»»»»» next_validators_hash string(byte) false none none
»»»»»»»» consensus_hash string(byte) false none none
»»»»»»»» app_hash string(byte) false none none
»»»»»»»» last_results_hash string(byte) false none none
»»»»»»»» evidence_hash string(byte) false none evidence included in the block
»»»»»»»» proposer_address string(byte) false none none
»»»»»»» commit object false none Commit contains the evidence that a block was committed by a set of validators.
»»»»»»»» height string(int64) false none none
»»»»»»»» round integer(int32) false none none
»»»»»»»» block_id object false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»»»» part_set_header object false none none
»»»»»»»»»» total integer(int64) false none none
»»»»»»»»»» hash string(byte) false none none
»»»»»»»» signatures [object] false none none
»»»»»»»»» block_id_flag string false none none
»»»»»»»»» validator_address string(byte) false none none
»»»»»»»»» timestamp string(date-time) false none none
»»»»»»»»» signature string(byte) false none none
»»»»»» validator_set object false none none
»»»»»»» validators [object] false none none
»»»»»»»» address string(byte) false none none
»»»»»»»» pub_key object false none none
»»»»»»»»» ed25519 string(byte) false none none
»»»»»»»»» secp256k1 string(byte) false none none
»»»»»»»» voting_power string(int64) false none none
»»»»»»»» proposer_priority string(int64) false none none
»»»»»»» proposer object false none none
»»»»»»»» address string(byte) false none none
»»»»»»»» pub_key object false none none
»»»»»»»»» ed25519 string(byte) false none none
»»»»»»»»» secp256k1 string(byte) false none none
»»»»»»»» voting_power string(int64) false none none
»»»»»»»» proposer_priority string(int64) false none none
»»»»»»» total_voting_power string(int64) false none none
»»»»» common_height string(int64) false none none
»»»»» byzantine_validators [object] false none none
»»»»»» address string(byte) false none none
»»»»»» pub_key object false none none
»»»»»»» ed25519 string(byte) false none none
»»»»»»» secp256k1 string(byte) false none none
»»»»»» voting_power string(int64) false none none
»»»»»» proposer_priority string(int64) false none none
»»»»» total_voting_power string(int64) false none none
»»»»» timestamp string(date-time) false none none
»» last_commit object false none Commit contains the evidence that a block was committed by a set of validators.
»»» height string(int64) false none none
»»» round integer(int32) false none none
»»» block_id object false none none
»»»» hash string(byte) false none none
»»»» part_set_header object false none none
»»»»» total integer(int64) false none none
»»»»» hash string(byte) false none none
»»» signatures [object] false none none
»»»» block_id_flag string false none none
»»»» validator_address string(byte) false none none
»»»» timestamp string(date-time) false none none
»»»» signature string(byte) false none none

Enumerated Values

Property Value
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosBaseTendermintV1Beta1GetBlockByHeight

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/blocks/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/blocks/string', {

> The result from the above endpoint looks like this:

```json
{
  "block_id": {
    "hash": "0x1234567890abcdef...",
    "part_set_header": {
      "total": 0,
      "hash": "0x1234567890abcdef..."
    }
  },
  "block": {
    "header": {
      "version": {
        "block": "1000000",
        "app": "1000000"
      },
      "chain_id": "0x1234567890abcdef...",
      "height": "height..."
    },
    "data": {
      "txs": [
        "item..."
      ]
    },
    "evidence": {
      "evidence": [
        {
          "duplicate_vote_evidence": {
            "vote_a": {
              "type": "type...",
              "height": "height...",
              "round": 0
            },
            "vote_b": {
              "type": "type...",
              "height": "height...",
              "round": 0
            },
            "total_voting_power": "total_voting_power..."
          },
          "light_client_attack_evidence": {
            "conflicting_block": {
              "signed_header": {
                "header": {
                  "version": {
                    "block": "1000000",
                    "app": "1000000"
                  },
                  "chain_id": "0x1234567890abcdef...",
                  "height": "height..."
                },
                "commit": {
                  "height": "height...",
                  "round": 0,
                  "block_id": {
                    "hash": "0x1234567890abcdef...",
                    "part_set_header": {
                      "total": 0,
                      "hash": "0x1234567890abcdef..."
                    }
                  }
                }
              },
              "validator_set": {
                "validators": [
                  {
                    "address": "0x1234567890abcdef...",
                    "pub_key": {
                      "ed25519": "ed25519...",
                      "secp256k1": "secp256k1..."
                    },
                    "voting_power": "voting_power..."
                  }
                ],
                "proposer": {
                  "address": "0x1234567890abcdef...",
                  "pub_key": {
                    "ed25519": "ed25519...",
                    "secp256k1": "secp256k1..."
                  },
                  "voting_power": "voting_power..."
                },
                "total_voting_power": "total_voting_power..."
              }
            },
            "common_height": "common_height...",
            "byzantine_validators": [
              {
                "address": "0x1234567890abcdef...",
                "pub_key": {
                  "ed25519": "ed25519...",
                  "secp256k1": "secp256k1..."
                },
                "voting_power": "voting_power..."
              }
            ]
          }
        }
      ]
    }
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/base/tendermint/v1beta1/blocks/{height}

GetBlockByHeight queries block for given height.

Parameters

Name In Type Required Description
height path string(int64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.

Name Type Required Restrictions Description
» block_id object false none none
»» hash string(byte) false none none
»» part_set_header object false none none
»»» total integer(int64) false none none
»»» hash string(byte) false none none
» block object false none none
»» header object false none Header defines the structure of a Tendermint block header.
»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»» block string(uint64) false none none
»»»» app string(uint64) false none none
»»» chain_id string false none none
»»» height string(int64) false none none
»»» time string(date-time) false none none
»»» last_block_id object false none none
»»»» hash string(byte) false none none
»»»» part_set_header object false none none
»»»»» total integer(int64) false none none
»»»»» hash string(byte) false none none
»»» last_commit_hash string(byte) false none commit from validators from the last block
»»» data_hash string(byte) false none none
»»» validators_hash string(byte) false none validators for the current block
»»» next_validators_hash string(byte) false none none
»»» consensus_hash string(byte) false none none
»»» app_hash string(byte) false none none
»»» last_results_hash string(byte) false none none
»»» evidence_hash string(byte) false none evidence included in the block
»»» proposer_address string(byte) false none none
»» data object false none none
»»» txs [string] false none Txs that will be applied by state @ block.Height+1.NOTE: not all txs here are valid. We're just agreeing on the order first.This means that block.AppHash does not include these txs.
»» evidence object false none none
»»» evidence [object] false none none
»»»» duplicate_vote_evidence object false none DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
»»»»» vote_a object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»»» height string(int64) false none none
»»»»»» round integer(int32) false none none
»»»»»» block_id object false none zero if vote is nil.
»»»»»»» hash string(byte) false none none
»»»»»»» part_set_header object false none none
»»»»»»»» total integer(int64) false none none
»»»»»»»» hash string(byte) false none none
»»»»»» timestamp string(date-time) false none none
»»»»»» validator_address string(byte) false none none
»»»»»» validator_index integer(int32) false none none
»»»»»» signature string(byte) false none none
»»»»» vote_b object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»»» height string(int64) false none none
»»»»»» round integer(int32) false none none
»»»»»» block_id object false none zero if vote is nil.
»»»»»»» hash string(byte) false none none
»»»»»»» part_set_header object false none none
»»»»»»»» total integer(int64) false none none
»»»»»»»» hash string(byte) false none none
»»»»»» timestamp string(date-time) false none none
»»»»»» validator_address string(byte) false none none
»»»»»» validator_index integer(int32) false none none
»»»»»» signature string(byte) false none none
»»»»» total_voting_power string(int64) false none none
»»»»» validator_power string(int64) false none none
»»»»» timestamp string(date-time) false none none
»»»» light_client_attack_evidence object false none LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
»»»»» conflicting_block object false none none
»»»»»» signed_header object false none none
»»»»»»» header object false none Header defines the structure of a Tendermint block header.
»»»»»»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»»»»»»» block string(uint64) false none none
»»»»»»»»» app string(uint64) false none none
»»»»»»»» chain_id string false none none
»»»»»»»» height string(int64) false none none
»»»»»»»» time string(date-time) false none none
»»»»»»»» last_block_id object false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»»»» part_set_header object false none none
»»»»»»»»»» total integer(int64) false none none
»»»»»»»»»» hash string(byte) false none none
»»»»»»»» last_commit_hash string(byte) false none commit from validators from the last block
»»»»»»»» data_hash string(byte) false none none
»»»»»»»» validators_hash string(byte) false none validators for the current block
»»»»»»»» next_validators_hash string(byte) false none none
»»»»»»»» consensus_hash string(byte) false none none
»»»»»»»» app_hash string(byte) false none none
»»»»»»»» last_results_hash string(byte) false none none
»»»»»»»» evidence_hash string(byte) false none evidence included in the block
»»»»»»»» proposer_address string(byte) false none none
»»»»»»» commit object false none Commit contains the evidence that a block was committed by a set of validators.
»»»»»»»» height string(int64) false none none
»»»»»»»» round integer(int32) false none none
»»»»»»»» block_id object false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»»»» part_set_header object false none none
»»»»»»»»»» total integer(int64) false none none
»»»»»»»»»» hash string(byte) false none none
»»»»»»»» signatures [object] false none none
»»»»»»»»» block_id_flag string false none none
»»»»»»»»» validator_address string(byte) false none none
»»»»»»»»» timestamp string(date-time) false none none
»»»»»»»»» signature string(byte) false none none
»»»»»» validator_set object false none none
»»»»»»» validators [object] false none none
»»»»»»»» address string(byte) false none none
»»»»»»»» pub_key object false none none
»»»»»»»»» ed25519 string(byte) false none none
»»»»»»»»» secp256k1 string(byte) false none none
»»»»»»»» voting_power string(int64) false none none
»»»»»»»» proposer_priority string(int64) false none none
»»»»»»» proposer object false none none
»»»»»»»» address string(byte) false none none
»»»»»»»» pub_key object false none none
»»»»»»»»» ed25519 string(byte) false none none
»»»»»»»»» secp256k1 string(byte) false none none
»»»»»»»» voting_power string(int64) false none none
»»»»»»»» proposer_priority string(int64) false none none
»»»»»»» total_voting_power string(int64) false none none
»»»»» common_height string(int64) false none none
»»»»» byzantine_validators [object] false none none
»»»»»» address string(byte) false none none
»»»»»» pub_key object false none none
»»»»»»» ed25519 string(byte) false none none
»»»»»»» secp256k1 string(byte) false none none
»»»»»» voting_power string(int64) false none none
»»»»»» proposer_priority string(int64) false none none
»»»»» total_voting_power string(int64) false none none
»»»»» timestamp string(date-time) false none none
»» last_commit object false none Commit contains the evidence that a block was committed by a set of validators.
»»» height string(int64) false none none
»»» round integer(int32) false none none
»»» block_id object false none none
»»»» hash string(byte) false none none
»»»» part_set_header object false none none
»»»»» total integer(int64) false none none
»»»»» hash string(byte) false none none
»»» signatures [object] false none none
»»»» block_id_flag string false none none
»»»» validator_address string(byte) false none none
»»»» timestamp string(date-time) false none none
»»»» signature string(byte) false none none

Enumerated Values

Property Value
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosBaseTendermintV1Beta1GetNodeInfo

Code samples


> The result from the above endpoint looks like this:

```json
{
  "default_node_info": {
    "protocol_version": {
      "p2p": "1000000",
      "block": "1000000",
      "app": "1000000"
    },
    "default_node_id": "0x1234567890abcdef...",
    "listen_addr": "listen_addr..."
  },
  "application_version": {
    "name": "name...",
    "app_name": "app_name...",
    "version": "version..."
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/node_info \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/node_info', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/base/tendermint/v1beta1/node_info

GetNodeInfo queries the current node info.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method.

Name Type Required Restrictions Description
» default_node_info object false none none
»» protocol_version object false none none
»»» p2p string(uint64) false none none
»»» block string(uint64) false none none
»»» app string(uint64) false none none
»» default_node_id string false none none
»» listen_addr string false none none
»» network string false none none
»» version string false none none
»» channels string(byte) false none none
»» moniker string false none none
»» other object false none none
»»» tx_index string false none none
»»» rpc_address string false none none
» application_version object false none VersionInfo is the type for the GetNodeInfoResponse message.
»» name string false none none
»» app_name string false none none
»» version string false none none
»» git_commit string false none none
»» build_tags string false none none
»» go_version string false none none
»» build_deps [object] false none none
»»» Module is the type for VersionInfo object false none none
»»»» path string false none none
»»»» version string false none none
»»»» sum string false none none
»» cosmos_sdk_version string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "syncing": true
}

This operation does not require authentication

CosmosBaseTendermintV1Beta1GetSyncing

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/syncing \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/syncing', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/base/tendermint/v1beta1/syncing

GetSyncing queries node syncing.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetSyncingResponse is the response type for the Query/GetSyncing RPC method.

Name Type Required Restrictions Description
» syncing boolean false none none

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "block_height": "block_height...",
  "validators": [
    {
      "address": "0x1234567890abcdef...",
      "pub_key": {
        "@type": "@type..."
      },
      "voting_power": "voting_power..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

CosmosBaseTendermintV1Beta1GetLatestValidatorSet

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/validatorsets/latest \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/validatorsets/latest', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/base/tendermint/v1beta1/validatorsets/latest

GetLatestValidatorSet queries latest validator-set.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.

Name Type Required Restrictions Description
» block_height string(int64) false none none
» validators [object] false none none
»» address string false none none
»» pub_key object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» voting_power string(int64) false none none
»» proposer_priority string(int64) false none none

The result from the above endpoint looks like this:

{
  "block_height": "block_height...",
  "validators": [
    {
      "address": "0x1234567890abcdef...",
      "pub_key": {
        "@type": "@type..."
      },
      "voting_power": "voting_power..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

|» pagination|object|false|none|pagination defines an pagination for the response.| |»» next_key|string(byte)|false|none|none| |»» total|string(uint64)|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosBaseTendermintV1Beta1GetValidatorSetByHeight

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/validatorsets/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/base/tendermint/v1beta1/validatorsets/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/base/tendermint/v1beta1/validatorsets/{height}

GetValidatorSetByHeight queries validator-set at a given height.

Parameters

Name In Type Required Description
height path string(int64) true none
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.

Name Type Required Restrictions Description
» block_height string(int64) false none none
» validators [object] false none none
»» address string false none none
»» pub_key object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» voting_power string(int64) false none none
»» proposer_priority string(int64) false none none
» pagination object false none pagination defines an pagination for the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Nyks Tx - Service Module

Simulate

Code samples

curl --request POST \
  --url https://lcd.twilight.org/cosmos/tx/v1beta1/simulate \
  --header 'Accept: */*' \
  --header 'Content-Type: application/json' \
  --data '{"tx":{"body":{"messages":[{"@type":"string","property1":null,"property2":null}],"memo":"string","timeout_height":"string","extension_options":[{"@type":"string","property1":null,"property2":null}],"non_critical_extension_options":[{"@type":"string","property1":null,"property2":null}]},"auth_info":{"signer_infos":[{"public_key":{"@type":"string","property1":null,"property2":null},"mode_info":{"single":{"mode":"SIGN_MODE_UNSPECIFIED"},"multi":{"bitarray":{"extra_bits_stored":0,"elems":"string"},"mode_infos":[{}]}},"sequence":"string"}],"fee":{"amount":[{"denom":"string","amount":"string"}],"gas_limit":"string","payer":"string","granter":"string"}},"signatures":["string"]},"tx_bytes":"string"}'

The result from the above endpoint looks like this:

{
  "gas_info": {
    "gas_wanted": "1000000",
    "gas_used": "1000000"
  },
  "result": {
    "data": "data...",
    "log": "log...",
    "events": [
      {
        "type": "type...",
        "attributes": [
          {
            "key": "key...",
            "value": "1000",
            "index": true
          }
        ]
      }
    ]
  }
}
const response = await fetch('https://lcd.twilight.org/cosmos/tx/v1beta1/simulate', {
  method: 'POST',
  headers: {
    'Accept': '*/*',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
console.log(data);

POST /cosmos/tx/v1beta1/simulate

Simulate simulates executing a transaction for estimating gas usage.

Body parameter

{
  "tx": {
    "body": {
      "messages": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "memo": "string",
      "timeout_height": "string",
      "extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "non_critical_extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ]
    },
    "auth_info": {
      "signer_infos": [
        {
          "public_key": {
            "@type": "string",
            "property1": null,
            "property2": null
          },
          "mode_info": {
            "single": {
              "mode": "SIGN_MODE_UNSPECIFIED"
            },
            "multi": {
              "bitarray": {
                "extra_bits_stored": 0,
                "elems": "string"
              },
              "mode_infos": [
                {}
              ]
            }
          },
          "sequence": "string"
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "string",
            "amount": "string"
          }
        ],
        "gas_limit": "string",
        "payer": "string",
        "granter": "string"
      }
    },
    "signatures": [
      "string"
    ]
  },
  "tx_bytes": "string"
}

Parameters

Name In Type Required Description
body body cosmos.tx.v1beta1.SimulateRequest true SimulateRequest is the request type for the Service.Simulate

Detailed descriptions

body: SimulateRequest is the request type for the Service.Simulate RPC method.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

SimulateResponse is the response type for the Service.SimulateRPC method.

Name Type Required Restrictions Description
» gas_info object false none gas_info is the information about gas used in the simulation.
»» gas_wanted string(uint64) false none GasWanted is the maximum units of work we allow this tx to perform.
»» gas_used string(uint64) false none GasUsed is the amount of gas actually consumed.
» result object false none result is the result of the simulation.
»» data string(byte) false none Data is any data returned from message or handler execution. It MUST belength prefixed in order to separate data from multiple message executions.
»» log string false none Log contains the log information from message or handler execution.
»» events [object] false none Events contains a slice of Event objects that were emitted during messageor handler execution.
»»» type string false none none
»»» attributes [object] false none none
»»»» key string(byte) false none none
»»»» value string(byte) false none none
»»»» index boolean false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

GetTxsEvent

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/tx/v1beta1/txs \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/tx/v1beta1/txs', {

> The result from the above endpoint looks like this:

```json
{
  "status": "success",
  "data": {}
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/tx/v1beta1/txs

GetTxsEvent fetches txs by event.

Parameters

Name In Type Required Description
events query array[string] false events is the list of transaction event type.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.
order_by query string false - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

order_by: - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - ORDER_BY_DESC: ORDER_BY_DESC defines descending order

Enumerated Values

Parameter Value
order_by ORDER_BY_UNSPECIFIED
order_by ORDER_BY_ASC
order_by ORDER_BY_DESC

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. cosmos.tx.v1beta1.GetTxsEventResponse
default Default An unexpected error response. Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "tx_response": {
    "height": "height...",
    "txhash": "0x1234567890abcdef...",
    "codespace": "0xabcdef1234567890...",
    "code": 0,
    "data": "data...",
    "raw_log": "raw_log...",
    "logs": [
      {
        "msg_index": 0,
        "log": "log...",
        "events": [
          {
            "type": "type...",
            "attributes": [
              {
                "key": "key...",
                "value": "1000"
              }
            ]
          }
        ]
      }
    ],
    "info": "info...",
    "gas_wanted": "gas_wanted...",
    "gas_used": "gas_used...",
    "tx": {
      "@type": "@type..."
    },
    "timestamp": "timestamp...",
    "events": [
      {
        "type": "type...",
        "attributes": [
          {
            "key": "key...",
            "value": "1000",
            "index": true
          }
        ]
      }
    ]
  }
}

This operation does not require authentication

BroadcastTx

Code samples

curl --request POST \
  --url https://lcd.twilight.org/cosmos/tx/v1beta1/txs \
  --header 'Accept: */*' \
  --header 'Content-Type: application/json' \
  --data '{"tx_bytes":"string","mode":"BROADCAST_MODE_UNSPECIFIED"}'
const response = await fetch('https://lcd.twilight.org/cosmos/tx/v1beta1/txs', {
  method: 'POST',
  headers: {
    'Accept': '*/*',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
console.log(data);

POST /cosmos/tx/v1beta1/txs

BroadcastTx broadcast transaction.

Body parameter

{
  "tx_bytes": "string",
  "mode": "BROADCAST_MODE_UNSPECIFIED"
}

Parameters

Name In Type Required Description
body body object true BroadcastTxRequest is the request type for the Service.BroadcastTxRequest
» tx_bytes body string(byte) false tx_bytes is the raw transaction.
» mode body string false BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method.

Detailed descriptions

body: BroadcastTxRequest is the request type for the Service.BroadcastTxRequest RPC method.

» mode: BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method.

Enumerated Values

Parameter Value
» mode BROADCAST_MODE_UNSPECIFIED
» mode BROADCAST_MODE_BLOCK
» mode BROADCAST_MODE_SYNC
» mode BROADCAST_MODE_ASYNC

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

BroadcastTxResponse is the response type for the Service.BroadcastTx method.

Name Type Required Restrictions Description
» tx_response object false none tx_response is the queried TxResponses.
»» height string(int64) false none none
»» txhash string false none The transaction hash.
»» codespace string false none none
»» code integer(int64) false none Response code.
»» data string false none Result bytes, if any.
»» raw_log string false none The output of the application's logger (raw string). May benon-deterministic.
»» logs [object] false none The output of the application's logger (typed). May be non-deterministic.
»»» msg_index integer(int64) false none none
»»» log string false none none
»»» events [object] false none Events contains a slice of Event objects that were emitted during someexecution.
»»»» type string false none none
»»»» attributes [object] false none none
»»»»» key string false none none
»»»»» value string false none none
»» info string false none Additional information. May be non-deterministic.
»» gas_wanted string(int64) false none Amount of gas requested for transaction.
»» gas_used string(int64) false none Amount of gas consumed by transaction.
»» tx object false none The request transaction bytes.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
»» timestamp string false none Time of the previous block. For heights > 1, it's the weighted median ofthe timestamps of the valid votes in the block.LastCommit. For height == 1,it's genesis time.
»» events [object] false none Events defines all the events emitted by processing a transaction. Note,these events include those emitted by processing all the messages and thoseemitted from the ante handler. Whereas Logs contains the events, withadditional metadata, emitted only by processing the messages.Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
»»» type string false none none
»»» attributes [object] false none none
»»»» key string(byte) false none none
»»»» value string(byte) false none none
»»»» index boolean false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "status": "success",
  "data": {}
}

This operation does not require authentication

GetBlockWithTxs

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/tx/v1beta1/txs/block/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/tx/v1beta1/txs/block/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/tx/v1beta1/txs/block/{height}

GetBlockWithTxs fetches a block with decoded txs.

Since: cosmos-sdk 0.45.2

Parameters

Name In Type Required Description
height path string(int64) true height is the height of the block to query.
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. cosmos.tx.v1beta1.GetBlockWithTxsResponse
default Default An unexpected error response. Inline

Response Schema

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "status": "success",
  "data": {}
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

GetTx

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/tx/v1beta1/txs/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/tx/v1beta1/txs/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/tx/v1beta1/txs/{hash}

GetTx fetches a tx by hash.

Parameters

Name In Type Required Description
hash path string true hash is the tx hash to query, encoded as a hex string.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. cosmos.tx.v1beta1.GetTxResponse
default Default An unexpected error response. Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Schemas

cosmos.tx.v1beta1.AuthInfo

{
  "signer_infos": [
    {
      "public_key": {
        "@type": "string",
        "property1": null,
        "property2": null
      },
      "mode_info": {
        "single": {
          "mode": "SIGN_MODE_UNSPECIFIED"
        },
        "multi": {
          "bitarray": {
            "extra_bits_stored": 0,
            "elems": "string"
          },
          "mode_infos": [
            {}
          ]
        }
      },
      "sequence": "string"
    }
  ],
  "fee": {
    "amount": [
      {
        "denom": "string",
        "amount": "string"
      }
    ],
    "gas_limit": "string",
    "payer": "string",
    "granter": "string"
  }
}

AuthInfo describes the fee and signer modes that are used to sign a transaction.

Properties

Name Type Required Restrictions Description
signer_infos [cosmos.tx.v1beta1.SignerInfo] false none signer_infos defines the signing modes for the required signers. The numberand order of elements must match the required signers from TxBody'smessages. The first element is the primary signer and the one which paysthe fee.
fee object false none Fee is the fee and gas limit for the transaction. The first signer is theprimary signer and the one which pays the fee. The fee can be calculatedbased on the cost of evaluating the body and doing signature verificationof the signers. This can be estimated via simulation.
» amount [object] false none none
»» denom string false none none
»» amount string false none none
» gas_limit string(uint64) false none none
» payer string false none if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.the payer must be a tx signer (and thus have signed this field in AuthInfo).setting this field does not change the ordering of required signers for the transaction.
» granter string false none none

cosmos.tx.v1beta1.GetBlockWithTxsResponse

{
  "txs": [
    {
      "body": {
        "messages": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ],
        "memo": "string",
        "timeout_height": "string",
        "extension_options": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ],
        "non_critical_extension_options": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ]
      },
      "auth_info": {
        "signer_infos": [
          {
            "public_key": {
              "@type": "string",
              "property1": null,
              "property2": null
            },
            "mode_info": {
              "single": {
                "mode": "SIGN_MODE_UNSPECIFIED"
              },
              "multi": {
                "bitarray": {
                  "extra_bits_stored": 0,
                  "elems": "string"
                },
                "mode_infos": [
                  {}
                ]
              }
            },
            "sequence": "string"
          }
        ],
        "fee": {
          "amount": [
            {
              "denom": "string",
              "amount": "string"
            }
          ],
          "gas_limit": "string",
          "payer": "string",
          "granter": "string"
        }
      },
      "signatures": [
        "string"
      ]
    }
  ],
  "block_id": {
    "hash": "string",
    "part_set_header": {
      "total": 0,
      "hash": "string"
    }
  },
  "block": {
    "header": {
      "version": {
        "block": "string",
        "app": "string"
      },
      "chain_id": "string",
      "height": "string",
      "time": "2019-08-24T14:15:22Z",
      "last_block_id": {
        "hash": "string",
        "part_set_header": {
          "total": 0,
          "hash": "string"
        }
      },
      "last_commit_hash": "string",
      "data_hash": "string",
      "validators_hash": "string",
      "next_validators_hash": "string",
      "consensus_hash": "string",
      "app_hash": "string",
      "last_results_hash": "string",
      "evidence_hash": "string",
      "proposer_address": "string"
    },
    "data": {
      "txs": [
        "string"
      ]
    },
    "evidence": {
      "evidence": [
        {
          "duplicate_vote_evidence": {
            "vote_a": {
              "type": "SIGNED_MSG_TYPE_UNKNOWN",
              "height": "string",
              "round": 0,
              "block_id": {
                "hash": "string",
                "part_set_header": {
                  "total": 0,
                  "hash": "string"
                }
              },
              "timestamp": "2019-08-24T14:15:22Z",
              "validator_address": "string",
              "validator_index": 0,
              "signature": "string"
            },
            "vote_b": {
              "type": "SIGNED_MSG_TYPE_UNKNOWN",
              "height": "string",
              "round": 0,
              "block_id": {
                "hash": "string",
                "part_set_header": {
                  "total": 0,
                  "hash": "string"
                }
              },
              "timestamp": "2019-08-24T14:15:22Z",
              "validator_address": "string",
              "validator_index": 0,
              "signature": "string"
            },
            "total_voting_power": "string",
            "validator_power": "string",
            "timestamp": "2019-08-24T14:15:22Z"
          },
          "light_client_attack_evidence": {
            "conflicting_block": {
              "signed_header": {
                "header": {
                  "version": {
                    "block": "string",
                    "app": "string"
                  },
                  "chain_id": "string",
                  "height": "string",
                  "time": "2019-08-24T14:15:22Z",
                  "last_block_id": {
                    "hash": "string",
                    "part_set_header": {}
                  },
                  "last_commit_hash": "string",
                  "data_hash": "string",
                  "validators_hash": "string",
                  "next_validators_hash": "string",
                  "consensus_hash": "string",
                  "app_hash": "string",
                  "last_results_hash": "string",
                  "evidence_hash": "string",
                  "proposer_address": "string"
                },
                "commit": {
                  "height": "string",
                  "round": 0,
                  "block_id": {
                    "hash": "string",
                    "part_set_header": {}
                  },
                  "signatures": [
                    {}
                  ]
                }
              },
              "validator_set": {
                "validators": [
                  {
                    "address": "string",
                    "pub_key": {},
                    "voting_power": "string",
                    "proposer_priority": "string"
                  }
                ],
                "proposer": {
                  "address": "string",
                  "pub_key": {
                    "ed25519": "string",
                    "secp256k1": "string"
                  },
                  "voting_power": "string",
                  "proposer_priority": "string"
                },
                "total_voting_power": "string"
              }
            },
            "common_height": "string",
            "byzantine_validators": [
              {
                "address": "string",
                "pub_key": {
                  "ed25519": "string",
                  "secp256k1": "string"
                },
                "voting_power": "string",
                "proposer_priority": "string"
              }
            ],
            "total_voting_power": "string",
            "timestamp": "2019-08-24T14:15:22Z"
          }
        }
      ]
    },
    "last_commit": {
      "height": "string",
      "round": 0,
      "block_id": {
        "hash": "string",
        "part_set_header": {
          "total": 0,
          "hash": "string"
        }
      },
      "signatures": [
        {
          "block_id_flag": "BLOCK_ID_FLAG_UNKNOWN",
          "validator_address": "string",
          "timestamp": "2019-08-24T14:15:22Z",
          "signature": "string"
        }
      ]
    }
  },
  "pagination": {
    "next_key": "string",
    "total": "string"
  }
}

GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method.

Since: cosmos-sdk 0.45.2

Properties

Name Type Required Restrictions Description
txs [cosmos.tx.v1beta1.Tx] false none txs are the transactions in the block.
block_id object false none none
» hash string(byte) false none none
» part_set_header object false none none
»» total integer(int64) false none none
»» hash string(byte) false none none
block object false none none
» header object false none Header defines the structure of a Tendermint block header.
»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»» block string(uint64) false none none
»»» app string(uint64) false none none
»» chain_id string false none none
»» height string(int64) false none none
»» time string(date-time) false none none
»» last_block_id object false none none
»»» hash string(byte) false none none
»»» part_set_header object false none none
»»»» total integer(int64) false none none
»»»» hash string(byte) false none none
»» last_commit_hash string(byte) false none commit from validators from the last block
»» data_hash string(byte) false none none
»» validators_hash string(byte) false none validators for the current block
»» next_validators_hash string(byte) false none none
»» consensus_hash string(byte) false none none
»» app_hash string(byte) false none none
»» last_results_hash string(byte) false none none
»» evidence_hash string(byte) false none evidence included in the block
»» proposer_address string(byte) false none none
» data object false none none
»» txs [string] false none Txs that will be applied by state @ block.Height+1.NOTE: not all txs here are valid. We're just agreeing on the order first.This means that block.AppHash does not include these txs.
» evidence object false none none
»» evidence [object] false none none
»»» duplicate_vote_evidence object false none DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
»»»» vote_a object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»» height string(int64) false none none
»»»»» round integer(int32) false none none
»»»»» block_id object false none zero if vote is nil.
»»»»»» hash string(byte) false none none
»»»»»» part_set_header object false none none
»»»»»»» total integer(int64) false none none
»»»»»»» hash string(byte) false none none
»»»»» timestamp string(date-time) false none none
»»»»» validator_address string(byte) false none none
»»»»» validator_index integer(int32) false none none
»»»»» signature string(byte) false none none
»»»» vote_b object false none Vote represents a prevote, precommit, or commit vote from validators forconsensus.
»»»»» type string false none SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals
»»»»» height string(int64) false none none
»»»»» round integer(int32) false none none
»»»»» block_id object false none zero if vote is nil.
»»»»»» hash string(byte) false none none
»»»»»» part_set_header object false none none
»»»»»»» total integer(int64) false none none
»»»»»»» hash string(byte) false none none
»»»»» timestamp string(date-time) false none none
»»»»» validator_address string(byte) false none none
»»»»» validator_index integer(int32) false none none
»»»»» signature string(byte) false none none
»»»» total_voting_power string(int64) false none none
»»»» validator_power string(int64) false none none
»»»» timestamp string(date-time) false none none
»»» light_client_attack_evidence object false none LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
»»»» conflicting_block object false none none
»»»»» signed_header object false none none
»»»»»» header object false none Header defines the structure of a Tendermint block header.
»»»»»»» version object false none Consensus captures the consensus rules for processing a block in the blockchain,including all blockchain data structures and the rules of the application'sstate transition machine.
»»»»»»»» block string(uint64) false none none
»»»»»»»» app string(uint64) false none none
»»»»»»» chain_id string false none none
»»»»»»» height string(int64) false none none
»»»»»»» time string(date-time) false none none
»»»»»»» last_block_id object false none none
»»»»»»»» hash string(byte) false none none
»»»»»»»» part_set_header object false none none
»»»»»»»»» total integer(int64) false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»» last_commit_hash string(byte) false none commit from validators from the last block
»»»»»»» data_hash string(byte) false none none
»»»»»»» validators_hash string(byte) false none validators for the current block
»»»»»»» next_validators_hash string(byte) false none none
»»»»»»» consensus_hash string(byte) false none none
»»»»»»» app_hash string(byte) false none none
»»»»»»» last_results_hash string(byte) false none none
»»»»»»» evidence_hash string(byte) false none evidence included in the block
»»»»»»» proposer_address string(byte) false none none
»»»»»» commit object false none Commit contains the evidence that a block was committed by a set of validators.
»»»»»»» height string(int64) false none none
»»»»»»» round integer(int32) false none none
»»»»»»» block_id object false none none
»»»»»»»» hash string(byte) false none none
»»»»»»»» part_set_header object false none none
»»»»»»»»» total integer(int64) false none none
»»»»»»»»» hash string(byte) false none none
»»»»»»» signatures [object] false none none
»»»»»»»» block_id_flag string false none none
»»»»»»»» validator_address string(byte) false none none
»»»»»»»» timestamp string(date-time) false none none
»»»»»»»» signature string(byte) false none none
»»»»» validator_set object false none none
»»»»»» validators [object] false none none
»»»»»»» address string(byte) false none none
»»»»»»» pub_key object false none none
»»»»»»»» ed25519 string(byte) false none none
»»»»»»»» secp256k1 string(byte) false none none
»»»»»»» voting_power string(int64) false none none
»»»»»»» proposer_priority string(int64) false none none
»»»»»» proposer object false none none
»»»»»»» address string(byte) false none none
»»»»»»» pub_key object false none none
»»»»»»»» ed25519 string(byte) false none none
»»»»»»»» secp256k1 string(byte) false none none
»»»»»»» voting_power string(int64) false none none
»»»»»»» proposer_priority string(int64) false none none
»»»»»» total_voting_power string(int64) false none none
»»»» common_height string(int64) false none none
»»»» byzantine_validators [object] false none none
»»»»» address string(byte) false none none
»»»»» pub_key object false none none
»»»»»» ed25519 string(byte) false none none
»»»»»» secp256k1 string(byte) false none none
»»»»» voting_power string(int64) false none none
»»»»» proposer_priority string(int64) false none none
»»»» total_voting_power string(int64) false none none
»»»» timestamp string(date-time) false none none
» last_commit object false none Commit contains the evidence that a block was committed by a set of validators.
»» height string(int64) false none none
»» round integer(int32) false none none
»» block_id object false none none
»»» hash string(byte) false none none
»»» part_set_header object false none none
»»»» total integer(int64) false none none
»»»» hash string(byte) false none none
»» signatures [object] false none none
»»» block_id_flag string false none none
»»» validator_address string(byte) false none none
»»» timestamp string(date-time) false none none
»»» signature string(byte) false none none
pagination object false none pagination defines a pagination for the response.
» next_key string(byte) false none none
» total string(uint64) false none none

Enumerated Values

Property Value
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
type SIGNED_MSG_TYPE_UNKNOWN
type SIGNED_MSG_TYPE_PREVOTE
type SIGNED_MSG_TYPE_PRECOMMIT
type SIGNED_MSG_TYPE_PROPOSAL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL
block_id_flag BLOCK_ID_FLAG_UNKNOWN
block_id_flag BLOCK_ID_FLAG_ABSENT
block_id_flag BLOCK_ID_FLAG_COMMIT
block_id_flag BLOCK_ID_FLAG_NIL

cosmos.tx.v1beta1.GetTxResponse

{
  "tx": {
    "body": {
      "messages": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "memo": "string",
      "timeout_height": "string",
      "extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "non_critical_extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ]
    },
    "auth_info": {
      "signer_infos": [
        {
          "public_key": {
            "@type": "string",
            "property1": null,
            "property2": null
          },
          "mode_info": {
            "single": {
              "mode": "SIGN_MODE_UNSPECIFIED"
            },
            "multi": {
              "bitarray": {
                "extra_bits_stored": 0,
                "elems": "string"
              },
              "mode_infos": [
                {}
              ]
            }
          },
          "sequence": "string"
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "string",
            "amount": "string"
          }
        ],
        "gas_limit": "string",
        "payer": "string",
        "granter": "string"
      }
    },
    "signatures": [
      "string"
    ]
  },
  "tx_response": {
    "height": "string",
    "txhash": "string",
    "codespace": "string",
    "code": 0,
    "data": "string",
    "raw_log": "string",
    "logs": [
      {
        "msg_index": 0,
        "log": "string",
        "events": [
          {
            "type": "string",
            "attributes": [
              {
                "key": "string",
                "value": "string"
              }
            ]
          }
        ]
      }
    ],
    "info": "string",
    "gas_wanted": "string",
    "gas_used": "string",
    "tx": {
      "@type": "string",
      "property1": null,
      "property2": null
    },
    "timestamp": "string",
    "events": [
      {
        "type": "string",
        "attributes": [
          {
            "key": "string",
            "value": "string",
            "index": true
          }
        ]
      }
    ]
  }
}

GetTxResponse is the response type for the Service.GetTx method.

Properties

Name Type Required Restrictions Description
tx cosmos.tx.v1beta1.Tx false none Tx is the standard type used for broadcasting transactions.
tx_response object false none tx_response is the queried TxResponses.
» height string(int64) false none none
» txhash string false none The transaction hash.
» codespace string false none none
» code integer(int64) false none Response code.
» data string false none Result bytes, if any.
» raw_log string false none The output of the application's logger (raw string). May benon-deterministic.
» logs [object] false none The output of the application's logger (typed). May be non-deterministic.
»» msg_index integer(int64) false none none
»» log string false none none
»» events [object] false none Events contains a slice of Event objects that were emitted during someexecution.
»»» type string false none none
»»» attributes [object] false none none
»»»» key string false none none
»»»» value string false none none
» info string false none Additional information. May be non-deterministic.
» gas_wanted string(int64) false none Amount of gas requested for transaction.
» gas_used string(int64) false none Amount of gas consumed by transaction.
» tx object false none The request transaction bytes.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» timestamp string false none Time of the previous block. For heights > 1, it's the weighted median ofthe timestamps of the valid votes in the block.LastCommit. For height == 1,it's genesis time.
» events [object] false none Events defines all the events emitted by processing a transaction. Note,these events include those emitted by processing all the messages and thoseemitted from the ante handler. Whereas Logs contains the events, withadditional metadata, emitted only by processing the messages.Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
»» type string false none none
»» attributes [object] false none none
»»» key string(byte) false none none
»»» value string(byte) false none none
»»» index boolean false none none

cosmos.tx.v1beta1.GetTxsEventResponse

{
  "txs": [
    {
      "body": {
        "messages": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ],
        "memo": "string",
        "timeout_height": "string",
        "extension_options": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ],
        "non_critical_extension_options": [
          {
            "@type": "string",
            "property1": null,
            "property2": null
          }
        ]
      },
      "auth_info": {
        "signer_infos": [
          {
            "public_key": {
              "@type": "string",
              "property1": null,
              "property2": null
            },
            "mode_info": {
              "single": {
                "mode": "SIGN_MODE_UNSPECIFIED"
              },
              "multi": {
                "bitarray": {
                  "extra_bits_stored": 0,
                  "elems": "string"
                },
                "mode_infos": [
                  {}
                ]
              }
            },
            "sequence": "string"
          }
        ],
        "fee": {
          "amount": [
            {
              "denom": "string",
              "amount": "string"
            }
          ],
          "gas_limit": "string",
          "payer": "string",
          "granter": "string"
        }
      },
      "signatures": [
        "string"
      ]
    }
  ],
  "tx_responses": [
    {
      "height": "string",
      "txhash": "string",
      "codespace": "string",
      "code": 0,
      "data": "string",
      "raw_log": "string",
      "logs": [
        {
          "msg_index": 0,
          "log": "string",
          "events": [
            {
              "type": "string",
              "attributes": [
                {
                  "key": "string",
                  "value": "string"
                }
              ]
            }
          ]
        }
      ],
      "info": "string",
      "gas_wanted": "string",
      "gas_used": "string",
      "tx": {
        "@type": "string",
        "property1": null,
        "property2": null
      },
      "timestamp": "string",
      "events": [
        {
          "type": "string",
          "attributes": [
            {
              "key": "string",
              "value": "string",
              "index": true
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "string",
    "total": "string"
  }
}

GetTxsEventResponse is the response type for the Service.TxsByEvents RPC method.

Properties

Name Type Required Restrictions Description
txs [cosmos.tx.v1beta1.Tx] false none txs is the list of queried transactions.
tx_responses [object] false none tx_responses is the list of queried TxResponses.
» height string(int64) false none none
» txhash string false none The transaction hash.
» codespace string false none none
» code integer(int64) false none Response code.
» data string false none Result bytes, if any.
» raw_log string false none The output of the application's logger (raw string). May benon-deterministic.
» logs [object] false none The output of the application's logger (typed). May be non-deterministic.
»» msg_index integer(int64) false none none
»» log string false none none
»» events [object] false none Events contains a slice of Event objects that were emitted during someexecution.
»»» type string false none none
»»» attributes [object] false none none
»»»» key string false none none
»»»» value string false none none
» info string false none Additional information. May be non-deterministic.
» gas_wanted string(int64) false none Amount of gas requested for transaction.
» gas_used string(int64) false none Amount of gas consumed by transaction.
» tx object false none The request transaction bytes.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» timestamp string false none Time of the previous block. For heights > 1, it's the weighted median ofthe timestamps of the valid votes in the block.LastCommit. For height == 1,it's genesis time.
» events [object] false none Events defines all the events emitted by processing a transaction. Note,these events include those emitted by processing all the messages and thoseemitted from the ante handler. Whereas Logs contains the events, withadditional metadata, emitted only by processing the messages.Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
»» type string false none none
»» attributes [object] false none none
»»» key string(byte) false none none
»»» value string(byte) false none none
»»» index boolean false none none
pagination object false none pagination defines a pagination for the response.
» next_key string(byte) false none none
» total string(uint64) false none none

cosmos.tx.v1beta1.ModeInfo

{
  "single": {
    "mode": "SIGN_MODE_UNSPECIFIED"
  },
  "multi": {
    "bitarray": {
      "extra_bits_stored": 0,
      "elems": "string"
    },
    "mode_infos": [
      {
        "single": {
          "mode": "SIGN_MODE_UNSPECIFIED"
        },
        "multi": {}
      }
    ]
  }
}

ModeInfo describes the signing mode of a single or nested multisig signer.

Properties

Name Type Required Restrictions Description
single object false none none
» mode string false none SignMode represents a signing mode with its own security guarantees. - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will berejected - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and isverified with raw bytes from Tx - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify somehuman-readable textual representation on top of the binary representationfrom SIGN_MODE_DIRECT - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which usesAmino JSON and will be removed in the future - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the CosmosSDK. Ref: https://eips.ethereum.org/EIPS/eip-191Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,but is not implemented on the SDK by default. To enable EIP-191, you needto pass a custom TxConfig that has an implementation ofSignModeHandler for EIP-191. The SDK may decide to fully supportEIP-191 in the future.Since: cosmos-sdk 0.45.2
multi cosmos.tx.v1beta1.ModeInfo.Multi false none none

Enumerated Values

Property Value
mode SIGN_MODE_UNSPECIFIED
mode SIGN_MODE_DIRECT
mode SIGN_MODE_TEXTUAL
mode SIGN_MODE_LEGACY_AMINO_JSON
mode SIGN_MODE_EIP_191

cosmos.tx.v1beta1.ModeInfo.Multi

{
  "bitarray": {
    "extra_bits_stored": 0,
    "elems": "string"
  },
  "mode_infos": [
    {
      "single": {
        "mode": "SIGN_MODE_UNSPECIFIED"
      },
      "multi": {
        "bitarray": {
          "extra_bits_stored": 0,
          "elems": "string"
        },
        "mode_infos": []
      }
    }
  ]
}

Multi is the mode info for a multisig public key

Properties

Name Type Required Restrictions Description
bitarray object false none CompactBitArray is an implementation of a space efficient bit array.This is used to ensure that the encoded data takes up a minimal amount ofspace after proto encoding.This is not thread safe, and is not intended for concurrent usage.
» extra_bits_stored integer(int64) false none none
» elems string(byte) false none none
mode_infos [cosmos.tx.v1beta1.ModeInfo] false none [ModeInfo describes the signing mode of a single or nested multisig signer.]

cosmos.tx.v1beta1.SignerInfo

{
  "public_key": {
    "@type": "string",
    "property1": null,
    "property2": null
  },
  "mode_info": {
    "single": {
      "mode": "SIGN_MODE_UNSPECIFIED"
    },
    "multi": {
      "bitarray": {
        "extra_bits_stored": 0,
        "elems": "string"
      },
      "mode_infos": [
        {}
      ]
    }
  },
  "sequence": "string"
}

SignerInfo describes the public key and signing mode of a single top-level signer.

Properties

Name Type Required Restrictions Description
public_key object false none public_key is the public key of the signer. It is optional for accountsthat already exist in state. If unset, the verifier can use the required \signer address for this position and lookup the public key.
» additionalProperties any false none none
» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
mode_info cosmos.tx.v1beta1.ModeInfo false none ModeInfo describes the signing mode of a single or nested multisig signer.
sequence string(uint64) false none sequence is the sequence of the account, which describes thenumber of committed transactions signed by a given address. It is used toprevent replay attacks.

cosmos.tx.v1beta1.SimulateRequest

{
  "tx": {
    "body": {
      "messages": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "memo": "string",
      "timeout_height": "string",
      "extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ],
      "non_critical_extension_options": [
        {
          "@type": "string",
          "property1": null,
          "property2": null
        }
      ]
    },
    "auth_info": {
      "signer_infos": [
        {
          "public_key": {
            "@type": "string",
            "property1": null,
            "property2": null
          },
          "mode_info": {
            "single": {
              "mode": "SIGN_MODE_UNSPECIFIED"
            },
            "multi": {
              "bitarray": {
                "extra_bits_stored": 0,
                "elems": "string"
              },
              "mode_infos": [
                {}
              ]
            }
          },
          "sequence": "string"
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "string",
            "amount": "string"
          }
        ],
        "gas_limit": "string",
        "payer": "string",
        "granter": "string"
      }
    },
    "signatures": [
      "string"
    ]
  },
  "tx_bytes": "string"
}

SimulateRequest is the request type for the Service.Simulate RPC method.

Properties

Name Type Required Restrictions Description
tx cosmos.tx.v1beta1.Tx false none Tx is the standard type used for broadcasting transactions.
tx_bytes string(byte) false none tx_bytes is the raw transaction.Since: cosmos-sdk 0.43

cosmos.tx.v1beta1.Tx

{
  "body": {
    "messages": [
      {
        "@type": "string",
        "property1": null,
        "property2": null
      }
    ],
    "memo": "string",
    "timeout_height": "string",
    "extension_options": [
      {
        "@type": "string",
        "property1": null,
        "property2": null
      }
    ],
    "non_critical_extension_options": [
      {
        "@type": "string",
        "property1": null,
        "property2": null
      }
    ]
  },
  "auth_info": {
    "signer_infos": [
      {
        "public_key": {
          "@type": "string",
          "property1": null,
          "property2": null
        },
        "mode_info": {
          "single": {
            "mode": "SIGN_MODE_UNSPECIFIED"
          },
          "multi": {
            "bitarray": {
              "extra_bits_stored": 0,
              "elems": "string"
            },
            "mode_infos": [
              {}
            ]
          }
        },
        "sequence": "string"
      }
    ],
    "fee": {
      "amount": [
        {
          "denom": "string",
          "amount": "string"
        }
      ],
      "gas_limit": "string",
      "payer": "string",
      "granter": "string"
    }
  },
  "signatures": [
    "string"
  ]
}

Tx is the standard type used for broadcasting transactions.

Properties

Name Type Required Restrictions Description
body object false none TxBody is the body of a transaction that all signers sign over.
» messages [object] false none messages is a list of messages to be executed. The required signers ofthose messages define the number and order of elements in AuthInfo'ssigner_infos and Tx's signatures. Each required signer address is added tothe list only the first time it occurs.By convention, the first required signer (usually from the first message)is referred to as the primary signer and pays the fee for the wholetransaction.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» memo string false none memo is any arbitrary note/comment to be added to the transaction.WARNING: in clients, any publicly exposed text should not be called memo,but should be called note instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
» timeout_height string(uint64) false none none
» extension_options [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» non_critical_extension_options [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
auth_info cosmos.tx.v1beta1.AuthInfo false none AuthInfo describes the fee and signer modes that are used to sign atransaction.
signatures [string] false none signatures is a list of signatures that matches the length and order ofAuthInfo's signer_infos to allow connecting signature meta information likepublic key and signing mode by position.

Nyks IBC Module

IbcApplicationsTransferV1DenomTraces

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/apps/transfer/v1/denom_traces \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/apps/transfer/v1/denom_traces', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "denom_traces": [
    {
      "path": "path...",
      "base_denom": "base_denom..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

GET /ibc/apps/transfer/v1/denom_traces

DenomTraces queries all denomination traces.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method.

Name Type Required Restrictions Description
» denom_traces [object] false none denom_traces returns all denominations trace information.
»» path string false none path defines the chain of port/channel identifiers used for tracing thesource of the fungible token.
»» base_denom string false none base denomination of the relayed fungible token.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcApplicationsTransferV1DenomTrace

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/apps/transfer/v1/denom_traces/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/apps/transfer/v1/denom_traces/string', {

> The result from the above endpoint looks like this:

```json
{
  "denom_trace": {
    "path": "path...",
    "base_denom": "base_denom..."
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /ibc/apps/transfer/v1/denom_traces/{hash}

DenomTrace queries a denomination trace information.

Parameters

Name In Type Required Description
hash path string true hash (in hex format) of the denomination trace information.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method.

Name Type Required Restrictions Description
» denom_trace object false none denom_trace returns the requested denomination trace information.
»» path string false none path defines the chain of port/channel identifiers used for tracing thesource of the fungible token.
»» base_denom string false none base denomination of the relayed fungible token.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcApplicationsTransferV1Params

Code samples


> The result from the above endpoint looks like this:

```json
{
  "params": {
    "send_enabled": true,
    "receive_enabled": true
  }
}

curl --request GET \ --url https://lcd.twilight.org/ibc/apps/transfer/v1/params \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/ibc/apps/transfer/v1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/apps/transfer/v1/params

Params queries all parameters of the ibc-transfer module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is the response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params defines the parameters of the module.
»» send_enabled boolean false none send_enabled enables or disables all cross-chain token transfers from thischain.
»» receive_enabled boolean false none receive_enabled enables or disables all cross-chain token transfers to thischain.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "channels": [
    {
      "state": "state...",
      "ordering": "ordering...",
      "counterparty": {
        "port_id": "0x1234567890abcdef...",
        "channel_id": "0x1234567890abcdef..."
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  },
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

This operation does not require authentication

IbcCoreChannelV1Channels

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels

Channels queries all the IBC channels of a chain.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryChannelsResponse is the response type for the Query/Channels RPC method.

Name Type Required Restrictions Description
» channels [object] false none list of stored channels of the chain.
»» state string false none State defines if a channel is in one of the following states:CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels areready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receivepackets.
»» ordering string false none - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order inwhich they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent
»» counterparty object false none none
»»» port_id string false none port on the counterparty chain which owns the other end of the channel.
»»» channel_id string false none none
»» connection_hops [string] false none none
»» version string false none none
»» port_id string false none none
»» channel_id string false none none
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Enumerated Values

Property Value
state STATE_UNINITIALIZED_UNSPECIFIED
state STATE_INIT
state STATE_TRYOPEN
state STATE_OPEN
state STATE_CLOSED
ordering ORDER_NONE_UNSPECIFIED
ordering ORDER_UNORDERED
ordering ORDER_ORDERED

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "channel": {
    "state": "state...",
    "ordering": "ordering...",
    "counterparty": {
      "port_id": "0x1234567890abcdef...",
      "channel_id": "0x1234567890abcdef..."
    }
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

IbcCoreChannelV1Channel

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}

Channel queries an IBC Channel.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryChannelResponse is the response type for the Query/Channel RPC method. Besides the Channel end, it includes a proof and the height from which the proof was retrieved.

Name Type Required Restrictions Description
» channel object false none Channel defines pipeline for exactly-once packet delivery between specificmodules on separate blockchains, which has at least one end capable ofsending packets and one end capable of receiving packets.
»» state string false none State defines if a channel is in one of the following states:CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels areready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receivepackets.
»» ordering string false none - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order inwhich they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent
»» counterparty object false none none
»»» port_id string false none port on the counterparty chain which owns the other end of the channel.
»»» channel_id string false none none
»» connection_hops [string] false none none
»» version string false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Enumerated Values

Property Value
state STATE_UNINITIALIZED_UNSPECIFIED
state STATE_INIT
state STATE_TRYOPEN
state STATE_OPEN
state STATE_CLOSED

The result from the above endpoint looks like this:

{
  "identified_client_state": {
    "client_id": "0x1234567890abcdef...",
    "client_state": {
      "@type": "@type..."
    }
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|ordering|ORDER_NONE_UNSPECIFIED| |ordering|ORDER_UNORDERED| |ordering|ORDER_ORDERED|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1ChannelClientState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/client_state \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/client_state', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state

ChannelClientState queries for the client state for the channel associated with the provided channel identifiers.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "consensus_state": {
    "@type": "@type..."
  },
  "client_id": "0x1234567890abcdef...",
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|---|---|---|---|---| |» identified_client_state|object|false|none|IdentifiedClientState defines a client state with an additional clientidentifier field.| |»» client_id|string|false|none|none| |»» client_state|object|false|none|Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }| |»»» additionalProperties|any|false|none|none| |»»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.| |» proof|string(byte)|false|none|none| |» proof_height|object|false|none|Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset| |»» revision_number|string(uint64)|false|none|none| |»» revision_height|string(uint64)|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1ChannelConsensusState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/consensus_state/revision/string/height/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/consensus_state/revision/string/height/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}

ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
revision_number path string(uint64) true revision number of the consensus state
revision_height path string(uint64) true revision height of the consensus state

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

The result from the above endpoint looks like this:

{
  "next_sequence_receive": "1000000",
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

Response Schema

Status Code 200

QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method

Name Type Required Restrictions Description
» consensus_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» client_id string false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1NextSequenceReceive

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/next_sequence \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/next_sequence', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence

NextSequenceReceive returns the next receive sequence for a given channel.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier

Example responses

The result from the above endpoint looks like this:

{
  "acknowledgements": [
    {
      "port_id": "0x1234567890abcdef...",
      "channel_id": "0x1234567890abcdef...",
      "sequence": "1000000"
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  },
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method

Name Type Required Restrictions Description
» next_sequence_receive string(uint64) false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1PacketAcknowledgements

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_acknowledgements \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_acknowledgements', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements

PacketAcknowledgements returns all the packet acknowledgements associated with a channel.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
packet_commitment_sequences query array[string] false list of packet sequences

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

The result from the above endpoint looks like this:

{
  "acknowledgement": "acknowledgement...",
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method

Name Type Required Restrictions Description
» acknowledgements [object] false none none
»» port_id string false none channel port identifier.
»» channel_id string false none channel unique identifier.
»» sequence string(uint64) false none packet sequence.
»» data string(byte) false none embedded data that represents packet state.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1PacketAcknowledgement

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_acks/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_acks/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "commitments": [
    {
      "port_id": "0x1234567890abcdef...",
      "channel_id": "0x1234567890abcdef...",
      "sequence": "1000000"
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  },
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}

PacketAcknowledgement queries a stored packet acknowledgement hash.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
sequence path string(uint64) true packet sequence

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPacketAcknowledgementResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved

Name Type Required Restrictions Description
» acknowledgement string(byte) false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1PacketCommitments

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments

PacketCommitments returns all the packet commitments hashes associated with a channel.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key

The result from the above endpoint looks like this:

{
  "sequences": [
    "1000000"
  ],
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method

Name Type Required Restrictions Description
» commitments [object] false none none
»» port_id string false none channel port identifier.
»» channel_id string false none channel unique identifier.
»» sequence string(uint64) false none packet sequence.
»» data string(byte) false none embedded data that represents packet state.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1UnreceivedAcks

Code samples


> The result from the above endpoint looks like this:

```json
{
  "sequences": [
    "1000000"
  ],
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

curl --request GET \ --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string/unreceived_acks \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string/unreceived_acks', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks

UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
packet_ack_sequences path array[string] true list of acknowledgement sequences

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method

Name Type Required Restrictions Description
» sequences [string] false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "commitment": "commitment...",
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

This operation does not require authentication

IbcCoreChannelV1UnreceivedPackets

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string/unreceived_packets \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string/unreceived_packets', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets

UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
packet_commitment_sequences path array[string] true list of packet sequences

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method

Name Type Required Restrictions Description
» sequences [string] false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description

The result from the above endpoint looks like this:

{
  "received": true,
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

IbcCoreChannelV1PacketCommitment

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_commitments/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}

PacketCommitment queries a stored packet commitment hash.

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
sequence path string(uint64) true packet sequence

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPacketCommitmentResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved

Name Type Required Restrictions Description
» commitment string(byte) false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none

The result from the above endpoint looks like this:

{
  "channels": [
    {
      "state": "state...",
      "ordering": "ordering...",
      "counterparty": {
        "port_id": "0x1234567890abcdef...",
        "channel_id": "0x1234567890abcdef..."
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  },
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|»» revision_height|string(uint64)|false|none|none|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1PacketReceipt

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_receipts/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/channels/string/ports/string/packet_receipts/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}

PacketReceipt queries if a given packet sequence has been received on the queried chain

Parameters

Name In Type Required Description
channel_id path string true channel unique identifier
port_id path string true port unique identifier
sequence path string(uint64) true packet sequence

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryPacketReceiptResponse defines the client query response for a packet receipt which also includes a proof, and the height from which the proof was retrieved

Name Type Required Restrictions Description
» received boolean false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreChannelV1ConnectionChannels

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/channel/v1/connections/string/channels \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/channel/v1/connections/string/channels', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/channel/v1/connections/{connection}/channels

The result from the above endpoint looks like this:

{
  "params": {
    "allowed_clients": [
      "item..."
    ]
  }
}

ConnectionChannels queries all the channels associated with a connection end.

Parameters

Name In Type Required Description
connection path string true connection unique identifier
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method

Name Type Required Restrictions Description
» channels [object] false none list of channels associated with a connection.

The result from the above endpoint looks like this:

{
  "client_states": [
    {
      "client_id": "0x1234567890abcdef...",
      "client_state": {
        "@type": "@type..."
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

|»» state|string|false|none|State defines if a channel is in one of the following states:CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels areready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receivepackets.| |»» ordering|string|false|none|- ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order inwhich they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent| |»» counterparty|object|false|none|none| |»»» port_id|string|false|none|port on the counterparty chain which owns the other end of the channel.| |»»» channel_id|string|false|none|none| |»» connection_hops|[string]|false|none|none| |»» version|string|false|none|none| |»» port_id|string|false|none|none| |»» channel_id|string|false|none|none| |» pagination|object|false|none|PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }| |»» next_key|string(byte)|false|none|none| |»» total|string(uint64)|false|none|none| |» height|object|false|none|Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset| |»» revision_number|string(uint64)|false|none|none| |»» revision_height|string(uint64)|false|none|none|

Enumerated Values

Property Value
state STATE_UNINITIALIZED_UNSPECIFIED
state STATE_INIT
state STATE_TRYOPEN
state STATE_OPEN
state STATE_CLOSED
ordering ORDER_NONE_UNSPECIFIED
ordering ORDER_UNORDERED
ordering ORDER_ORDERED

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1ClientParams

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/client/v1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/client/v1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/client/v1/params

ClientParams queries all parameters of the ibc client.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryClientParamsResponse is the response type for the Query/ClientParams RPC method.

Name Type Required Restrictions Description

The result from the above endpoint looks like this:

{
  "client_state": {
    "@type": "@type..."
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|» params|object|false|none|params defines the parameters of the module.| |»» allowed_clients|[string]|false|none|allowed_clients defines the list of allowed client state types.|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1ClientStates

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/client_states \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/client_states', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/client_states

ClientStates queries all the IBC light clients of a chain.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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

The result from the above endpoint looks like this:

{
  "status": "status..."
}

is set.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryClientStatesResponse is the response type for the Query/ClientStates RPC method.

Name Type Required Restrictions Description
» client_states [object] false none list of stored ClientStates of the chain.
»» client_id string false none none
»» client_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1ClientState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/client_states/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/client_states/string', {
  headers: {
    'Accept': '*/*'

> The result from the above endpoint looks like this:

```json
{
  "consensus_states": [
    {
      "height": {
        "revision_number": "1000000",
        "revision_height": "1000000"
      },
      "consensus_state": {
        "@type": "@type..."
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

} }); const data = await response.json(); console.log(data); ```

GET /ibc/core/client/v1/client_states/{client_id}

ClientState queries an IBC light client.

Parameters

Name In Type Required Description
client_id path string true client state unique identifier

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryClientStateResponse is the response type for the Query/ClientState RPC method. Besides the client state, it includes a proof and the height from which the proof was retrieved.

Name Type Required Restrictions Description
» client_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1ClientStatus

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/client_status/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/client_status/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/client_status/{client_id}

Status queries the status of an IBC client.

Parameters

Name In Type Required Description
client_id path string true client unique identifier

Example responses

The result from the above endpoint looks like this:

{
  "consensus_state": {
    "@type": "@type..."
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryClientStatusResponse is the response type for the Query/ClientStatus RPC method. It returns the current status of the IBC client.

Name Type Required Restrictions Description
» status string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1ConsensusStates

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/consensus_states/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/consensus_states/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/consensus_states/{client_id}

ConsensusStates queries all the consensus state associated with a given client.

Parameters

Name In Type Required Description
client_id path string true client identifier
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

The result from the above endpoint looks like this:

{
  "upgraded_client_state": {
    "@type": "@type..."
  }
}

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method

Name Type Required Restrictions Description
» consensus_states [object] false none none
»» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»»» revision_number string(uint64) false none none
»»» revision_height string(uint64) false none none
»» consensus_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "upgraded_consensus_state": {
    "@type": "@type..."
  }
}

This operation does not require authentication

IbcCoreClientV1ConsensusState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/consensus_states/string/revision/string/height/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/consensus_states/string/revision/string/height/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}

ConsensusState queries a consensus state associated with a client state at a given height.

Parameters

Name In Type Required Description
client_id path string true client identifier
revision_number path string(uint64) true consensus state revision number
revision_height path string(uint64) true consensus state revision height
latest_height query boolean false latest_height overrrides the height field and queries the latest stored

Detailed descriptions

latest_height: latest_height overrrides the height field and queries the latest stored ConsensusState

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

The result from the above endpoint looks like this:

{
  "connection_paths": [
    "item..."
  ],
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

Response Schema

Status Code 200

QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method

Name Type Required Restrictions Description
» consensus_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1UpgradedClientState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/upgraded_client_states \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/upgraded_client_states', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/upgraded_client_states

UpgradedClientState queries an Upgraded IBC light client.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline

The result from the above endpoint looks like this:

{
  "connections": [
    {
      "id": "0x1234567890abcdef...",
      "client_id": "0x1234567890abcdef...",
      "versions": [
        {
          "identifier": "0x1234567890abcdef...",
          "features": [
            "item..."
          ]
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  },
  "height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|default|Default|An unexpected error response.|Inline|

Response Schema

Status Code 200

QueryUpgradedClientStateResponse is the response type for the Query/UpgradedClientState RPC method.

Name Type Required Restrictions Description
» upgraded_client_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreClientV1UpgradedConsensusState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/client/v1/upgraded_consensus_states \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/client/v1/upgraded_consensus_states', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/client/v1/upgraded_consensus_states

UpgradedConsensusState queries an Upgraded IBC consensus state.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method.

Name Type Required Restrictions Description
» upgraded_consensus_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreConnectionV1ClientConnections

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/connection/v1/client_connections/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/connection/v1/client_connections/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

> The result from the above endpoint looks like this:

```json
{
  "connection": {
    "client_id": "0x1234567890abcdef...",
    "versions": [
      {
        "identifier": "0x1234567890abcdef...",
        "features": [
          "item..."
        ]
      }
    ],
    "state": "state..."
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

`GET /ibc/core/connection/v1/client_connections/{client_id}`

*ClientConnections queries the connection paths associated with a client
state.*

### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|client_id|path|string|true|client identifier associated with a connection|

> Example responses

> 200 Response

### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A successful response.|Inline|
|default|Default|An unexpected error response.|Inline|

### Response Schema

Status Code **200**

*QueryClientConnectionsResponse is the response type for the
Query/ClientConnections RPC method*

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» connection_paths|[string]|false|none|slice of all the connection paths associated with a client.|
|» proof|string(byte)|false|none|none|
|» proof_height|object|false|none|Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset|
|»» revision_number|string(uint64)|false|none|none|
|»» revision_height|string(uint64)|false|none|none|

Status Code **default**

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» code|integer(int32)|false|none|none|
|» message|string|false|none|none|
|» details|[object]|false|none|none|
|»» **additionalProperties**|any|false|none|none|
|»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as in`path/google.protobuf.Duration`). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme `http`, `https`, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, `https` is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][]  value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the  URL, or have them precompiled into a binary to avoid any  lookup. Therefore, binary compatibility needs to be preserved  on changes to types. (Use versioned type names to manage  breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than `http`, `https` (or the empty scheme) might beused with implementation specific semantics.|

> This operation does not require authentication

## IbcCoreConnectionV1Connections

> Code samples

```shell
curl --request GET \
  --url https://lcd.twilight.org/ibc/core/connection/v1/connections \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/connection/v1/connections', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/connection/v1/connections

Connections queries all the IBC connections of a chain.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.

The result from the above endpoint looks like this:

{
  "identified_client_state": {
    "client_id": "0x1234567890abcdef...",
    "client_state": {
      "@type": "@type..."
    }
  },
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|pagination.count_total|query|boolean|false|count_total is set to true to indicate that the result set should include|

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionsResponse is the response type for the Query/Connections RPC method.

Name Type Required Restrictions Description
» connections [object] false none list of stored connections of the chain.
»» id string false none connection identifier.
»» client_id string false none client associated with this connection.
»» versions [object] false none none
»»» identifier string false none none
»»» features [string] false none none
»» state string false none current state of the connection end.
»» counterparty object false none counterparty chain associated with this connection.
»»» client_id string false none identifies the client on the counterparty chain associated with a givenconnection.
»»» connection_id string false none identifies the connection end on the counterparty chain associated with agiven connection.
»»» prefix object false none commitment merkle prefix of the counterparty chain.
»»»» key_prefix string(byte) false none none
»» delay_period string(uint64) false none delay period associated with this connection.
» pagination object false none PageResponse is to be embedded in gRPC response messages where thecorresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
»» next_key string(byte) false none none
»» total string(uint64) false none none
» height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Enumerated Values

Property Value
state STATE_UNINITIALIZED_UNSPECIFIED
state STATE_INIT

The result from the above endpoint looks like this:

{
  "consensus_state": {
    "@type": "@type..."
  },
  "client_id": "0x1234567890abcdef...",
  "proof": "proof...",
  "proof_height": {
    "revision_number": "1000000",
    "revision_height": "1000000"
  }
}

|state|STATE_TRYOPEN| |state|STATE_OPEN|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreConnectionV1Connection

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/connection/v1/connections/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/connection/v1/connections/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/connection/v1/connections/{connection_id}

Connection queries an IBC connection end.

Parameters

Name In Type Required Description
connection_id path string true connection unique identifier

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionResponse is the response type for the Query/Connection RPC method. Besides the connection end, it includes a proof and the height from which the proof was retrieved.

Name Type Required Restrictions Description
» connection object false none ConnectionEnd defines a stateful object on a chain connected to anotherseparate one.NOTE: there must only be 2 defined ConnectionEnds to establisha connection between two chains.
»» client_id string false none client associated with this connection.
»» versions [object] false none IBC version which can be utilised to determine encodings or protocols forchannels or packets utilising this connection.
»»» identifier string false none none
»»» features [string] false none none
»» state string false none current state of the connection end.
»» counterparty object false none counterparty chain associated with this connection.
»»» client_id string false none identifies the client on the counterparty chain associated with a givenconnection.
»»» connection_id string false none identifies the connection end on the counterparty chain associated with agiven connection.
»»» prefix object false none commitment merkle prefix of the counterparty chain.
»»»» key_prefix string(byte) false none none
»» delay_period string(uint64) false none delay period that must pass before a consensus state can be used forpacket-verification NOTE: delay period logic is only implemented by someclients.
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Enumerated Values

Property Value
state STATE_UNINITIALIZED_UNSPECIFIED
state STATE_INIT
state STATE_TRYOPEN
state STATE_OPEN

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreConnectionV1ConnectionClientState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/connection/v1/connections/string/client_state \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/connection/v1/connections/string/client_state', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/connection/v1/connections/{connection_id}/client_state

ConnectionClientState queries the client state associated with the connection.

Parameters

Name In Type Required Description
connection_id path string true connection identifier

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method

Name Type Required Restrictions Description
» identified_client_state object false none IdentifiedClientState defines a client state with an additional clientidentifier field.
»» client_id string false none none
»» client_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

IbcCoreConnectionV1ConnectionConsensusState

Code samples

curl --request GET \
  --url https://lcd.twilight.org/ibc/core/connection/v1/connections/string/consensus_state/revision/string/height/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/ibc/core/connection/v1/connections/string/consensus_state/revision/string/height/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}

ConnectionConsensusState queries the consensus state associated with the connection.

Parameters

Name In Type Required Description
connection_id path string true connection identifier
revision_number path string(uint64) true none
revision_height path string(uint64) true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method

Name Type Required Restrictions Description
» consensus_state object false none Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» client_id string false none none
» proof string(byte) false none none
» proof_height object false none Normally the RevisionHeight is incremented at each height while keepingRevisionNumber the same. However some consensus algorithms may choose toreset the height in certain conditions e.g. hard forks, state-machinebreaking changes In these cases, the RevisionNumber is incremented so thatheight continues to be monitonically increasing even as the RevisionHeightgets reset
»» revision_number string(uint64) false none none
»» revision_height string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Miscellaneous

CosmosEvidenceV1Beta1AllEvidence

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/evidence/v1beta1/evidence \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/evidence/v1beta1/evidence', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "evidence": [
    {
      "@type": "@type..."
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

GET /cosmos/evidence/v1beta1/evidence

AllEvidence queries all evidence.

Parameters

Name In Type Required Description
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method.

Name Type Required Restrictions Description
» evidence [object] false none evidence returns all evidences.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» pagination object false none pagination defines the pagination in the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosEvidenceV1Beta1Evidence

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/evidence/v1beta1/evidence/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/evidence/v1beta1/evidence/string', {

> The result from the above endpoint looks like this:

```json
{
  "evidence": {
    "@type": "@type..."
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /cosmos/evidence/v1beta1/evidence/{evidence_hash}

Evidence queries evidence based on evidence hash.

Parameters

Name In Type Required Description
evidence_hash path string(byte) true evidence_hash defines the hash of the requested evidence.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryEvidenceResponse is the response type for the Query/Evidence RPC method.

Name Type Required Restrictions Description
» evidence object false none evidence returns the requested evidence.
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosFeegrantV1Beta1Allowance

Code samples


> The result from the above endpoint looks like this:

```json
{
  "allowance": {
    "granter": "granter...",
    "grantee": "grantee...",
    "allowance": {
      "@type": "@type..."
    }
  }
}

curl --request GET \ --url https://lcd.twilight.org/cosmos/feegrant/v1beta1/allowance/string/string \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/cosmos/feegrant/v1beta1/allowance/string/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}

Allowance returns fee granted to the grantee by the granter.

Parameters

Name In Type Required Description
granter path string true granter is the address of the user granting an allowance of their funds.
grantee path string true grantee is the address of the user being granted an allowance of another user's funds.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAllowanceResponse is the response type for the Query/Allowance RPC method.

Name Type Required Restrictions Description
» allowance object false none allowance is a allowance granted for grantee by granter.
»» granter string false none granter is the address of the user granting an allowance of their funds.
»» grantee string false none grantee is the address of the user being granted an allowance of another user's funds.
»» allowance object false none allowance can be any of basic and filtered fee allowance.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

The result from the above endpoint looks like this:

{
  "allowances": [
    {
      "granter": "granter...",
      "grantee": "grantee...",
      "allowance": {
        "@type": "@type..."
      }
    }
  ],
  "pagination": {
    "next_key": "next_key...",
    "total": "1000000"
  }
}

This operation does not require authentication

CosmosFeegrantV1Beta1Allowances

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/feegrant/v1beta1/allowances/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/feegrant/v1beta1/allowances/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/feegrant/v1beta1/allowances/{grantee}

Allowances returns all the grants for address.

Parameters

Name In Type Required Description
grantee path string true none
pagination.key query string(byte) false key is a value returned in PageResponse.next_key to begin
pagination.offset query string(uint64) false offset is a numeric offset that can be used when key is unavailable.
pagination.limit query string(uint64) false limit is the total number of results to be returned in the result page.
pagination.count_total query boolean false count_total is set to true to indicate that the result set should include
pagination.reverse query boolean false reverse is set to true if results are to be returned in the descending order.

Detailed descriptions

pagination.key: key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset: offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit: limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total: 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.

pagination.reverse: reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAllowancesResponse is the response type for the Query/Allowances RPC method.

Name Type Required Restrictions Description
» allowances [object] false none allowances are allowance's granted for grantee by granter.
»» Grant is stored in the KVStore to record a grant with full context object false none none
»»» granter string false none granter is the address of the user granting an allowance of their funds.
»»» grantee string false none grantee is the address of the user being granted an allowance of another user's funds.
»»» allowance object false none allowance can be any of basic and filtered fee allowance.
»»»» additionalProperties any false none none
»»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.
» pagination object false none pagination defines an pagination for the response.
»» next_key string(byte) false none none
»» total string(uint64) false none none

Status Code default

|Name|Type|Required|Restrictions|Description|

The result from the above endpoint looks like this:

{
  "annual_provisions": "annual_provisions..."
}

|---|---|---|---|---| |» code|integer(int32)|false|none|none| |» message|string|false|none|none| |» details|[object]|false|none|none| |»» additionalProperties|any|false|none|none| |»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

This operation does not require authentication

CosmosMintV1Beta1AnnualProvisions

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/mint/v1beta1/annual_provisions \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/mint/v1beta1/annual_provisions', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/mint/v1beta1/annual_provisions

AnnualProvisions current minting annual provisions value.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method.

The result from the above endpoint looks like this:

{
  "inflation": "inflation..."
}
Name Type Required Restrictions Description
» annual_provisions string(byte) false none annual_provisions is the current minting annual provisions value.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

CosmosMintV1Beta1Inflation

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/mint/v1beta1/inflation \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/mint/v1beta1/inflation', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/mint/v1beta1/inflation

Inflation returns the current minting inflation value.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

The result from the above endpoint looks like this:

{
  "params": {
    "mint_denom": "mint_denom...",
    "inflation_rate_change": "inflation_rate_change...",
    "inflation_max": "inflation_max...",
    "inflation_min": "inflation_min...",
    "goal_bonded": "goal_bonded...",
    "blocks_per_year": "1000000"
  }
}

Response Schema

Status Code 200

QueryInflationResponse is the response type for the Query/Inflation RPC method.

Name Type Required Restrictions Description
» inflation string(byte) false none inflation is the current minting inflation value.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

CosmosMintV1Beta1Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/mint/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/mint/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/mint/v1beta1/params

Params returns the total set of minting parameters.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline

The result from the above endpoint looks like this:

{
  "param": {
    "subspace": "subspace...",
    "key": "key...",
    "value": "1000"
  }
}

|default|Default|An unexpected error response.|Inline|

Response Schema

Status Code 200

QueryParamsResponse is the response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params defines the parameters of the module.
»» mint_denom string false none none
»» inflation_rate_change string false none none
»» inflation_max string false none none
»» inflation_min string false none none
»» goal_bonded string false none none
»» blocks_per_year string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

CosmosParamsV1Beta1Params

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/params/v1beta1/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/params/v1beta1/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/params/v1beta1/params

Params queries a specific parameter of a module, given its subspace and key.

Parameters

Name In Type Required Description
subspace query string false subspace defines the module to query the parameter for.
key query string false key defines the key of the parameter in the subspace.

The result from the above endpoint looks like this:

{
  "height": "height..."
}

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» param object false none param defines the queried parameter.
»» subspace string false none none
»» key string false none none
»» value string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

CosmosUpgradeV1Beta1AppliedPlan

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/upgrade/v1beta1/applied_plan/string \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/upgrade/v1beta1/applied_plan/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "plan": {
    "name": "name...",
    "time": "time...",
    "height": "height...",
    "info": "info...",
    "upgraded_client_state": {
      "@type": "@type..."
    }
  }
}

GET /cosmos/upgrade/v1beta1/applied_plan/{name}

AppliedPlan queries a previously applied upgrade plan by its name.

Parameters

Name In Type Required Description
name path string true name is the name of the applied plan to query for.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method.

Name Type Required Restrictions Description
» height string(int64) false none height is the block height at which the plan was applied.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosUpgradeV1Beta1CurrentPlan

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/upgrade/v1beta1/current_plan \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/upgrade/v1beta1/current_plan', {
  headers: {
    'Accept': '*/*'

> The result from the above endpoint looks like this:

```json
{
  "module_versions": [
    {
      "name": "name...",
      "version": "1000000"
    }
  ]
}

} }); const data = await response.json(); console.log(data); ```

GET /cosmos/upgrade/v1beta1/current_plan

CurrentPlan queries the current upgrade plan.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method.

Name Type Required Restrictions Description
» plan object false none plan is the current upgrade plan.
»» name string false none Sets the name for the upgrade. This name will be used by the upgradedversion of the software to apply any special "on-upgrade" commands duringthe first BeginBlock method after the upgrade is applied. It is also usedto detect whether a software version can handle a given upgrade. If noupgrade handler with this name has been set in the software, it will beassumed that the software is out-of-date when the upgrade Time or Height isreached and the software will exit.
»» time string(date-time) false none Deprecated: Time based upgrades have been deprecated. Time based upgrade logichas been removed from the SDK.If this field is not empty, an error will be thrown.
»» height string(int64) false none The height at which the upgrade must be performed.Only used if Time is not set.
»» info string false none none
»» upgraded_client_state object false none Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has beenmoved to the IBC module in the sub module 02-client.If this field is not empty, an error will be thrown.
»»» additionalProperties any false none none
»»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

CosmosUpgradeV1Beta1ModuleVersions

Code samples

curl --request GET \
  --url https://lcd.twilight.org/cosmos/upgrade/v1beta1/module_versions \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/cosmos/upgrade/v1beta1/module_versions', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

> The result from the above endpoint looks like this:

```json
{
  "upgraded_consensus_state": "upgraded_consensus_state..."
}

`GET /cosmos/upgrade/v1beta1/module_versions`

*ModuleVersions queries the list of module versions from state.*

Since: cosmos-sdk 0.43

### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|module_name|query|string|false|module_name is a field to query a specific module|

#### Detailed descriptions

**module_name**: module_name is a field to query a specific module
consensus version from state. Leaving this empty will
fetch the full list of module versions from state

> Example responses

> 200 Response

### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A successful response.|Inline|
|default|Default|An unexpected error response.|Inline|

### Response Schema

Status Code **200**

*QueryModuleVersionsResponse is the response type for the Query/ModuleVersions
RPC method.

Since: cosmos-sdk 0.43*

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» module_versions|[object]|false|none|module_versions is a list of module names with their consensus versions.|
|»» name|string|false|none|none|
|»» version|string(uint64)|false|none|none|

Status Code **default**

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» code|integer(int32)|false|none|none|
|» message|string|false|none|none|
|» details|[object]|false|none|none|
|»» **additionalProperties**|any|false|none|none|
|»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as in`path/google.protobuf.Duration`). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme `http`, `https`, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, `https` is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][]  value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the  URL, or have them precompiled into a binary to avoid any  lookup. Therefore, binary compatibility needs to be preserved  on changes to types. (Use versioned type names to manage  breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than `http`, `https` (or the empty scheme) might beused with implementation specific semantics.|

> This operation does not require authentication

## CosmosUpgradeV1Beta1UpgradedConsensusState

> Code samples

```shell
curl --request GET \
  --url https://lcd.twilight.org/cosmos/upgrade/v1beta1/upgraded_consensus_state/string \
  --header 'Accept: */*'

The result from the above endpoint looks like this:

{
  "attestations": [
    {
      "observed": true,
      "votes": [
        "item..."
      ],
      "height": "1000000",
      "proposal": {
        "@type": "@type..."
      }
    }
  ]
}
const response = await fetch('https://lcd.twilight.org/cosmos/upgrade/v1beta1/upgraded_consensus_state/string', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}

UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)

Parameters

Name In Type Required Description
last_height path string(int64) true last height of the current chain must be sent in request

Detailed descriptions

last_height: last height of the current chain must be sent in request as this is the height under which next consensus state is stored

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method.

Name Type Required Restrictions Description
» upgraded_consensus_state string(byte) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

TwilightprojectNyksForksGetAttestations

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilight-project/nyks/nyks/attestations \
  --header 'Accept: */*'

The result from the above endpoint looks like this:

{
  "params": {}
}
const response = await fetch('https://lcd.twilight.org/twilight-project/nyks/nyks/attestations', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /twilight-project/nyks/nyks/attestations

Queries a list of Attestations items.

Parameters

Name In Type Required Description
limit query string(uint64) false limit defines how many attestations to limit in the response.
order_by query string false order_by provides ordering of atteststions by nonce in the response. Either
proposal_type query string false proposal_type allows filtering attestations by proposal type
height query string(uint64) false height allows filtering attestations by block height

Detailed descriptions

order_by: order_by provides ordering of atteststions by nonce in the response. Either 'asc' or 'desc' can be provided. If no value is provided, it defaults to 'asc'.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» attestations [object] false none none
»» Attestation is an aggregate of proposals that eventually becomes observed by

all orchestrators OBSERVED: Observed indicates that >67% of validators have attested to the event, and that the event should be executed by the state machine|object|false|none|The actual content of the proposals is passed in with the transaction making the proposaland then passed through the call stack alongside the attestation while it is processedthe key in which the attestation is stored is keyed on the exact details of the proposalbut there is no reason to store those exact details becuause the next message senderwill kindly provide you with them.| |»»» observed|boolean|false|none|none| |»»» votes|[string]|false|none|none| |»»» height|string(uint64)|false|none|none| |»»» proposal|object|false|none|Any contains an arbitrary serialized protocol buffer message along with aURL that describes the type of the serialized message.Protobuf library provides support to pack/unpack Any values in the formof utility functions or additional generated methods of the Any type.Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }The pack methods provided by protobuf library will by default use'type.googleapis.com/full.type.name' as the type URL and the unpackmethods only use the fully qualified type name after the last '/'in the type URL, for example "foo.bar.com/x/y.z" will yield typename "y.z".JSON====The JSON representation of an Any value uses the regularrepresentation of the deserialized, embedded message, with anadditional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": }If the embedded message type is well-known and has a custom JSONrepresentation, that representation will be embedded adding a fieldvalue which holds the custom JSON in addition to the @typefield. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }| |»»»» additionalProperties|any|false|none|none| |»»»» @type|string|false|none|A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.|

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

TwilightprojectNyksForksParams

Code samples

curl --request GET \
  --url https://lcd.twilight.org/twilightproject/nyks/nyks/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/twilightproject/nyks/nyks/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /twilightproject/nyks/nyks/params

Parameters queries the parameters of the module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none params holds all the parameters of this module.

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:* If no scheme is provided, https is assumed.* An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)Note: this functionality is not currently available in the officialprotobuf release, and it is not used for type URLs beginning withtype.googleapis.com.Schemes other than http, https (or the empty scheme) might beused with implementation specific semantics.

This operation does not require authentication

Nyks Tendermint Queries

TendermintSpnMonitoringpConnectionChannelID

Code samples

curl --request GET \
  --url https://lcd.twilight.org/tendermint/spn/monitoringp/connection_channel_id \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/tendermint/spn/monitoringp/connection_channel_id', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "ConnectionChannelID": {
    "channelID": "0x1234567890abcdef..."
  }
}

GET /tendermint/spn/monitoringp/connection_channel_id

Queries a ConnectionChannelID by index.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ConnectionChannelID object false none none
»» channelID string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

TendermintSpnMonitoringpConsumerClientID

Code samples

curl --request GET \
  --url https://lcd.twilight.org/tendermint/spn/monitoringp/consumer_client_id \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/tendermint/spn/monitoringp/consumer_client_id', {

> The result from the above endpoint looks like this:

```json
{
  "ConsumerClientID": {
    "clientID": "0x1234567890abcdef..."
  }
}

headers: { 'Accept': '/' } }); const data = await response.json(); console.log(data); ```

GET /tendermint/spn/monitoringp/consumer_client_id

Queries a ConsumerClientID by index.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ConsumerClientID object false none none
»» clientID string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

TendermintSpnMonitoringpMonitoringInfo

Code samples


> The result from the above endpoint looks like this:

```json
{
  "MonitoringInfo": {
    "transmitted": true,
    "signatureCounts": {
      "blockCount": "1000000",
      "counts": [
        {
          "opAddress": "0x1234567890abcdef...",
          "RelativeSignatures": "RelativeSignatures..."
        }
      ]
    }
  }
}

curl --request GET \ --url https://lcd.twilight.org/tendermint/spn/monitoringp/monitoring_info \ --header 'Accept: /' ```

const response = await fetch('https://lcd.twilight.org/tendermint/spn/monitoringp/monitoring_info', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /tendermint/spn/monitoringp/monitoring_info

Queries a MonitoringInfo by index.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» MonitoringInfo object false none none
»» transmitted boolean false none none
»» signatureCounts object false none none
»»» blockCount string(uint64) false none none
»»» counts [object] false none none
»»»» SignatureCount contains information of signature reporting for one specific validator with consensus address
RelativeSignatures is the sum of all signatures relative to the validator set size object false none none
»»»»» opAddress string false none none
»»»»» RelativeSignatures string false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

The result from the above endpoint looks like this:

{
  "params": {
    "lastBlockHeight": "lastBlockHeight...",
    "consumerChainID": "0x1234567890abcdef...",
    "consumerConsensusState": {
      "nextValidatorsHash": "0x1234567890abcdef...",
      "timestamp": "timestamp...",
      "root": {
        "hash": "0x1234567890abcdef..."
      }
    },
    "consumerUnbondingPeriod": "consumerUnbondingPeriod...",
    "consumerRevisionHeight": "1000000"
  }
}

This operation does not require authentication

TendermintSpnMonitoringpParams

Code samples

curl --request GET \
  --url https://lcd.twilight.org/tendermint/spn/monitoringp/params \
  --header 'Accept: */*'
const response = await fetch('https://lcd.twilight.org/tendermint/spn/monitoringp/params', {
  headers: {
    'Accept': '*/*'
  }
});
const data = await response.json();
console.log(data);

GET /tendermint/spn/monitoringp/params

Params queries the parameters of the module.

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK A successful response. Inline
default Default An unexpected error response. Inline

Response Schema

Status Code 200

QueryParamsResponse is response type for the Query/Params RPC method.

Name Type Required Restrictions Description
» params object false none Params defines the parameters for the module.
»» lastBlockHeight string(int64) false none none
»» consumerChainID string false none none
»» consumerConsensusState object false none none
»»» nextValidatorsHash string false none none
»»» timestamp string false none none
»»» root object false none none
»»»» hash string false none none
»» consumerUnbondingPeriod string(int64) false none none
»» consumerRevisionHeight string(uint64) false none none

Status Code default

Name Type Required Restrictions Description
» code integer(int32) false none none
» message string false none none
» details [object] false none none
»» additionalProperties any false none none
»» @type string false none none

This operation does not require authentication

Zkos RPC API

Overview

The zkOS RPC API exposes the UTXO-based account state and encrypted account details tracked by the zkOS node. Use it to submit shielded transactions, query UTXOs and outputs, and interact with the zero-knowledge privacy layer.

Base URL: https://nykschain.twilight.rest/zkos/

Development URL: http://localhost:3030/ (Local development)

No authentication required. All requests use JSON-RPC 2.0 via HTTP POST.


Parameter Formats

Methods accept parameters in two formats:

Check each endpoint's parameter table for the correct format.

All hex-encoded values should be valid hexadecimal without the 0x prefix.


Error Responses

All errors follow the JSON-RPC 2.0 error format:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid params: expected hex-encoded address"
  },
  "id": 1
}
Code Meaning
-32700 Parse error — invalid JSON
-32600 Invalid request — missing required fields
-32601 Method not found
-32602 Invalid params — wrong type or format
-32603 Internal error — server-side failure

Table of Contents

  1. Transaction Operations
  2. UTXO Queries
  3. Output Queries
  4. Database Queries

Transaction Operations

Submit Transaction

# Transfer/Script Transaction
curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "txCommit",
    "params": ["your_hex_encoded_transaction_here"],
    "id": 1
  }'

# Message Transaction (Burn) - requires twilight address as second parameter
curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "txCommit",
    "params": ["your_hex_encoded_message_transaction_here", "twilight_address_here"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'txCommit',
    params: ['your_hex_encoded_transaction_here'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "tx_hash": "A1B2C3D4E5F6789012345678901234567890ABCDEF",
    "status": "success"
  },
  "id": 1
}

Commits a transaction to the blockchain with cryptographic verification and UTXO state updates. For message transactions with burn type, a twilight address must be provided as the second parameter.

HTTP Method

POST

RPC Method

txCommit

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded transaction data
[1] string Conditional Twilight address (required ONLY for message transactions with burn type)

Response Fields

Field Data_Type Description
tx_hash string Transaction hash for blockchain confirmation
status string Transaction status ("success" or "failed")

UTXO Queries

Get UTXOs by Address

Use getUtxos for coin UTXOs associated with a specific address. For all coin UTXOs system-wide, use allCoinUtxos.

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getUtxos",
    "params": ["hex_encoded_zkos_account_address"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getUtxos',
    params: ['hex_encoded_zkos_account_address'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "a1b2c3d4e5f67890abcdef1234567890abcdef12...",
      "block_height": 12345
    }
  ],
  "id": 1
}

Retrieves coin-type UTXOs for a specific address.

HTTP Method

POST

RPC Method

getUtxos

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded address to query UTXOs for

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the UTXO
block_height integer Block height when UTXO was created

Get Memo UTXOs by Address

Use getMemoUtxos for memo UTXOs associated with a specific address. For all memo UTXOs system-wide, use allMemoUtxos.

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getMemoUtxos",
    "params": ["hex_encoded_zkos_account_address"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getMemoUtxos',
    params: ['hex_encoded_zkos_account_address'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "b2c3d4e5f67890abcdef1234567890abcdef1234...",
      "memo_data": "encrypted_memo_content",
      "block_height": 12346
    }
  ],
  "id": 1
}

Retrieves memo-type UTXOs containing encrypted message data for a specific address.

HTTP Method

POST

RPC Method

getMemoUtxos

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded address to query memo UTXOs for

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the memo UTXO
memo_data string Encrypted memo content
block_height integer Block height when memo UTXO was created

Get State UTXOs by Address

Use getStateUtxos for state UTXOs associated with a specific address. For all state UTXOs system-wide, use allStateUtxos.

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getStateUtxos",
    "params": ["hex_encoded_zkos_account_address"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getStateUtxos',
    params: ['hex_encoded_zkos_account_address'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "c3d4e5f67890abcdef1234567890abcdef123456...",
      "state_data": "encrypted_state_content",
      "block_height": 12347
    }
  ],
  "id": 1
}

Retrieves state-type UTXOs containing smart contract state data for a specific address.

HTTP Method

POST

RPC Method

getStateUtxos

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded address to query state UTXOs for

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the state UTXO
state_data string Encrypted state content
block_height integer Block height when state UTXO was created

Get All Coin UTXOs

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "allCoinUtxos",
    "params": [],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'allCoinUtxos',
    params: [],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "d4e5f67890abcdef1234567890abcdef12345678...",
      "block_height": 12348
    }
  ],
  "id": 1
}

Retrieves all coin-type UTXOs in the system.

HTTP Method

POST

RPC Method

allCoinUtxos

Message Parameters

Params Data_Type Required Values
N/A null No No parameters required

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the UTXO
block_height integer Block height when UTXO was created

Get All Memo UTXOs

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "allMemoUtxos",
    "params": [],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'allMemoUtxos',
    params: [],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "e5f67890abcdef1234567890abcdef1234567890...",
      "memo_data": "encrypted_memo_content",
      "block_height": 12349
    }
  ],
  "id": 1
}

Retrieves all memo-type UTXOs in the system.

HTTP Method

POST

RPC Method

allMemoUtxos

Message Parameters

Params Data_Type Required Values
N/A null No No parameters required

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the memo UTXO
memo_data string Encrypted memo content
block_height integer Block height when memo UTXO was created

Get All State UTXOs

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "allStateUtxos",
    "params": [],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'allStateUtxos',
    params: [],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "f67890abcdef1234567890abcdef123456789012...",
      "state_data": "encrypted_state_content",
      "block_height": 12350
    }
  ],
  "id": 1
}

Retrieves all state-type UTXOs in the system.

HTTP Method

POST

RPC Method

allStateUtxos

Message Parameters

Params Data_Type Required Values
N/A null No No parameters required

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the state UTXO
state_data string Encrypted state content
block_height integer Block height when state UTXO was created

Get UTXO IDs by Address

This method uses named parameters (object) instead of positional parameters (array).

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "get_utxos_id",
    "params": {
      "address_or_id": "hex_encoded_address",
      "input_type": "Coin"
    },
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'get_utxos_id',
    params: {
      address_or_id: 'hex_encoded_address',
      input_type: 'Coin'
    },
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": "hex_encoded_utxo_id",
  "id": 1
}

Retrieves UTXO IDs associated with a specific address and input type.

HTTP Method

POST

RPC Method

get_utxos_id

Message Parameters

Field Data_Type Required Values
address_or_id string Yes Hex-encoded address to query
input_type string Yes UTXO type: "Coin", "Memo", or "State"

Response Fields

Field Data_Type Description
result string Hex-encoded UTXO ID

Get UTXO Details by Address

This method uses named parameters (object) instead of positional parameters (array).

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "get_utxos_detail",
    "params": {
      "address_or_id": "hex_encoded_address",
      "input_type": "Coin"
    },
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'get_utxos_detail',
    params: {
      address_or_id: 'hex_encoded_address',
      input_type: 'Coin'
    },
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "id": {
      "commitment": "hex_encoded_commitment",
      "nullifier": "hex_encoded_nullifier"
    },
    "output": {
      "value": "encrypted_value",
      "data": "encrypted_output_data"
    }
  },
  "id": 1
}

Retrieves comprehensive UTXO information including both the UTXO ID and associated output data.

HTTP Method

POST

RPC Method

get_utxos_detail

Message Parameters

Field Data_Type Required Values
address_or_id string Yes Hex-encoded address to query
input_type string Yes UTXO type: "Coin", "Memo", or "State"

Response Fields

Field Data_Type Description
id object UTXO object containing commitment and nullifier data
output object Output object containing encrypted transaction data

Get Output by UTXO Key (Structured)

This method uses named parameters (object) instead of positional parameters (array).

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "get_output",
    "params": {
      "address_or_id": "hex_encoded_utxo_key",
      "input_type": "Coin"
    },
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'get_output',
    params: {
      address_or_id: 'hex_encoded_utxo_key',
      input_type: 'Coin'
    },
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "value": "encrypted_output_value",
    "data": "encrypted_output_data",
    "commitment": "hex_encoded_commitment"
  },
  "id": 1
}

Retrieves output data by UTXO key using structured parameters with explicit type specification.

HTTP Method

POST

RPC Method

get_output

Message Parameters

Field Data_Type Required Values
address_or_id string Yes Hex-encoded UTXO key to query
input_type string Yes UTXO type: "Coin", "Memo", or "State"

Response Fields

Field Data_Type Description
value string Encrypted output value
data string Encrypted output data
commitment string Hex-encoded commitment for the output

Output Queries

Get All Coin Outputs

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "allOutputs",
    "params": [],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'allOutputs',
    params: [],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "output_key": "7890abcdef1234567890abcdef12345678901234...",
      "value": "1000000",
      "block_height": 12351
    }
  ],
  "id": 1
}

Retrieves all coin-type outputs in the system.

HTTP Method

POST

RPC Method

allOutputs

Message Parameters

Params Data_Type Required Values
N/A null No No parameters required

Response Fields

Field Data_Type Description
output_key string Unique identifier for the output
value string Output value in base currency units
block_height integer Block height when output was created

Get Specific Coin Output

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getOutput",
    "params": ["hex_encoded_utxo_key"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getOutput',
    params: ['hex_encoded_utxo_key'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "output_key": "90abcdef1234567890abcdef123456789012abcd...",
    "value": "1000000",
    "block_height": 12352,
    "transaction_hash": "abcdef1234567890abcdef1234567890abcdef12..."
  },
  "id": 1
}

Retrieves a specific coin output by its UTXO key.

HTTP Method

POST

RPC Method

getOutput

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded UTXO key to query output for

Response Fields

Field Data_Type Description
output_key string Unique identifier for the output
value string Output value in base currency units
block_height integer Block height when output was created
transaction_hash string Transaction hash containing this output

Get Specific Memo Output

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getMemoOutput",
    "params": ["hex_encoded_utxo_key"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getMemoOutput',
    params: ['hex_encoded_utxo_key'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "output_key": "bcdef1234567890abcdef1234567890abcdef1234...",
    "memo_data": "encrypted_memo_content",
    "block_height": 12353,
    "transaction_hash": "cdef1234567890abcdef1234567890abcdef1234..."
  },
  "id": 1
}

Retrieves a specific memo output by its UTXO key.

HTTP Method

POST

RPC Method

getMemoOutput

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded UTXO key to query memo output for

Response Fields

Field Data_Type Description
output_key string Unique identifier for the memo output
memo_data string Encrypted memo content
block_height integer Block height when memo output was created
transaction_hash string Transaction hash containing this memo output

Get Specific State Output

curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getStateOutput",
    "params": ["hex_encoded_utxo_key"],
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getStateOutput',
    params: ['hex_encoded_utxo_key'],
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "output_key": "def1234567890abcdef1234567890abcdef123456...",
    "state_data": "encrypted_state_content",
    "block_height": 12354,
    "transaction_hash": "ef1234567890abcdef1234567890abcdef123456..."
  },
  "id": 1
}

Retrieves a specific state output by its UTXO key.

HTTP Method

POST

RPC Method

getStateOutput

Message Parameters

Params Data_Type Required Values
[0] string Yes Hex-encoded UTXO key to query state output for

Response Fields

Field Data_Type Description
output_key string Unique identifier for the state output
state_data string Encrypted state content
block_height integer Block height when state output was created
transaction_hash string Transaction hash containing this state output

Database Queries

Query UTXOs from Database

Maximum limit: 10,000 records per request. Requests exceeding this limit will be capped.

This method uses named parameters (object) instead of positional parameters (array).

# Query coin UTXOs
curl -X POST https://nykschain.twilight.rest/zkos/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getUtxosFromDB",
    "params": {
      "start_block": 0,
      "end_block": 1000,
      "limit": 100,
      "pagination": 0,
      "io_type": "Coin"
    },
    "id": 1
  }'
const response = await fetch('https://nykschain.twilight.rest/zkos/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getUtxosFromDB',
    params: {
      start_block: 0,
      end_block: 1000,
      limit: 100,
      pagination: 0,
      io_type: 'Coin'
    },
    id: 1
  })
});
const data = await response.json();
console.log(data);

The result from the above endpoint looks like this:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "utxo_key": "1234567890abcdef1234567890abcdef12345678...",
      "block_height": 12355,
      "io_type": "Coin",
      "data": "encrypted_utxo_data"
    }
  ],
  "id": 1
}

Queries UTXOs from the PostgreSQL database with filtering by block range, type, and pagination.

HTTP Method

POST

RPC Method

getUtxosFromDB

Message Parameters

Field Data_Type Required Values
start_block integer Yes Starting block height
end_block integer Yes Ending block height
limit integer Yes Maximum number of results (max: 10,000)
pagination integer Yes Pagination offset for result sets
io_type string Yes Type of UTXO: "Coin", "Memo", or "State"

Response Fields

Field Data_Type Description
utxo_key string Unique identifier for the UTXO
block_height integer Block height when UTXO was created
io_type string Type of UTXO (Coin, Memo, or State)
data string Encrypted UTXO content based on type

Notes

  1. All hex strings should be valid hexadecimal without the 0x prefix
  2. Some endpoints return empty results with error messages if no data is found
  3. Transaction verification is performed before committing transactions

Indexer API

Overview

The Twilight Indexer API is a read-only REST API that provides comprehensive access to indexed Nyks blockchain data including blocks, transactions, accounts, validators, BTC bridge operations, fragments, and zkOS transactions.

The API includes: - Paginated list and detail endpoints for all indexed data - Real-time WebSocket subscriptions for new blocks, transactions, deposits, and withdrawals - Swagger UI for interactive endpoint testing

Note This API serves indexed data from PostgreSQL. For authoritative on-chain state, refer to the Twilight LCD: https://lcd.twilight.org.


Base URL

Production https://indexer.twilight.org/api

Local development http://localhost:3001/api

Swagger UI https://indexer.twilight.org/api/docs


Authentication

No authentication is required.


Rate Limiting

All /api routes are rate limited.

Setting Value
Window 60 seconds
Max requests 100 per window

Conventions


Table of Contents

  1. Health Checks
  2. Blocks
  3. Transactions
  4. Accounts
  5. Validators
  6. Statistics
  7. BTC Deposits
  8. BTC Withdrawals
  9. Reserves
  10. Fragments
  11. zkOS Transfers
  12. zkOS Mint/Burn
  13. Bitcoin Info
  14. Search
  15. WebSocket API

Health Checks

Liveness Probe

Description Simple liveness check. Returns 200 if the API process is running.

HTTP Method GET

Path /health/live

Example

curl -X GET "https://indexer.twilight.org/health/live"

The result from the above endpoint looks like this:

{
  "status": "ok"
}

Readiness Probe

Description Comprehensive readiness check. Verifies database, Redis, and indexer state.

HTTP Method GET

Path /health/ready

Example

curl -X GET "https://indexer.twilight.org/health/ready"

The result from the above endpoint looks like this:

{
  "status": "ready",
  "checks": {
    "database": "ok",
    "redis": "ok",
    "lastIndexedHeight": "428041"
  },
  "timestamp": "2024-02-26T10:00:00.000Z"
}

Response Fields

Field Type Description
status string ready or not_ready
checks.database string ok or failed
checks.redis string ok, failed, or unavailable
checks.lastIndexedHeight string Last indexed block height
timestamp string ISO 8601 timestamp

Returns 200 when healthy, 503 when not ready.


Blocks

List Blocks

Description Returns a paginated list of blocks ordered by height descending.

HTTP Method GET

Path /api/blocks

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/blocks?page=1&limit=20"
fetch("https://indexer.twilight.org/api/blocks?page=1&limit=20")
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

The result from the above endpoint looks like this:

{
  "data": [
    {
      "height": 428041,
      "hash": "A1B2C3D4...",
      "timestamp": "2024-02-26T10:00:00.000Z",
      "proposer": "base64address",
      "proposerMoniker": "twilight-validator-1",
      "proposerOperator": "twilightvaloper1...",
      "txCount": 5,
      "gasUsed": "125000",
      "gasWanted": "200000"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 428041,
    "totalPages": 21403
  }
}

Response Fields

Field Type Description
data[].height integer Block height
data[].hash string Block hash
data[].timestamp string Block time (ISO 8601)
data[].proposer string Proposer address (base64)
data[].proposerMoniker string Validator moniker
data[].txCount integer Transaction count
data[].gasUsed string Total gas used
data[].gasWanted string Total gas wanted

Cache: 10 seconds


Get Latest Block

Description Returns the most recent block with its last 10 transactions.

HTTP Method GET

Path /api/blocks/latest

Example

curl -X GET "https://indexer.twilight.org/api/blocks/latest"

The result from the above endpoint looks like this:

{
  "height": 428041,
  "hash": "A1B2C3D4...",
  "timestamp": "2024-02-26T10:00:00.000Z",
  "proposer": "base64address",
  "txCount": 5,
  "transactions": []
}

Get Block by Height

Description Returns a specific block by height with all transactions and events.

HTTP Method GET

Path /api/blocks/{height}

Path Parameters

Parameter Type Required Description
height integer Yes Block height

Example

curl -X GET "https://indexer.twilight.org/api/blocks/428041"

The result from the above endpoint looks like this:

{
  "height": 428041,
  "hash": "A1B2C3D4...",
  "timestamp": "2024-02-26T10:00:00.000Z",
  "proposer": "base64address",
  "txCount": 5,
  "gasUsed": "125000",
  "gasWanted": "200000",
  "transactions": [],
  "events": []
}

Get Block Transactions

Description Returns paginated transactions for a specific block.

HTTP Method GET

Path /api/blocks/{height}/transactions

Path Parameters

Parameter Type Required Description
height integer Yes Block height

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/blocks/428041/transactions?page=1&limit=20"

Transactions

List Transactions

Description Returns a paginated, filterable list of transactions.

HTTP Method GET

Path /api/txs

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
type string No Filter by message type
status string No success or failed
module string No bridge, forks, volt, or zkos
programType string No zkOS program type filter

Example

curl -X GET "https://indexer.twilight.org/api/txs?module=bridge&page=1&limit=20"
fetch("https://indexer.twilight.org/api/txs?module=bridge&page=1&limit=20")
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

The result from the above endpoint looks like this:

{
  "data": [
    {
      "hash": "A1B2C3D4...",
      "blockHeight": 428041,
      "blockTime": "2024-02-26T10:00:00.000Z",
      "type": "/twilight-project.nyks.bridge.MsgConfirmBtcDeposit",
      "messageTypes": ["/twilight-project.nyks.bridge.MsgConfirmBtcDeposit"],
      "status": "success",
      "gasUsed": "125000"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 654321,
    "totalPages": 32717
  }
}

Cache: 10 seconds


Get Recent Transactions

Description Returns the most recent transactions.

HTTP Method GET

Path /api/txs/recent

Query Parameters

Parameter Type Required Description
limit integer No Number of results (default: 10, max: 50)

Example

curl -X GET "https://indexer.twilight.org/api/txs/recent?limit=10"

Cache: 10 seconds


Get Transaction by Hash

Description Returns complete transaction details including decoded messages, events, and zkOS data.

HTTP Method GET

Path /api/txs/{hash}

Path Parameters

Parameter Type Required Description
hash string Yes Transaction hash (case-insensitive)

Example

curl -X GET "https://indexer.twilight.org/api/txs/A1B2C3D4..."

The result from the above endpoint looks like this:

{
  "hash": "A1B2C3D4...",
  "blockHeight": 428041,
  "blockTime": "2024-02-26T10:00:00.000Z",
  "type": "/twilight-project.nyks.bridge.MsgConfirmBtcDeposit",
  "messageTypes": [],
  "messages": [
    {
      "type": "/twilight-project.nyks.bridge.MsgConfirmBtcDeposit",
      "typeName": "CONFIRM_BTC_DEPOSIT",
      "data": {}
    }
  ],
  "fee": {},
  "gasUsed": "125000",
  "gasWanted": "200000",
  "memo": "",
  "status": "success",
  "errorLog": null,
  "signers": [],
  "events": [],
  "block": {},
  "zkosDecodedData": null
}

Response Fields

Field Type Description
hash string Transaction hash
blockHeight integer Block containing this transaction
type string Primary message type
messageTypes array All message types
messages array Decoded messages with type, typeName, and data
fee object Fee object
gasUsed string Gas used
gasWanted string Gas wanted
status string success or failed
errorLog string Error message if failed
signers array Signer public keys
events array Transaction events
zkosDecodedData object Decoded zkOS data (if applicable)

Get Transaction Type Stats

Description Returns the top 20 transaction types by count.

HTTP Method GET

Path /api/txs/types/stats

Example

curl -X GET "https://indexer.twilight.org/api/txs/types/stats"

The result from the above endpoint looks like this:

[
  {
    "type": "/twilight-project.nyks.bridge.MsgConfirmBtcDeposit",
    "count": 5432
  }
]

Cache: 30 seconds


Get Transactions by Script Address

Description Returns transactions associated with a zkOS script address.

HTTP Method GET

Path /api/txs/script/{scriptAddress}

Path Parameters

Parameter Type Required Description
scriptAddress string Yes zkOS script address (min 10 chars)

Example

curl -X GET "https://indexer.twilight.org/api/txs/script/script1abc..."

Cache: 10 seconds


Accounts

List Accounts

Description Returns accounts ordered by transaction count.

HTTP Method GET

Path /api/accounts

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/accounts?page=1&limit=20"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "address": "twilight1...",
      "balance": "1000000",
      "txCount": 42
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 5432,
    "totalPages": 272
  }
}

Get Account Details

Description Returns comprehensive account details including balances, deposits, withdrawals, clearing account, zkOS operations, and fragment signer records.

HTTP Method GET

Path /api/accounts/{address}

Path Parameters

Parameter Type Required Description
address string Yes Twilight address (twilight1... or twilightvaloper1...)

Example

curl -X GET "https://indexer.twilight.org/api/accounts/twilight1..."

The result from the above endpoint looks like this:

{
  "account": {
    "address": "twilight1...",
    "balance": "1000000",
    "txCount": 42
  },
  "balances": [
    { "denom": "utlx", "amount": "1000000" }
  ],
  "deposits": [],
  "withdrawals": [],
  "clearingAccount": null,
  "zkosOperations": [],
  "fragmentSigners": []
}

Response Fields

Field Type Description
account object Basic account info (address, balance, txCount)
balances array On-chain token balances from LCD
deposits array Recent BTC deposits
withdrawals array Recent BTC withdrawals
clearingAccount object Clearing account info (if exists)
zkosOperations array Recent zkOS mint/burn operations
fragmentSigners array Fragment signer records

Get Account Transactions

Description Returns transactions involving an address (as signer or in message data).

HTTP Method GET

Path /api/accounts/{address}/transactions

Path Parameters

Parameter Type Required Description
address string Yes Twilight address

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/accounts/twilight1.../transactions?page=1&limit=20"

Validators

List Validators

Description Returns validators from LCD.

HTTP Method GET

Path /api/validators

Query Parameters

Parameter Type Required Description
status string No BOND_STATUS_BONDED (default), BOND_STATUS_UNBONDED, BOND_STATUS_UNBONDING
limit integer No Max results (default: 200, max: 500)

Example

curl -X GET "https://indexer.twilight.org/api/validators?status=BOND_STATUS_BONDED"

The result from the above endpoint looks like this:

{
  "validators": [
    {
      "operator_address": "twilightvaloper1...",
      "jailed": false,
      "status": "BOND_STATUS_BONDED",
      "tokens": "1000000000",
      "description": {
        "moniker": "Validator Name",
        "identity": "",
        "website": "",
        "details": ""
      },
      "commission": {
        "commission_rates": {
          "rate": "0.100000000000000000",
          "max_rate": "0.200000000000000000",
          "max_change_rate": "0.010000000000000000"
        }
      }
    }
  ]
}

Cache: 10 minutes


Get Validator Details

Description Returns a single validator's details.

HTTP Method GET

Path /api/validators/{address}

Path Parameters

Parameter Type Required Description
address string Yes Validator operator address (twilightvaloper1...)

Example

curl -X GET "https://indexer.twilight.org/api/validators/twilightvaloper1..."

Cache: 10 minutes


Get Validator Block Production

Description Returns block production statistics for a validator.

HTTP Method GET

Path /api/validators/{address}/blocks

Path Parameters

Parameter Type Required Description
address string Yes Validator operator address

Example

curl -X GET "https://indexer.twilight.org/api/validators/twilightvaloper1.../blocks"

The result from the above endpoint looks like this:

{
  "totalBlocks": 5432,
  "blocks24h": 123,
  "blocks7d": 847,
  "percentage": 5.43,
  "lastBlock": {
    "height": 428041,
    "hash": "A1B2C3...",
    "timestamp": "2024-02-26T10:00:00.000Z"
  }
}

Cache: 30 seconds


Get Validator Count

Description Returns the count of validators for a given status.

HTTP Method GET

Path /api/validators/count

Query Parameters

Parameter Type Required Description
status string No Bond status (default: BOND_STATUS_BONDED)

Example

curl -X GET "https://indexer.twilight.org/api/validators/count"

The result from the above endpoint looks like this:

{
  "count": 42
}

Cache: 10 minutes


Statistics

Chain Overview

Description Returns overall chain statistics.

HTTP Method GET

Path /api/stats

Example

curl -X GET "https://indexer.twilight.org/api/stats"

The result from the above endpoint looks like this:

{
  "latestBlock": {
    "height": 428041,
    "hash": "A1B2C3...",
    "timestamp": "2024-02-26T10:00:00.000Z"
  },
  "totalBlocks": 428041,
  "totalTransactions": 654321,
  "totalAccounts": 5432,
  "transactionsLast24h": 1234,
  "transactionsByStatus": {
    "success": 1200,
    "failed": 34
  }
}

Cache: 30 seconds


Module Statistics

Description Returns per-module statistics for bridge, forks, volt, and zkos.

HTTP Method GET

Path /api/stats/modules

Example

curl -X GET "https://indexer.twilight.org/api/stats/modules"

The result from the above endpoint looks like this:

{
  "bridge": {
    "deposits": 1234,
    "withdrawals": 567,
    "depositVolume": "1234567890",
    "withdrawalVolume": "567890123"
  },
  "forks": {
    "delegateKeys": 42
  },
  "volt": {
    "fragments": 123,
    "activeFragments": 98
  },
  "zkos": {
    "transfers": 5432,
    "mintBurns": 234,
    "volume": "12345678900"
  }
}

Cache: 60 seconds


Network Performance

Description Returns network performance metrics including block time, TPS, and gas utilization.

HTTP Method GET

Path /api/stats/network-performance

Example

curl -X GET "https://indexer.twilight.org/api/stats/network-performance"

The result from the above endpoint looks like this:

{
  "averageBlockTime": 5.42,
  "tps": 0.89,
  "blockProductionRate": 234,
  "gasUtilization": 65,
  "proposerDistribution": [
    {
      "address": "base64address",
      "blocks": 1234,
      "percentage": 5.43
    }
  ]
}

Cache: 30 seconds


Bridge Analytics

Description Returns BTC bridge deposit/withdrawal analytics.

HTTP Method GET

Path /api/stats/bridge-analytics

Example

curl -X GET "https://indexer.twilight.org/api/stats/bridge-analytics"

The result from the above endpoint looks like this:

{
  "totalVolume": "12345678900",
  "depositVolume24h": "1234567",
  "withdrawalVolume24h": "567890",
  "pendingWithdrawals": 23,
  "confirmedWithdrawals": 1234,
  "averageDepositSize": "1000000",
  "averageWithdrawalSize": "500000",
  "withdrawalSuccessRate": 98.15
}

Cache: 30 seconds


Active Accounts

Description Returns active account metrics over various time windows.

HTTP Method GET

Path /api/stats/active-accounts

Example

curl -X GET "https://indexer.twilight.org/api/stats/active-accounts"

The result from the above endpoint looks like this:

{
  "active24h": 1234,
  "active7d": 5432,
  "active30d": 12345,
  "newAccounts24h": 123,
  "growthRate": 2.34
}

Cache: 30 seconds


Fragment Health

Description Returns fragment health and signer statistics.

HTTP Method GET

Path /api/stats/fragment-health

Example

curl -X GET "https://indexer.twilight.org/api/stats/fragment-health"

The result from the above endpoint looks like this:

{
  "totalFragments": 123,
  "activeFragments": 98,
  "bootstrappingFragments": 15,
  "inactiveFragments": 10,
  "averageSignersPerFragment": 12.5,
  "totalSigners": 1234,
  "fragmentSuccessRate": 79.67
}

Cache: 30 seconds


Block Chart Data

Description Returns daily aggregated block and transaction data for charting.

HTTP Method GET

Path /api/stats/charts/blocks

Query Parameters

Parameter Type Required Description
days integer No Number of days (default: 7)

Example

curl -X GET "https://indexer.twilight.org/api/stats/charts/blocks?days=7"

The result from the above endpoint looks like this:

[
  {
    "date": "2024-02-20",
    "blocks": 1234,
    "transactions": 5432,
    "gasUsed": "125000000"
  }
]

Transaction Chart Data

Description Returns daily transaction data by status and module.

HTTP Method GET

Path /api/stats/charts/transactions

Query Parameters

Parameter Type Required Description
days integer No Number of days (default: 7)

Example

curl -X GET "https://indexer.twilight.org/api/stats/charts/transactions?days=7"

The result from the above endpoint looks like this:

[
  {
    "date": "2024-02-20",
    "total": 5432,
    "success": 5398,
    "failed": 34,
    "byModule": {
      "bridge": 1234,
      "forks": 234,
      "volt": 567,
      "zkos": 3397
    }
  }
]

BTC Deposits

List BTC Deposits

Description Returns paginated BTC deposits with optional filtering.

HTTP Method GET

Path /api/twilight/deposits

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
address string No Filter by Twilight deposit address
reserveAddress string No Filter by reserve address
search string No Search by address or reserve

Example

curl -X GET "https://indexer.twilight.org/api/twilight/deposits?page=1&limit=20"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "id": 1,
      "txHash": "A1B2C3...",
      "blockHeight": 428041,
      "reserveAddress": "bc1q...",
      "depositAmount": "1000000",
      "btcHeight": "878000",
      "btcHash": "00000000...",
      "twilightDepositAddress": "twilight1...",
      "oracleAddress": "twilight1...",
      "votes": 5,
      "confirmed": true,
      "createdAt": "2024-02-26T10:00:00.000Z"
    }
  ],
  "pagination": {}
}

Get BTC Deposit by ID

Description Returns a single BTC deposit by ID.

HTTP Method GET

Path /api/twilight/deposits/{id}

Path Parameters

Parameter Type Required Description
id integer Yes Deposit ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/deposits/1"

BTC Withdrawals

List BTC Withdrawals

Description Returns paginated BTC withdrawals with optional filtering.

HTTP Method GET

Path /api/twilight/withdrawals

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
confirmed string No true or false
address string No Filter by Twilight address
withdrawAddress string No Filter by BTC withdraw address
search string No Search term

Example

curl -X GET "https://indexer.twilight.org/api/twilight/withdrawals?confirmed=true&page=1&limit=20"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "id": 1,
      "withdrawIdentifier": 123,
      "twilightAddress": "twilight1...",
      "withdrawAddress": "bc1q...",
      "withdrawReserveId": "1",
      "blockHeight": 428041,
      "withdrawAmount": "1000000",
      "isConfirmed": true,
      "createdAt": "2024-02-26T10:00:00.000Z"
    }
  ],
  "pagination": {}
}

Get BTC Withdrawal by ID

Description Returns a single BTC withdrawal by ID.

HTTP Method GET

Path /api/twilight/withdrawals/{id}

Path Parameters

Parameter Type Required Description
id integer Yes Withdrawal ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/withdrawals/1"

Reserves

List Reserves

Description Returns all BTC reserves.

HTTP Method GET

Path /api/twilight/reserves

Example

curl -X GET "https://indexer.twilight.org/api/twilight/reserves"

The result from the above endpoint looks like this:

[
  {
    "id": "1",
    "btcRelayCapacityValue": "1000000",
    "totalValue": "5000000",
    "privatePoolValue": "3000000",
    "publicValue": "2000000",
    "feePool": "500000",
    "unlockHeight": "878000",
    "roundId": "1"
  }
]

Get Reserve by ID

Description Returns a single reserve by ID.

HTTP Method GET

Path /api/twilight/reserves/{id}

Path Parameters

Parameter Type Required Description
id string Yes Reserve ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/reserves/1"

Fragments

List Live Fragments

Description Returns current fragment state from LCD with signers.

HTTP Method GET

Path /api/twilight/fragments/live

Example

curl -X GET "https://indexer.twilight.org/api/twilight/fragments/live"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "id": "1",
      "status": "active",
      "judgeAddress": "twilight1...",
      "threshold": 10,
      "signerApplicationFee": "1000",
      "feePool": "10000",
      "feeBips": 100,
      "signers": [
        {
          "fragmentId": "1",
          "signerAddress": "twilight1...",
          "status": "active",
          "btcPubKey": "02abc...",
          "applicationFee": "1000"
        }
      ],
      "signersCount": 1
    }
  ],
  "total": 123
}

Cache: 10 minutes


Get Live Fragment by ID

Description Returns a single live fragment from LCD.

HTTP Method GET

Path /api/twilight/fragments/live/{id}

Path Parameters

Parameter Type Required Description
id string Yes Fragment ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/fragments/live/1"

Cache: 10 minutes


List Fragments (Database)

Description Returns fragments from the indexed database with pagination.

HTTP Method GET

Path /api/twilight/fragments

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/twilight/fragments?page=1&limit=20"

List Fragment Signers

Description Returns fragment signers with optional filtering by fragment ID.

HTTP Method GET

Path /api/twilight/fragment-signers

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
fragmentId string No Filter by fragment ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/fragment-signers?fragmentId=1"

zkOS Transfers

List zkOS Transfers

Description Returns paginated zkOS transfer transactions.

HTTP Method GET

Path /api/twilight/zkos/transfers

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)

Example

curl -X GET "https://indexer.twilight.org/api/twilight/zkos/transfers?page=1&limit=20"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "zkTxId": "abc123...",
      "txHash": "A1B2C3...",
      "blockHeight": 428041,
      "programType": "Transfer",
      "decodedData": {},
      "txFee": "1000"
    }
  ],
  "pagination": {}
}

Get zkOS Transfer by ID

Description Returns a single zkOS transfer by transaction ID.

HTTP Method GET

Path /api/twilight/zkos/transfers/{txId}

Path Parameters

Parameter Type Required Description
txId string Yes zkOS transaction ID

Example

curl -X GET "https://indexer.twilight.org/api/twilight/zkos/transfers/abc123..."

zkOS Mint/Burn

List Mint/Burn Operations

Description Returns paginated zkOS mint and burn operations.

HTTP Method GET

Path /api/twilight/zkos/mint-burns

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
type string No mint or burn

Example

curl -X GET "https://indexer.twilight.org/api/twilight/zkos/mint-burns?type=mint&page=1&limit=20"

The result from the above endpoint looks like this:

{
  "data": [
    {
      "txHash": "A1B2C3...",
      "blockHeight": 428041,
      "twilightAddress": "twilight1...",
      "mintOrBurn": true,
      "btcValue": "1000000"
    }
  ],
  "pagination": {}
}

Bitcoin Info

Get Bitcoin Node Info

Description Returns Bitcoin node block height and fee estimates.

HTTP Method GET

Path /api/bitcoin/info

Example

curl -X GET "https://indexer.twilight.org/api/bitcoin/info"

The result from the above endpoint looks like this:

{
  "blockHeight": 878000,
  "feeEstimate": {
    "satPerVbyte": 12,
    "btcPerKb": 0.00012,
    "targetBlocks": 6
  }
}

Cache: 30 seconds


Get Bitcoin Address Balance

Description Returns the balance of a Bitcoin address via mempool.space API.

HTTP Method GET

Path /api/bitcoin/address/{address}/balance

Path Parameters

Parameter Type Required Description
address string Yes Bitcoin address (bc1, 1, 3, or tb1 prefix)

Example

curl -X GET "https://indexer.twilight.org/api/bitcoin/address/bc1q.../balance"

The result from the above endpoint looks like this:

{
  "address": "bc1q...",
  "balanceSats": 1234567,
  "txCount": 42
}

Response Fields

Field Type Description
address string Bitcoin address
balanceSats integer Balance in satoshis (confirmed + mempool)
txCount integer Total transaction count

Cache: 12 hours


Description Searches across blocks, transactions, accounts, and deposits. Auto-detects query type.

HTTP Method GET

Path /api/twilight/search

Query Parameters

Parameter Type Required Description
q string Yes Search query (min 3 chars). Auto-detects: numeric = block height, hex string = tx hash, twilight1 prefix = account address

Example

curl -X GET "https://indexer.twilight.org/api/twilight/search?q=twilight1abc..."

The result from the above endpoint looks like this:

{
  "block": null,
  "transaction": null,
  "account": {
    "address": "twilight1abc...",
    "balance": "1000000",
    "txCount": 42
  },
  "deposits": []
}

Delegate Keys

List Delegate Keys

Description Returns all validator delegate key mappings (validator to oracle addresses).

HTTP Method GET

Path /api/twilight/delegates

Example

curl -X GET "https://indexer.twilight.org/api/twilight/delegates"

The result from the above endpoint looks like this:

[
  {
    "validatorAddress": "twilightvaloper1...",
    "btcOracleAddress": "twilight1...",
    "btcPublicKey": "02abc...",
    "zkOracleAddress": "twilight1..."
  }
]

Sweep Addresses

List Sweep Addresses

Description Returns proposed BTC sweep addresses from LCD.

HTTP Method GET

Path /api/twilight/sweep-addresses

Query Parameters

Parameter Type Required Description
limit integer No Max results (default: 100, max: 200)

Example

curl -X GET "https://indexer.twilight.org/api/twilight/sweep-addresses?limit=100"

Cache: 10 minutes


WebSocket API

Connection

URL wss://indexer.twilight.org/ws

Local ws://localhost:3001/ws

Clients subscribe to all channels by default. Server pings every 30 seconds; unresponsive clients are terminated.


Channels

Channel Description
twilight:block:new New blocks
twilight:tx:new New transactions
twilight:deposit:new New BTC deposits
twilight:withdrawal:new New BTC withdrawals

Client Messages

Subscribe to a channel

{ "action": "subscribe", "channel": "twilight:block:new" }

Unsubscribe from a channel

{ "action": "unsubscribe", "channel": "twilight:block:new" }

Subscribe to all channels

{ "action": "subscribe_all" }

Unsubscribe from all channels

{ "action": "unsubscribe_all" }

Ping

{ "action": "ping" }

Server Messages

Connection confirmation

The server sends a connection message on connect:

{
  "type": "connected",
  "message": "Connected to Twilight Explorer WebSocket",
  "channels": ["blocks", "transactions", "deposits", "withdrawals"]
}

New block event

When a new block is indexed:

{
  "type": "block",
  "data": {
    "height": 428042,
    "hash": "A1B2C3...",
    "timestamp": "2024-02-26T10:00:05.000Z",
    "txCount": 3
  },
  "timestamp": "2024-02-26T10:00:05.000Z"
}

Pong response

{
  "type": "pong",
  "timestamp": 1708942800000
}

HTTP Status Codes

Code Meaning
200 Success
400 Invalid request parameters
404 Resource not found
429 Rate limit exceeded
500 Internal server error
503 Service unavailable (health check failed)

Error response bodies:

// 400 Bad Request
{ "error": "Invalid page parameter" }

// 404 Not Found
{ "error": "Block not found" }

// 429 Too Many Requests
{ "error": "Rate limit exceeded. Try again later." }

// 500 Internal Server Error
{ "error": "Internal server error" }

Indexer Architecture

The Nyks Chain Indexer is a background service that syncs the Nyks blockchain into PostgreSQL. It processes blocks from the LCD API, decodes 23 custom module message types across 4 modules (bridge, forks, volt, zkOS), and publishes real-time events via Redis pub/sub for WebSocket delivery.

Nyks Chain (LCD API)
       |
       v
  Sync Loop ──> PostgreSQL <── API Server
       |              ^
       |              |
       +──> Redis ────+──> WebSocket
       |
  Enrichment Worker ──> zkOS Decode API

For the full indexer architecture, configuration, database schema, and deployment guide, see the twilight-indexer-api repository.