All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bloxbean.cardano.client.backend.api.AddressService Maven / Gradle / Ivy

There is a newer version: 0.6.3
Show newest version
package com.bloxbean.cardano.client.backend.api;

import com.bloxbean.cardano.client.api.common.OrderEnum;
import com.bloxbean.cardano.client.api.exception.ApiException;
import com.bloxbean.cardano.client.api.model.Result;
import com.bloxbean.cardano.client.backend.model.AddressContent;
import com.bloxbean.cardano.client.backend.model.AddressDetails;
import com.bloxbean.cardano.client.backend.model.AddressTransactionContent;

import java.util.List;

/**
 * Get information specific to an address
 */
public interface AddressService {

    /**
     * Get information about a specific address
     *
     * @param address
     * @return
     */
    Result getAddressInfo(String address) throws ApiException;

    /**
     * Address details
     * Obtain details about an address.
     *
     * @param address Bech32 address.
     * @return {@link AddressDetails}
     */
    Result getAddressDetails(String address) throws ApiException;

    /**
     * Get transactions on the address
     *
     * @param address
     * @param count
     * @param page
     * @return
     * @throws ApiException
     */
    Result> getTransactions(String address, int count, int page) throws ApiException;

    /**
     * Get transactions on the address
     *
     * @param address
     * @param count
     * @param page
     * @param order   asc or desc. Default is "asc"
     * @return
     * @throws ApiException
     */
    Result> getTransactions(String address, int count, int page, OrderEnum order) throws ApiException;

    /**
     * Get transactions on the address
     * Default implementation ignores from and to argument. But a backend implementation can override this behavior.
     *
     * @param address
     * @param count
     * @param page
     * @param order   order asc or desc. Default is "asc"
     * @param from    from block number
     * @param to      to block number
     * @return
     * @throws ApiException
     */
    default Result> getTransactions(String address, int count, int page, OrderEnum order, String from, String to) throws ApiException {
        return getTransactions(address, count, page, order);
    }

    /**
     * getAllTransactions
     * @param address paymentAddress
     * @param order order
     * @param fromBlockHeight from block number
     * @param toBlockHeight to block number
     * @return List of {@link AddressTransactionContent}
     */
    Result> getAllTransactions(String address, OrderEnum order, Integer fromBlockHeight, Integer toBlockHeight) throws ApiException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy