diff --git a/src/lib.rs b/src/lib.rs index ba5a41c..4ea2354 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -//! A rust implementation of BIP352: Silent Payments. This library +//! A rust implementation of BIP352: Silent Payments. This library //! can be used to add silent payment support to wallets. //! //! This library is split up in two parts: sending and receiving. @@ -11,8 +11,8 @@ //! In the meantime, have a look at the [test vectors from the BIP](https://github.com/cygnet3/rust-silentpayments/blob/master/tests/vector_tests.rs) //! to see how to do a simple implementation. //! -//! Alternatively, have a look at [Donation wallet](https://github.com/cygnet3/sp-backend/tree/master), -//! which is a WIP 'silent payments native' wallet. +//! Alternatively, have a look at [Sp client](https://github.com/cygnet3/sp-client/tree/master), +//! which is a WIP wallet client for building silent payment wallets. #![allow(dead_code, non_snake_case)] mod common; mod error; diff --git a/src/receiving.rs b/src/receiving.rs index e4046f8..6d655d8 100644 --- a/src/receiving.rs +++ b/src/receiving.rs @@ -1,15 +1,15 @@ //! The receiving component of silent payments. //! -//! For receiving, we use the `Receiver` struct. +//! For receiving, we use the [`Receiver`] struct. //! This struct does not contain any private key information, //! so as to avoid having access to secret data. //! -//! After creating a `Receiver` object, you can call `scan_transaction`, +//! After creating a [`Receiver`] object, you can call [`scan_transaction`](Receiver::scan_transaction), //! to scan a specific transaction for outputs belonging to this receiver. //! For this, you need to have calculated the `ecdh_shared_secret` beforehand. -//! To do so, you can use `utils::receiving::calculate_shared_secret`. +//! To do so, you can use [`calculate_ecdh_shared_secret`](`crate::utils::receiving::calculate_ecdh_shared_secret`) from the `utils` module. //! -//! For a concrete example, you can have a look at the [vector tests](https://github.com/cygnet3/rust-silentpayments/blob/master/tests/vector_tests.rs). +//! For a concrete example, have a look at the [test vectors](https://github.com/cygnet3/rust-silentpayments/blob/master/tests/vector_tests.rs). use std::{ collections::{HashMap, HashSet}, fmt, @@ -29,6 +29,7 @@ use serde::{ Deserialize, Deserializer, Serialize, }; +/// A Silent payment receiving label. #[derive(Eq, PartialEq, Clone)] pub struct Label { s: Scalar, @@ -103,9 +104,10 @@ impl From