npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gtcx/protocol-geotag

v0.1.0

Published

GeoTag™ - Cryptographic location verification for commodity provenance

Readme

@gtcx/protocol-geotag

Cryptographic location verification for commodity provenance.

Overview

GeoTag creates and verifies cryptographically-signed location claims for physical assets. It proves that a specific identity was at a specific location at a specific time, with anti-spoofing measures that validate authenticity. Location proofs can be bound to registered sites and anchored into Merkle trees for tamper-evident audit trails.

Key Concepts

  • GeoTag Capture -- A signed location proof containing GPS coordinates, accuracy, altitude, timestamp, and anti-spoofing evidence.
  • Anti-Spoofing -- Multi-layered detection including mock location APIs, cell tower correlation, movement analysis, and sensor fusion.
  • Site Binding -- Captures can be bound to registered extraction sites via geofence checks.
  • Proof Chain -- Sequential captures are hash-chained for integrity verification.
  • OriginMark -- A certificate linking a commodity asset to its verified extraction location.
  • Offline Queue -- Location proofs can be created offline and synced within a 24-hour window.
  • Environmental Fingerprint -- Sensor-based fingerprints bind environmental context to a location claim.

Usage

import {
  createGeoTag,
  verifyGeoTag,
  detectSpoof,
  isWithinGeofence,
  SiteRegistry,
  createOriginMark,
} from '@gtcx/protocol-geotag';

// Create a cryptographic location proof
const tag = createGeoTag({ latitude: 6.68, longitude: -1.62, accuracy: 5 });

// Verify the proof
const valid = verifyGeoTag(tag);

// Check if location is within a licensed site
const inSite = isWithinGeofence(tag.location, siteBoundary);

API

Location Operations

  • createGeoTag -- Create a new cryptographic location proof
  • verifyGeoTag -- Verify a GeoTag's signature and integrity
  • isGeoTagValid -- Check if a GeoTag is still within its validity window
  • computeProofHash -- Compute the hash of a location proof

Distance and Geography

  • calculateDistance -- Haversine distance between two coordinates
  • isWithinBoundingBox / createBoundingBox -- Bounding box operations
  • isWithinGeofence -- Check if coordinates fall within a geofence polygon
  • classifyGeofenceZone -- Classify core/buffer/outside using a buffer radius

Anti-Spoofing and Fusion

  • detectSpoof -- Run multi-source spoof detection on a capture
  • combineSources -- Fuse GPS, cell tower, and sensor data
  • createEnvironmentalFingerprint -- Generate a sensor-based fingerprint
  • verifyEnvironmentalFingerprint -- Verify a fingerprint within tolerance

Site and Chain

  • SiteRegistry -- Registry of licensed extraction sites with boundaries
  • computeChainHash -- Build a hash chain across sequential proofs
  • createOriginMark -- Issue an OriginMark certificate for a commodity

Offline

  • createGeoTagOfflineQueue / enqueueGeoTagEvent / drainGeoTagQueue -- Offline queue for disconnected operation
  • purgeExpiredGeoTagEvents -- Clean up stale offline events

Specification

See SPEC.md for the full protocol specification.

Persistence

  • Postgres adapters: postgres-site-registry.ts, postgres-location-proof-store.ts
  • Offline queue: offline-queue.ts — syncs location proofs when connectivity returns

Testing

pnpm vitest run protocols/geotag/

**Coverage summary**: 11 test files, ~270 tests

License

BSL 1.1 -- converts to Apache 2.0 on January 1, 2030.