class P2PRestApp extends TesseraRestApplication {

    @Override
    public Set<Object> getSingletons() {

        RuntimeContext runtimeContext = RuntimeContext.getInstance();
        LOGGER.debug("Found configured peers {}", runtimeContext.getPeers());

        runtimeContext.getPeers().stream()
                .map(NodeUri::create)
                .map(NodeUri::asURI)
                .peek(u -> LOGGER.debug("Adding {} to party store", u))
                .forEach(partyStore::store);

        final PartyInfoResource partyInfoResource =
                new PartyInfoResource(
                        discovery,
                        partyInfoParser,
                        runtimeContext.getP2pClient(),
                        enclave,
                        runtimeContext.isRemoteKeyValidation());

        final IPWhitelistFilter iPWhitelistFilter = new IPWhitelistFilter();

        TransactionManagerFactory transactionManagerFactory = TransactionManagerFactory.create();
        TransactionManager transactionManager = transactionManagerFactory.create(config);
        PayloadEncoder payloadEncoder = PayloadEncoder.create();

        final TransactionResource transactionResource = new TransactionResource(transactionManager, payloadEncoder);

        return Set.of(partyInfoResource, iPWhitelistFilter, transactionResource);
    }

    public  P2PRestApp();

}