@cosmjs/proto-signing
Advanced tools
Comparing version 0.25.0 to 0.25.1
@@ -16,5 +16,7 @@ "use strict"; | ||
constructor(mnemonic, options) { | ||
const { seed, hdPaths, prefix } = Object.assign(Object.assign({}, defaultOptions), options); | ||
var _a, _b; | ||
const prefix = (_a = options.prefix) !== null && _a !== void 0 ? _a : defaultOptions.prefix; | ||
const hdPaths = (_b = options.hdPaths) !== null && _b !== void 0 ? _b : defaultOptions.hdPaths; | ||
this.secret = mnemonic; | ||
this.seed = seed; | ||
this.seed = options.seed; | ||
this.accounts = hdPaths.map((hdPath) => ({ | ||
@@ -21,0 +23,0 @@ hdPath: hdPath, |
@@ -32,2 +32,13 @@ "use strict"; | ||
}); | ||
it("works with explicitly undefined options", async () => { | ||
const wallet = await directsecp256k1hdwallet_1.DirectSecp256k1HdWallet.fromMnemonic(defaultMnemonic, { | ||
bip39Password: undefined, | ||
hdPaths: undefined, | ||
prefix: undefined, | ||
}); | ||
expect(wallet.mnemonic).toEqual(defaultMnemonic); | ||
const [{ pubkey, address }] = await wallet.getAccounts(); | ||
expect(pubkey).toEqual(defaultPubkey); | ||
expect(address).toEqual(defaultAddress); | ||
}); | ||
}); | ||
@@ -34,0 +45,0 @@ describe("generate", () => { |
{ | ||
"name": "@cosmjs/proto-signing", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)", | ||
@@ -46,3 +46,3 @@ "contributors": [ | ||
"dependencies": { | ||
"@cosmjs/amino": "^0.25.0", | ||
"@cosmjs/amino": "^0.25.1", | ||
"long": "^4.0.0", | ||
@@ -52,6 +52,6 @@ "protobufjs": "~6.10.2" | ||
"devDependencies": { | ||
"@cosmjs/encoding": "^0.25.0", | ||
"@cosmjs/utils": "^0.25.0" | ||
"@cosmjs/encoding": "^0.25.1", | ||
"@cosmjs/utils": "^0.25.1" | ||
}, | ||
"gitHead": "1a396b8e7a0529cb1e5fad2e1b2a1cffd73da0cb" | ||
"gitHead": "0dda1b0c4a034c60cb88dad7306c235cfc1ad77f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
706562
10221
Updated@cosmjs/amino@^0.25.1