proto-signing: Expose DirectSignResponse interface

Also make DirectSecp256k1HdWallet constructor protected
This commit is contained in:
willclarktech 2020-12-01 16:49:42 +00:00
parent bd08cad70b
commit 2c89e4bacd
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
5 changed files with 12 additions and 5 deletions

View File

@ -12,6 +12,7 @@
- @cosmjs/launchpad-ledger: `LedgerSigner.sign` method renamed `signAmino`.
- @cosmjs/proto-signing: Add new package for handling transaction signing with
protobuf encoding.
- @cosmjs/proto-signing: Expose `DirectSignResponse` interface.
- @cosmjs/stargate: Add new package for Cosmos SDK Stargate support.
- @cosmjs/tendermint-rpc: Make `Client.detectVersion` private and let it return
a version instead of a client.

View File

@ -80,7 +80,7 @@ export class DirectSecp256k1HdWallet implements OfflineDirectSigner {
private readonly pubkey: Uint8Array;
private readonly privkey: Uint8Array;
private constructor(
protected constructor(
mnemonic: EnglishMnemonic,
hdPath: HdPath,
privkey: Uint8Array,

View File

@ -4,5 +4,5 @@ export { EncodeObject, Registry } from "./registry";
export { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";
export { DirectSecp256k1Wallet } from "./directsecp256k1wallet";
export { decodePubkey, encodePubkey } from "./pubkey";
export { isOfflineDirectSigner, OfflineDirectSigner, OfflineSigner } from "./signer";
export { DirectSignResponse, isOfflineDirectSigner, OfflineDirectSigner, OfflineSigner } from "./signer";
export { makeAuthInfoBytes, makeSignBytes, makeSignDoc } from "./signing";

View File

@ -1,4 +1,4 @@
import { HdPath } from "@cosmjs/crypto";
import { EnglishMnemonic, HdPath } from "@cosmjs/crypto";
import { AccountData } from "@cosmjs/launchpad";
import { cosmos } from "./codec";
import { DirectSignResponse, OfflineDirectSigner } from "./signer";
@ -31,7 +31,13 @@ export declare class DirectSecp256k1HdWallet implements OfflineDirectSigner {
/** Derived data */
private readonly pubkey;
private readonly privkey;
private constructor();
protected constructor(
mnemonic: EnglishMnemonic,
hdPath: HdPath,
privkey: Uint8Array,
pubkey: Uint8Array,
prefix: string,
);
get mnemonic(): string;
private get address();
getAccounts(): Promise<readonly AccountData[]>;

View File

@ -4,5 +4,5 @@ export { EncodeObject, Registry } from "./registry";
export { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";
export { DirectSecp256k1Wallet } from "./directsecp256k1wallet";
export { decodePubkey, encodePubkey } from "./pubkey";
export { isOfflineDirectSigner, OfflineDirectSigner, OfflineSigner } from "./signer";
export { DirectSignResponse, isOfflineDirectSigner, OfflineDirectSigner, OfflineSigner } from "./signer";
export { makeAuthInfoBytes, makeSignBytes, makeSignDoc } from "./signing";