Repository navigation
Expand file tree
/
Copy pathBRCryptoPeer.h
More file actions
60 lines (44 loc) · 1.47 KB
/
Copy pathBRCryptoPeer.h
File metadata and controls
60 lines (44 loc) · 1.47 KB
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
//
// BRCryptoPeer.h
// BRCore
//
// Created by Ed Gamble on 10/17/2019.
// Copyright © 2019 breadwallet. All rights reserved.
//
// See the LICENSE file at the project root for license information.
// See the CONTRIBUTORS file at the project root for a list of contributors.
#ifndef BRCryptoPeer_h
#define BRCryptoPeer_h
#include "BRCryptoBase.h"
#include "BRCryptoNetwork.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct BRCryptoPeerRecord *BRCryptoPeer;
private_extern BRCryptoPeer
cryptoPeerCreate (BRCryptoNetwork network,
const char *address,
uint16_t port,
const char *publicKey);
private_extern BRCryptoPeer
cryptoPeerCreateFromSerialization (BRCryptoNetwork network,
uint8_t *bytes, size_t bytesCount);
extern UInt128
cryptoPeerGetAddrAsInt (BRCryptoPeer peer);
extern BRCryptoNetwork
cryptoPeerGetNetwork (BRCryptoPeer peer);
extern const char *
cryptoPeerGetAddress (BRCryptoPeer peer);
extern uint16_t
cryptoPeerGetPort (BRCryptoPeer peer);
extern const char *
cryptoPeerGetPublicKey (BRCryptoPeer peer);
extern uint8_t *
cryptoPeerSerialize (BRCryptoPeer peer, size_t *bytesCount);
extern BRCryptoBoolean
cryptoPeerIsIdentical (BRCryptoPeer p1, BRCryptoPeer p2);
DECLARE_CRYPTO_GIVE_TAKE (BRCryptoPeer, cryptoPeer);
#ifdef __cplusplus
}
#endif
#endif /* BRCryptoPeer_h */