this.me 3.0.22 → 3.0.24
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 +13 -31
- package/package.json +16 -20
package/README.md
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1761149332/this.me-removebg-preview_2_j1eoiy.png" alt="57b0b83e8518fecf9b3e2d06457421c7da70e0663f7490fab98f9ecbdbe5db6e-removebg-preview" style="zoom:34%;" />
|
|
2
2
|
|
|
3
3
|
# .ME
|
|
4
|
-
|
|
5
4
|
You can use **.me** both in **browser** and **Node** environments.
|
|
6
|
-
|
|
7
|
-
#### **1. Installation**
|
|
5
|
+
#### **1. NODEJS**
|
|
8
6
|
Using **npm**:
|
|
9
7
|
|
|
10
8
|
```bash
|
|
11
9
|
npm install this.me
|
|
12
10
|
```
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
#### **2.BROWSER (build):**
|
|
15
13
|
|
|
16
14
|
```html
|
|
17
15
|
<script src="this.me.umd.js"></script>
|
|
@@ -23,12 +21,11 @@ Or load it directly in the **browser** (build):
|
|
|
23
21
|
|
|
24
22
|
---
|
|
25
23
|
|
|
26
|
-
#### **
|
|
24
|
+
#### **Initialization**
|
|
27
25
|
You need to initialize the `.me` instance before using it:
|
|
28
26
|
|
|
29
27
|
```js
|
|
30
28
|
import me from "this.me";
|
|
31
|
-
|
|
32
29
|
await me.init({
|
|
33
30
|
monadEndpoint: "http://localhost:7777" // optional, defaults to 7777
|
|
34
31
|
});
|
|
@@ -38,7 +35,7 @@ Once initialized, the `me` instance will maintain its state (status, loaded iden
|
|
|
38
35
|
|
|
39
36
|
---
|
|
40
37
|
|
|
41
|
-
#### **
|
|
38
|
+
#### **Checking Daemon Status**
|
|
42
39
|
You can verify if the local daemon is running:
|
|
43
40
|
|
|
44
41
|
```js
|
|
@@ -50,7 +47,7 @@ The floating components or any GUI indicators (green/red) can rely directly on `
|
|
|
50
47
|
|
|
51
48
|
---
|
|
52
49
|
|
|
53
|
-
#### **
|
|
50
|
+
#### **Listing Identities**
|
|
54
51
|
```js
|
|
55
52
|
const list = await me.listUs();
|
|
56
53
|
console.log(list);
|
|
@@ -66,8 +63,7 @@ console.log(list);
|
|
|
66
63
|
|
|
67
64
|
---
|
|
68
65
|
|
|
69
|
-
#### **
|
|
70
|
-
|
|
66
|
+
#### **Loading an Identity**
|
|
71
67
|
```js
|
|
72
68
|
await me.load("abellae", "mySecretHash");
|
|
73
69
|
console.log(me.active); // true if identity is successfully loaded
|
|
@@ -77,8 +73,7 @@ After loading, you can use all available methods (`be`, `have`, `do`, etc.).
|
|
|
77
73
|
|
|
78
74
|
---
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
# **Example in the Browser Console**
|
|
82
77
|
If you include the UMD bundle:
|
|
83
78
|
|
|
84
79
|
```html
|
|
@@ -93,17 +88,14 @@ If you include the UMD bundle:
|
|
|
93
88
|
```
|
|
94
89
|
|
|
95
90
|
- `me` is a **singleton instance** that lives in memory once initialized.
|
|
96
|
-
- Works in both browser and
|
|
91
|
+
- Works in both browser and node.
|
|
97
92
|
- Provides methods for status, identity management, and attribute handling.
|
|
98
93
|
|
|
99
94
|
------
|
|
100
95
|
|
|
101
|
-
### How
|
|
102
|
-
|
|
96
|
+
### How .me **Works (Simplified)**
|
|
103
97
|
The **Me** class creates and manages a **local, encrypted identity file** based on a username and a secret hash.
|
|
104
|
-
|
|
105
98
|
#### **Creating a new identity**
|
|
106
|
-
|
|
107
99
|
When you run:
|
|
108
100
|
|
|
109
101
|
```js
|
|
@@ -115,7 +107,6 @@ Me.create('abellae', 'mySecretHash');
|
|
|
115
107
|
------
|
|
116
108
|
|
|
117
109
|
#### Loading an existing identity
|
|
118
|
-
|
|
119
110
|
When you run:
|
|
120
111
|
|
|
121
112
|
```js
|
|
@@ -123,8 +114,7 @@ Me.load('abellae', 'mySecretHash');
|
|
|
123
114
|
```
|
|
124
115
|
|
|
125
116
|
It:
|
|
126
|
-
|
|
127
|
-
- Reads the encrypted .me file.
|
|
117
|
+
- Reads the **encrypted .me** file.
|
|
128
118
|
- Extracts the first 16 bytes as iv.
|
|
129
119
|
- Recomputes the key from the given hash.
|
|
130
120
|
- Tries to decrypt the file.
|
|
@@ -133,9 +123,7 @@ It:
|
|
|
133
123
|
------
|
|
134
124
|
|
|
135
125
|
#### **Using the unlocked identity**
|
|
136
|
-
|
|
137
126
|
Once unlocked, you can:
|
|
138
|
-
|
|
139
127
|
- Set attributes: me.be('developer', true)
|
|
140
128
|
- Add endorsements: me.addEndorsement(...)
|
|
141
129
|
- View attributes: me.getAttributes()
|
|
@@ -144,18 +132,14 @@ Once unlocked, you can:
|
|
|
144
132
|
------
|
|
145
133
|
|
|
146
134
|
### **Summary**
|
|
147
|
-
|
|
148
135
|
- Your identity is encrypted on your own machine.
|
|
149
136
|
- Only the correct hash can unlock it.
|
|
150
137
|
- No third parties are involved.
|
|
151
|
-
- The
|
|
152
|
-
|
|
153
|
-
Let me know if you’d like a diagram or visual flow to go with this explanation!
|
|
138
|
+
- The **.me** file is secure, portable, and self-owned.
|
|
154
139
|
|
|
155
140
|
---
|
|
156
141
|
|
|
157
142
|
### 🔍 Core Principles
|
|
158
|
-
|
|
159
143
|
1. **Freedom to Declare**
|
|
160
144
|
Anyone can generate a `.me` identity locally without external approval.
|
|
161
145
|
2. **Trusted Endorsements**
|
|
@@ -166,7 +150,7 @@ Let me know if you’d like a diagram or visual flow to go with this explanation
|
|
|
166
150
|
---
|
|
167
151
|
### 🛡️ Security Model
|
|
168
152
|
* No private key ever leaves the local `.me` file.
|
|
169
|
-
* Endorsements are public and verifiable using the public key
|
|
153
|
+
* Endorsements are public and verifiable using the **public key.**
|
|
170
154
|
* If compromised, user can rotate keys and notify authorities.
|
|
171
155
|
|
|
172
156
|
---
|
|
@@ -183,12 +167,10 @@ Let me know if you’d like a diagram or visual flow to go with this explanation
|
|
|
183
167
|
|
|
184
168
|
---
|
|
185
169
|
<img src="https://suign.github.io/assets/imgs/monads.png" alt="Cleak Me Please" width="244">Hello, I am **.me**
|
|
186
|
-
|
|
187
170
|
----
|
|
188
171
|
|
|
189
172
|
#### License & Policies
|
|
190
173
|
- **License**: MIT License.
|
|
191
174
|
- **Learn more** at **https://neurons.me**
|
|
192
175
|
[Terms](https://neurons.me/terms-and-conditions) | [Privacy](https://neurons.me/privacy-policy)
|
|
193
|
-
|
|
194
|
-
<img src="https://docs.neurons.me/neurons.me.webp" alt="neurons.me logo" width="123" height="123">
|
|
176
|
+
<img src="https://docs.neurons.me/neurons.me.webp" alt="neurons.me logo" width="89" height="89">
|
package/package.json
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.me",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": ".me is your identity
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"module": "dist/
|
|
7
|
-
"browser": "dist/
|
|
3
|
+
"version": "3.0.24",
|
|
4
|
+
"description": ".me is your identity trust through cryptographic signatures.",
|
|
5
|
+
"main": "dist/me.cjs.js",
|
|
6
|
+
"module": "dist/me.es.js",
|
|
7
|
+
"browser": "dist/me.umd.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
|
|
11
|
-
"require": "./dist/
|
|
10
|
+
"import": "./dist/me.es.js",
|
|
11
|
+
"require": "./dist/me.cjs.js"
|
|
12
12
|
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "vite",
|
|
16
|
+
"build": "vite build",
|
|
17
|
+
"preview": "vite preview"
|
|
13
18
|
},
|
|
14
19
|
"type": "module",
|
|
15
20
|
"keywords": [
|
|
16
|
-
"this.me",
|
|
17
|
-
"
|
|
18
|
-
"decentralized",
|
|
19
|
-
"cryptographic",
|
|
20
|
-
"trust",
|
|
21
|
-
"signature",
|
|
22
|
-
"local",
|
|
23
|
-
"self-sovereign",
|
|
24
|
-
"monad"
|
|
21
|
+
"this.me", "identity", "decentralized", "cryptographic",
|
|
22
|
+
"trust", "signature", "local", "monad"
|
|
25
23
|
],
|
|
26
24
|
"repository": {
|
|
27
25
|
"type": "git",
|
|
@@ -33,10 +31,8 @@
|
|
|
33
31
|
"files": [
|
|
34
32
|
"dist"
|
|
35
33
|
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "vite build"
|
|
38
|
-
},
|
|
39
34
|
"devDependencies": {
|
|
40
|
-
"vite": "^7.0.6"
|
|
35
|
+
"vite": "^7.0.6",
|
|
36
|
+
"vite-plugin-dts": "^4.5.4"
|
|
41
37
|
}
|
|
42
38
|
}
|