当前位置: 首页>>代码示例>>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;未经允许,请勿转载。