use of io.nem.symbol.sdk.api.NamespaceSearchCriteria in project nem2-sdk-java by nemtech.
the class StateProofServiceImpl method namespace.
@Override
public Observable<StateMerkleProof<NamespaceInfo>> namespace(NamespaceInfo state) {
NamespaceId id = state.getId();
NamespaceRepository namespaceRepository = this.repositoryFactory.createNamespaceRepository();
PaginationStreamer<NamespaceInfo, NamespaceSearchCriteria> streamer = namespaceRepository.streamer();
return namespaceRepository.getNamespaceMerkle(id).flatMap(merkle -> streamer.search(new NamespaceSearchCriteria().level0(state.getId().getIdAsHex()).registrationType(NamespaceRegistrationType.SUB_NAMESPACE)).toList().toObservable().map(state::serialize).map(s -> toStateMerkleProof(state, merkle, s)));
}
use of io.nem.symbol.sdk.api.NamespaceSearchCriteria in project nem2-sdk-java by nemtech.
the class MerkleLoaderIntegrationTest method namespaces.
public List<Arguments> namespaces() {
RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
NamespaceRepository repository = repositoryFactory.createNamespaceRepository();
return getArguments(repository, new NamespaceSearchCriteria().order(ORDER_BY).registrationType(NamespaceRegistrationType.ROOT_NAMESPACE));
}
Aggregations