當前位置: 首頁>>代碼示例>>Java>>正文


Java Transaction類代碼示例

本文整理匯總了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;
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:9,代碼來源:TransactionResult.java

示例2: transactionFee

import com.ripple.core.types.known.tx.Transaction; //導入依賴的package包/類
public Amount transactionFee(Transaction transaction) {
    return computeFee(fee_base);
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:4,代碼來源:ServerInfo.java

示例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;
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:6,代碼來源:TransactionManager.java

示例4: ManagedTxn

import com.ripple.core.types.known.tx.Transaction; //導入依賴的package包/類
public ManagedTxn(Transaction txn) {
    this.txn = txn;
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:4,代碼來源:ManagedTxn.java

示例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());
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:5,代碼來源:SignedTransaction.java

示例6: fromTx

import com.ripple.core.types.known.tx.Transaction; //導入依賴的package包/類
public static SignedTransaction fromTx(Transaction tx) {
    return new SignedTransaction(tx);
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:4,代碼來源:SignedTransaction.java

示例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;
    // }
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:47,代碼來源:SignedTransaction.java

示例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);
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:6,代碼來源:TransactionResult.java

示例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);
}
 
開發者ID:cping,項目名稱:RipplePower,代碼行數:7,代碼來源:STReader.java


注:本文中的com.ripple.core.types.known.tx.Transaction類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。