Rename type to CosmosSdkAccount

This commit is contained in:
Simon Warta 2020-02-09 13:08:28 +01:00
parent a22f035c94
commit 34c0f1e18f
4 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
import { Encoding } from "@iov/encoding";
import axios, { AxiosInstance } from "axios";
import { AminoTx, BaseAccount, CodeInfo, ContractInfo, isAminoStdTx, StdTx, WasmData } from "./types";
import { AminoTx, CodeInfo, ContractInfo, CosmosSdkAccount, isAminoStdTx, StdTx, WasmData } from "./types";
const { fromBase64, fromUtf8, toHex, toUtf8 } = Encoding;
@ -38,7 +38,7 @@ interface BlocksResponse {
interface AuthAccountsResponse {
readonly result: {
readonly type: "cosmos-sdk/Account";
readonly value: BaseAccount;
readonly value: CosmosSdkAccount;
};
}

View File

@ -151,7 +151,7 @@ export const pubkeyTypes: readonly string[] = [pubkeyType.secp256k1, pubkeyType.
// bech32-encoded amino-binary encoded PubKey interface. oof.
export type Bech32PubKey = string;
export interface BaseAccount {
export interface CosmosSdkAccount {
/** Bech32 account address */
readonly address: string;
readonly coins: ReadonlyArray<Coin>;
@ -160,8 +160,8 @@ export interface BaseAccount {
readonly sequence: number;
}
/** The data we need from BaseAccount to create a nonce */
export type NonceInfo = Pick<BaseAccount, "account_number" | "sequence">;
/** The data we need from CosmosSdkAccount to create a nonce */
export type NonceInfo = Pick<CosmosSdkAccount, "account_number" | "sequence">;
export interface CodeInfo {
readonly id: number;

View File

@ -1,4 +1,4 @@
import { AminoTx, BaseAccount, CodeInfo, ContractInfo, StdTx, WasmData } from "./types";
import { AminoTx, CodeInfo, ContractInfo, CosmosSdkAccount, StdTx, WasmData } from "./types";
interface NodeInfo {
readonly network: string;
}
@ -27,7 +27,7 @@ interface BlocksResponse {
interface AuthAccountsResponse {
readonly result: {
readonly type: "cosmos-sdk/Account";
readonly value: BaseAccount;
readonly value: CosmosSdkAccount;
};
}
declare type WasmResponse = WasmSuccess | WasmError;

View File

@ -110,7 +110,7 @@ export declare const pubkeyType: {
};
export declare const pubkeyTypes: readonly string[];
export declare type Bech32PubKey = string;
export interface BaseAccount {
export interface CosmosSdkAccount {
/** Bech32 account address */
readonly address: string;
readonly coins: ReadonlyArray<Coin>;
@ -118,8 +118,8 @@ export interface BaseAccount {
readonly account_number: number;
readonly sequence: number;
}
/** The data we need from BaseAccount to create a nonce */
export declare type NonceInfo = Pick<BaseAccount, "account_number" | "sequence">;
/** The data we need from CosmosSdkAccount to create a nonce */
export declare type NonceInfo = Pick<CosmosSdkAccount, "account_number" | "sequence">;
export interface CodeInfo {
readonly id: number;
/** Bech32 account address */