@@ -1,3 +1,5 @@
|
||||
import { TransactionHash } from './transaction-hash.js';
|
||||
|
||||
import {
|
||||
binToHex,
|
||||
hexToBin,
|
||||
@@ -69,6 +71,18 @@ export class Transaction {
|
||||
return binToHex(bytes);
|
||||
}
|
||||
|
||||
public toHash(): TransactionHash {
|
||||
return TransactionHash.fromTransactionBytes(this.toBytes());
|
||||
}
|
||||
|
||||
public toHashHex(): string {
|
||||
return this.toHash().toHex();
|
||||
}
|
||||
|
||||
public toHashBytes(): Uint8Array {
|
||||
return this.toHash().toBytes();
|
||||
}
|
||||
|
||||
public getVersion() {
|
||||
return this.transaction.version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user