Skip to content

PolymeshAssociation/polymesh-private-proof-api

Repository files navigation

Discord Twitter Follow

Polymesh

Polymesh Private Proof Server

This repository provides functionality to interact with Confidential Assets on Polymesh.

Functionality is split into:

Proof API

The Proof API provides endpoints to allow users to:

  • Generate and Store Confidential Accounts: A confidential account is an Elgamal Key pair used to store encrypted balances and generate proofs with respect to those balances.
  • Generate Sender Proofs: Proofs are required when transacting confidential assets on Polymesh - these proofs establish the validity of transactions, without revealing their underlying balances.
  • Verify Proofs: Mediators and asset receivers need to verify sender proofs to check that they are referencing expected amounts and other details.
  • Decrypt Amounts: Investors can decrypt their encrypted on-chain balances, using their stored confidential accounts.

Build and Run

The Proof API can be built via:

cd proof-api
cargo build --release

Once built, you must set the DATABASE_URL environment variable as per https://github.com/PolymeshAssociation/confidential_assets_server/blob/main/proof-api/.env.example.

You can the initialise the database via:

cargo install sqlx-cli
sqlx database setup

Once the database is initialised, you can run the Proof API via:

cargo run --release

License

LICENSE

Use of the software is governed by the license in, LICENSE.pdf. Commercial licenses are available, for inquires relating to commercial licenses please contact info@polymesh.network.

REST API

The REST API will directly interact with a Polymesh node to submit Confidential Asset transactions on-chain, and read relevant chain storage.

This part of the project is expected to be deprecated in favour of https://github.com/PolymeshAssociation/polymesh-rest-api.

About

Confidential assets proof API server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published