Rename type to CosmosSdkAccount
This commit is contained in:
parent
a22f035c94
commit
34c0f1e18f
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
4
packages/sdk/types/restclient.d.ts
vendored
4
packages/sdk/types/restclient.d.ts
vendored
@ -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;
|
||||
|
||||
6
packages/sdk/types/types.d.ts
vendored
6
packages/sdk/types/types.d.ts
vendored
@ -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 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user