forked from trustwallet/wallet-core
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTWBravoAddress.h
More file actions
44 lines (31 loc) · 1.31 KB
/
TWBravoAddress.h
File metadata and controls
44 lines (31 loc) · 1.31 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
#pragma once
#include "TWBase.h"
#include "TWData.h"
#include "TWString.h"
#include "TWBravoAddressType.h"
TW_EXTERN_C_BEGIN
struct TWPublicKey;
/// Represents a Bravo address.
TW_EXPORT_CLASS
struct TWBravoAddress;
/// Compares two addresses for equality.
TW_EXPORT_STATIC_METHOD
bool TWBravoAddressEqual(struct TWBravoAddress *_Nonnull lhs, struct TWBravoAddress *_Nonnull rhs);
/// Determines if the string is a valid address.
TW_EXPORT_STATIC_METHOD
bool TWBravoAddressIsValidString(TWString *_Nonnull string);
/// Creates an address from a string representaion.
TW_EXPORT_STATIC_METHOD
struct TWBravoAddress *_Nullable TWBravoAddressCreateWithString(TWString *_Nonnull string);
/// Creates an address from a public key.
TW_EXPORT_STATIC_METHOD
struct TWBravoAddress *_Nonnull TWBravoAddressCreateWithPublicKey(struct TWPublicKey *_Nonnull publicKey, enum TWBravoAddressType type);
/// Creates an address from a key hash.
TW_EXPORT_STATIC_METHOD
struct TWBravoAddress *_Nullable TWBravoAddressCreateWithKeyHash(TWData *_Nonnull keyHash, enum TWBravoAddressType type);
TW_EXPORT_METHOD
void TWBravoAddressDelete(struct TWBravoAddress *_Nonnull address);
/// Returns the address string representation.
TW_EXPORT_PROPERTY
TWString *_Nonnull TWBravoAddressDescription(struct TWBravoAddress *_Nonnull address);
TW_EXTERN_C_END