-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitcoin.h
44 lines (30 loc) · 1.1 KB
/
bitcoin.h
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
#ifndef BITCOIN_H
#define BITCOIN_H
#include "wallet.h"
#include "transaction.h"
typedef struct Params {
unsigned long int bid;
char *walletId;
unsigned long int v;
} ht_bitcoin_params;
typedef struct BitCoin *bitcoin;
typedef struct Node *bcNode;
void bcTrace(bitcoin bc, unsigned long int *value, unsigned long int *transactions, unsigned long int *unspent,
bool traceTransaction, bool printTransactions);
bool bcInsert(bitcoin bc, unsigned long int *rest, unsigned long int *amount, Transaction transaction);
unsigned long int bcGetAmount(bitcoin bc, char *walletId);
bool bcPrint(bitcoin bc);
long unsigned int bcGetId(bitcoin bc);
/* Create
* Initialize & return a new wallet*/
bitcoin bcCreate(ht_bitcoin_params *htBitCoinParams);
/* @Callback
* Compare trees function for bitcoins hashtable*/
int bcCompare(bitcoin bc1, bitcoin bc2);
/* @Callback
* Hash function for bitcoins hashtable*/
unsigned long int bitcoinHash(const long int *bid, unsigned long int capacity);
/* @Callback
* Compare keys function for wallets hashtable*/
void bcDestroy(bitcoin bc);
#endif //BITCOIN_H