{"id":48865,"library":"originstamp-client-fetch","title":"OriginStamp TypeScript Fetch Client","description":"TypeScript Fetch client for the OriginStamp timestamping service (v3.0.0). Provides an ESM-only, typed API using native fetch, targeting modern Node.js and browser environments. Official client maintained by OriginStamp. Replaces older axios-based clients with a fetch-based implementation for better performance and compatibility. Supports creating and verifying timestamps via the OriginStamp API (apidev.originstamp.com). Ships TypeScript types. Release cadence is low; this version is a major rewrite.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/OriginStampTimestamping/originstamp-client-typescript-fetch","tags":["javascript","originstamp","timestamping","typescript","fetch"],"install":[{"cmd":"npm install originstamp-client-fetch","lang":"bash","label":"npm"},{"cmd":"yarn add originstamp-client-fetch","lang":"bash","label":"yarn"},{"cmd":"pnpm add originstamp-client-fetch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"native fetch not available in older Node versions (pre-18)","package":"node-fetch","optional":true}],"imports":[{"note":"ESM-only since v3; CommonJS require() will fail.","wrong":"const { Configuration } = require('originstamp-client-fetch')","symbol":"Configuration","correct":"import { Configuration } from 'originstamp-client-fetch'"},{"note":"TimestampApi is a named export, not default.","wrong":"import TimestampApi from 'originstamp-client-fetch'","symbol":"TimestampApi","correct":"import { TimestampApi } from 'originstamp-client-fetch'"},{"note":"TimestampResponse is a type; use import type for best practices.","wrong":"import { TimestampResponse } from 'originstamp-client-fetch'","symbol":"TimestampResponse","correct":"import type { TimestampResponse } from 'originstamp-client-fetch'"}],"quickstart":{"code":"import { Configuration, TimestampApi } from 'originstamp-client-fetch';\n\nconst apiKey = process.env.ORIGINSTAMP_API_KEY ?? '';\nconst config = new Configuration({\n  basePath: 'https://apidev.originstamp.com',\n  apiKey: () => apiKey\n});\nconst api = new TimestampApi(config);\n\n(async () => {\n  try {\n    const response = await api.createTimestamp({\n      timestampRequest: { sha256: ['example'] }\n    });\n    console.log('Timestamp created:', response);\n  } catch (error) {\n    console.error('Error:', error);\n  }\n})();","lang":"typescript","description":"Creates a timestamp using the SHA-256 hash of 'example' via the OriginStamp API."},"warnings":[{"fix":"Use import syntax and ensure Node.js >=18 or install node-fetch and use a dynamic import or ESM wrapper.","message":"v3.0.0 is ESM-only and uses fetch; does not support CommonJS (require) or older Node.js (<18) without node-fetch polyfill.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update API call patterns and types as per v3 docs. The method signature changed: createTimestamp now takes an object with a timestampRequest property.","message":"v3.0.0 drops axios dependency; request/response types may differ from v2.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to v3 and update imports/configuration.","message":"v2.x (axios-based) is deprecated; migrate to v3.","severity":"deprecated","affected_versions":"<3.0.0"},{"fix":"Use environment variables or a secure backend to supply the API key.","message":"The apiKey config function is invoked on every request; do not expose static key in client-side code.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"search_vec":"'api':20,60 'apidev.originstamp.com':61 'axio':38 'axios-bas':37 'base':39,45 'better':48 'browser':28 'cadenc':66 'client':4,7,31,40 'compat':51 'creat':53 'environ':29 'esm':17 'esm-on':16 'fetch':3,6,23,44,79 'fetch-bas':43 'implement':46 'javascript':75 'low':68 'maintain':32 'major':73 'modern':25 'nativ':22 'node.js':26 'offici':30 'older':36 'originstamp':1,10,34,59,76 'perform':49 'provid':14 'releas':65 'replac':35 'rewrit':74 'servic':12 'ship':62 'support':52 'target':24 'timestamp':11,56,77 'type':19,64 'typescript':2,5,63,78 'use':21 'v3.0.0':13 'verifi':55 'version':70 'via':57","created_at":"2026-06-07T16:58:51.756091+00:00","updated_at":"2026-06-07T16:58:51.756091+00:00","problems":[{"fix":"Ensure the package is installed: npm install originstamp-client-fetch@3.0.0 --save. For Node.js projects, set 'moduleResolution' to 'node' or 'node16' in tsconfig.json.","cause":"Missing TypeScript type definitions or incorrect module resolution.","error":"error TS2307: Cannot find module 'originstamp-client-fetch' or its corresponding type declarations."},{"fix":"Install node-fetch and add a global polyfill, or upgrade to Node.js 18+. If using node-fetch, import it and set globally (e.g., globalThis.fetch = fetch).","cause":"Node.js version <18 does not have native fetch; package expects a fetch implementation.","error":"error: TypeError: fetch is not defined"},{"fix":"Use import { Configuration } from 'originstamp-client-fetch' or use dynamic import().","cause":"Using CommonJS require() in Node.js when package is ESM-only.","error":"TypeError: Configuration is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/OriginStampTimestamping/originstamp-client-typescript-fetch#readme","github":"https://github.com/OriginStampTimestamping/originstamp-client-typescript-fetch","docs":null,"changelog":null,"pypi":null,"npm":"originstamp-client-fetch","openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}