38 lines
1.7 KiB
C
38 lines
1.7 KiB
C
#ifndef DIDACTYL_CASHU_WALLET_H
|
|
#define DIDACTYL_CASHU_WALLET_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "config.h"
|
|
#include "cjson/cJSON.h"
|
|
#include "../nostr_core_lib/nostr_core/nostr_signer.h"
|
|
|
|
int cashu_wallet_init(didactyl_config_t* cfg);
|
|
void cashu_wallet_set_signer(nostr_signer_t* signer);
|
|
void cashu_wallet_cleanup(void);
|
|
|
|
int cashu_wallet_load_from_relays(void);
|
|
int cashu_wallet_create_new_from_config(void);
|
|
int cashu_wallet_has_default_mint(void);
|
|
|
|
int cashu_wallet_balance(cJSON** out_json);
|
|
int cashu_wallet_info(const char* mint_url, cJSON** out_json);
|
|
int cashu_wallet_mint_quote(const char* mint_url, uint64_t amount, const char* unit, cJSON** out_json);
|
|
int cashu_wallet_mint_check(const char* mint_url, const char* quote_id, cJSON** out_json);
|
|
int cashu_wallet_mint_claim(const char* mint_url, const char* quote_id, uint64_t amount, cJSON** out_json);
|
|
int cashu_wallet_melt_quote(const char* mint_url, const char* payment_request, const char* unit, cJSON** out_json);
|
|
int cashu_wallet_melt_pay(const char* mint_url, const char* quote_id, cJSON** out_json);
|
|
int cashu_wallet_check_proofs(const char* mint_url, cJSON** out_json);
|
|
int cashu_wallet_receive_token(const char* token_string, const char* mint_url, cJSON** out_json);
|
|
int cashu_wallet_send_token(const char* mint_url, uint64_t amount, const char* format, cJSON** out_json);
|
|
int cashu_wallet_mints_get(cJSON** out_json);
|
|
int cashu_wallet_mints_set(const char** wallet_mints,
|
|
int wallet_mint_count,
|
|
const char** public_mints,
|
|
int public_mint_count,
|
|
int set_wallet,
|
|
int set_public,
|
|
cJSON** out_json);
|
|
|
|
#endif
|