Expose senderAddress()
This commit is contained in:
parent
28a85a5e6e
commit
b6b29562cb
@ -122,11 +122,6 @@ export class CosmWasmClient {
|
||||
private readonly signingData: SigningData | undefined;
|
||||
private readonly fees: FeeTable;
|
||||
|
||||
private get senderAddress(): string {
|
||||
if (!this.signingData) throw new Error("Signing data not set in this client");
|
||||
return this.signingData.senderAddress;
|
||||
}
|
||||
|
||||
private get signCallback(): SigningCallback {
|
||||
if (!this.signingData) throw new Error("Signing data not set in this client");
|
||||
return this.signingData.signCallback;
|
||||
@ -143,6 +138,11 @@ export class CosmWasmClient {
|
||||
return response.node_info.network;
|
||||
}
|
||||
|
||||
public get senderAddress(): string {
|
||||
if (!this.signingData) throw new Error("Signing data not set in this client");
|
||||
return this.signingData.senderAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a 32 byte upper-case hex transaction hash (typically used as the transaction ID)
|
||||
*/
|
||||
|
||||
6
packages/sdk/types/cosmwasmclient.d.ts
vendored
6
packages/sdk/types/cosmwasmclient.d.ts
vendored
@ -10,6 +10,10 @@ export interface FeeTable {
|
||||
export interface SigningCallback {
|
||||
(signBytes: Uint8Array): Promise<StdSignature>;
|
||||
}
|
||||
export interface SigningData {
|
||||
readonly senderAddress: string;
|
||||
readonly signCallback: SigningCallback;
|
||||
}
|
||||
export interface GetNonceResult {
|
||||
readonly accountNumber: number;
|
||||
readonly sequence: number;
|
||||
@ -44,10 +48,10 @@ export declare class CosmWasmClient {
|
||||
private readonly restClient;
|
||||
private readonly signingData;
|
||||
private readonly fees;
|
||||
private get senderAddress();
|
||||
private get signCallback();
|
||||
private constructor();
|
||||
chainId(): Promise<string>;
|
||||
get senderAddress(): string;
|
||||
/**
|
||||
* Returns a 32 byte upper-case hex transaction hash (typically used as the transaction ID)
|
||||
*/
|
||||
|
||||
2
packages/sdk/types/index.d.ts
vendored
2
packages/sdk/types/index.d.ts
vendored
@ -14,6 +14,8 @@ export {
|
||||
SearchByIdQuery,
|
||||
SearchBySentFromOrToQuery,
|
||||
SearchTxQuery,
|
||||
SigningCallback,
|
||||
SigningData,
|
||||
} from "./cosmwasmclient";
|
||||
export { makeCosmoshubPath, Pen, PrehashType, Secp256k1Pen } from "./pen";
|
||||
export {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user