本文整理匯總了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);
}