本文整理汇总了Java中com.ripple.core.types.known.tx.Transaction类的典型用法代码示例。如果您正苦于以下问题:Java Transaction类的具体用法?Java Transaction怎么用?Java Transaction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Transaction类属于com.ripple.core.types.known.tx包,在下文中一共展示了Transaction类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TransactionResult
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public TransactionResult(long ledgerIndex, Hash256 hash, Transaction txn, TransactionMeta meta) {
this.ledgerIndex = new UInt32(ledgerIndex);
this.hash = hash;
this.txn = txn;
this.meta = meta;
this.engineResult = meta.engineResult();
this.validated = true;
}
示例2: transactionFee
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public Amount transactionFee(Transaction transaction) {
return computeFee(fee_base);
}
示例3: manage
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public ManagedTxn manage(Transaction tt) {
ManagedTxn txn = new ManagedTxn(tt);
tt.account(accountID);
return txn;
}
示例4: ManagedTxn
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public ManagedTxn(Transaction txn) {
this.txn = txn;
}
示例5: SignedTransaction
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
private SignedTransaction(Transaction of) {
// TODO: is this just over kill ?
txn = (Transaction) STObject.translate.fromBytes(of.toBytes());
}
示例6: fromTx
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public static SignedTransaction fromTx(Transaction tx) {
return new SignedTransaction(tx);
}
示例7: prepare
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public void prepare(IKeyPair keyPair,
Amount fee,
UInt32 Sequence,
UInt32 lastLedgerSequence) {
Blob pubKey = new Blob(keyPair.canonicalPubBytes());
// This won't always be specified
if (lastLedgerSequence != null) {
txn.put(UInt32.LastLedgerSequence, lastLedgerSequence);
}
if (Sequence != null) {
txn.put(UInt32.Sequence, Sequence);
}
if (fee != null) {
txn.put(Amount.Fee, fee);
}
txn.signingPubKey(pubKey);
if (Transaction.CANONICAL_FLAG_DEPLOYED) {
txn.setCanonicalSignatureFlag();
}
txn.checkFormat();
signingData = txn.signingData();
if (previousSigningData != null && Arrays.equals(signingData, previousSigningData)) {
return;
}
try {
txn.txnSignature(new Blob(keyPair.signMessage(signingData)));
BytesList blob = new BytesList();
HalfSha512 id = HalfSha512.prefixed256(HashPrefix.transactionID);
txn.toBytesSink(new MultiSink(blob, id));
tx_blob = blob.bytesHex();
hash = id.finish();
} catch (Exception e) {
// electric paranoia
previousSigningData = null;
throw new RuntimeException(e);
} /*else {*/
previousSigningData = signingData;
// }
}
示例8: copy
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public TransactionResult copy() {
TransactionMeta metaCopy = (TransactionMeta) STObject.translate.fromBytes(meta.toBytes());
Transaction txnCopy = (Transaction) STObject.translate.fromBytes(txn.toBytes());
return new TransactionResult(ledgerIndex.longValue(), hash, txnCopy, metaCopy);
}
示例9: readTransactionResult
import com.ripple.core.types.known.tx.Transaction; //导入依赖的package包/类
public TransactionResult readTransactionResult(UInt32 ledgerIndex) {
Hash256 hash = hash256();
Transaction txn = (Transaction) vlStObject();
TransactionMeta meta = (TransactionMeta) vlStObject();
return new TransactionResult(ledgerIndex.longValue(), hash, txn, meta);
}