6 #ifndef KAGOME_CORE_API_SERVICE_HPP 7 #define KAGOME_CORE_API_SERVICE_HPP 26 using sptr = std::shared_ptr<T>;
34 virtual bool start() = 0;
37 virtual void stop() = 0;
40 const std::vector<common::Buffer> &keys) = 0;
43 const std::vector<PubsubSubscriptionId> &subscription_id) = 0;
57 virtual outcome::result<PubsubSubscriptionId>
66 #endif // KAGOME_CORE_API_SERVICE_HPP virtual ~ApiService()=default
virtual outcome::result< PubsubSubscriptionId > subscribeNewHeads()=0
virtual outcome::result< PubsubSubscriptionId > subscribeRuntimeVersion()=0
virtual outcome::result< bool > unsubscribeFinalizedHeads(PubsubSubscriptionId subscription_id)=0
virtual outcome::result< bool > unsubscribeSessionFromIds(const std::vector< PubsubSubscriptionId > &subscription_id)=0
std::shared_ptr< T > sptr
uint32_t PubsubSubscriptionId
subscription id for pubsub API methods
virtual outcome::result< bool > unsubscribeNewHeads(PubsubSubscriptionId subscription_id)=0
virtual outcome::result< bool > unsubscribeFromExtrinsicLifecycle(PubsubSubscriptionId subscription_id)=0
virtual outcome::result< bool > unsubscribeRuntimeVersion(PubsubSubscriptionId subscription_id)=0
virtual outcome::result< PubsubSubscriptionId > subscribeFinalizedHeads()=0
virtual outcome::result< PubsubSubscriptionId > subscribeForExtrinsicLifecycle(const primitives::Transaction::Hash &tx_hash)=0
virtual outcome::result< uint32_t > subscribeSessionToKeys(const std::vector< common::Buffer > &keys)=0