Remove IpPortString

This commit is contained in:
Simon Warta 2020-12-21 00:10:35 +01:00
parent 1cdfc35fe1
commit 0855c56fdc
8 changed files with 10 additions and 12 deletions

View File

@ -34,7 +34,7 @@
`adaptor34`. Export the `Adaptor` type. `adaptor34`. Export the `Adaptor` type.
- @cosmjs/tendermint-rpc: Export `DateTime` class. - @cosmjs/tendermint-rpc: Export `DateTime` class.
- @cosmjs/tendermint-rpc: Remove types `QueryString`, `Base64String`, - @cosmjs/tendermint-rpc: Remove types `QueryString`, `Base64String`,
`HexString`, `IntegerString`. Use `string` instead. `HexString`, `IntegerString` and `IpPortString`. Use `string` instead.
## 0.23.1 (2020-10-27) ## 0.23.1 (2020-10-27)

View File

@ -18,7 +18,7 @@ import {
} from "../../encodings"; } from "../../encodings";
import * as responses from "../../responses"; import * as responses from "../../responses";
import { SubscriptionEvent } from "../../rpcclients"; import { SubscriptionEvent } from "../../rpcclients";
import { IpPortString, TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "../../types"; import { TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "../../types";
import { hashTx } from "./hasher"; import { hashTx } from "./hasher";
interface AbciInfoResult { interface AbciInfoResult {
@ -500,7 +500,8 @@ function decodeValidatorInfo(data: RpcValidatorInfo): responses.Validator {
interface RpcNodeInfo { interface RpcNodeInfo {
/** hex encoded */ /** hex encoded */
readonly id: string; readonly id: string;
readonly listen_addr: IpPortString; /** IP and port */
readonly listen_addr: string;
readonly network: string; readonly network: string;
readonly version: string; readonly version: string;
readonly channels: string; // ??? readonly channels: string; // ???

View File

@ -74,7 +74,6 @@ export {
} from "./responses"; } from "./responses";
export { HttpClient, WebsocketClient } from "./rpcclients"; // TODO: Why do we export those outside of this package? export { HttpClient, WebsocketClient } from "./rpcclients"; // TODO: Why do we export those outside of this package?
export { export {
IpPortString,
TxBytes, TxBytes,
TxHash, TxHash,
ValidatorEd25519Pubkey, ValidatorEd25519Pubkey,

View File

@ -1,6 +1,6 @@
import { ReadonlyDate } from "readonly-date"; import { ReadonlyDate } from "readonly-date";
import { IpPortString, TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "./types"; import { TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "./types";
export type Response = export type Response =
| AbciInfoResponse | AbciInfoResponse
@ -283,7 +283,8 @@ export interface Header {
export interface NodeInfo { export interface NodeInfo {
readonly id: Uint8Array; readonly id: Uint8Array;
readonly listenAddr: IpPortString; /** IP and port */
readonly listenAddr: string;
readonly network: string; readonly network: string;
readonly version: string; readonly version: string;
readonly channels: string; // ??? readonly channels: string; // ???

View File

@ -16,8 +16,6 @@ export type TxBytes = Uint8Array & As<"tx-bytes">;
*/ */
export type TxHash = Uint8Array & As<"tx-hash">; export type TxHash = Uint8Array & As<"tx-hash">;
export type IpPortString = string & As<"ipport">;
export interface ValidatorEd25519Pubkey { export interface ValidatorEd25519Pubkey {
readonly algorithm: "ed25519"; readonly algorithm: "ed25519";
readonly data: Uint8Array; readonly data: Uint8Array;

View File

@ -74,7 +74,6 @@ export {
} from "./responses"; } from "./responses";
export { HttpClient, WebsocketClient } from "./rpcclients"; export { HttpClient, WebsocketClient } from "./rpcclients";
export { export {
IpPortString,
TxBytes, TxBytes,
TxHash, TxHash,
ValidatorEd25519Pubkey, ValidatorEd25519Pubkey,

View File

@ -1,5 +1,5 @@
import { ReadonlyDate } from "readonly-date"; import { ReadonlyDate } from "readonly-date";
import { IpPortString, TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "./types"; import { TxBytes, TxHash, ValidatorPubkey, ValidatorSignature } from "./types";
export declare type Response = export declare type Response =
| AbciInfoResponse | AbciInfoResponse
| AbciQueryResponse | AbciQueryResponse
@ -219,7 +219,8 @@ export interface Header {
} }
export interface NodeInfo { export interface NodeInfo {
readonly id: Uint8Array; readonly id: Uint8Array;
readonly listenAddr: IpPortString; /** IP and port */
readonly listenAddr: string;
readonly network: string; readonly network: string;
readonly version: string; readonly version: string;
readonly channels: string; readonly channels: string;

View File

@ -9,7 +9,6 @@ export declare type TxBytes = Uint8Array & As<"tx-bytes">;
* A raw tendermint transaction hash, currently 20 bytes * A raw tendermint transaction hash, currently 20 bytes
*/ */
export declare type TxHash = Uint8Array & As<"tx-hash">; export declare type TxHash = Uint8Array & As<"tx-hash">;
export declare type IpPortString = string & As<"ipport">;
export interface ValidatorEd25519Pubkey { export interface ValidatorEd25519Pubkey {
readonly algorithm: "ed25519"; readonly algorithm: "ed25519";
readonly data: Uint8Array; readonly data: Uint8Array;