55import org .cardanofoundation .rosetta .api .account .model .domain .Utxo ;
66import org .cardanofoundation .rosetta .api .block .model .domain .BlockTx ;
77import org .cardanofoundation .rosetta .api .common .model .Asset ;
8- import org .openapitools .client .model .Amount ;
98import org .openapitools .client .model .BlockTransaction ;
109import org .openapitools .client .model .CurrencyMetadataResponse ;
1110import org .openapitools .client .model .Operation ;
1211
12+ import lombok .NonNull ;
13+ import javax .annotation .Nullable ;
14+ import javax .validation .constraints .NotNull ;
1315import java .util .List ;
1416import java .util .Map ;
1517import java .util .Set ;
@@ -26,50 +28,50 @@ public interface TokenRegistryService {
2628 * @param assets Set of Asset objects containing policyId and optional assetName
2729 * @return Map of Asset -> CurrencyMetadataResponse with metadata (always returns at least policyId)
2830 */
29- Map <Asset , CurrencyMetadataResponse > getTokenMetadataBatch (Set <Asset > assets );
31+ Map <Asset , CurrencyMetadataResponse > getTokenMetadataBatch (@ NotNull Set <Asset > assets );
3032
3133 /**
3234 * Extract all native token assets from a BlockTx (inputs and outputs)
3335 * @param blockTx The block transaction to extract assets from
3436 * @return Set of unique Asset objects found in the transaction
3537 */
36- Set <Asset > extractAssetsFromBlockTx (BlockTx blockTx );
38+ Set <Asset > extractAssetsFromBlockTx (@ NonNull BlockTx blockTx );
3739
3840 /**
3941 * Extract all native token assets from a list of BlockTransaction objects
4042 * @param transactions List of BlockTransaction objects from search results
4143 * @return Set of unique Asset objects found across all transactions
4244 */
43- Set <Asset > extractAssetsFromBlockTransactions (List <BlockTransaction > transactions );
45+ Set <Asset > extractAssetsFromBlockTransactions (@ NotNull List <BlockTransaction > transactions );
4446
4547 /**
4648 * Extract assets from a list of Amt objects (utility method)
4749 * @param amounts List of amounts potentially containing native tokens
4850 * @return Set of unique Asset objects (excludes ADA/lovelace)
4951 */
50- Set <Asset > extractAssetsFromAmounts (List <Amt > amounts );
52+ Set <Asset > extractAssetsFromAmounts (@ NonNull List <Amt > amounts );
5153
5254 /**
5355 * Extract assets from a list of Operation objects
5456 * @param operations List of operations potentially containing native tokens
5557 * @return Set of unique Asset objects found in operation amounts
5658 */
57- Set <Asset > extractAssetsFromOperations (List <Operation > operations );
59+ Set <Asset > extractAssetsFromOperations (@ NotNull List <Operation > operations );
5860
5961 /**
6062 * Convenience method to extract assets and fetch metadata for a BlockTx in one call
6163 * @param blockTx The block transaction to process
6264 * @return Map of Asset -> CurrencyMetadataResponse with metadata
6365 */
64- Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTx (BlockTx blockTx );
66+ Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTx (@ NotNull BlockTx blockTx );
6567
6668 /**
6769 * Convenience method to extract assets and fetch metadata for BlockTransactions in one call
6870 * @param transactions List of BlockTransaction objects from search results
6971 * @return Map of Asset -> CurrencyMetadataResponse with metadata
7072 */
71- Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTransactions (List <BlockTransaction > transactions );
72-
73+ Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTransactions (@ NotNull List <BlockTransaction > transactions );
74+
7375 /**
7476 * Convenience method to extract assets and fetch metadata for a list of BlockTx objects in one call.
7577 * This method handles the common pattern of processing multiple transactions and fetching their metadata
@@ -78,20 +80,20 @@ public interface TokenRegistryService {
7880 * @param blockTxList List of BlockTx objects to process
7981 * @return Map of Asset -> CurrencyMetadataResponse with metadata (empty map if no native tokens)
8082 */
81- Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTxList (List <BlockTx > blockTxList );
83+ Map <Asset , CurrencyMetadataResponse > fetchMetadataForBlockTxList (@ NotNull List <BlockTx > blockTxList );
8284
8385 /**
8486 * Extract all native token assets from AddressBalance list and fetch metadata in a single batch call
8587 * @param balances List of address balances potentially containing native tokens
8688 * @return Map of Asset -> CurrencyMetadataResponse with metadata
8789 */
88- Map <Asset , CurrencyMetadataResponse > fetchMetadataForAddressBalances (List <AddressBalance > balances );
90+ Map <Asset , CurrencyMetadataResponse > fetchMetadataForAddressBalances (@ NotNull List <AddressBalance > balances );
8991
9092 /**
9193 * Extract all native token assets from UTXO list and fetch metadata in a single batch call
9294 * @param utxos List of UTXOs potentially containing native tokens
9395 * @return Map of Asset -> CurrencyMetadataResponse with metadata
9496 */
95- Map <Asset , CurrencyMetadataResponse > fetchMetadataForUtxos (List <Utxo > utxos );
97+ Map <Asset , CurrencyMetadataResponse > fetchMetadataForUtxos (@ NotNull List <Utxo > utxos );
9698
9799}
0 commit comments