Search in sources :

Example 1 with RistrettoPublic

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

the class PaymentMetaDataUtil method addReceiptData.

private static void addReceiptData(@NonNull byte[] receipt, PaymentMetaData.MobileCoinTxoIdentification.Builder builder) throws SerializationException {
    RistrettoPublic publicKey = Receipt.fromBytes(receipt).getPublicKey();
    addPublicKey(builder, publicKey);
}
Also used : RistrettoPublic(com.mobilecoin.lib.RistrettoPublic)

Example 2 with RistrettoPublic

use of com.mobilecoin.lib.RistrettoPublic 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 3 with RistrettoPublic

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

the class PaymentMetaDataUtil method addReceiptData.

private static void addReceiptData(@NonNull byte[] receipt, PaymentMetaData.MobileCoinTxoIdentification.Builder builder) throws SerializationException {
    RistrettoPublic publicKey = Receipt.fromBytes(receipt).getPublicKey();
    addPublicKey(builder, publicKey);
}
Also used : RistrettoPublic(com.mobilecoin.lib.RistrettoPublic)

Example 4 with RistrettoPublic

use of com.mobilecoin.lib.RistrettoPublic 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

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