Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cedarmist/e2eproxy-sapphire
End-to-End encryption between Client and Sapphire EVM contract using X25519 and Deoxys-II-256-128
https://github.com/cedarmist/e2eproxy-sapphire
end-to-end-encryption oasis-sapphire proxy-contract solidity
Last synced: 19 days ago
JSON representation
End-to-End encryption between Client and Sapphire EVM contract using X25519 and Deoxys-II-256-128
- Host: GitHub
- URL: https://github.com/cedarmist/e2eproxy-sapphire
- Owner: CedarMist
- Created: 2023-06-17T17:14:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-31T10:06:16.000Z (about 1 year ago)
- Last Synced: 2024-11-02T11:21:47.653Z (2 months ago)
- Topics: end-to-end-encryption, oasis-sapphire, proxy-contract, solidity
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# End-to-End encrypted proxy contract example
This repo provides an example of how a contract can relay encrypted transactions on Oasis Sapphire, so the relayer cannot see which contract is being invoked or what the parameters are.
Using the [@oasis-protocol/sapphire-contracts](https://www.npmjs.com/package/@oasisprotocol/sapphire-contracts) library The E2EProxy contract generates a long-term X25519 keypair which allows users to submit a Deoxys-II encrypted payload (with forward secrecy) containing the contract address to invoke and the calldata to pass.
While [@oasis-protocol/sapphire-hardhat](https://www.npmjs.com/package/@oasisprotocol/sapphire-hardhat) package makes testing easy with Hardhat, you also need to run a local [sapphire-dev](https://github.com/oasisprotocol/oasis-web3-gateway/pkgs/container/sapphire-dev) instance which supports the necessary EVM precompiles.
For your convenience there is a `Makefile` which uses Docker to keep everything neatly contained:
```
make sapphire-dev & # This will take a few minutes
make pnpm-install
make hardhat-compile
make hardhat-test
```