mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
Rename CosmosSdkAccount to BaseAccount
This commit is contained in:
parent
a69006b8c3
commit
29e98ec156
@ -16,6 +16,7 @@
|
||||
- @cosmjs/sdk38: Remove `Pen` type in favour of `OfflineSigner` and remove
|
||||
`Secp256k1Pen` class in favour of `Secp256k1Wallet` which takes an
|
||||
`OfflineSigner` instead of a `SigningCallback`.
|
||||
- @cosmjs/sdk38: Rename `CosmosSdkAccount` to `BaseAccount` and export the type.
|
||||
- @cosmjs/math: Add missing integer check to `Uint64.fromNumber`. Before
|
||||
`Uint64.fromNumber(1.1)` produced some result.
|
||||
- @cosmjs/sdk38: Add `SigningCosmosClient.signAndPost` as a mid-level
|
||||
|
@ -30,6 +30,7 @@ export {
|
||||
AuthExtension,
|
||||
BankBalancesResponse,
|
||||
BankExtension,
|
||||
BaseAccount,
|
||||
BlockResponse,
|
||||
BroadcastMode,
|
||||
DistributionCommunityPoolResponse,
|
||||
|
@ -2,7 +2,15 @@
|
||||
import { Coin } from "../coins";
|
||||
import { LcdClient } from "./lcdclient";
|
||||
|
||||
export interface CosmosSdkAccount {
|
||||
/**
|
||||
* A Cosmos SDK base account.
|
||||
*
|
||||
* This type describes the base account representation as returned
|
||||
* by the Cosmos SDK 0.37–0.39 LCD API.
|
||||
*
|
||||
* @see https://docs.cosmos.network/master/modules/auth/02_state.html#base-account
|
||||
*/
|
||||
export interface BaseAccount {
|
||||
/** Bech32 account address */
|
||||
readonly address: string;
|
||||
readonly coins: readonly Coin[];
|
||||
@ -16,7 +24,7 @@ export interface AuthAccountsResponse {
|
||||
readonly height: string;
|
||||
readonly result: {
|
||||
readonly type: "cosmos-sdk/Account";
|
||||
readonly value: CosmosSdkAccount;
|
||||
readonly value: BaseAccount;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Standard modules (see tracking issue https://github.com/CosmWasm/cosmjs/issues/276)
|
||||
//
|
||||
|
||||
export { AuthExtension, AuthAccountsResponse, setupAuthExtension } from "./auth";
|
||||
export { AuthExtension, AuthAccountsResponse, BaseAccount, setupAuthExtension } from "./auth";
|
||||
export { BankBalancesResponse, BankExtension, setupBankExtension } from "./bank";
|
||||
export {
|
||||
DistributionCommunityPoolResponse,
|
||||
|
1
packages/sdk38/types/index.d.ts
vendored
1
packages/sdk38/types/index.d.ts
vendored
@ -28,6 +28,7 @@ export {
|
||||
AuthExtension,
|
||||
BankBalancesResponse,
|
||||
BankExtension,
|
||||
BaseAccount,
|
||||
BlockResponse,
|
||||
BroadcastMode,
|
||||
DistributionCommunityPoolResponse,
|
||||
|
12
packages/sdk38/types/lcdapi/auth.d.ts
vendored
12
packages/sdk38/types/lcdapi/auth.d.ts
vendored
@ -1,6 +1,14 @@
|
||||
import { Coin } from "../coins";
|
||||
import { LcdClient } from "./lcdclient";
|
||||
export interface CosmosSdkAccount {
|
||||
/**
|
||||
* A Cosmos SDK base account.
|
||||
*
|
||||
* This type describes the base account representation as returned
|
||||
* by the Cosmos SDK 0.37–0.39 LCD API.
|
||||
*
|
||||
* @see https://docs.cosmos.network/master/modules/auth/02_state.html#base-account
|
||||
*/
|
||||
export interface BaseAccount {
|
||||
/** Bech32 account address */
|
||||
readonly address: string;
|
||||
readonly coins: readonly Coin[];
|
||||
@ -13,7 +21,7 @@ export interface AuthAccountsResponse {
|
||||
readonly height: string;
|
||||
readonly result: {
|
||||
readonly type: "cosmos-sdk/Account";
|
||||
readonly value: CosmosSdkAccount;
|
||||
readonly value: BaseAccount;
|
||||
};
|
||||
}
|
||||
export interface AuthExtension {
|
||||
|
2
packages/sdk38/types/lcdapi/index.d.ts
vendored
2
packages/sdk38/types/lcdapi/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
export { AuthExtension, AuthAccountsResponse, setupAuthExtension } from "./auth";
|
||||
export { AuthExtension, AuthAccountsResponse, BaseAccount, setupAuthExtension } from "./auth";
|
||||
export { BankBalancesResponse, BankExtension, setupBankExtension } from "./bank";
|
||||
export {
|
||||
DistributionCommunityPoolResponse,
|
||||
|
Loading…
x
Reference in New Issue
Block a user