Skip to content

Mahdi171/NirvanaPayments

Repository files navigation

Nirvana payments enable a customer to instantly transact with a merchant using a cryptocurrency of their choice.

The structure of this repository is as follows:

  • Python
    • Nirvana.py: Python code to emulate Nirvana payments in a local environment.
    • PoK.py: Python code for NIZKs used in Nirvana
    • Test.py: Python code to test Nirvana.py
    • secretshare.py: Python code for Shamir secret sharing
  • build/contracts
    • Migrations.json: JSON file for Migrations smart contract
    • Nirvana.json: JSON file for Nirvana smart contract
  • communication_python
    • Customer_preprocessed.py: Python code to emulate a customer in Nirvana. Socket IP can be configured to connect this customer to Nirvana and merchants
    • Merchant.py: Python code to emulate a merchant in Nirvana. Socket IP can be configured to connect this merchant to Nirvana and customers
    • NirvanaTTP.py: Python code to emulate Nrvana in trusted setting. Sockets are binded to ports 5551,5556,5557
    • PoK.py: Python code for NIZKs used in Nirvana
    • secretshare.py: Python code for Shamir secret sharing
  • contracts
    • Nirvana.sol: Smart contract for Nirvana which requires a customer to allocate individual payments to merchants
    • NirvanaPaymentChannel.sol: Smart contract for Nirvana which allows a victim merchant to retrieve a given amount from the customer's collateral
  • NirvanaPayment.js: JS file that executes the Nirvana smart contracts

About

Code for Nirvana: An Instant, Privacy-Preserving & Fair On-Chain Payment Method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors