Skip to content

Commit 03fe3c2

Browse files
authored
feat: Update ffi headers (#183)
1 parent 4f39f84 commit 03fe3c2

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

dash-spv-ffi/include/dash_spv_ffi.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef DASH_SPV_FFI_H
44
#define DASH_SPV_FFI_H
55

6-
/* Generated with cbindgen:0.29.0 */
6+
/* Generated with cbindgen:0.29.2 */
77

88
/* Warning: This file is auto-generated by cbindgen. Do not modify manually. */
99

@@ -16,11 +16,6 @@
1616
namespace dash_spv_ffi {
1717
#endif // __cplusplus
1818

19-
typedef enum FFIMempoolStrategy {
20-
FetchAll = 0,
21-
BloomFilter = 1,
22-
} FFIMempoolStrategy;
23-
2419
typedef enum FFISyncStage {
2520
Connecting = 0,
2621
QueryingHeight = 1,
@@ -34,6 +29,11 @@ typedef enum FFISyncStage {
3429
Failed = 9,
3530
} FFISyncStage;
3631

32+
typedef enum FFIMempoolStrategy {
33+
FetchAll = 0,
34+
BloomFilter = 1,
35+
} FFIMempoolStrategy;
36+
3737
typedef enum DashSpvValidationMode {
3838
None = 0,
3939
Basic = 1,

key-wallet-ffi/include/key_wallet_ffi.h

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef KEY_WALLET_FFI_H
1212
#define KEY_WALLET_FFI_H
1313

14-
/* Generated with cbindgen:0.29.0 */
14+
/* Generated with cbindgen:0.29.2 */
1515

1616
/* Warning: This file is auto-generated by cbindgen. Do not modify manually. */
1717

@@ -25,30 +25,14 @@
2525
#include <stdbool.h>
2626

2727
/*
28-
FFI Account Creation Option Type
28+
FFI Network type (single network)
2929
*/
3030
typedef enum {
31-
/*
32-
Create default accounts (BIP44 account 0, CoinJoin account 0, and special accounts)
33-
*/
34-
DEFAULT = 0,
35-
/*
36-
Create all specified accounts plus all special purpose accounts
37-
*/
38-
ALL_ACCOUNTS = 1,
39-
/*
40-
Create only BIP44 accounts (no CoinJoin or special accounts)
41-
*/
42-
BIP44_ACCOUNTS_ONLY = 2,
43-
/*
44-
Create specific accounts with full control
45-
*/
46-
SPECIFIC_ACCOUNTS = 3,
47-
/*
48-
Create no accounts at all
49-
*/
50-
NO_ACCOUNTS = 4,
51-
} FFIAccountCreationOptionType;
31+
DASH = 0,
32+
TESTNET = 1,
33+
REGTEST = 2,
34+
DEVNET = 3,
35+
} FFINetwork;
5236

5337
/*
5438
Account type enumeration matching all key_wallet AccountType variants
@@ -111,22 +95,16 @@ typedef enum {
11195
} FFIAccountType;
11296

11397
/*
114-
Address pool type
98+
FFI Network type (bit flags for multiple networks)
11599
*/
116100
typedef enum {
117-
/*
118-
External (receive) addresses
119-
*/
120-
EXTERNAL = 0,
121-
/*
122-
Internal (change) addresses
123-
*/
124-
INTERNAL = 1,
125-
/*
126-
Single pool (for non-standard accounts)
127-
*/
128-
SINGLE = 2,
129-
} FFIAddressPoolType;
101+
NO_NETWORKS = 0,
102+
DASH_FLAG = 1,
103+
TESTNET_FLAG = 2,
104+
REGTEST_FLAG = 4,
105+
DEVNET_FLAG = 8,
106+
ALL_NETWORKS = 15,
107+
} FFINetworks;
130108

131109
/*
132110
FFI Error code
@@ -147,6 +125,24 @@ typedef enum {
147125
INTERNAL_ERROR = 12,
148126
} FFIErrorCode;
149127

128+
/*
129+
Address pool type
130+
*/
131+
typedef enum {
132+
/*
133+
External (receive) addresses
134+
*/
135+
EXTERNAL = 0,
136+
/*
137+
Internal (change) addresses
138+
*/
139+
INTERNAL = 1,
140+
/*
141+
Single pool (for non-standard accounts)
142+
*/
143+
SINGLE = 2,
144+
} FFIAddressPoolType;
145+
150146
/*
151147
Language enumeration for mnemonic generation
152148
@@ -167,28 +163,6 @@ typedef enum {
167163
SPANISH = 9,
168164
} FFILanguage;
169165

170-
/*
171-
FFI Network type (single network)
172-
*/
173-
typedef enum {
174-
DASH = 0,
175-
TESTNET = 1,
176-
REGTEST = 2,
177-
DEVNET = 3,
178-
} FFINetwork;
179-
180-
/*
181-
FFI Network type (bit flags for multiple networks)
182-
*/
183-
typedef enum {
184-
NO_NETWORKS = 0,
185-
DASH_FLAG = 1,
186-
TESTNET_FLAG = 2,
187-
REGTEST_FLAG = 4,
188-
DEVNET_FLAG = 8,
189-
ALL_NETWORKS = 15,
190-
} FFINetworks;
191-
192166
/*
193167
FFI-compatible transaction context
194168
*/
@@ -207,6 +181,32 @@ typedef enum {
207181
IN_CHAIN_LOCKED_BLOCK = 2,
208182
} FFITransactionContext;
209183

184+
/*
185+
FFI Account Creation Option Type
186+
*/
187+
typedef enum {
188+
/*
189+
Create default accounts (BIP44 account 0, CoinJoin account 0, and special accounts)
190+
*/
191+
DEFAULT = 0,
192+
/*
193+
Create all specified accounts plus all special purpose accounts
194+
*/
195+
ALL_ACCOUNTS = 1,
196+
/*
197+
Create only BIP44 accounts (no CoinJoin or special accounts)
198+
*/
199+
BIP44_ACCOUNTS_ONLY = 2,
200+
/*
201+
Create specific accounts with full control
202+
*/
203+
SPECIFIC_ACCOUNTS = 3,
204+
/*
205+
Create no accounts at all
206+
*/
207+
NO_ACCOUNTS = 4,
208+
} FFIAccountCreationOptionType;
209+
210210
/*
211211
Opaque account handle
212212
*/

0 commit comments

Comments
 (0)