/** * <code>repeated uint32 path = 2;</code> * * <pre> * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation * and high bit unset for public derivation. * </pre> */ public Builder clearPath() { path_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; }
/** * <code>required bytes chain_code = 1;</code> * * <pre> * Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and * should just treat it as a regular ORIGINAL type key. * </pre> */ public Builder setChainCode(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; chainCode_ = value; onChanged(); return this; } /**
/** * <code>repeated uint32 path = 2;</code> * * <pre> * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation * and high bit unset for public derivation. * </pre> */ public Builder addPath(int value) { ensurePathIsMutable(); path_.add(value); onChanged(); return this; } /**
public Builder mergeFrom(com.openwallet.core.protos.Protos.DeterministicKey other) { if (other == com.openwallet.core.protos.Protos.DeterministicKey.getDefaultInstance()) return this; if (other.hasChainCode()) { setChainCode(other.getChainCode()); } if (!other.path_.isEmpty()) { if (path_.isEmpty()) { path_ = other.path_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePathIsMutable(); path_.addAll(other.path_); } onChanged(); } if (other.hasIssuedSubkeys()) { setIssuedSubkeys(other.getIssuedSubkeys()); } if (other.hasLookaheadSize()) { setLookaheadSize(other.getLookaheadSize()); } if (other.hasIsFollowing()) { setIsFollowing(other.getIsFollowing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>repeated uint32 path = 2;</code> * * <pre> * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation * and high bit unset for public derivation. * </pre> */ public Builder addAllPath( java.lang.Iterable<? extends java.lang.Integer> values) { ensurePathIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, path_); onChanged(); return this; } /**
/** * <code>optional bool isFollowing = 5;</code> * * <pre> ** * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce * a single P2SH multisignature address * </pre> */ public Builder setIsFollowing(boolean value) { bitField0_ |= 0x00000010; isFollowing_ = value; onChanged(); return this; } /**
/** * <code>optional uint32 issued_subkeys = 3;</code> * * <pre> * How many children of this key have been issued, that is, given to the user when they requested a fresh key? * For the parents of keys being handed out, this is always less than the true number of children: the difference is * called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of * this wallet - for instance when restoring from backup or if the seed was shared between devices. * If this field is missing it means we're not issuing subkeys of this key to users. * </pre> */ public Builder clearIssuedSubkeys() { bitField0_ = (bitField0_ & ~0x00000004); issuedSubkeys_ = 0; onChanged(); return this; }
/** * <code>repeated uint32 path = 2;</code> * * <pre> * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation * and high bit unset for public derivation. * </pre> */ public Builder setPath( int index, int value) { ensurePathIsMutable(); path_.set(index, value); onChanged(); return this; } /**
/** * <code>optional bool isFollowing = 5;</code> * * <pre> ** * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce * a single P2SH multisignature address * </pre> */ public Builder clearIsFollowing() { bitField0_ = (bitField0_ & ~0x00000010); isFollowing_ = false; onChanged(); return this; }
/** * <code>optional uint32 issued_subkeys = 3;</code> * * <pre> * How many children of this key have been issued, that is, given to the user when they requested a fresh key? * For the parents of keys being handed out, this is always less than the true number of children: the difference is * called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of * this wallet - for instance when restoring from backup or if the seed was shared between devices. * If this field is missing it means we're not issuing subkeys of this key to users. * </pre> */ public Builder setIssuedSubkeys(int value) { bitField0_ |= 0x00000004; issuedSubkeys_ = value; onChanged(); return this; } /**
/** * <code>required bytes chain_code = 1;</code> * * <pre> * Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and * should just treat it as a regular ORIGINAL type key. * </pre> */ public Builder clearChainCode() { bitField0_ = (bitField0_ & ~0x00000001); chainCode_ = getDefaultInstance().getChainCode(); onChanged(); return this; }
/** * <code>optional uint32 lookahead_size = 4;</code> */ public Builder setLookaheadSize(int value) { bitField0_ |= 0x00000008; lookaheadSize_ = value; onChanged(); return this; } /**
/** * <code>optional uint32 lookahead_size = 4;</code> */ public Builder clearLookaheadSize() { bitField0_ = (bitField0_ & ~0x00000008); lookaheadSize_ = 0; onChanged(); return this; }