Skip to content

Commit

Permalink
Merge pull request #34 from centrys-otniel/Ledger_accessibility
Browse files Browse the repository at this point in the history
Expose functionality needed for Ledger integration
  • Loading branch information
AionJayT authored Aug 28, 2018
2 parents 528c5a8 + f06c8ce commit ac79208
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
config/
output/
out/
aion.iml
build/
pack/
*.iml
META-INF
build/
pack/
4 changes: 4 additions & 0 deletions src/org/aion/api/type/core/tx/AbstractTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public AbstractTransaction(byte[] nonce, Address receiveAddress, byte[] value, b
// }
// }

public void setSignature(final ISignature signature) {
this.signature = signature;
}

public abstract byte[] getEncoded();

public abstract Address getFrom();
Expand Down
14 changes: 7 additions & 7 deletions src/org/aion/api/type/core/tx/AionTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@

package org.aion.api.type.core.tx;

import static org.aion.base.util.ByteUtil.ZERO_BYTE_ARRAY;

import java.math.BigInteger;
import java.util.Arrays;

import org.aion.base.type.Address;
import org.aion.base.util.ByteUtil;
import org.aion.base.util.TimeInstant;
Expand All @@ -41,6 +36,11 @@
import org.aion.rlp.RLP;
import org.aion.rlp.RLPList;

import java.math.BigInteger;
import java.util.Arrays;

import static org.aion.base.util.ByteUtil.ZERO_BYTE_ARRAY;

/**
*
* Aion transaction class.
Expand Down Expand Up @@ -178,7 +178,7 @@ public byte[] getHash() {
return hash;
}

private byte[] getRawHash() {
public byte[] getRawHash() {
if (!parsed) {
rlpParse();
}
Expand Down Expand Up @@ -350,7 +350,7 @@ public String toString(int maxDataSize) {
* For signatures you have to keep also RLP of the transaction without any
* signature data
*/
private byte[] getEncodedRaw() {
public byte[] getEncodedRaw() {

if (!parsed) {
rlpParse();
Expand Down

0 comments on commit ac79208

Please sign in to comment.