sdk38: Rename GetNonceResult -> GetSequenceResult
This commit is contained in:
parent
7159896d88
commit
96d6c4e120
@ -41,7 +41,7 @@ export function main(originalArgs: readonly string[]): void {
|
||||
"Contract",
|
||||
"ContractDetails",
|
||||
"CosmWasmClient",
|
||||
"GetNonceResult",
|
||||
"GetSequenceResult",
|
||||
"PostTxResult",
|
||||
"SearchByHeightQuery",
|
||||
"SearchByIdQuery",
|
||||
|
||||
@ -18,7 +18,7 @@ import { setupWasmExtension, WasmExtension } from "./lcdapi/wasm";
|
||||
import { Log, parseLogs } from "./logs";
|
||||
import { JsonObject } from "./types";
|
||||
|
||||
export interface GetNonceResult {
|
||||
export interface GetSequenceResult {
|
||||
readonly accountNumber: number;
|
||||
readonly sequence: number;
|
||||
}
|
||||
@ -231,7 +231,7 @@ export class CosmWasmClient {
|
||||
*
|
||||
* @param address returns data for this address. When unset, the client's sender adddress is used.
|
||||
*/
|
||||
public async getSequence(address: string): Promise<GetNonceResult> {
|
||||
public async getSequence(address: string): Promise<GetSequenceResult> {
|
||||
const account = await this.getAccount(address);
|
||||
if (!account) {
|
||||
throw new Error(
|
||||
|
||||
@ -11,7 +11,7 @@ export {
|
||||
Contract,
|
||||
ContractDetails,
|
||||
CosmWasmClient,
|
||||
GetNonceResult,
|
||||
GetSequenceResult,
|
||||
PostTxResult,
|
||||
SearchByHeightQuery,
|
||||
SearchByIdQuery,
|
||||
|
||||
@ -19,7 +19,7 @@ import { isValidBuilder } from "./builder";
|
||||
import {
|
||||
Account,
|
||||
CosmWasmClient,
|
||||
GetNonceResult,
|
||||
GetSequenceResult,
|
||||
isPostTxFailure,
|
||||
PostTxFailure,
|
||||
PostTxResult,
|
||||
@ -196,7 +196,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
this.fees = { ...defaultFees, ...(customFees || {}) };
|
||||
}
|
||||
|
||||
public async getSequence(address?: string): Promise<GetNonceResult> {
|
||||
public async getSequence(address?: string): Promise<GetSequenceResult> {
|
||||
return super.getSequence(address || this.senderAddress);
|
||||
}
|
||||
|
||||
|
||||
4
packages/cosmwasm/types/cosmwasmclient.d.ts
vendored
4
packages/cosmwasm/types/cosmwasmclient.d.ts
vendored
@ -11,7 +11,7 @@ import {
|
||||
import { WasmExtension } from "./lcdapi/wasm";
|
||||
import { Log } from "./logs";
|
||||
import { JsonObject } from "./types";
|
||||
export interface GetNonceResult {
|
||||
export interface GetSequenceResult {
|
||||
readonly accountNumber: number;
|
||||
readonly sequence: number;
|
||||
}
|
||||
@ -154,7 +154,7 @@ export declare class CosmWasmClient {
|
||||
*
|
||||
* @param address returns data for this address. When unset, the client's sender adddress is used.
|
||||
*/
|
||||
getSequence(address: string): Promise<GetNonceResult>;
|
||||
getSequence(address: string): Promise<GetSequenceResult>;
|
||||
getAccount(address: string): Promise<Account | undefined>;
|
||||
/**
|
||||
* Gets block header and meta
|
||||
|
||||
2
packages/cosmwasm/types/index.d.ts
vendored
2
packages/cosmwasm/types/index.d.ts
vendored
@ -10,7 +10,7 @@ export {
|
||||
Contract,
|
||||
ContractDetails,
|
||||
CosmWasmClient,
|
||||
GetNonceResult,
|
||||
GetSequenceResult,
|
||||
PostTxResult,
|
||||
SearchByHeightQuery,
|
||||
SearchByIdQuery,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { BroadcastMode, Coin, OfflineSigner, StdFee, StdSignature } from "@cosmjs/sdk38";
|
||||
import { Account, CosmWasmClient, GetNonceResult, PostTxResult } from "./cosmwasmclient";
|
||||
import { Account, CosmWasmClient, GetSequenceResult, PostTxResult } from "./cosmwasmclient";
|
||||
import { Log } from "./logs";
|
||||
export interface SigningCallback {
|
||||
(signBytes: Uint8Array): Promise<StdSignature>;
|
||||
@ -104,7 +104,7 @@ export declare class SigningCosmWasmClient extends CosmWasmClient {
|
||||
customFees?: Partial<FeeTable>,
|
||||
broadcastMode?: BroadcastMode,
|
||||
);
|
||||
getSequence(address?: string): Promise<GetNonceResult>;
|
||||
getSequence(address?: string): Promise<GetSequenceResult>;
|
||||
getAccount(address?: string): Promise<Account | undefined>;
|
||||
/** Uploads code and returns a receipt, including the code ID */
|
||||
upload(wasmCode: Uint8Array, meta?: UploadMeta, memo?: string): Promise<UploadResult>;
|
||||
|
||||
@ -8,7 +8,7 @@ import { Log, parseLogs } from "./logs";
|
||||
import { decodeBech32Pubkey } from "./pubkey";
|
||||
import { CosmosSdkTx, PubKey, StdTx } from "./types";
|
||||
|
||||
export interface GetNonceResult {
|
||||
export interface GetSequenceResult {
|
||||
readonly accountNumber: number;
|
||||
readonly sequence: number;
|
||||
}
|
||||
@ -196,7 +196,7 @@ export class CosmosClient {
|
||||
*
|
||||
* @param address returns data for this address. When unset, the client's sender adddress is used.
|
||||
*/
|
||||
public async getSequence(address: string): Promise<GetNonceResult> {
|
||||
public async getSequence(address: string): Promise<GetSequenceResult> {
|
||||
const account = await this.getAccount(address);
|
||||
if (!account) {
|
||||
throw new Error(
|
||||
|
||||
@ -9,7 +9,7 @@ export {
|
||||
Block,
|
||||
BlockHeader,
|
||||
CosmosClient,
|
||||
GetNonceResult,
|
||||
GetSequenceResult,
|
||||
IndexedTx,
|
||||
PostTxResult,
|
||||
SearchByHeightQuery,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { Coin, coins } from "./coins";
|
||||
import { Account, CosmosClient, GetNonceResult, PostTxResult } from "./cosmosclient";
|
||||
import { Account, CosmosClient, GetSequenceResult, PostTxResult } from "./cosmosclient";
|
||||
import { makeSignBytes } from "./encoding";
|
||||
import { BroadcastMode } from "./lcdapi";
|
||||
import { MsgSend } from "./msgs";
|
||||
@ -66,7 +66,7 @@ export class SigningCosmosClient extends CosmosClient {
|
||||
this.fees = { ...defaultFees, ...(customFees || {}) };
|
||||
}
|
||||
|
||||
public async getSequence(address?: string): Promise<GetNonceResult> {
|
||||
public async getSequence(address?: string): Promise<GetSequenceResult> {
|
||||
return super.getSequence(address || this.senderAddress);
|
||||
}
|
||||
|
||||
|
||||
4
packages/sdk38/types/cosmosclient.d.ts
vendored
4
packages/sdk38/types/cosmosclient.d.ts
vendored
@ -2,7 +2,7 @@ import { Coin } from "./coins";
|
||||
import { AuthExtension, BroadcastMode, LcdClient } from "./lcdapi";
|
||||
import { Log } from "./logs";
|
||||
import { CosmosSdkTx, PubKey, StdTx } from "./types";
|
||||
export interface GetNonceResult {
|
||||
export interface GetSequenceResult {
|
||||
readonly accountNumber: number;
|
||||
readonly sequence: number;
|
||||
}
|
||||
@ -124,7 +124,7 @@ export declare class CosmosClient {
|
||||
*
|
||||
* @param address returns data for this address. When unset, the client's sender adddress is used.
|
||||
*/
|
||||
getSequence(address: string): Promise<GetNonceResult>;
|
||||
getSequence(address: string): Promise<GetSequenceResult>;
|
||||
getAccount(address: string): Promise<Account | undefined>;
|
||||
/**
|
||||
* Gets block header and meta
|
||||
|
||||
2
packages/sdk38/types/index.d.ts
vendored
2
packages/sdk38/types/index.d.ts
vendored
@ -7,7 +7,7 @@ export {
|
||||
Block,
|
||||
BlockHeader,
|
||||
CosmosClient,
|
||||
GetNonceResult,
|
||||
GetSequenceResult,
|
||||
IndexedTx,
|
||||
PostTxResult,
|
||||
SearchByHeightQuery,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Coin } from "./coins";
|
||||
import { Account, CosmosClient, GetNonceResult, PostTxResult } from "./cosmosclient";
|
||||
import { Account, CosmosClient, GetSequenceResult, PostTxResult } from "./cosmosclient";
|
||||
import { BroadcastMode } from "./lcdapi";
|
||||
import { StdFee } from "./types";
|
||||
import { OfflineSigner } from "./wallet";
|
||||
@ -32,7 +32,7 @@ export declare class SigningCosmosClient extends CosmosClient {
|
||||
customFees?: Partial<FeeTable>,
|
||||
broadcastMode?: BroadcastMode,
|
||||
);
|
||||
getSequence(address?: string): Promise<GetNonceResult>;
|
||||
getSequence(address?: string): Promise<GetSequenceResult>;
|
||||
getAccount(address?: string): Promise<Account | undefined>;
|
||||
sendTokens(recipientAddress: string, transferAmount: readonly Coin[], memo?: string): Promise<PostTxResult>;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user