@me2em/core 0.4.2-alpha.1 → 0.4.4-alpha.1

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.
Files changed (65) hide show
  1. package/.github/workflows/ci.yml +0 -0
  2. package/CODE_OF_CONDUCT.md +73 -0
  3. package/CONTRIBUTING.md +145 -0
  4. package/GOVERNANCE.md +132 -0
  5. package/README.md +374 -189
  6. package/SECURITY.md +70 -0
  7. package/package.json +12 -36
  8. package/packages/core/README.md +656 -0
  9. package/packages/core/package.json +44 -0
  10. package/{src → packages/core/src}/crypto/ed25519.ts +4 -0
  11. package/{src → packages/core/src}/handle.ts +42 -6
  12. package/{src → packages/core/src}/identity.ts +33 -0
  13. package/packages/core/src/index.ts +35 -0
  14. package/packages/core/src/seed.ts +138 -0
  15. package/packages/core/src/session.ts +47 -0
  16. package/packages/core/test/derivation.spec.ts +117 -0
  17. package/packages/core/tsconfig.json +9 -0
  18. package/pnpm-workspace.yaml +2 -0
  19. package/specs/core.md +44 -0
  20. package/specs/openapi/server-ref.yaml +10 -0
  21. package/specs/test-vectors.json +13 -0
  22. package/tsconfig.base.json +20 -0
  23. package/typedoc.json +18 -0
  24. package/dist/crypto/ed25519.d.ts +0 -8
  25. package/dist/crypto/ed25519.d.ts.map +0 -1
  26. package/dist/crypto/ed25519.js +0 -8
  27. package/dist/crypto/ed25519.js.map +0 -1
  28. package/dist/crypto/hkdf.d.ts +0 -13
  29. package/dist/crypto/hkdf.d.ts.map +0 -1
  30. package/dist/crypto/hkdf.js +0 -16
  31. package/dist/crypto/hkdf.js.map +0 -1
  32. package/dist/crypto/index.d.ts +0 -3
  33. package/dist/crypto/index.d.ts.map +0 -1
  34. package/dist/crypto/index.js +0 -3
  35. package/dist/crypto/index.js.map +0 -1
  36. package/dist/crypto/init.d.ts +0 -9
  37. package/dist/crypto/init.d.ts.map +0 -1
  38. package/dist/crypto/init.js +0 -16
  39. package/dist/crypto/init.js.map +0 -1
  40. package/dist/handle.d.ts +0 -53
  41. package/dist/handle.d.ts.map +0 -1
  42. package/dist/handle.js +0 -79
  43. package/dist/handle.js.map +0 -1
  44. package/dist/identity.d.ts +0 -10
  45. package/dist/identity.d.ts.map +0 -1
  46. package/dist/identity.js +0 -38
  47. package/dist/identity.js.map +0 -1
  48. package/dist/index.d.ts +0 -7
  49. package/dist/index.d.ts.map +0 -1
  50. package/dist/index.js +0 -8
  51. package/dist/index.js.map +0 -1
  52. package/dist/seed.d.ts +0 -24
  53. package/dist/seed.d.ts.map +0 -1
  54. package/dist/seed.js +0 -55
  55. package/dist/seed.js.map +0 -1
  56. package/dist/session.d.ts +0 -20
  57. package/dist/session.d.ts.map +0 -1
  58. package/dist/session.js +0 -16
  59. package/dist/session.js.map +0 -1
  60. package/src/index.ts +0 -15
  61. package/src/seed.ts +0 -65
  62. package/src/session.ts +0 -25
  63. /package/{src → packages/core/src}/crypto/hkdf.ts +0 -0
  64. /package/{src → packages/core/src}/crypto/index.ts +0 -0
  65. /package/{src → packages/core/src}/crypto/init.ts +0 -0
package/SECURITY.md ADDED
@@ -0,0 +1,70 @@
1
+ # Security Policy
2
+
3
+ ## 🔐 Supported Versions
4
+
5
+ | Version | Supported |
6
+ |---------|-----------|
7
+ | 0.1.x | ✅ Yes |
8
+ | < 0.1 | ❌ No |
9
+
10
+ > Me2em is in active development. Always use the latest version for security fixes.
11
+
12
+ ## 🚨 Reporting a Vulnerability
13
+
14
+ Me2em handles cryptographic identities and authentication. We take security seriously.
15
+
16
+ **If you discover a security vulnerability:**
17
+
18
+ 1. **Do NOT** open a public issue or discuss it publicly
19
+ 2. Email `security@me2em.com` with:
20
+ - Description of the vulnerability
21
+ - Steps to reproduce (if applicable)
22
+ - Potential impact assessment
23
+ - Suggested fix (optional but appreciated)
24
+ 3. Use PGP if possible: [PGP Key](https://me2em.com/security/pgp-key.asc) (coming soon)
25
+
26
+ ## 📬 What to Expect
27
+
28
+ - **Acknowledgment**: Within 72 hours
29
+ - **Assessment**: Within 7 business days
30
+ - **Fix timeline**: Depends on severity (critical: ≤14 days)
31
+ - **Disclosure**: Coordinated with reporter, after fix is released
32
+
33
+ ## 🛡️ Security Best Practices for Users
34
+
35
+ When implementing Me2em in your application:
36
+
37
+ ✅ **Do**:
38
+ - Store seed phrases in secure, user-controlled storage (never in plaintext)
39
+ - Use short-lived sessions and rotate tokens frequently
40
+ - Validate Handle metadata server-side, not just client-side
41
+ - Keep dependencies updated (`@me2em/*` packages)
42
+
43
+ ❌ **Don't**:
44
+ - Expose private keys or seed phrases in client-side code
45
+ - Reuse sessions across different contexts/applications
46
+ - Trust Handle metadata without verification
47
+ - Disable cryptographic signature verification
48
+
49
+ ## 🔍 Audit Status
50
+
51
+ | Component | Audit Date | Auditor | Report |
52
+ |-----------|------------|---------|--------|
53
+ | protocol-core | Planned Q2 2026 | TBD | — |
54
+
55
+ > We plan independent security audits before v1.0 release. Follow [Discussions](https://github.com/me2em-org/me2em-protocol/discussions) for updates.
56
+
57
+ ## 📜 Responsible Disclosure Policy
58
+
59
+ We follow responsible disclosure principles:
60
+ - No legal action against good-faith researchers
61
+ - Public acknowledgment (with consent) after fix
62
+ - Bug bounty program: Planned for post-v1.0
63
+
64
+ ## 🔄 Updates
65
+
66
+ This policy is reviewed quarterly. Last updated: May 2026.
67
+
68
+ ---
69
+
70
+ *Part of the Me2em ecosystem: [github.com/me2em-org](https://github.com/me2em-org) | Contact: security@me2em.com*
package/package.json CHANGED
@@ -1,44 +1,20 @@
1
1
  {
2
2
  "name": "@me2em/core",
3
- "version": "0.4.2-alpha.1",
4
- "description": "Core primitives for the Me2em authorization protocol: Identity, Handle, and Session",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.cjs"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "src",
18
- "README.md",
19
- "LICENSE"
20
- ],
21
- "license": "Apache-2.0",
22
- "publishConfig": {
23
- "access": "public"
24
- },
25
- "dependencies": {
26
- "@noble/ed25519": "^3.1.0",
27
- "@noble/hashes": "^2.2.0",
28
- "@scure/bip39": "^1.3.0"
3
+ "version": "0.4.4-alpha.1",
4
+ "private": false,
5
+ "engines": {
6
+ "node": ">=18.0.0",
7
+ "pnpm": ">=9.0.0"
29
8
  },
30
9
  "devDependencies": {
31
- "@types/node": "^25.9.1",
32
- "@vitest/coverage-v8": "^4.1.11",
33
- "eslint": "^10.4.1",
34
- "typescript": "^6.0.3",
35
- "vitest": "^4.1.7"
10
+ "typedoc": "^0.26.11",
11
+ "typescript": "5.6"
36
12
  },
37
13
  "scripts": {
38
- "build": "tsc -p tsconfig.json",
39
- "test": "vitest run",
40
- "test:coverage": "vitest run --coverage",
41
- "lint": "eslint src",
42
- "typecheck": "tsc --noEmit"
14
+ "build": "pnpm -r build",
15
+ "test": "pnpm -r test",
16
+ "lint": "pnpm -r lint",
17
+ "typecheck": "pnpm -r typecheck",
18
+ "build-docs": "typedoc"
43
19
  }
44
20
  }