this.me 2.8.71 → 2.8.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -26
- package/index.js +10 -2
- package/knowledge_files/00_Context.md +40 -0
- package/package.json +1 -2
- package/src/browser/meFormatter.browser.js +9 -0
- package/src/createMeFormatter.js +15 -0
- package/src/nodejs/meFormatter.node.js +9 -0
- package/src/this.me.js +58 -0
- package/src/this.me.promises.js +21 -0
package/README.md
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="./Cleaker-removebg-preview.png" alt="SVG Image" style="width:89px;">
|
|
1
|
+
|
|
3
2
|
|
|
4
3
|
<img src="https://suign.github.io/assets/imgs/cleak_me-removebg.png" alt="DID Me Art" width="244">
|
|
5
4
|
|
|
6
5
|
<img src="https://suign.github.io/assets/imgs/Cleaker-removebg-preview.png" alt="Cleak Me Please" width="244">
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
# THIS.ME
|
|
8
|
+
|
|
9
|
+
**This.Me** is a digital identity representation of **.Me** as it encapsulates **the essence of an entity**.
|
|
10
|
+
|
|
11
|
+
Services become **user-centric,** based on cryptographic proofs rather than centralized authorities.
|
|
12
|
+
|
|
13
|
+
-----------
|
|
14
|
+
|
|
15
|
+
### [Project Status : Experimental and Under Development, Subject to Major Changes]
|
|
16
|
+
|
|
17
|
+
The module is in active development, and as such, it is subject to significant changes as we refine our approach and methodologies to best support our goals.
|
|
18
|
+
|
|
19
|
+
visit: https://neurons.me to learn more.
|
|
20
|
+
|
|
21
|
+
----------
|
|
22
|
+
|
|
23
|
+
# Getting Started
|
|
24
|
+
|
|
25
|
+
**This.Me** is a class focused on **encapsulating user identity,** specifically crafted to facilitate the creation of instances ready for **hashing and cryptographic signature** generation. It opens the door to coding and decoding through **".me"** signatures, offering a modular framework that prioritizes privacy and integrity in application-wide identity management.
|
|
26
|
+
|
|
9
27
|
|
|
10
|
-
|
|
28
|
+
|
|
29
|
+
**This.Me** is also part of the **all.this Data Structures** which means aligns well with the entire **neurons.me ecosystem.**
|
|
11
30
|
|
|
12
31
|
|
|
13
32
|
|
|
@@ -25,30 +44,63 @@
|
|
|
25
44
|
import Me from 'this.me';
|
|
26
45
|
```
|
|
27
46
|
|
|
28
|
-
3. **Create an Instance of `Me`:**
|
|
29
|
-
Instantiate the `Me` class with the required user details.
|
|
30
|
-
|
|
31
|
-
```js
|
|
32
|
-
const user = new Me('John', 'Doe', '1990-01-01', 'password123', '1234');
|
|
33
|
-
```
|
|
34
47
|
|
|
35
|
-
4. **Validate and Use the Instance:**
|
|
36
|
-
Utilize the instance for user data validation and preparation for cryptographic actions.
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
try {
|
|
40
|
-
const identity = user.getMe();
|
|
41
|
-
// Ready for hashing and cryptographic signatures
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error(error.message);
|
|
44
|
-
// Error handling for missing fields
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
48
|
|
|
48
49
|
This quick start guide provides a straightforward path to incorporating `this.me` into your project, enabling you to manage user identities and prepare them for secure cryptographic processes efficiently.
|
|
49
50
|
|
|
50
51
|
-----
|
|
51
52
|
|
|
53
|
+
## Conceptual Grounds.
|
|
54
|
+
|
|
55
|
+
`.me` objects to serve as both a local identity on the user's host machine and as an identity within a larger network. When a `.me` object is authenticated on a network, it can access data not only on the local host but also from other nodes within that network. Conversely, if it's not authenticated or recognized by the network, it should only access local data.
|
|
56
|
+
|
|
57
|
+
### Local and Network Identity Management
|
|
58
|
+
|
|
59
|
+
1. #### Local Identity
|
|
60
|
+
|
|
61
|
+
- When a `.me` object is created, it's initially configured with access to local host resources.
|
|
62
|
+
- Users can manage their local profile, which includes their personal settings, preferences, and local data access permissions.
|
|
63
|
+
|
|
64
|
+
2. #### Network Identity
|
|
65
|
+
|
|
66
|
+
- To access resources on the network, a `.me` object must be authenticated against the network, possibly by a central authority or a decentralized consensus mechanism.
|
|
67
|
+
- Once authenticated, the `.me` object's hash is recognized across the network, granting the user access to network resources according to their permissions.
|
|
68
|
+
|
|
69
|
+
3. #### Access Control
|
|
70
|
+
|
|
71
|
+
- Both local and network resources use access control lists (ACLs) that are tied to the `.me` object's hash.
|
|
72
|
+
- These ACLs determine what resources the `.me` object can access and the level of interaction permitted (read, write, execute).
|
|
73
|
+
|
|
74
|
+
4. #### Data Fetching
|
|
75
|
+
|
|
76
|
+
- When fetching data, the system checks if the `.me` object is authenticated within the network.
|
|
77
|
+
- If authenticated, the `.me` object can retrieve data from across the network based on the established ACLs.
|
|
78
|
+
- If not authenticated, the `.me` object is limited to retrieving data from the local host.
|
|
79
|
+
|
|
80
|
+
5. #### CLI Functionality
|
|
81
|
+
|
|
82
|
+
- The CLI tool facilitates the creation of `.me` objects, management of profiles, and authentication processes.
|
|
83
|
+
- It could include commands to "login" to the network, "logout", or "sync" local profiles with network profiles.
|
|
84
|
+
|
|
85
|
+
6. #### Data Sharing and Security
|
|
86
|
+
|
|
87
|
+
- Data sharing across the network should be secure, with encryption mechanisms in place to protect data in transit and at rest.
|
|
88
|
+
- The `.me` object's unique hash can be part of the encryption key, ensuring that only the intended `.me` object can decrypt and access the shared data.
|
|
89
|
+
|
|
90
|
+
### Example CLI Commands
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
- `me init`: Initializes a new `.me` object on the local host.
|
|
95
|
+
- `me login`: Authenticates the `.me` object against the network to access network resources.
|
|
96
|
+
- `me logout`: De-authenticates the `.me` object from the network, reverting to local-only access.
|
|
97
|
+
- `me sync`: Synchronizes local `.me` object data with the network profile.
|
|
98
|
+
- `me fetch`: Retrieves data from the local host or network based on authentication status.
|
|
99
|
+
|
|
100
|
+
By implementing this dual identity system, you enable a seamless transition for users between operating solely on their local device and engaging with a broader network, all while maintaining strict control over their data access rights.
|
|
101
|
+
|
|
102
|
+
----------
|
|
103
|
+
|
|
52
104
|
# About All.This
|
|
53
105
|
|
|
54
106
|
## Modular Data Structures:
|
|
@@ -67,13 +119,27 @@ This quick start guide provides a straightforward path to incorporating `this.me
|
|
|
67
119
|
|
|
68
120
|
visit: [Neurons.me Glossary](https://suign.github.io/neurons.me/Glossary)
|
|
69
121
|
|
|
70
|
-
|
|
122
|
+
## License & Policies
|
|
123
|
+
|
|
124
|
+
- **License**: MIT License (see LICENSE for details).
|
|
125
|
+
|
|
126
|
+
- **Privacy Policy**: Respects user privacy; no collection/storage of personal data.
|
|
127
|
+
|
|
128
|
+
- **Terms of Usage**: Use responsibly. No guarantees/warranties provided. [Terms](https://www.neurons.me/terms-of-use) | [Privacy](https://www.neurons.me/privacy-policy)
|
|
129
|
+
|
|
130
|
+
**Learn more** at https://neurons.me
|
|
71
131
|
|
|
72
|
-
**Author:** SuiGn
|
|
132
|
+
**Author:** SuiGn
|
|
73
133
|
|
|
74
|
-
[By neurons.me](https://neurons.me)
|
|
134
|
+
[By neurons.me](https://neurons.me)
|
|
75
135
|
|
|
76
|
-
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
----
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
<img src="https://suign.github.io/neurons.me/neurons_logo.png" alt="neurons.me logo" width="123" height="123" style="width123px; height:123px;">
|
|
77
143
|
|
|
78
144
|
|
|
79
145
|
|
package/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
this.me/index.js
|
|
3
|
+
ⓝⓔⓤⓡⓞⓝⓢ.ⓜⓔ
|
|
4
|
+
🆂🆄🅸🅶🅽
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* @module This.Me
|
|
4
8
|
* @description
|
|
@@ -9,5 +13,9 @@
|
|
|
9
13
|
* Command Definitions and Interactive Shell.*/
|
|
10
14
|
|
|
11
15
|
// index.js in the `this.me` package
|
|
12
|
-
|
|
16
|
+
// index.js for this.me module
|
|
17
|
+
import Me from './src/this.me.js';
|
|
18
|
+
export default Me;
|
|
19
|
+
console.log('this.me loaded');
|
|
20
|
+
|
|
13
21
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Key Points of This.Me:
|
|
2
|
+
Digital Identity Representation:
|
|
3
|
+
|
|
4
|
+
This.Me encapsulates the essence of an entity, providing a robust framework for managing digital identities.
|
|
5
|
+
It allows for cryptographic proof-based interactions, moving away from centralized authority reliance.
|
|
6
|
+
User-Centric Services:
|
|
7
|
+
|
|
8
|
+
The design focuses on user-centricity, where services rely on cryptographic proofs, enhancing security and user control.
|
|
9
|
+
Project Status:
|
|
10
|
+
|
|
11
|
+
Being experimental and under active development, it's highlighted that significant changes may occur, showing transparency in its developmental stage.
|
|
12
|
+
Integration and Usage:
|
|
13
|
+
|
|
14
|
+
The quick start guide simplifies the integration process, encouraging users to start utilizing This.Me in their projects for identity management and cryptographic operations.
|
|
15
|
+
Local and Network Identity:
|
|
16
|
+
|
|
17
|
+
The dual identity system (local and network) provides a versatile approach to data access and user interaction, distinguishing between authenticated network interactions and local-only data access.
|
|
18
|
+
CLI Functionality:
|
|
19
|
+
|
|
20
|
+
Proposed CLI commands (me init, me login, etc.) offer straightforward interfaces for users to manage their .me objects, enhancing usability.
|
|
21
|
+
Modular Data Structures:
|
|
22
|
+
|
|
23
|
+
Being part of all.this data structures, This.Me aligns with a suite of modules, each specializing in different data aspects, ensuring integration and interoperability within the neurons.me ecosystem.
|
|
24
|
+
Security and Privacy:
|
|
25
|
+
|
|
26
|
+
Emphasizes security through unique cryptographic identities for each module instance and adheres to privacy-centric policies, reassuring users of their data integrity and privacy.
|
|
27
|
+
Enhancements and Considerations:
|
|
28
|
+
Interactivity Between Instances:
|
|
29
|
+
While each Me instance represents an identity, considering how these instances interact and relate within each sphere (personal, family, friends, etc.) can further enrich the model. For instance, defining interaction protocols or shared spaces where instances influence or contribute to each other's state or data.
|
|
30
|
+
|
|
31
|
+
Data Inheritance and Sharing:
|
|
32
|
+
Exploring how instances might inherit or share data within a sphere (like family traits or common friend group memories) could add depth to the identity representations.
|
|
33
|
+
|
|
34
|
+
Network Dynamics:
|
|
35
|
+
Delving deeper into the network identity aspect, considering how a Me instance evolves or influences the network when transitioning from a local to a networked context, could provide insights into collective behaviors or network effects.
|
|
36
|
+
|
|
37
|
+
External Interactions:
|
|
38
|
+
Reflecting on how Me instances interact with external entities or services (beyond the user's direct network) could expand on the role of digital identity in broader ecosystems.
|
|
39
|
+
|
|
40
|
+
By fleshing out these aspects, This.Me can offer a comprehensive and nuanced framework for digital identity, providing users with a versatile and secure way to manage their presence and interactions across various contexts and networks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.me",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.73",
|
|
4
4
|
"description": "User-Centric.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"user"
|
|
13
13
|
],
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"browserify": "^17.0.0"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
18
17
|
"type": "git",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// createMeFormatter.js
|
|
2
|
+
import MeFormatterNode from './nodejs/meFormatter.node.js';
|
|
3
|
+
import MeFormatterBrowser from './browser/meFormatter.browser.js';
|
|
4
|
+
|
|
5
|
+
function isNode() {
|
|
6
|
+
return typeof window === 'undefined';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export async function createMeFormatter() {
|
|
10
|
+
if (isNode()) {
|
|
11
|
+
return { formatter: new MeFormatterNode(), error: null };
|
|
12
|
+
} else {
|
|
13
|
+
return { formatter: new MeFormatterBrowser(), error: null };
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/this.me.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
this.me.js
|
|
3
|
+
ⓝⓔⓤⓡⓞⓝⓢ.ⓜⓔ
|
|
4
|
+
🆂🆄🅸🅶🅽
|
|
5
|
+
*/
|
|
6
|
+
import { createMeFormatter } from './createMeFormatter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Represents a '.me' entity with personal information and methods to process and manage it.
|
|
9
|
+
* name: 'Alice',
|
|
10
|
+
* dob: '1990-01-01',
|
|
11
|
+
* city: 'Wonderland',
|
|
12
|
+
* gender: 'Female',
|
|
13
|
+
* textInfo: 'Loves adventures'
|
|
14
|
+
*/
|
|
15
|
+
class Me {
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of the Me class representing user identity.
|
|
18
|
+
* @param {Object} meInfo - User's personal information.
|
|
19
|
+
* @param {string} meInfo.name - The user's name.
|
|
20
|
+
* @param {string} meInfo.dob - The user's date of birth.
|
|
21
|
+
* @param {string} meInfo.city - The city associated with the user.
|
|
22
|
+
* @param {string} meInfo.gender - The user's gender.
|
|
23
|
+
* @param {string} meInfo.bio - A short biography or description of the user.
|
|
24
|
+
* @param {string} meInfo.password - A password for the user's identity (should be handled securely).
|
|
25
|
+
* @param {string} meInfo.pin - A PIN for additional security or quick access.
|
|
26
|
+
*/
|
|
27
|
+
constructor(meInfo = {}) {
|
|
28
|
+
this.name = meInfo.name || 'Unknown';
|
|
29
|
+
this.dob = meInfo.dob || 'Unknown';
|
|
30
|
+
this.city = meInfo.city || 'Unknown';
|
|
31
|
+
this.gender = meInfo.gender || 'Unknown';
|
|
32
|
+
this.bio = meInfo.bio || 'No bio provided';
|
|
33
|
+
this.password = meInfo.password || ''; // Consider encryption/hashing for security
|
|
34
|
+
this.pin = meInfo.pin || ''; // Consider encryption/hashing for security
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Updates the user's information in the .Me instance.
|
|
39
|
+
* @param {Object} updateInfo - The information to update.
|
|
40
|
+
*/
|
|
41
|
+
updateInfo(updateInfo) {
|
|
42
|
+
this.name = updateInfo.name || this.name;
|
|
43
|
+
this.dob = updateInfo.dob || this.dob;
|
|
44
|
+
this.city = updateInfo.city || this.city;
|
|
45
|
+
this.gender = updateInfo.gender || this.gender;
|
|
46
|
+
this.bio = updateInfo.bio || this.bio;
|
|
47
|
+
// Password and PIN updates should be handled carefully, potentially with additional security checks
|
|
48
|
+
if (updateInfo.password) {
|
|
49
|
+
this.password = updateInfo.password; // Consider implementing a method to securely update the password
|
|
50
|
+
}
|
|
51
|
+
if (updateInfo.pin) {
|
|
52
|
+
this.pin = updateInfo.pin; // Consider implementing a method to securely update the PIN
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
export default Me;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Path: Lisa/monadLisa/workspaces/packages/dataformatters/this.me/src/this.me.promises.js
|
|
2
|
+
// this.me.promises.js
|
|
3
|
+
export const logMeSuccess = (result) => {
|
|
4
|
+
console.log('Operation successful:', result);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const logMeError = (error) => {
|
|
8
|
+
console.error('Operation failed:', error);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const handleMePromise = (promise, successHandler, errorHandler) => {
|
|
12
|
+
promise.then(successHandler).catch(errorHandler);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const BeMe = (promise, successHandler, errorHandler) => {
|
|
16
|
+
promise.then(successHandler).catch(errorHandler);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// You can add more handlers as needed.
|
|
21
|
+
|