1.0.10 • Published 6 years ago

xgov v1.0.10

Weekly downloads
46
License
Proprietary
Repository
github
Last release
6 years ago

xGovern (XGOV)

Javascript-based decentralized group governance and data layer
(Utilizing NaCl library with x25519 elliptic curve cryptography)

LICENSE (Proprietary; For Audit-only Code Disclosure)

© 2018 xGovern Inc., all rights reserved.
Unauthorized copying of this file, via any medium is strictly prohibited.

API Usage & Documentation

Address Creation with generate_address

xgov.generate_address(
        {domain:(str,''), group:(str,''), async_interval:(+int,300)},
        {callback:(func), onprogress(func)}
);

//
// Address generation with default protocol and no group membership
//	the first argument '{domain:'', group:''}' can be '{}', still the same result;
//
xgov.generate_address({domain:'', group:''},{
	callback:function(e,data){
		if(e) return; //Error case;
		var address = data.address //e.g. starts with x_ (x_XzOw9o048uk5jwSqKE1rUpASe8plQCKEG3JreiUHU0r)
		var secret = data.secret //e.g. 42~43 character long base62_encoded private key (string)
	}
});

//
// Address generation with default protocol and U.S. group membership signifier
//	takes about 1~7 seconds to generate one keypair with US header (with a single-thread 2Ghz core)
//	async_interval: how many new key pairs try after 'onprogress' triggers and process rests; 
//	 e.g. 500, after 500 new key pairs tried, onprogress is triggered and process rests to pass other executions
//
xgov.generate_address({domain:'', group:'US', async_interval:500},{
	callback:function(e,data){
		if(e) return; //Error case;
		var address = data.address //e.g. starts with xUS_ (xUS_XzOw9o048uk5USSqKE1rUpASe8plQCKEG3JreiUHU0r)
		var secret = data.secret //e.g. 42~43 character long base62_encoded private key (string)
	},
	onprogress:function(meta){
		meta.count; //how many new key pairs have been tried so far to match something that starts with group header 'xUS';
		meta.domain; //Target protocol domain
		meta.group; //target group
	}
});

Authors

Written by:
Joe K. Kim (jkk@xgovern.com)

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago