Crypto API

The crypto API is available from the full node via websockets.

If you have not set up your websockets connection, please read this article.


Blinding and Un-Blinding

blind

commitment_type graphene::app::crypto_api::blind(const fc::ecc::blind_factor_type &blind, uint64_t value)

blind_sum

blind_factor_type graphene::app::crypto_api::blind_sum(const std::vector<blind_factor_type> &blinds_in, uint32_t non_neg)


Rage Proofs

range_get_info

range_proof_info graphene::app::crypto_api::range_get_info(const std::vector<char> &proof)

range_proof_sign

std::vector<char> graphene::app::crypto_api::range_proof_sign(uint64_t min_value, const commitment_type &commit, const blind_factor_type &commit_blind, const blind_factor_type &nonce, int8_t base10_exp, uint8_t min_bits, uint64_t actual_value)


Verification

verify_sum

bool graphene::app::crypto_api::verify_sum(const std::vector<commitment_type> &commits_in, const std::vector<commitment_type> &neg_commits_in, int64_t excess)

verify_range

verify_range_result graphene::app::crypto_api::verify_range(const fc::ecc::commitment_type &commit, const std::vector<char> &proof)

verify_range_proof_rewind

verify_range_proof_rewind_result graphene::app::crypto_api::verify_range_proof_rewind(const blind_factor_type &nonce, const fc::ecc::commitment_type &commit, const std::vector<char> &proof)