Search in sources :

Example 1 with AccountIds

use of io.nem.symbol.sdk.openapi.vertx.model.AccountIds in project nem2-sdk-java by nemtech.

the class AccountRepositoryVertxImpl method getAccountsInfo.

@Override
public Observable<List<AccountInfo>> getAccountsInfo(List<Address> addresses) {
    AccountIds accountIds = new AccountIds().addresses(addresses.stream().map(Address::plain).collect(Collectors.toList()));
    Consumer<Handler<AsyncResult<List<AccountInfoDTO>>>> callback = handler -> getClient().getAccountsInfo(accountIds, handler);
    return exceptionHandling(call(callback).flatMapIterable(item -> item).map(this::toAccountInfo).toList().toObservable());
}
Also used : AccountDTO(io.nem.symbol.sdk.openapi.vertx.model.AccountDTO) AccountOrderByEnum(io.nem.symbol.sdk.openapi.vertx.model.AccountOrderByEnum) MapperUtils.toMosaicId(io.nem.symbol.core.utils.MapperUtils.toMosaicId) AccountRepository(io.nem.symbol.sdk.api.AccountRepository) AccountType(io.nem.symbol.sdk.model.account.AccountType) SupplementalPublicKeysDTO(io.nem.symbol.sdk.openapi.vertx.model.SupplementalPublicKeysDTO) MapperUtils.toAddress(io.nem.symbol.core.utils.MapperUtils.toAddress) Order(io.nem.symbol.sdk.openapi.vertx.model.Order) AccountInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.AccountInfoDTO) ObjectUtils(org.apache.commons.lang3.ObjectUtils) AccountRoutesApi(io.nem.symbol.sdk.openapi.vertx.api.AccountRoutesApi) AccountInfo(io.nem.symbol.sdk.model.account.AccountInfo) MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) ActivityBucket(io.nem.symbol.sdk.model.account.ActivityBucket) Observable(io.reactivex.Observable) AsyncResult(io.vertx.core.AsyncResult) AccountPage(io.nem.symbol.sdk.openapi.vertx.model.AccountPage) AccountIds(io.nem.symbol.sdk.openapi.vertx.model.AccountIds) ResolvedMosaic(io.nem.symbol.sdk.model.mosaic.ResolvedMosaic) ApiClient(io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient) AccountSearchCriteria(io.nem.symbol.sdk.api.AccountSearchCriteria) Collectors(java.util.stream.Collectors) Consumer(java.util.function.Consumer) List(java.util.List) SupplementalAccountKeys(io.nem.symbol.sdk.model.account.SupplementalAccountKeys) PublicKey(io.nem.symbol.core.crypto.PublicKey) AccountLinkPublicKeyDTO(io.nem.symbol.sdk.openapi.vertx.model.AccountLinkPublicKeyDTO) AccountLinkVotingKey(io.nem.symbol.sdk.model.account.AccountLinkVotingKey) Address(io.nem.symbol.sdk.model.account.Address) AccountRoutesApiImpl(io.nem.symbol.sdk.openapi.vertx.api.AccountRoutesApiImpl) Handler(io.vertx.core.Handler) Collections(java.util.Collections) Page(io.nem.symbol.sdk.api.Page) AccountIds(io.nem.symbol.sdk.openapi.vertx.model.AccountIds) MapperUtils.toAddress(io.nem.symbol.core.utils.MapperUtils.toAddress) Address(io.nem.symbol.sdk.model.account.Address) Handler(io.vertx.core.Handler) List(java.util.List)

Aggregations

PublicKey (io.nem.symbol.core.crypto.PublicKey)1 MapperUtils.toAddress (io.nem.symbol.core.utils.MapperUtils.toAddress)1 MapperUtils.toMosaicId (io.nem.symbol.core.utils.MapperUtils.toMosaicId)1 AccountRepository (io.nem.symbol.sdk.api.AccountRepository)1 AccountSearchCriteria (io.nem.symbol.sdk.api.AccountSearchCriteria)1 Page (io.nem.symbol.sdk.api.Page)1 AccountInfo (io.nem.symbol.sdk.model.account.AccountInfo)1 AccountLinkVotingKey (io.nem.symbol.sdk.model.account.AccountLinkVotingKey)1 AccountType (io.nem.symbol.sdk.model.account.AccountType)1 ActivityBucket (io.nem.symbol.sdk.model.account.ActivityBucket)1 Address (io.nem.symbol.sdk.model.account.Address)1 SupplementalAccountKeys (io.nem.symbol.sdk.model.account.SupplementalAccountKeys)1 MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)1 ResolvedMosaic (io.nem.symbol.sdk.model.mosaic.ResolvedMosaic)1 AccountRoutesApi (io.nem.symbol.sdk.openapi.vertx.api.AccountRoutesApi)1 AccountRoutesApiImpl (io.nem.symbol.sdk.openapi.vertx.api.AccountRoutesApiImpl)1 ApiClient (io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient)1 AccountDTO (io.nem.symbol.sdk.openapi.vertx.model.AccountDTO)1 AccountIds (io.nem.symbol.sdk.openapi.vertx.model.AccountIds)1 AccountInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.AccountInfoDTO)1