@Override public MarriedKeyChain build() { checkState(random != null || entropy != null || seed != null || watchingKey!= null, "Must provide either entropy or random or seed or watchingKey"); checkNotNull(followingKeys, "followingKeys must be provided"); MarriedKeyChain chain; if (threshold == 0) threshold = (followingKeys.size() + 1) / 2 + 1; if (random != null) { chain = new MarriedKeyChain(random, bits, getPassphrase(), seedCreationTimeSecs); } else if (entropy != null) { chain = new MarriedKeyChain(entropy, getPassphrase(), seedCreationTimeSecs); } else if (seed != null) { seed.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(seed); } else { watchingKey.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(watchingKey); } chain.addFollowingAccountKeys(followingKeys, threshold); return chain; } }
@Override public MarriedKeyChain build() { checkState(random != null || entropy != null || seed != null || watchingKey!= null, "Must provide either entropy or random or seed or watchingKey"); checkNotNull(followingKeys, "followingKeys must be provided"); MarriedKeyChain chain; if (threshold == 0) threshold = (followingKeys.size() + 1) / 2 + 1; if (random != null) { chain = new MarriedKeyChain(random, bits, getPassphrase(), seedCreationTimeSecs); } else if (entropy != null) { chain = new MarriedKeyChain(entropy, getPassphrase(), seedCreationTimeSecs); } else if (seed != null) { seed.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(seed); } else { watchingKey.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(watchingKey); } chain.addFollowingAccountKeys(followingKeys, threshold); return chain; } }
@Override public MarriedKeyChain build() { checkState(random != null || entropy != null || seed != null || watchingKey!= null, "Must provide either entropy or random or seed or watchingKey"); checkNotNull(followingKeys, "followingKeys must be provided"); MarriedKeyChain chain; if (threshold == 0) threshold = (followingKeys.size() + 1) / 2 + 1; if (random != null) { chain = new MarriedKeyChain(random, bits, getPassphrase(), seedCreationTimeSecs); } else if (entropy != null) { chain = new MarriedKeyChain(entropy, getPassphrase(), seedCreationTimeSecs); } else if (seed != null) { seed.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(seed); } else { watchingKey.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(watchingKey); } chain.addFollowingAccountKeys(followingKeys, threshold); return chain; } }
@Override public MarriedKeyChain build() { checkState(random != null || entropy != null || seed != null || watchingKey!= null, "Must provide either entropy or random or seed or watchingKey"); checkNotNull(followingKeys, "followingKeys must be provided"); MarriedKeyChain chain; if (threshold == 0) threshold = (followingKeys.size() + 1) / 2 + 1; if (random != null) { chain = new MarriedKeyChain(random, bits, getPassphrase(), seedCreationTimeSecs); } else if (entropy != null) { chain = new MarriedKeyChain(entropy, getPassphrase(), seedCreationTimeSecs); } else if (seed != null) { seed.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(seed); } else { watchingKey.setCreationTimeSeconds(seedCreationTimeSecs); chain = new MarriedKeyChain(watchingKey); } chain.addFollowingAccountKeys(followingKeys, threshold); return chain; } }