Search in sources :

Example 1 with KeyImage

use of com.mobilecoin.lib.KeyImage in project Signal-Android by WhisperSystems.

the class PaymentMetaDataUtil method addTransactionData.

private static void addTransactionData(@NonNull byte[] transactionBytes, PaymentMetaData.MobileCoinTxoIdentification.Builder builder) throws SerializationException {
    Transaction transaction = Transaction.fromBytes(transactionBytes);
    Set<KeyImage> keyImages = transaction.getKeyImages();
    for (KeyImage keyImage : keyImages) {
        builder.addKeyImages(ByteString.copyFrom(keyImage.getData()));
    }
    for (RistrettoPublic publicKey : transaction.getOutputPublicKeys()) {
        addPublicKey(builder, publicKey);
    }
}
Also used : RistrettoPublic(com.mobilecoin.lib.RistrettoPublic) KeyImage(com.mobilecoin.lib.KeyImage) Transaction(com.mobilecoin.lib.Transaction)

Example 2 with KeyImage

use of com.mobilecoin.lib.KeyImage in project Signal-Android by signalapp.

the class PaymentMetaDataUtil method addTransactionData.

private static void addTransactionData(@NonNull byte[] transactionBytes, PaymentMetaData.MobileCoinTxoIdentification.Builder builder) throws SerializationException {
    Transaction transaction = Transaction.fromBytes(transactionBytes);
    Set<KeyImage> keyImages = transaction.getKeyImages();
    for (KeyImage keyImage : keyImages) {
        builder.addKeyImages(ByteString.copyFrom(keyImage.getData()));
    }
    for (RistrettoPublic publicKey : transaction.getOutputPublicKeys()) {
        addPublicKey(builder, publicKey);
    }
}
Also used : RistrettoPublic(com.mobilecoin.lib.RistrettoPublic) KeyImage(com.mobilecoin.lib.KeyImage) Transaction(com.mobilecoin.lib.Transaction)

Aggregations

KeyImage (com.mobilecoin.lib.KeyImage)2 RistrettoPublic (com.mobilecoin.lib.RistrettoPublic)2 Transaction (com.mobilecoin.lib.Transaction)2