// Generated by mpgen from /build/bitcoin/src/bitcoin-30.2/src/ipc/capnp/mining.capnp

// IWYU pragma: no_include <kj/memory.h>
// IWYU pragma: no_include <memory>
// IWYU pragma: begin_keep
#include <src/ipc/capnp/mining.capnp.proxy.h>
#include <src/ipc/capnp/mining.capnp.proxy-types.h>
#include <capnp/generated-header-support.h>
#include <cstring>
#include <kj/async.h>
#include <kj/common.h>
#include <kj/exception.h>
#include <mp/proxy.h>
#include <mp/util.h>
#include <mp/proxy-types.h>
// IWYU pragma: end_keep

namespace mp {
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::isTestChain(IsTestChainContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::isInitialBlockDownload(IsInitialBlockDownloadContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::getTip(GetTipContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_OPTIONAL | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::waitTipChanged(WaitTipChangedContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::CurrentTip, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Timeout, FIELD_IN>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())))));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::createNewBlock(CreateNewBlockContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<1, Accessor<mining_fields::Options, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::Mining>::checkBlock(CheckBlockContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<1, Accessor<mining_fields::Block, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Options, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Reason, FIELD_OUT | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Debug, FIELD_OUT | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT>>(ServerCall()))))));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::destroy(DestroyContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(ServerDestroy()));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getBlockHeader(GetBlockHeaderContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getBlock(GetBlockContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getTxFees(GetTxFeesContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getTxSigops(GetTxSigopsContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getCoinbaseTx(GetCoinbaseTxContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getCoinbaseCommitment(GetCoinbaseCommitmentContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getWitnessCommitmentIndex(GetWitnessCommitmentIndexContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::getCoinbaseMerklePath(GetCoinbaseMerklePathContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::submitSolution(SubmitSolutionContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Version, FIELD_IN>>(MakeServerField<1, Accessor<mining_fields::Timestamp, FIELD_IN>>(MakeServerField<1, Accessor<mining_fields::Nonce, FIELD_IN>>(MakeServerField<1, Accessor<mining_fields::Coinbase, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT>>(ServerCall())))))));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::waitNext(WaitNextContext call_context) {
    return serverInvoke(*this, call_context, MakeServerField<0, Accessor<mining_fields::Context, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<mining_fields::Options, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<mining_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall()))));
}
kj::Promise<void> ProxyServer<ipc::capnp::messages::BlockTemplate>::interruptWait(InterruptWaitContext call_context) {
    return serverInvoke(*this, call_context, ServerCall());
}
} // namespace mp
