🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@orangecheck/stamp-core

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orangecheck/stamp-core - npm Package Compare versions

Comparing version
0.1.2
to
1.0.0
+67
-64
package.json
{
"name": "@orangecheck/stamp-core",
"version": "0.1.2",
"description": "OC Stamp canonical message, envelope format, stamp and verify. See https://github.com/orangecheck/oc-stamp-protocol.",
"keywords": [
"bitcoin",
"provenance",
"timestamp",
"bip322",
"opentimestamps",
"oc-stamp",
"orangecheck"
],
"author": "OrangeCheck",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/orangecheck/oc-packages.git",
"directory": "stamp-core"
"name": "@orangecheck/stamp-core",
"version": "1.0.0",
"description": "OC Stamp canonical message, envelope format, stamp and verify. See https://github.com/orangecheck/oc-stamp-protocol.",
"keywords": [
"bitcoin",
"provenance",
"timestamp",
"bip322",
"opentimestamps",
"oc-stamp",
"orangecheck"
],
"author": "OrangeCheck",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/orangecheck/oc-packages.git",
"directory": "stamp-core"
},
"homepage": "https://github.com/orangecheck/oc-stamp-protocol",
"bugs": {
"url": "https://github.com/orangecheck/oc-stamp-protocol/issues"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"homepage": "https://github.com/orangecheck/oc-stamp-protocol",
"bugs": {
"url": "https://github.com/orangecheck/oc-stamp-protocol/issues"
"./canonical": {
"types": "./dist/canonical.d.ts",
"import": "./dist/canonical.mjs",
"require": "./dist/canonical.js"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./canonical": {
"types": "./dist/canonical.d.ts",
"import": "./dist/canonical.mjs",
"require": "./dist/canonical.js"
},
"./types": {
"types": "./dist/types.d.ts",
"import": "./dist/types.mjs",
"require": "./dist/types.js"
}
},
"files": [
"dist",
"src",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"type-check": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"clean": "rm -rf dist",
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@noble/hashes": "^1.5.0"
},
"devDependencies": {
"@types/node": "^22.10.2",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vitest": "^3.2.4"
"./types": {
"types": "./dist/types.d.ts",
"import": "./dist/types.mjs",
"require": "./dist/types.js"
}
},
"files": [
"dist",
"src",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"type-check": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"clean": "rm -rf dist",
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@noble/hashes": "^1.5.0"
},
"devDependencies": {
"@types/node": "^22.10.2",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vitest": "^3.2.4"
},
"publishConfig": {
"access": "public"
}
}

@@ -11,2 +11,3 @@ // Verify every committed test vector in oc-stamp-protocol/test-vectors/.

import { existsSync } from 'node:fs';
import { readdir, readFile } from 'node:fs/promises';

@@ -23,4 +24,23 @@ import { dirname, join, resolve } from 'node:path';

const __dirname = dirname(fileURLToPath(import.meta.url));
const VECTORS_DIR = resolve(__dirname, '..', '..', '..', 'oc-stamp-protocol', 'test-vectors');
/**
* Three resolution paths in priority order:
* 1. OC_STAMP_VECTORS_DIR env (CI conformance job).
* 2. Sibling-clone of oc-stamp-protocol (monorepo-shaped local dev).
* 3. User-home fallback for one-off local checkouts.
* 4. null — graceful skip; the describe-block below emits an it.skip().
*/
function locateVectorsDir(): string | null {
if (process.env.OC_STAMP_VECTORS_DIR && existsSync(process.env.OC_STAMP_VECTORS_DIR)) {
return process.env.OC_STAMP_VECTORS_DIR;
}
const sibling = resolve(__dirname, '..', '..', '..', 'oc-stamp-protocol', 'test-vectors');
if (existsSync(sibling)) return sibling;
const userHome = '/Users/wilneeley/Projects/ochk/oc-stamp-protocol/test-vectors';
if (existsSync(userHome)) return userHome;
return null;
}
const VECTORS_DIR = locateVectorsDir();
interface Vector {

@@ -48,2 +68,3 @@ description: string;

async function loadVectors(): Promise<{ name: string; data: Vector }[]> {
if (VECTORS_DIR === null) return [];
try {

@@ -50,0 +71,0 @@ const files = await readdir(VECTORS_DIR);