return types
This commit is contained in:
parent
727f8ea026
commit
8e3c9eea0c
@ -1,11 +1,10 @@
|
||||
import type { Block, Coin, NodeInfo, PaginatedTendermintValidator, SlashingSigningInfo } from "@/types";
|
||||
import type { AuthAccount, PaginabledAccounts } from "@/types/Auth";
|
||||
import type { PaginatedTxs, Tx, TxResponse } from "@/types/Tx";
|
||||
import type { Txs } from "@/types/Txs";
|
||||
import type { AuthAccount, Block, Coin, NodeInfo, PaginabledAccounts, 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";
|
||||
|
||||
|
||||
@ -32,7 +31,7 @@ export interface RequestRegistry {
|
||||
distribution_validator_slashes: Request<PaginatedSlashes>;
|
||||
|
||||
slashing_params: Request<any>;
|
||||
slashing_signing_info: Request<SlashingSigningInfo>;
|
||||
slashing_signing_info: Request<PaginatedSigningInfo>;
|
||||
|
||||
gov_params_voting: Request<GovParams>;
|
||||
gov_params_tally: Request<GovParams>;
|
||||
@ -64,7 +63,7 @@ export interface RequestRegistry {
|
||||
base_tendermint_validatorsets_height: Request<PaginatedTendermintValidator>;
|
||||
|
||||
tx_txs: Request<PaginatedTxs>;
|
||||
tx_txs_block: Request<Txs>;
|
||||
tx_txs_block: Request<Tx>;
|
||||
tx_hash: Request<{tx: Tx, tx_response: TxResponse}>;
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ async function tt() {
|
||||
const address = "echelon1uattqtrtv8944qkmh44ll97qjacj6tgrekqzm9"
|
||||
const validator = "echelonvaloper1uattqtrtv8944qkmh44ll97qjacj6tgr2cupk4"
|
||||
const client = new CosmosRestClient("https://api.ech.network")
|
||||
let response = await client.getTx("EFF175AF4D46532CFACA4A0F0748DFF1EF8CC1C96DA967D8AFB794EFE048461C");
|
||||
let response = await client.getSlashingSigningInfos();
|
||||
console.log('response:', response)
|
||||
}
|
||||
tt()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { Coin } from "./Coin"
|
||||
import type { PaginatedResponse } from "./common"
|
||||
|
||||
import type { Coin, PaginatedResponse } from "./common"
|
||||
|
||||
export interface GovParams {
|
||||
"voting_params": {
|
||||
|
14
src/types/slashing.ts
Normal file
14
src/types/slashing.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import type { PaginatedResponse } from "./common";
|
||||
|
||||
export interface SigningInfo {
|
||||
"address": string,
|
||||
"start_height": string,
|
||||
"index_offset": string,
|
||||
"jailed_until": string,
|
||||
"tombstoned": boolean,
|
||||
"missed_blocks_counter": string
|
||||
}
|
||||
|
||||
export interface PaginatedSigningInfo extends PaginatedResponse {
|
||||
info: SigningInfo[]
|
||||
}
|
Loading…
Reference in New Issue
Block a user