You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you only need the type definitions (`Network` and `SilentPaymentAddress`) without any protocol functionality:
30
+
31
+
```toml
32
+
[dependencies]
33
+
silentpayments = { version = "0.4", default-features = false }
34
+
```
35
+
36
+
This configuration only pulls in `secp256k1` as a dependency, significantly reducing the dependency tree for applications that only need to work with silent payment addresses without implementing the full protocol.
37
+
38
+
**Bring Your Own Parser**: Even without the `encode` feature, you can construct a `SilentPaymentAddress` using `SilentPaymentAddress::new()` if you parse the bech32 yourself. This is useful if your application already has a bech32 parser and you want to avoid duplicate dependencies. The constructor documentation includes the complete bech32 format specification.
39
+
40
+
### Custom Feature Combinations
41
+
42
+
You can enable only the features you need:
43
+
44
+
```toml
45
+
# Just types and string encoding (no protocol implementation)
46
+
silentpayments = { version = "0.4", default-features = false, features = ["encode"] }
47
+
48
+
# Types with serde support (no protocol or encoding)
49
+
silentpayments = { version = "0.4", default-features = false, features = ["serde"] }
50
+
51
+
# Only sending capability
52
+
silentpayments = { version = "0.4", default-features = false, features = ["sending"] }
53
+
54
+
# Only receiving capability
55
+
silentpayments = { version = "0.4", default-features = false, features = ["receiving"] }
56
+
```
57
+
17
58
## Sending
18
59
19
60
For sending to a silent payment address, you can call the `sender::generate_recipient_pubkeys` function.
0 commit comments