@cosmjs/amino
Advanced tools
Comparing version 0.25.0 to 0.25.1
@@ -56,8 +56,10 @@ "use strict"; | ||
constructor(mnemonic, options) { | ||
const { seed, hdPaths, prefix } = Object.assign(Object.assign({}, defaultOptions), options); | ||
var _a, _b; | ||
const hdPaths = (_a = options.hdPaths) !== null && _a !== void 0 ? _a : defaultOptions.hdPaths; | ||
const prefix = (_b = options.prefix) !== null && _b !== void 0 ? _b : defaultOptions.prefix; | ||
this.secret = mnemonic; | ||
this.seed = seed; | ||
this.seed = options.seed; | ||
this.accounts = hdPaths.map((hdPath) => ({ | ||
hdPath: hdPath, | ||
prefix: prefix, | ||
prefix, | ||
})); | ||
@@ -64,0 +66,0 @@ } |
@@ -34,2 +34,13 @@ "use strict"; | ||
}); | ||
it("works with explicitly undefined options", async () => { | ||
const wallet = await secp256k1hdwallet_1.Secp256k1HdWallet.fromMnemonic(defaultMnemonic, { | ||
bip39Password: undefined, | ||
hdPaths: undefined, | ||
prefix: undefined, | ||
}); | ||
expect(wallet.mnemonic).toEqual(defaultMnemonic); | ||
const [account] = await wallet.getAccounts(); | ||
expect(account.pubkey).toEqual(defaultPubkey); | ||
expect(account.address).toEqual(defaultAddress); | ||
}); | ||
}); | ||
@@ -36,0 +47,0 @@ describe("generate", () => { |
{ | ||
"name": "@cosmjs/amino", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "Helpers for Amino based signing which are shared between @cosmjs/launchpad and @cosmjs/stargate.", | ||
@@ -43,8 +43,8 @@ "contributors": [ | ||
"dependencies": { | ||
"@cosmjs/crypto": "^0.25.0", | ||
"@cosmjs/encoding": "^0.25.0", | ||
"@cosmjs/math": "^0.25.0", | ||
"@cosmjs/utils": "^0.25.0" | ||
"@cosmjs/crypto": "^0.25.1", | ||
"@cosmjs/encoding": "^0.25.1", | ||
"@cosmjs/math": "^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
174556
2106
Updated@cosmjs/crypto@^0.25.1
Updated@cosmjs/encoding@^0.25.1
Updated@cosmjs/math@^0.25.1
Updated@cosmjs/utils@^0.25.1