diff --git a/src/libs/api.ts b/src/libs/api.ts index 05b29ba5..c8d4eec9 100644 --- a/src/libs/api.ts +++ b/src/libs/api.ts @@ -47,19 +47,23 @@ export const DEFAULT: RequestRegistry = { tx_txs_block: { url: "/cosmos/tx/v1beta1/txs/block/{height}", adapter }, tx_hash: { url: "/cosmos/tx/v1beta1/txs/{hash}", adapter }, - mint_inflation: { url: "/cosmos/mint/v1beta1/inflation", adapter}, - mint_params: { url: "/cosmos/mint/v1beta1/params", adapter}, - mint_annual_provisions: { url: "/cosmos/mint/v1beta1/annual_provisions", adapter}, + mint_inflation: { url: "/cosmos/mint/v1beta1/inflation", adapter }, + mint_params: { url: "/cosmos/mint/v1beta1/params", adapter }, + mint_annual_provisions: { url: "/cosmos/mint/v1beta1/annual_provisions", adapter }, // ibc ibc_app_ica_controller_params: { url: "/ibc/apps/interchain_accounts/controller/v1/params", adapter }, - ibc_app_ica_host_params: { url: "/ibc​/apps​/interchain_accounts​/host​/v1​/params", adapter}, - ibc_app_transfer_escrow_address: { url: "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address", adapter}, - ibc_app_transfer_denom_traces: { url: "/ibc/apps/transfer/v1/denom_traces", adapter}, - ibc_app_transfer_denom_traces_hash: { url: "/ibc/apps/transfer/v1/denom_traces/{hash}", adapter}, - ibc_core_channel_channels: { url: "/ibc/core/channel/v1/channels", adapter}, - ibc_core_channel_channels_next_sequence: { url: "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence", adapter}, - ibc_core_channel_channels_acknowledgements: { url: "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements", adapter} + ibc_app_ica_host_params: { url: "/ibc​/apps​/interchain_accounts​/host​/v1​/params", adapter }, + ibc_app_transfer_escrow_address: { url: "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address", adapter }, + ibc_app_transfer_denom_traces: { url: "/ibc/apps/transfer/v1/denom_traces", adapter }, + ibc_app_transfer_denom_traces_hash: { url: "/ibc/apps/transfer/v1/denom_traces/{hash}", adapter }, + ibc_core_channel_channels: { url: "/ibc/core/channel/v1/channels", adapter }, + ibc_core_channel_channels_next_sequence: { url: "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence", adapter }, + ibc_core_channel_channels_acknowledgements: { url: "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements", adapter }, + ibc_core_channel_connections_channels: { url: "/ibc/core/channel/v1/connections/{connection_id}/channels", adapter }, + ibc_core_connection_connections: { url: "/ibc/core/connection/v1/connections", adapter }, + ibc_core_connection_connections_connection_id: { url: "/ibc/core/connection/v1/connections/{connection_id}", adapter }, + ibc_core_connection_connections_connection_id_client_state: { url: "/ibc/core/connection/v1/connections/{connection_id}/client_state", adapter } }; export const VERSION_REGISTRY: Registry = { diff --git a/src/libs/client.ts b/src/libs/client.ts index 6b50d901..53dde8cc 100644 --- a/src/libs/client.ts +++ b/src/libs/client.ts @@ -179,6 +179,27 @@ export class CosmosRestClient extends BaseRestClient { async getIBCAppTransferDenom(hash: string) { return this.request(this.registry.ibc_app_transfer_denom_traces_hash, {hash}) } + async getIBCConnections() { + return this.request(this.registry.ibc_core_connection_connections, {}) + } + async getIBCConnectionsById(connection_id: string) { + return this.request(this.registry.ibc_core_connection_connections_connection_id, {connection_id}) + } + async getIBCConnectionsClientState(connection_id: string) { + return this.request(this.registry.ibc_core_connection_connections_connection_id_client_state, {connection_id}) + } + async getIBCConnectionsChannels(connection_id: string) { + return this.request(this.registry.ibc_core_channel_connections_channels, {connection_id}) + } + async getIBCChannels() { + return this.request(this.registry.ibc_core_channel_channels, {}) + } + async getIBCChannelAcknowledgements(channel_id: string, port_id: string) { + return this.request(this.registry.ibc_core_channel_channels_acknowledgements, {channel_id, port_id}) + } + async getIBCChannelNextSequence(channel_id: string, port_id: string) { + return this.request(this.registry.ibc_core_channel_channels_next_sequence, {channel_id, port_id}) + } } diff --git a/src/libs/registry.ts b/src/libs/registry.ts index bb9b196d..1ddf8a4f 100644 --- a/src/libs/registry.ts +++ b/src/libs/registry.ts @@ -1,11 +1,10 @@ -import type { AuthAccount, Block, Coin, NodeInfo, PaginabledAccounts, PaginatedTendermintValidator,} from "@/types"; +import type { AuthAccount, Block, ClientStateWithProof, Coin, ConnectionWithProof, DenomTrace, NodeInfo, PaginabledAccounts, PaginatedIBCChannels, PaginatedIBCConnections, PaginatedTendermintValidator,} from "@/types"; import type { BankParams, PaginatedBalances, PaginatedDenomMetadata, PaginatedSupply } from "@/types/bank"; import type { DistributionParams, PaginatedSlashes } from "@/types/distribution"; import type { GovParams, GovProposal, GovVote, PaginatedProposalDeposit, PaginatedProposalVotes, PaginatedProposals, Tally } from "@/types/gov"; import type { PaginatedSigningInfo } from "@/types/slashing"; import type { Delegation, PaginatedDelegations, PaginatedRedelegations, PaginatedUnbonding, PaginatedValdiators, StakingParam, StakingPool, Validator } from "@/types/staking"; import type { PaginatedTxs, Tx, TxResponse } from "@/types/tx"; -import semver from "semver"; export interface Request { @@ -86,15 +85,22 @@ export interface RequestRegistry extends AbstractRegistry { ibc_app_transfer_escrow_address: Request; ibc_app_transfer_denom_traces: Request; ibc_app_transfer_denom_traces_hash: Request<{ - "denom_trace": { - "path": "string", - "base_denom": "string" + denom_trace: DenomTrace + }>; + ibc_core_channel_channels: Request; + ibc_core_channel_channels_next_sequence: Request<{ + next_sequence_receive: string, + proof: string, + proof_height: { + revision_number: string, + revision_height: string } }>; - ibc_core_channel_channels: Request; - ibc_core_channel_channels_next_sequence: Request; ibc_core_channel_channels_acknowledgements: Request; - + ibc_core_channel_connections_channels: Request; + ibc_core_connection_connections: Request; + ibc_core_connection_connections_connection_id: Request; + ibc_core_connection_connections_connection_id_client_state: Request; } diff --git a/src/modules/[chain]/cosmwasm/WasmStore.ts b/src/modules/[chain]/cosmwasm/WasmStore.ts index 6e753a97..7f4c5fba 100644 --- a/src/modules/[chain]/cosmwasm/WasmStore.ts +++ b/src/modules/[chain]/cosmwasm/WasmStore.ts @@ -1,6 +1,5 @@ import { BaseRestClient } from "@/libs/client"; import { adapter, type AbstractRegistry, type Request } from "@/libs/registry"; -import type { PaginabledAccounts } from "@/types"; import { defineStore } from "pinia"; import type { CodeInfo, ContractInfo, PaginabledCodeInfos, PaginabledContractHistory, PaginabledContracts, PaginabledContractStates, WasmParam } from "./types"; import { toBase64 } from "@cosmjs/encoding"; diff --git a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue index 9c4c5da2..a6f7cc0f 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue @@ -1,11 +1,12 @@