1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
typedef enum LogLevel LogLevel;
typedef struct ProviderHandle ProviderHandle;
void ;
/**
* Start message listening and stabilization.
*
* # Safety
*
* `provider_ptr` must be NULL or a live ProviderHandle returned by
* `rings_node_new_provider_with_callback`. NULL is logged and ignored. Using a
* handle after `rings_node_provider_destroy` is undefined behavior.
*/
void ;
/**
* Request internal rpc api.
*
* # Safety
*
* `provider_ptr` must be NULL or a live ProviderHandle returned by
* `rings_node_new_provider_with_callback`; `method` and `params` must be valid
* null-terminated UTF-8 strings. Returns NULL when request validation or
* execution fails. Every non-NULL returned string must be released exactly once
* with `rings_node_string_free`.
*/
char *;
/**
* Free a string returned by `rings_node_request`.
*
* Passing NULL is a no-op. Passing any pointer not returned by
* `rings_node_request`, or freeing the same pointer twice, is undefined
* behavior.
*/
void ;
/**
* Destroy a ProviderHandle returned by `rings_node_new_provider_with_callback`.
*
* Passing NULL is a no-op. The pointer is invalid after this call. Do not call
* concurrently with other functions that use the same handle.
*/
void ;
/**
* Craft a new Provider with signer.
*
* # Safety
*
* String pointers must be valid null-terminated UTF-8 strings. The signer must
* write exactly 65 signature bytes into the provided output buffer. Returns NULL
* when provider creation fails. The returned handle must be released exactly
* once with `rings_node_provider_destroy`.
*/
struct ProviderHandle *;