Commit Graph

27 Commits

Author SHA1 Message Date
cygnet 97c749b0d2
Add sending and receiving features (#21)
* Add sending and receiving features and enable them by default

* Add feature attributes in code and tests

* Add serde as dev-dependency

* Small improvements to sending docs
2023-08-23 00:32:34 +02:00
cygnet eaef44177a
Change Cygnet -> cygnet (#19) 2023-08-22 22:40:24 +02:00
cygnet 997065d3e3
Make crate publishable (#18)
* Add About section to README

* Expand package description in Cargo.toml

* Rename rust-secp256k1 -> secp256k1

* Make NULL_LABEL const public
2023-08-22 22:35:06 +02:00
cygnet 0d28b61730
Improve receiver interface (#16)
* Copy recipient code structure from Sosthene00 fork

* Move SilentPayment struct to receiving

* Provide shared_secret as input argument for scan_for_outputs

Also refactors a number of things to enable this change: calculate A_sum
and outpoints_hash in the test code instead of the library, remove the
obsolete hash_outpoints function from the library move calculate_P_n
and calculate_t_n to utils.rs.

* Add debug trait implementation for Label

* Refactoring

* Add get_receiving_address function for getting sp-address per label

* Refactor scan_for_outputs and rename to scan_transaction

* Provide tweak data to scan_transaction function

* Expand README.me
2023-08-22 21:56:08 +02:00
cygnet bd7962db21
Downgrade secp256k1 to 0.24 (#15) 2023-08-17 15:28:32 +02:00
cygnet 9f835ffc8d
Remove Cargo.lock from source control (#14) 2023-08-16 00:21:06 +02:00
cygnet c3b8d65e03
Improve sender interface (#10)
* Refactor tests: add utils.rs for test helper functions

* Refactor sending

* Add SilentPaymentAddress struct

* Use structs instead of tuples as func arguments

* Change create_outputs function and remove amounts

* Use is_testnet in SilentPaymentAddress struct

* Provide pre-computed tweak data to create_outputs function

* Git rebase main

* Provide ecdh shared secret as argument to create_output

* Rename create_outputs -> generate_recipient_pubkeys
2023-08-15 20:06:58 +02:00
cygnet cd09955b30
Update test vectors to August 4 version (#12) 2023-08-07 02:02:15 +02:00
cygnet ad2c5b0e72
8 remove all unwrap (#9)
* Remove all unwraps from sending

* Remove unwraps from receiving

* Move Result type to utils
2023-07-24 23:15:04 +02:00
cygnet a7001e4a3d
Update README.md (#4) 2023-07-24 00:29:12 +02:00
cygnet 547afabfeb
Resolve "Separate test logic from the library functions" (#3)
* Remove all references to input.rs from other files

* Move test vector test to integration test folder

* Move test vector file into integration test folder

* Move input.rs to tests folder
2023-07-24 00:22:44 +02:00
cygnet 9f7ea9191f
Merge pull request #1 from cygnet3/convert-to-library
Convert project to library
2023-07-23 22:56:17 +02:00
cygnet 74d6050151 Format test 2023-07-23 22:36:23 +02:00
cygnet 6c83881619 Convert project to library 2023-07-23 21:42:34 +02:00
cygnet a6071f7df7 Change README 2023-07-23 17:36:44 +02:00
cygnet 957a59016d Change format test vector: label value in hex format 2023-07-23 17:14:59 +02:00
cygnet 0ac736bd54 Move functions to utils.rs 2023-07-23 15:05:23 +02:00
cygnet ec503564bc Add check sending outputs equal receiving given outputs 2023-07-23 14:15:45 +02:00
cygnet 6d0d7854e6 Add label support for scanning 2023-07-23 14:15:45 +02:00
cygnet 2d55f9fa49 Add create_labeled_silent_payment_address function 2023-07-23 14:15:45 +02:00
cygnet fcb11d0208 Add multiple receiving outputs 2023-07-23 14:15:45 +02:00
cygnet 3194cb2d56 Extract calculate functions from scanning function 2023-07-23 14:15:45 +02:00
cygnet 8715e492a2 Use x_only public keys, cleanup 2023-07-23 14:15:45 +02:00
cygnet f7f34ffa64 Add verify receiving signatures 2023-07-23 14:15:45 +02:00
cygnet c0f10c4781 Partially implemented receiving 2023-07-23 14:15:45 +02:00
cygnet c634c3a191 Implement sending 2023-07-23 14:15:45 +02:00
cygnet ba99f4831b Initial commit 2023-07-23 14:15:45 +02:00