feat(c-miner): port miner pipeline to modular C implementation
This commit is contained in:
23
rpc.h
Normal file
23
rpc.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef RPC_H
|
||||
#define RPC_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
|
||||
typedef struct {
|
||||
const MinerConfig *cfg;
|
||||
} RpcClient;
|
||||
|
||||
void rpc_init(RpcClient *client, const MinerConfig *cfg);
|
||||
|
||||
int rpc_test_connection(RpcClient *client, char **chain_out);
|
||||
int rpc_get_best_block_hash(RpcClient *client, char **hash_out);
|
||||
int rpc_get_block_template(RpcClient *client, BlockTemplate *tpl);
|
||||
int rpc_get_address_script_pubkey(RpcClient *client, const char *wallet_address, char **script_out);
|
||||
int rpc_get_raw_transaction(RpcClient *client, const char *txid, char **raw_tx_out);
|
||||
int rpc_ensure_witness_data(RpcClient *client, BlockTemplate *tpl);
|
||||
int rpc_submit_block(RpcClient *client, const char *serialized_block);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user