Line data Source code
1 : #include "../../util/fd_util.h"
2 :
3 : #include "../../ballet/txn/fd_txn.h"
4 : #include "../../flamenco/runtime/fd_blockstore.h"
5 :
6 : typedef struct fd_webserver fd_webserver_t;
7 :
8 : typedef enum {
9 : FD_ENC_BASE58, FD_ENC_BASE64, FD_ENC_BASE64_ZSTD, FD_ENC_JSON, FD_ENC_JSON_PARSED
10 : } fd_rpc_encoding_t;
11 :
12 : enum fd_block_detail { FD_BLOCK_DETAIL_FULL, FD_BLOCK_DETAIL_ACCTS, FD_BLOCK_DETAIL_SIGS, FD_BLOCK_DETAIL_NONE };
13 :
14 : const char* fd_txn_meta_to_json( fd_webserver_t * ws,
15 : const void * meta_raw,
16 : ulong meta_raw_sz );
17 :
18 : const char* fd_txn_to_json( fd_webserver_t * ws,
19 : fd_txn_t* txn,
20 : const uchar* raw,
21 : ulong raw_sz,
22 : fd_rpc_encoding_t encoding,
23 : long maxvers,
24 : enum fd_block_detail detail );
25 :
26 : const char* fd_block_to_json( fd_webserver_t * ws,
27 : fd_blockstore_t * blockstore,
28 : int blockstore_fd,
29 : const char * call_id,
30 : const uchar * blk_data,
31 : ulong blk_sz,
32 : fd_block_info_t * meta,
33 : fd_hash_t * parent_hash,
34 : fd_rpc_encoding_t encoding,
35 : long maxvers,
36 : enum fd_block_detail detail,
37 : fd_block_rewards_t * rewards );
38 :
39 0 : #define FD_LONG_UNSET (1L << 63L)
40 :
41 : const char* fd_account_to_json( fd_webserver_t * ws,
42 : fd_pubkey_t acct,
43 : fd_rpc_encoding_t enc,
44 : uchar const * val,
45 : ulong val_sz,
46 : long off,
47 : long len );
|