Transaction extends NeoSerializable { @Override public void deserialize(BinaryReader reader) throws DeserializationException { try { this.version = reader.readByte(); this.nonce = reader.readUInt32(); this.systemFee = reader.readInt64(); this.networkFee = reader.readInt64(); this.validUntilBlock = reader.readUInt32(); this.signers = reader.readSerializableList(Signer.class); readTransactionAttributes(reader); this.script = reader.readVarBytes(); this.witnesses = reader.readSerializableList(Witness.class); } catch (IOException e) { throw new DeserializationException(e); } } Transaction();  Transaction(Neow3j neow, byte version, long nonce, long validUntilBlock, List<Signer> signers,
            long systemFee, long networkFee, List<TransactionAttribute> attributes, byte[] script,
            List<Witness> witnesses); byte getVersion(); long getNonce(); long getValidUntilBlock(); List<Signer> getSigners(); ScriptHash getSender(); long getSystemFee(); long getNetworkFee(); List<TransactionAttribute> getAttributes(); byte[] getScript(); List<Witness> getWitnesses(); void addWitness(Witness witness); String getTxId(); NeoSendRawTransaction send(); @Override int getSize(); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); byte[] toArrayWithoutWitnesses(); byte[] getHashData(); @Override byte[] toArray(); static final int HEADER_SIZE; }
@Test public void deserialize() throws DeserializationException { byte[] data = Numeric.hexStringToByteArray("" + "00" + "62bdaa0e" + "c272890000000000" + "a65a130000000000" + "99232000" + "01" + "941343239213fa0e765f1027ce742f48db779a96" + "01" + "00" + "01" + OpCode.PUSH1.toString() + "01" + "01000100"); Transaction tx = NeoSerializableInterface.from(data, Transaction.class); assertThat(tx.getVersion(), is((byte) 0)); assertThat(tx.getNonce(), is(246070626L)); assertThat(tx.getSender(), is(new ScriptHash("969a77db482f74ce27105f760efa139223431394"))); assertThat(tx.getSystemFee(), is(9007810L)); assertThat(tx.getNetworkFee(), is(1268390L)); assertThat(tx.getValidUntilBlock(), is(2106265L)); assertThat(tx.getAttributes(), hasSize(0)); assertThat(tx.getSigners(), hasSize(1)); assertThat(tx.getSigners().get(0).getScriptHash(), is(new ScriptHash("969a77db482f74ce27105f760efa139223431394"))); assertThat(tx.getSigners().get(0).getScopes(), contains(WitnessScope.CALLED_BY_ENTRY)); assertArrayEquals(new byte[]{(byte) OpCode.PUSH1.getCode()}, tx.getScript()); assertThat(tx.getWitnesses(), is( Arrays.asList(new Witness(new byte[]{0x00}, new byte[]{0x00})))); }