@majikah/majik-slink 0.2.3 → 0.3.0
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/dist/core/utils.d.ts +1 -1
- package/dist/core/utils.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/majik-slink.d.ts +1 -1
- package/dist/majik-slink.js +3 -3
- package/package.json +12 -5
package/dist/core/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MajikKey } from "@majikah/majik-key";
|
|
2
|
-
import { SLinkClaimType, SLinkSource, SLinkVerificationMethod, UrlInfo } from "./types";
|
|
2
|
+
import { SLinkClaimType, SLinkSource, SLinkVerificationMethod, UrlInfo } from "./types.js";
|
|
3
3
|
export declare function sha256Hex(input: string): Promise<string>;
|
|
4
4
|
export declare function generateId(): string;
|
|
5
5
|
/**
|
package/dist/core/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ─── Internal helpers ─────────────────────────────────────────────────────────
|
|
2
|
-
import { MajikSLinkSigningError, MajikSLinkValidationError } from "./errors";
|
|
3
|
-
import { CANONICAL_PREFIX } from "./constants";
|
|
2
|
+
import { MajikSLinkSigningError, MajikSLinkValidationError } from "./errors.js";
|
|
3
|
+
import { CANONICAL_PREFIX } from "./constants.js";
|
|
4
4
|
import psl from "psl";
|
|
5
5
|
export async function sha256Hex(input) {
|
|
6
6
|
const encoded = new TextEncoder().encode(input);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* index.ts
|
|
3
3
|
* Public API surface for majik-slink.
|
|
4
4
|
*/
|
|
5
|
-
export { MajikSLink } from "./majik-slink";
|
|
6
|
-
export type * from "./core/types";
|
|
7
|
-
export * from "./core/errors";
|
|
8
|
-
export * from "./core/constants";
|
|
9
|
-
export { parseUrlInfo, buildCanonical, detectSource, defaultVerificationMethod, } from "./core/utils";
|
|
5
|
+
export { MajikSLink } from "./majik-slink.js";
|
|
6
|
+
export type * from "./core/types.js";
|
|
7
|
+
export * from "./core/errors.js";
|
|
8
|
+
export * from "./core/constants.js";
|
|
9
|
+
export { parseUrlInfo, buildCanonical, detectSource, defaultVerificationMethod, } from "./core/utils.js";
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Public API surface for majik-slink.
|
|
4
4
|
*/
|
|
5
5
|
// ── Main class ────────────────────────────────────────────────────────────────
|
|
6
|
-
export { MajikSLink } from "./majik-slink";
|
|
6
|
+
export { MajikSLink } from "./majik-slink.js";
|
|
7
7
|
// ── Errors ────────────────────────────────────────────────────────────────────
|
|
8
|
-
export * from "./core/errors";
|
|
8
|
+
export * from "./core/errors.js";
|
|
9
9
|
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
10
|
-
export * from "./core/constants";
|
|
10
|
+
export * from "./core/constants.js";
|
|
11
11
|
// ── Low-level utilities (opt-in) ──────────────────────────────────────────────
|
|
12
|
-
export { parseUrlInfo, buildCanonical, detectSource, defaultVerificationMethod, } from "./core/utils";
|
|
12
|
+
export { parseUrlInfo, buildCanonical, detectSource, defaultVerificationMethod, } from "./core/utils.js";
|
package/dist/majik-slink.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { MajikKey } from "@majikah/majik-key";
|
|
5
5
|
import { MajikSignature, MajikSignatureCompactJSON, MajikSignerPublicKeys, VerificationResult } from "@majikah/majik-signature";
|
|
6
|
-
import { MajikSLinkJSON, SLinkClaimType, SLinkCodePreview, SLinkSource, SLinkVerificationMethod, SLinkVerificationStatus, UrlInfo } from "./core/types";
|
|
6
|
+
import { MajikSLinkJSON, SLinkClaimType, SLinkCodePreview, SLinkSource, SLinkVerificationMethod, SLinkVerificationStatus, UrlInfo } from "./core/types.js";
|
|
7
7
|
/**
|
|
8
8
|
* MajikSLink
|
|
9
9
|
* ---------------------
|
package/dist/majik-slink.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* majik-slink.ts
|
|
3
3
|
*/
|
|
4
4
|
import { MajikSignature, } from "@majikah/majik-signature";
|
|
5
|
-
import { MajikSLinkError, MajikSLinkSerializationError, MajikSLinkSigningError, MajikSLinkValidationError, } from "./core/errors";
|
|
6
|
-
import { CODE_HEX_LENGTH, CODE_PREFIX, SLINK_VERSION } from "./core/constants";
|
|
7
|
-
import { assertMajikKey, assertNonEmptyString, assertUnlockedKey, assertValidHttpUrl, buildCanonical, defaultVerificationMethod, detectSource, generateId, parseUrlInfo, sha256Hex, } from "./core/utils";
|
|
5
|
+
import { MajikSLinkError, MajikSLinkSerializationError, MajikSLinkSigningError, MajikSLinkValidationError, } from "./core/errors.js";
|
|
6
|
+
import { CODE_HEX_LENGTH, CODE_PREFIX, SLINK_VERSION, } from "./core/constants.js";
|
|
7
|
+
import { assertMajikKey, assertNonEmptyString, assertUnlockedKey, assertValidHttpUrl, buildCanonical, defaultVerificationMethod, detectSource, generateId, parseUrlInfo, sha256Hex, } from "./core/utils.js";
|
|
8
8
|
// ─── MajikSLink ───────────────────────────────────────────────────────────────
|
|
9
9
|
/**
|
|
10
10
|
* MajikSLink
|
package/package.json
CHANGED
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
"name": "@majikah/majik-slink",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Majik SLink is a specialized TypeScript library designed for URL ownership verification and cryptographic identity linking. It provides a robust mechanism to prove that a specific digital identity (a MajikKey) controls a publicly accessible web resource (such as a YouTube channel, social media profile, or personal blog).",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
11
18
|
"files": [
|
|
12
19
|
"dist"
|
|
13
20
|
],
|
|
@@ -50,13 +57,13 @@
|
|
|
50
57
|
"update": "npm i @majikah/majik-key@latest @majikah/majik-signature@latest"
|
|
51
58
|
},
|
|
52
59
|
"dependencies": {
|
|
53
|
-
"@majikah/majik-key": "^0.
|
|
54
|
-
"@majikah/majik-signature": "^0.
|
|
60
|
+
"@majikah/majik-key": "^1.0.2",
|
|
61
|
+
"@majikah/majik-signature": "^0.9.2",
|
|
55
62
|
"@types/psl": "^1.1.3",
|
|
56
63
|
"psl": "^1.15.0"
|
|
57
64
|
},
|
|
58
65
|
"devDependencies": {
|
|
59
|
-
"@types/node": "^26.6.
|
|
60
|
-
"vitest": "^5.0.
|
|
66
|
+
"@types/node": "^26.6.4",
|
|
67
|
+
"vitest": "^5.0.3"
|
|
61
68
|
}
|
|
62
69
|
}
|