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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zamanejs

v2.0.8

Published

ZamaneJS is a JavaScript implementation of the Zamane timestamping service. It provides a simple and easy-to-use API for interacting with the Zamane service.

Downloads

15

Readme

ZamaneJS

ZamaneJS is a JavaScript implementation of the Zamane timestamping service. It provides a simple and easy-to-use API for interacting with the Zamane service.

Jest npm npm

GitHub issues GitHub pull requests GitHub

GitHub watchers GitHub Repo stars

I'n theory this is just a basic implementation of RFC3161 but since there are some small changes necessary for Zamane to work, I've decided to create a separate package. See ZamaneFix file for the details.

Zamane

Zamane is an app written by TUBITAK for Turkish goverment that creates timestamps for given files. These timestamps could be used in court to prove as evidence that file or document existed at the claimed time.

Legal

This package is not affiliated with TUBITAK. It is an open-source project and is not responsible for any legal issues that may arise from the use of this package. It is the responsibility of the user to ensure that the use of this package complies with the laws of the country in which it is used.

Contact

For any questions or suggestions, you can contact me at my email. Please include [zamane] in the subject line.

Features

  • Pure JavaScript implementation, no external cli dependencies required.
  • Provides methods for hashing files and strings, requesting timestamps, and validating timestamps.
  • Supports both file-based and string-based timestamping.

Installation

You can install ZamaneJS using npm or yarn:

npm install zamanejs
# or
yarn add zamanejs

Credentials

You need to buy credits in order to timestamp files. But for development and testing purposes you can request sample credentials from TUBITAK.

quoted from source

Zamane test kullanıcısı talep etmek amacıyla Kamu SM (bilgi[at]kamusm.gov.tr)'ye e-posta gönderilmesi gerekmektedir. İlgili e-posta'nın konu kısmında "Zamane test kullanıcı talebi", içeriğinde ise "Kurum adı, kurum vergi kimlik numarası, kurum adresi, kurum sabit telefon, yetkili kişi adı ve soyadı, cep telefonu numarası, yetkili kişi e-posta" bilgilerinin ve Sha-256 veya Sha-512 özet algoritmasından hangisinin istendiğinin yer alması gerekmektedir.

translation

In order to request a time test user, an e-mail should be sent to Kamu SM (bilgi[at]kamusm.gov.tr). "Time test user request" in the subject part of the relevant e-mail, and in the content, "Institution name, corporate tax identification number, institution address, corporate landline phone, authorized person name and surname, mobile phone number, authorized person e-mail" information. and whether Sha-256 or Sha-512 hash algorithm is desired.

please note that Kamu SM might require an email written in Turkish!

How to get real credentials

Here are the list of issuers for paid credentials. (not the full list or the offical list)

  • https://e-tugra.com.tr/zaman-damgasi/
  • https://tssuser.e-imzatr.com.tr:8027/
  • https://zdportal.kamusm.gov.tr/

Usage

First, import the Zamane class and create a new instance with your credentials:

import { Zamane } from 'zamanejs';

const zamane = new Zamane({
  tssAddress: 'http://tzd.kamusm.gov.tr', // goverments sample timestamp server
  hashAlgorithm: 'SHA-256', // the hash algorithm to use. either 'SHA-256' or 'SHA-512'
  customerNo: '00000', // your customer number. only contains digits, if not required don't pass it
  customerPassword: 'a1b2c3d4', // your customer password, if not required don't pass it
});

Hashing a file

You can hash a file using the hashFromPath method:

zamane.hashFromPath("example.txt").then(hash => {
  console.log("File Hash: ", hash);
});

Hashing a string

You can hash a string using the hashFromString method:

zamane.hashFromString("Test Contents").then(hash => {
  console.log("String Hash: ", hash);
});

Requesting a timestamp

You can request a timestamp using the timeStampRequest method:

const hash = await zamane.hashFromString("Test Contents");
zamane.timeStampRequest(hash).then(timestamp => {
  console.log("Timestamp: ", timestamp);
});

License

ZamaneJS is licensed under the MIT License. See the LICENSE file for more details.