public com.openwallet.core.protos.Protos.WalletPocket buildPartial() { com.openwallet.core.protos.Protos.WalletPocket result = new com.openwallet.core.protos.Protos.WalletPocket(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public Builder mergeFrom(com.openwallet.core.protos.Protos.WalletPocket other) { if (other == com.openwallet.core.protos.Protos.WalletPocket.getDefaultInstance()) return this; if (other.hasNetworkIdentifier()) { bitField0_ |= 0x00000001; networkIdentifier_ = other.networkIdentifier_; onChanged(); if (other.hasDescription()) { bitField0_ |= 0x00000002; description_ = other.description_; if (other.hasLastSeenBlockHash()) { setLastSeenBlockHash(other.getLastSeenBlockHash()); if (other.hasLastSeenBlockHeight()) { setLastSeenBlockHeight(other.getLastSeenBlockHeight()); if (other.hasLastSeenBlockTimeSecs()) { setLastSeenBlockTimeSecs(other.getLastSeenBlockTimeSecs()); if (other.hasId()) { bitField0_ |= 0x00000100; id_ = other.id_; this.mergeUnknownFields(other.getUnknownFields()); return this;
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNetworkIdentifierBytes()); .computeBytesSize(2, getDescriptionBytes()); .computeBytesSize(9, getIdBytes()); .computeMessageSize(10, unspentOutput_.get(i)); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
CoinType coinType; try { coinType = CoinID.typeFromId(walletProto.getNetworkIdentifier()); } catch (IllegalArgumentException e) { throw new UnreadableWalletException("Unknown network parameters ID " + walletProto.getNetworkIdentifier()); chain = SimpleHDKeyChain.fromProtobuf(walletProto.getKeyList(), keyCrypter); } else { chain = SimpleHDKeyChain.fromProtobuf(walletProto.getKeyList()); if (walletProto.hasId()) { pocket = new WalletPocketHD(walletProto.getId(), chain, coinType); } else { pocket = new WalletPocketHD(chain, coinType); if (walletProto.hasDescription()) { pocket.setDescription(walletProto.getDescription()); for (Protos.Transaction txProto : walletProto.getTransactionList()) { readTransaction(txProto, coinType); ArrayList<WalletTransaction<BitTransaction>> wtxs = new ArrayList<>(walletProto.getTransactionList().size()); for (Protos.Transaction txProto : walletProto.getTransactionList()) { wtxs.add(connectTransactionOutputs(txProto)); for (Protos.UnspentOutput proto : walletProto.getUnspentOutputList()) { TrimmedOutput utxo = new TrimmedOutput(coinType, proto.getValue(), byteStringToHash(proto.getOutPointHash()),
CoinType coinType; try { coinType = CoinID.typeFromId(walletProto.getNetworkIdentifier()); } catch (IllegalArgumentException e) { throw new UnreadableWalletException("Unknown network parameters ID " + walletProto.getNetworkIdentifier()); rootKey = NxtFamilyKey.fromProtobuf(walletProto.getKeyList(), keyCrypter); } else { rootKey = NxtFamilyKey.fromProtobuf(walletProto.getKeyList()); if (walletProto.hasId()) { pocket = new NxtFamilyWallet(walletProto.getId(), rootKey, coinType); } else { pocket = new NxtFamilyWallet(rootKey, coinType); if (walletProto.hasDescription()) { pocket.setDescription(walletProto.getDescription());
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getNetworkIdentifierBytes()); output.writeBytes(2, getDescriptionBytes()); output.writeBytes(9, getIdBytes()); getUnknownFields().writeTo(output);
if (isInitialized == 0) return false; if (!hasNetworkIdentifier()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getKeyCount(); i++) { if (!getKey(i).isInitialized()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getTransactionCount(); i++) { if (!getTransaction(i).isInitialized()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getAddressStatusCount(); i++) { if (!getAddressStatus(i).isInitialized()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getUnspentOutputCount(); i++) { if (!getUnspentOutput(i).isInitialized()) { memoizedIsInitialized = 0; return false;
/** * <code>required string network_identifier = 1;</code> * * <pre> * the network used by this wallet * </pre> */ public Builder clearNetworkIdentifier() { bitField0_ = (bitField0_ & ~0x00000001); networkIdentifier_ = getDefaultInstance().getNetworkIdentifier(); onChanged(); return this; } /**
/** * <code>optional string description = 2;</code> * * <pre> * A UTF8 encoded text description of the wallet that is intended for end user provided text. * </pre> */ public Builder clearDescription() { bitField0_ = (bitField0_ & ~0x00000002); description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**
public com.openwallet.core.protos.Protos.WalletPocket getDefaultInstanceForType() { return com.openwallet.core.protos.Protos.WalletPocket.getDefaultInstance(); }
/** * <code>optional bytes last_seen_block_hash = 4;</code> * * <pre> * The SHA256 hash of the head of the best chain seen by this wallet. * </pre> */ public Builder clearLastSeenBlockHash() { bitField0_ = (bitField0_ & ~0x00000008); lastSeenBlockHash_ = getDefaultInstance().getLastSeenBlockHash(); onChanged(); return this; }
/** * <code>repeated .com.openwallet.core.protos.WalletPocket pockets = 6;</code> */ public com.openwallet.core.protos.Protos.WalletPocket.Builder addPocketsBuilder() { return getPocketsFieldBuilder().addBuilder( com.openwallet.core.protos.Protos.WalletPocket.getDefaultInstance()); } /**
/** * <code>optional string id = 9;</code> */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000100); id_ = getDefaultInstance().getId(); onChanged(); return this; } /**
/** * <code>repeated .com.openwallet.core.protos.WalletPocket pockets = 6;</code> */ public com.openwallet.core.protos.Protos.WalletPocket.Builder addPocketsBuilder( int index) { return getPocketsFieldBuilder().addBuilder( index, com.openwallet.core.protos.Protos.WalletPocket.getDefaultInstance()); } /**