this.me 3.0.21 → 3.0.23
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 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
You can use **.me** both in **browser** and **Node** environments.
|
|
6
6
|
|
|
7
|
-
#### **1.
|
|
7
|
+
#### **1. NODEJS**
|
|
8
8
|
Using **npm**:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
npm install this.me
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
#### **2.BROWSER (build):**
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
17
|
<script src="this.me.umd.js"></script>
|
|
@@ -23,12 +23,11 @@ Or load it directly in the **browser** (build):
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
#### **
|
|
26
|
+
#### **Initialization**
|
|
27
27
|
You need to initialize the `.me` instance before using it:
|
|
28
28
|
|
|
29
29
|
```js
|
|
30
30
|
import me from "this.me";
|
|
31
|
-
|
|
32
31
|
await me.init({
|
|
33
32
|
monadEndpoint: "http://localhost:7777" // optional, defaults to 7777
|
|
34
33
|
});
|
|
@@ -38,7 +37,7 @@ Once initialized, the `me` instance will maintain its state (status, loaded iden
|
|
|
38
37
|
|
|
39
38
|
---
|
|
40
39
|
|
|
41
|
-
#### **
|
|
40
|
+
#### **Checking Daemon Status**
|
|
42
41
|
You can verify if the local daemon is running:
|
|
43
42
|
|
|
44
43
|
```js
|
|
@@ -50,7 +49,7 @@ The floating components or any GUI indicators (green/red) can rely directly on `
|
|
|
50
49
|
|
|
51
50
|
---
|
|
52
51
|
|
|
53
|
-
#### **
|
|
52
|
+
#### **Listing Identities**
|
|
54
53
|
```js
|
|
55
54
|
const list = await me.listUs();
|
|
56
55
|
console.log(list);
|
|
@@ -66,7 +65,7 @@ console.log(list);
|
|
|
66
65
|
|
|
67
66
|
---
|
|
68
67
|
|
|
69
|
-
#### **
|
|
68
|
+
#### **Loading an Identity**
|
|
70
69
|
|
|
71
70
|
```js
|
|
72
71
|
await me.load("abellae", "mySecretHash");
|
|
@@ -77,7 +76,7 @@ After loading, you can use all available methods (`be`, `have`, `do`, etc.).
|
|
|
77
76
|
|
|
78
77
|
---
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
# **Example in the Browser Console**
|
|
81
80
|
|
|
82
81
|
If you include the UMD bundle:
|
|
83
82
|
|
|
@@ -93,12 +92,12 @@ If you include the UMD bundle:
|
|
|
93
92
|
```
|
|
94
93
|
|
|
95
94
|
- `me` is a **singleton instance** that lives in memory once initialized.
|
|
96
|
-
- Works in both browser and
|
|
95
|
+
- Works in both browser and node.
|
|
97
96
|
- Provides methods for status, identity management, and attribute handling.
|
|
98
97
|
|
|
99
98
|
------
|
|
100
99
|
|
|
101
|
-
### How
|
|
100
|
+
### How .me **Works (Simplified)**
|
|
102
101
|
|
|
103
102
|
The **Me** class creates and manages a **local, encrypted identity file** based on a username and a secret hash.
|
|
104
103
|
|
|
@@ -124,7 +123,7 @@ Me.load('abellae', 'mySecretHash');
|
|
|
124
123
|
|
|
125
124
|
It:
|
|
126
125
|
|
|
127
|
-
- Reads the encrypted .me file.
|
|
126
|
+
- Reads the **encrypted .me** file.
|
|
128
127
|
- Extracts the first 16 bytes as iv.
|
|
129
128
|
- Recomputes the key from the given hash.
|
|
130
129
|
- Tries to decrypt the file.
|
|
@@ -148,9 +147,7 @@ Once unlocked, you can:
|
|
|
148
147
|
- Your identity is encrypted on your own machine.
|
|
149
148
|
- Only the correct hash can unlock it.
|
|
150
149
|
- 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!
|
|
150
|
+
- The **.me** file is secure, portable, and self-owned.
|
|
154
151
|
|
|
155
152
|
---
|
|
156
153
|
|
|
@@ -166,7 +163,7 @@ Let me know if you’d like a diagram or visual flow to go with this explanation
|
|
|
166
163
|
---
|
|
167
164
|
### 🛡️ Security Model
|
|
168
165
|
* No private key ever leaves the local `.me` file.
|
|
169
|
-
* Endorsements are public and verifiable using the public key
|
|
166
|
+
* Endorsements are public and verifiable using the **public key.**
|
|
170
167
|
* If compromised, user can rotate keys and notify authorities.
|
|
171
168
|
|
|
172
169
|
---
|
|
@@ -191,4 +188,4 @@ Let me know if you’d like a diagram or visual flow to go with this explanation
|
|
|
191
188
|
- **Learn more** at **https://neurons.me**
|
|
192
189
|
[Terms](https://neurons.me/terms-and-conditions) | [Privacy](https://neurons.me/privacy-policy)
|
|
193
190
|
|
|
194
|
-
<img src="https://docs.neurons.me/neurons.me.webp" alt="neurons.me logo" width="
|
|
191
|
+
<img src="https://docs.neurons.me/neurons.me.webp" alt="neurons.me logo" width="89" height="89">
|