Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URAuth Parachain #1

Open
4 tasks
cocoyoon opened this issue Aug 16, 2023 · 0 comments
Open
4 tasks

URAuth Parachain #1

cocoyoon opened this issue Aug 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cocoyoon
Copy link
Contributor

PR Tracking

  • URAuthTree implementation
  • Account verification server
  • Data Oracle Nodes implementation
  • Data market implementation

Overview

Universal Resource Auth (UR-Auth) protocol that allows web data and copyrighted tangible and intangible assets referenced by Uniform Resource Identifiers (URI) to be publicly registered on the internet using blockchain technology and Decentralized Identifiers (DID) technology.

Pallets

URAuthTree

Data Ownership Register
Domain owner(e.g www.website1.com), web service owner(e.g instagram account), and copyrights of data files claim their ownership of their data through blockchain.

Process

  1. Owners(clients) call urauth_request_register_domain_owner() to request registering.
  2. Random value will be created and stored on blockchain.
  3. Owner will generate certificate(json file) and upload it to root directory.
  4. Oracle Nodes will download that json file and do signature on that document, which will be sent to blockchain.
  5. If 2/3 of nodes verify and accept the document, register URAuthDoc on blockchain.

URAuthDocument

pub struct Uri(Vec<u8>);
// Multisig-enabled DID 
pub struct MultiDid {
	ids: Vec<(AccountId, Weight=u16)>,
	// Sum(weight) >= threshold
	threshold: u16,
}
pub enum ContentMetadata {
	MetadataV1 { content_address: Vec<u8> },
	// MetadataV2 { },
	// MetdataV3 { },
}
pub enum CopyrightInfo {
	Text(Vec<u8>), // e.g "©2023 All Rights Reserved. Website1 is a registered trademark of,
	CopyrightInfoV1 { copyright_address: Vec<u8> }
}

pub struct AccessRule { 
	path: Vec<u8>,
	rules: Vec<Rule>,
}
pub struct Rule {
	user_agents: BoundedVec<UserAgent(Vec<u8>), Max>,
	allow: BoundedVec<(ContentType, Price), Max>,
	disallow: BoundedVec<ContentType, Max>
}
pub enum ContentType {
	Any,
	Image,
	Video
	Text,
	Code,
}

pub enum Proof<Signature> { 
	// To be defined 
	// Digital Sig
	ProofV1 { proof_value: Signature } 
} 

pub struct URAuthDoc {
	// *: 업데이트 될 수 있는 필드
	id: Vec<u8>,
	uri: Uri,
	created_at: u64
	*updated_at: u64, // UNIX? => 온체인 시간
	*owner_did: MultiDid,
	*identity_info: Vec<Vec<u8>>,
	*content_metadata: ContentMetadata,
	*copyright_info: CopyrightInfo,
	*access_rules: Vec<AccessRule>,
	*proofs: Proof,
}

impl URAuthDoc {
	fn update_owner_did(&mut self, owner_did: MultiDid, proof: Proof) { .. }
	fn update_identity_info(&mut self, identity_info: Vec<Vec<u8>>, proof: Proof) { .. }
	fn update_content_metadata(&mut self, content_metadata: ContentMetadata, proof: Proof) { .. }
	fn update_copyright_info(&mut self, copyright_info: CopyrightInfo, proof: Proof) { .. }
	fn update_access_rules(&mut self, access_rules: Vec<AccessRule>, proof: Proof) { .. }
}

map URAuthTree = StorageMap<T: Config> = <_, Hash, Uri, URAuthDoc>;

// For example,
// Case: Domain Owner
let uri: Vec<u8> = URI::new(b"website1.com");
// Case: Web Service account
let uri: Vec<u8> = URI::new(b"website1.com/user/account1");
// Case: Copyrights
let uri: Uri = Uri::new(b"urauth://file/{CIDv1}");

DataMarket

To be updated

@cocoyoon cocoyoon added the enhancement New feature or request label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants