@kokuin/browser 0.2.0 → 0.2.2

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 (2) hide show
  1. package/lib/identity.js +1 -9
  2. package/package.json +17 -13
package/lib/identity.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CODECS, decryptToken, getDID } from '@kokuin/token';
1
+ import { CODECS, getDID } from '@kokuin/token';
2
2
  import { x25519 } from '@noble/curves/ed25519.js';
3
3
  import { p256 } from '@noble/curves/nist.js';
4
4
  import { b64uFromJSON, fromUTF, toB64U } from '@sozai/codec';
@@ -58,18 +58,10 @@ import { getES256PublicKey } from './utils.js';
58
58
  }, agreement, 256);
59
59
  return new Uint8Array(shared);
60
60
  }
61
- async function decrypt(jwe) {
62
- return decryptToken({
63
- id,
64
- decrypt,
65
- agreeKey
66
- }, jwe);
67
- }
68
61
  return {
69
62
  id,
70
63
  publicKey,
71
64
  signToken,
72
- decrypt,
73
65
  agreeKey
74
66
  };
75
67
  }
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@kokuin/browser",
3
- "version": "0.2.0",
4
- "license": "MIT",
3
+ "version": "0.2.2",
5
4
  "description": "Key store for browser",
6
5
  "keywords": [
7
6
  "cryptography",
@@ -14,35 +13,40 @@
14
13
  "url": "https://github.com/TairuFramework/kokuin",
15
14
  "directory": "packages/browser"
16
15
  },
16
+ "license": "MIT",
17
+ "sideEffects": false,
17
18
  "type": "module",
18
- "main": "lib/index.js",
19
- "types": "lib/index.d.ts",
20
19
  "exports": {
21
20
  ".": "./lib/index.js"
22
21
  },
22
+ "main": "lib/index.js",
23
+ "types": "lib/index.d.ts",
23
24
  "files": [
24
25
  "lib/*"
25
26
  ],
26
- "sideEffects": false,
27
27
  "dependencies": {
28
- "@noble/curves": "^2.0.1",
28
+ "@noble/curves": "^2.3.0",
29
29
  "@sozai/async": "^0.2.1",
30
- "@sozai/codec": "^0.2.0",
31
- "@sozai/log": "^0.2.0",
32
- "@sozai/otel": "^0.3.0",
30
+ "@sozai/codec": "^0.4.0",
31
+ "@sozai/log": "^0.3.1",
32
+ "@sozai/otel": "^0.3.2",
33
33
  "@kokuin/otel": "^0.3.0",
34
- "@kokuin/token": "^0.3.0"
34
+ "@kokuin/token": "^0.5.0"
35
35
  },
36
36
  "devDependencies": {
37
+ "@kokuin/jwe": "^0.1.0",
37
38
  "@kokuin/keystore-conformance": "^0.0.0"
38
39
  },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
39
43
  "scripts": {
44
+ "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
40
45
  "build:clean": "del lib",
41
46
  "build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
42
47
  "build:types": "tsc --emitDeclarationOnly --skipLibCheck",
43
- "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
48
+ "test": "pnpm run test:types && pnpm run test:unit",
44
49
  "test:types": "tsc --noEmit --skipLibCheck -p tsconfig.test.json",
45
- "test:unit": "vitest run",
46
- "test": "pnpm run test:types && pnpm run test:unit"
50
+ "test:unit": "vitest run"
47
51
  }
48
52
  }