Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

feat: Implement EIP-1024 #11284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ parity-bytes = "0.1"
parity-crypto = { version = "0.4.2", features = ["publickey"] }

eip-712 = { path = "../util/EIP-712" }
eip-1024 = { path = "../util/EIP-1024" }
ethjson = { path = "../json" }
ethkey = { path = "../accounts/ethkey" }
ethstore = { path = "../accounts/ethstore" }
Expand Down
1 change: 1 addition & 0 deletions rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ extern crate parity_runtime;
extern crate parity_updater as updater;
extern crate parity_version as version;
extern crate eip_712;
extern crate eip_1024;
extern crate rlp;
extern crate account_state;

Expand Down
11 changes: 11 additions & 0 deletions rpc/src/v1/traits/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use jsonrpc_core::{Result, BoxFuture};
use jsonrpc_derive::rpc;
use ethereum_types::{H64, H160, H256, U64, U256};
use eip_1024::{EIP1024};

use v1::types::{RichBlock, BlockNumber, Bytes, CallRequest, Filter, FilterChanges, Index, EthAccount};
use v1::types::{Log, Receipt, SyncStatus, Transaction, Work};
Expand Down Expand Up @@ -215,3 +216,13 @@ pub trait EthFilter {
#[rpc(name = "eth_uninstallFilter")]
fn uninstall_filter(&self, _: Index) -> Result<bool>;
}

#[rpc(server)]
pub trait EthPrivacy {
/// Returns public key to encrypt
#[rpc(name= "eth_getEncryptionPublic")]
fn get_encryption_public(&self, public: String, data: Vec<u8>) -> BoxFuture<EIP1024>;

/// Returns encrypted data
fn encrypt(&self, encryption_public )
}
10 changes: 10 additions & 0 deletions util/EIP-1024/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
20 changes: 20 additions & 0 deletions util/EIP-1024/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "eip-1024"
version = "0.1.1"
repository = "https://github.com/hskang9/eip-1024"
documentation = "https://docs.rs/eip-1024"
readme = "README.md"
description = "EIP-1024 encryption"
keywords = ["eip-1024", "eip1024", "eip"]
license = "GPL-3.0"
authors = ["hskang9 <[email protected]>"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include Parity Technologies

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

edition = "2018"

[dependencies]
arrayref = "0.3.5"
rustc-hex = "^1.0"
hex = "0.4.0"
serde_derive = "1.0"
serde = "1.0"
serde_json = "1.0"
saltbabe = "0.1.4"
Loading