I think it should be documented for how long the returned pointer from
label_lookup
should be valid. I think it is obvious it should be valid until the next call of
label_lookup
, but it is currently not clear (from the docs) whether it should remain valid until
secp256k1_silentpayments_recipient_scan_outputs
returns.
The current implementation of
secp256k1_silentpayments_recipient_scan_outputs
does not need this (from looking at the code) and in a safe Rust abstraction for this function (
code, does contain some outdated comments) suggested for
https://github.com/rust-bitcoin/rust-secp256k1/pull/721 (WIP bindings to this pull request’s code) I relied on this
not being a requirement (though that can be changed).