Skip to content

0xcoinymous/payment-channel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Decentralized payment system using vyper

Payment channel enables stream of payments between 2 parties.

sender exchanges signatures offchain and receiver only needs to submitt a single transaction to finalize the payments.

sign a transaction message using msgHash( _amount ) and MetaMask :

  1. deploy the contract and get the hash of your message with function below :
msgHash(_amount)

open browser console and then :

  1. assign MsgHash with the value of msgHash(_amount)
    MsgHash =  
  1. enable metamask:
    ethereum.enable()  
  1. get connected account of your metamask :
ethereum.request({ method: 'eth_requestAccounts' }).then(function (accounts) {  
    CurrentAccount = accounts[0];  
    console.log('current account: ' + CurrentAccount); 
}); 
  1. send a request to sign the message with metamask :
    ethereum.request({method : "personal_sign" , params : [CurrentAccount, MsgHash]})  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages