@@ -374,9 +374,9 @@ inline int ae_signer_commit_from_bytes(const PRIV_KEY& priv_key, const BYTES& by
374
374
}
375
375
376
376
template <class PUB_KEY , class BYTES , class ENTROPY , class S2C_OPENING , class SIG >
377
- inline int ae_verify (const PUB_KEY& pub_key, const BYTES& bytes, const ENTROPY& entropy, const S2C_OPENING& s2c_opening, uint32_t flags, const SIG& sig) {
377
+ inline bool ae_verify (const PUB_KEY& pub_key, const BYTES& bytes, const ENTROPY& entropy, const S2C_OPENING& s2c_opening, uint32_t flags, const SIG& sig) {
378
378
int ret = ::wally_ae_verify (pub_key.data (), pub_key.size (), bytes.data (), bytes.size (), entropy.data (), entropy.size (), s2c_opening.data (), s2c_opening.size (), flags, sig.data (), sig.size ());
379
- return detail::check_ret (__FUNCTION__, ret) ;
379
+ return ret == WALLY_OK ;
380
380
}
381
381
382
382
template <class KEY , class BYTES , class BYTES_OUT >
@@ -630,9 +630,9 @@ inline int ec_private_key_bip341_tweak(const PRIV_KEY& priv_key, const MERKLE_RO
630
630
}
631
631
632
632
template <class PRIV_KEY >
633
- inline int ec_private_key_verify (const PRIV_KEY& priv_key) {
633
+ inline bool ec_private_key_verify (const PRIV_KEY& priv_key) {
634
634
int ret = ::wally_ec_private_key_verify (priv_key.data (), priv_key.size ());
635
- return detail::check_ret (__FUNCTION__, ret) ;
635
+ return ret == WALLY_OK ;
636
636
}
637
637
638
638
template <class PUB_KEY , class MERKLE_ROOT , class BYTES_OUT >
@@ -660,9 +660,9 @@ inline int ec_public_key_negate(const PUB_KEY& pub_key, BYTES_OUT& bytes_out) {
660
660
}
661
661
662
662
template <class PUB_KEY >
663
- inline int ec_public_key_verify (const PUB_KEY& pub_key) {
663
+ inline bool ec_public_key_verify (const PUB_KEY& pub_key) {
664
664
int ret = ::wally_ec_public_key_verify (pub_key.data (), pub_key.size ());
665
- return detail::check_ret (__FUNCTION__, ret) ;
665
+ return ret == WALLY_OK ;
666
666
}
667
667
668
668
template <class SCALAR , class OPERAND , class BYTES_OUT >
@@ -702,9 +702,9 @@ inline int ec_scalar_subtract_from(SCALAR& scalar, const OPERAND& operand) {
702
702
}
703
703
704
704
template <class SCALAR >
705
- inline int ec_scalar_verify (const SCALAR& scalar) {
705
+ inline bool ec_scalar_verify (const SCALAR& scalar) {
706
706
int ret = ::wally_ec_scalar_verify (scalar.data (), scalar.size ());
707
- return detail::check_ret (__FUNCTION__, ret) ;
707
+ return ret == WALLY_OK ;
708
708
}
709
709
710
710
template <class PRIV_KEY , class BYTES , class BYTES_OUT >
@@ -756,15 +756,15 @@ inline int ec_sig_to_public_key(const BYTES& bytes, const SIG& sig, BYTES_OUT& b
756
756
}
757
757
758
758
template <class PUB_KEY , class BYTES , class SIG >
759
- inline int ec_sig_verify (const PUB_KEY& pub_key, const BYTES& bytes, uint32_t flags, const SIG& sig) {
759
+ inline bool ec_sig_verify (const PUB_KEY& pub_key, const BYTES& bytes, uint32_t flags, const SIG& sig) {
760
760
int ret = ::wally_ec_sig_verify (pub_key.data (), pub_key.size (), bytes.data (), bytes.size (), flags, sig.data (), sig.size ());
761
- return detail::check_ret (__FUNCTION__, ret) ;
761
+ return ret == WALLY_OK ;
762
762
}
763
763
764
764
template <class PUB_KEY >
765
- inline int ec_xonly_public_key_verify (const PUB_KEY& pub_key) {
765
+ inline bool ec_xonly_public_key_verify (const PUB_KEY& pub_key) {
766
766
int ret = ::wally_ec_xonly_public_key_verify (pub_key.data (), pub_key.size ());
767
- return detail::check_ret (__FUNCTION__, ret) ;
767
+ return ret == WALLY_OK ;
768
768
}
769
769
770
770
template <class PUB_KEY , class PRIV_KEY , class BYTES_OUT >
@@ -819,9 +819,9 @@ inline int hex_n_to_bytes(const HEX& hex, size_t hex_len, BYTES_OUT& bytes_out,
819
819
}
820
820
821
821
template <class HEX >
822
- inline int hex_n_verify (const HEX& hex, size_t hex_len) {
822
+ inline bool hex_n_verify (const HEX& hex, size_t hex_len) {
823
823
int ret = ::wally_hex_n_verify (detail::get_p (hex), hex_len);
824
- return detail::check_ret (__FUNCTION__, ret) ;
824
+ return ret == WALLY_OK ;
825
825
}
826
826
827
827
template <class HEX , class BYTES_OUT >
@@ -830,9 +830,9 @@ inline int hex_to_bytes(const HEX& hex, BYTES_OUT& bytes_out, size_t* written) {
830
830
return detail::check_ret (__FUNCTION__, ret);
831
831
}
832
832
833
- inline int hex_verify (const char * hex) {
833
+ inline bool hex_verify (const char * hex) {
834
834
int ret = ::wally_hex_verify (hex);
835
- return detail::check_ret (__FUNCTION__, ret) ;
835
+ return ret == WALLY_OK ;
836
836
}
837
837
838
838
template <class KEY , class BYTES , class BYTES_OUT >
@@ -858,9 +858,9 @@ inline int is_elements_build(size_t* written) {
858
858
}
859
859
860
860
template <class KEY , class VAL >
861
- inline int keypath_bip32_verify (const KEY& key, const VAL& val) {
861
+ inline bool keypath_bip32_verify (const KEY& key, const VAL& val) {
862
862
int ret = ::wally_keypath_bip32_verify (key.data (), key.size (), val.data (), val.size ());
863
- return detail::check_ret (__FUNCTION__, ret) ;
863
+ return ret == WALLY_OK ;
864
864
}
865
865
866
866
template <class VAL , class BYTES_OUT >
@@ -882,15 +882,15 @@ inline int keypath_get_path_len(const VAL& val, size_t* written) {
882
882
}
883
883
884
884
template <class KEY , class VAL >
885
- inline int keypath_public_key_verify (const KEY& key, const VAL& val) {
885
+ inline bool keypath_public_key_verify (const KEY& key, const VAL& val) {
886
886
int ret = ::wally_keypath_public_key_verify (key.data (), key.size (), val.data (), val.size ());
887
- return detail::check_ret (__FUNCTION__, ret) ;
887
+ return ret == WALLY_OK ;
888
888
}
889
889
890
890
template <class KEY , class VAL >
891
- inline int keypath_xonly_public_key_verify (const KEY& key, const VAL& val) {
891
+ inline bool keypath_xonly_public_key_verify (const KEY& key, const VAL& val) {
892
892
int ret = ::wally_keypath_xonly_public_key_verify (key.data (), key.size (), val.data (), val.size ());
893
- return detail::check_ret (__FUNCTION__, ret) ;
893
+ return ret == WALLY_OK ;
894
894
}
895
895
896
896
template <class MAP_IN , class KEY , class VALUE >
@@ -988,9 +988,9 @@ inline int map_get_num_items(const MAP_IN& map_in, size_t* written) {
988
988
}
989
989
990
990
template <class KEY , class VAL >
991
- inline int map_hash_preimage_verify (const KEY& key, const VAL& val) {
991
+ inline bool map_hash_preimage_verify (const KEY& key, const VAL& val) {
992
992
int ret = ::wally_map_hash_preimage_verify (key.data (), key.size (), val.data (), val.size ());
993
- return detail::check_ret (__FUNCTION__, ret) ;
993
+ return ret == WALLY_OK ;
994
994
}
995
995
996
996
inline int map_init (size_t allocation_len, wally_map_verify_fn_t verify_fn, struct wally_map * output) {
@@ -1109,9 +1109,9 @@ inline int map_sort(const MAP_IN& map_in, uint32_t flags) {
1109
1109
}
1110
1110
1111
1111
template <class KEY , class VAL >
1112
- inline int merkle_path_xonly_public_key_verify (const KEY& key, const VAL& val) {
1112
+ inline bool merkle_path_xonly_public_key_verify (const KEY& key, const VAL& val) {
1113
1113
int ret = ::wally_merkle_path_xonly_public_key_verify (key.data (), key.size (), val.data (), val.size ());
1114
- return detail::check_ret (__FUNCTION__, ret) ;
1114
+ return ret == WALLY_OK ;
1115
1115
}
1116
1116
1117
1117
template <class PASS , class SALT , class BYTES_OUT >
@@ -1612,9 +1612,9 @@ inline int ripemd160(const BYTES& bytes, BYTES_OUT& bytes_out) {
1612
1612
}
1613
1613
1614
1614
template <class SIG , class S2C_DATA , class S2C_OPENING >
1615
- inline int s2c_commitment_verify (const SIG& sig, const S2C_DATA& s2c_data, const S2C_OPENING& s2c_opening, uint32_t flags) {
1615
+ inline bool s2c_commitment_verify (const SIG& sig, const S2C_DATA& s2c_data, const S2C_OPENING& s2c_opening, uint32_t flags) {
1616
1616
int ret = ::wally_s2c_commitment_verify (sig.data (), sig.size (), s2c_data.data (), s2c_data.size (), s2c_opening.data (), s2c_opening.size (), flags);
1617
- return detail::check_ret (__FUNCTION__, ret) ;
1617
+ return ret == WALLY_OK ;
1618
1618
}
1619
1619
1620
1620
template <class PRIV_KEY , class BYTES , class S2C_DATA , class S2C_OPENING_OUT , class BYTES_OUT >
@@ -2326,9 +2326,9 @@ inline int explicit_rangeproof(uint64_t value, const NONCE& nonce, const VBF& vb
2326
2326
}
2327
2327
2328
2328
template <class RANGEPROOF , class COMMITMENT , class GENERATOR >
2329
- inline int explicit_rangeproof_verify (const RANGEPROOF& rangeproof, uint64_t value, const COMMITMENT& commitment, const GENERATOR& generator) {
2329
+ inline bool explicit_rangeproof_verify (const RANGEPROOF& rangeproof, uint64_t value, const COMMITMENT& commitment, const GENERATOR& generator) {
2330
2330
int ret = ::wally_explicit_rangeproof_verify (rangeproof.data (), rangeproof.size (), value, commitment.data (), commitment.size (), generator.data (), generator.size ());
2331
- return detail::check_ret (__FUNCTION__, ret) ;
2331
+ return ret == WALLY_OK ;
2332
2332
}
2333
2333
2334
2334
template <class OUTPUT_ASSET , class OUTPUT_ABF , class OUTPUT_GENERATOR , class BYTES_OUT >
@@ -2338,9 +2338,9 @@ inline int explicit_surjectionproof(const OUTPUT_ASSET& output_asset, const OUTP
2338
2338
}
2339
2339
2340
2340
template <class SURJECTIONPROOF , class OUTPUT_ASSET , class OUTPUT_GENERATOR >
2341
- inline int explicit_surjectionproof_verify (const SURJECTIONPROOF& surjectionproof, const OUTPUT_ASSET& output_asset, const OUTPUT_GENERATOR& output_generator) {
2341
+ inline bool explicit_surjectionproof_verify (const SURJECTIONPROOF& surjectionproof, const OUTPUT_ASSET& output_asset, const OUTPUT_GENERATOR& output_generator) {
2342
2342
int ret = ::wally_explicit_surjectionproof_verify (surjectionproof.data (), surjectionproof.size (), output_asset.data (), output_asset.size (), output_generator.data (), output_generator.size ());
2343
- return detail::check_ret (__FUNCTION__, ret) ;
2343
+ return ret == WALLY_OK ;
2344
2344
}
2345
2345
2346
2346
template <class PSBT , class SCALAR >
0 commit comments