zcash-sync/binding.h

147 lines
3.3 KiB
C
Raw Normal View History

2022-06-09 04:28:37 -07:00
#ifndef __APPLE__
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int uint16_t;
typedef long long int int64_t;
typedef long long int uint64_t;
typedef long long int uintptr_t;
typedef long int int32_t;
typedef long int uint32_t;
typedef char bool;
#endif
typedef void *DartPostCObjectFnType;
2022-07-13 20:22:12 -07:00
#define QR_DATA_SIZE 256
2022-06-08 05:48:16 -07:00
2022-08-18 21:07:55 -07:00
#define N 200000
2022-07-13 20:22:12 -07:00
void dummy_export(void);
2022-06-22 06:03:49 -07:00
2022-06-08 05:48:16 -07:00
void dart_post_cobject(DartPostCObjectFnType ptr);
2022-07-13 20:22:12 -07:00
void deallocate_str(char *s);
2022-06-16 03:13:58 -07:00
bool get_error(void);
2022-06-22 06:03:49 -07:00
char *get_error_msg(void);
2022-06-08 05:48:16 -07:00
void init_wallet(char *db_path);
void set_active(uint8_t active);
void set_active_account(uint8_t coin, uint32_t id);
void set_coin_lwd_url(uint8_t coin, char *lwd_url);
2022-07-14 18:12:25 -07:00
char *get_lwd_url(uint8_t coin);
2022-06-08 05:48:16 -07:00
void reset_app(void);
uint32_t new_account(uint8_t coin, char *name, char *data, int32_t index);
2022-07-16 20:23:56 -07:00
void new_sub_account(char *name, int32_t index, uint32_t count);
void import_transparent_key(uint8_t coin, uint32_t id_account, char *path);
2022-06-08 05:48:16 -07:00
2022-07-23 06:25:08 -07:00
void import_transparent_secret_key(uint8_t coin, uint32_t id_account, char *secret_key);
2022-07-21 18:08:29 -07:00
void cancel_warp(void);
2022-07-30 16:11:58 -07:00
uint8_t warp(uint8_t coin, bool get_tx, uint32_t anchor_offset, uint32_t max_cost, int64_t port);
2022-06-08 05:48:16 -07:00
int8_t is_valid_key(uint8_t coin, char *key);
bool valid_address(uint8_t coin, char *address);
char *new_diversified_address(void);
uint32_t get_latest_height(void);
char *send_multi_payment(char *recipients_json,
bool use_transparent,
uint32_t anchor_offset,
int64_t port);
void skip_to_last_height(uint8_t coin);
void rewind_to_height(uint32_t height);
int64_t mempool_sync(void);
void mempool_reset(void);
int64_t get_mempool_balance(void);
uint64_t get_taddr_balance(uint8_t coin, uint32_t id_account);
char *shield_taddr(void);
void scan_transparent_accounts(uint32_t gap_limit);
char *prepare_multi_payment(char *recipients_json, bool use_transparent, uint32_t anchor_offset);
2022-06-20 02:05:11 -07:00
char *sign(char *tx, int64_t port);
2022-06-08 05:48:16 -07:00
2022-06-20 02:05:11 -07:00
char *broadcast_tx(char *tx_str);
2022-06-08 05:48:16 -07:00
uint32_t get_activation_date(void);
uint32_t get_block_by_time(uint32_t time);
uint32_t sync_historical_prices(int64_t now, uint32_t days, char *currency);
void store_contact(uint32_t id, char *name, char *address, bool dirty);
char *commit_unsaved_contacts(uint32_t anchor_offset);
void mark_message_read(uint32_t message, bool read);
void mark_all_messages_read(bool read);
void truncate_data(void);
void delete_account(uint8_t coin, uint32_t account);
char *make_payment_uri(char *address, uint64_t amount, char *memo);
char *parse_payment_uri(char *uri);
char *generate_random_enc_key(void);
char *get_full_backup(char *key);
2022-06-22 06:03:49 -07:00
void restore_full_backup(char *key, char *backup);
2022-06-20 02:05:11 -07:00
char *split_data(uint32_t id, char *data);
char *merge_data(char *drop);
2022-06-21 17:18:47 -07:00
2022-07-13 20:22:12 -07:00
char *get_tx_summary(char *tx);
char *get_best_server(char **servers, uint32_t count);
2022-07-17 19:55:57 -07:00
2022-07-21 18:08:29 -07:00
void import_from_zwl(uint8_t coin, char *name, char *data);
2022-07-26 19:11:36 -07:00
char *derive_zip32(uint8_t coin,
uint32_t id_account,
uint32_t account,
uint32_t external,
bool has_address,
uint32_t address);
2022-08-13 19:56:42 -07:00
2022-08-16 07:47:48 -07:00
uintptr_t get_downloaded_size(void);
uintptr_t get_trial_decryptions_count(void);
2022-08-21 09:40:14 -07:00
void disable_wal(char *db_path);
2022-08-13 19:56:42 -07:00
bool has_cuda(void);
2022-08-18 21:07:55 -07:00
bool has_metal(void);
2022-08-21 10:48:34 -07:00
bool has_gpu(void);
void use_gpu(bool v);
2022-08-26 05:54:52 -07:00
void import_sync_file(uint8_t coin, char *path);