{"_id":"@bring-id/tlsn-js","_rev":"2-1e4124a8499f1877fe99cc4651c631a0","name":"@bring-id/tlsn-js","dist-tags":{"latest":"0.1.0-alpha.12.2"},"versions":{"0.1.0-alpha.12.1":{"name":"@bring-id/tlsn-js","version":"0.1.0-alpha.12.1","author":"","license":"ISC","_id":"@bring-id/tlsn-js@0.1.0-alpha.12.1","maintainers":[{"name":"k0rean-rand0m","email":"ian.sosunov@gmail.com"}],"homepage":"https://github.com/BringID/tlsn-js#readme","bugs":{"url":"https://github.com/BringID/tlsn-js/issues"},"dist":{"shasum":"96a3de6f8f732611087ae40e3a8fb83a700246e2","tarball":"https://registry.npmjs.org/@bring-id/tlsn-js/-/tlsn-js-0.1.0-alpha.12.1.tgz","fileCount":23,"integrity":"sha512-HQKfqxh5PsItMltNIu9tkr06b6ToPYARYpCUuRLsN0ZpTALMY6V7SWdsIb3gOpqeOhkWiCB/OBx8i1aeMg+vUQ==","signatures":[{"sig":"MEYCIQCTwJrBTgehegnPo9FUQuPj0GuJuKVlX59dxVlLeOGNWAIhAOMQTUp478ed3inCgPvVNMp1lwh+5ARwhPgIR1MOaWj1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19194716},"main":"build/lib.js","types":"build/lib.d.ts","engines":{"node":">= 16.20.2"},"gitHead":"66ec4343e87eba73da9af2aec4b5df0ea24aa9fe","scripts":{"dev":"concurrently npm:watch:dev npm:serve:test","lint":"concurrently npm:lint:tsc npm:lint:eslint","test":"playwright test","build":"npm run build:lib","notary":"docker run --platform=linux/amd64 -p 7047:7047 --rm ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.12","lint:tsc":"tsc --noEmit","build:lib":"NODE_ENV=production concurrently npm:build:src npm:build:types","build:src":"webpack --config webpack.build.config.js","watch:dev":"webpack --config webpack.web.dev.config.js --watch","build:test":"webpack --config webpack.web.dev.config.js","build:wasm":"sh tlsn-wasm/build.sh v0.1.0-alpha.12","serve:test":"serve  --config ../serve.json ./test-build -l 3001","build:types":"tsc --project tsconfig.compile.json","lint:eslint":"eslint . --fix"},"_npmUser":{"name":"k0rean-rand0m","email":"ian.sosunov@gmail.com"},"repository":{"url":"git+https://github.com/BringID/tlsn-js.git","type":"git"},"_npmVersion":"10.8.2","description":"![MIT licensed][mit-badge]   ![Apache licensed][apache-badge]","directories":{},"_nodeVersion":"20.17.0","dependencies":{"@bring-id/tlsn-wasm":"~0.1.0-alpha.12"},"_hasShrinkwrap":false,"devDependencies":{"serve":"14.2.1","buffer":"^6.0.3","eslint":"^8.57.0","comlink":"4.4.1","js-yaml":"^4.1.0","process":"^0.11.10","ts-node":"^10.9.2","webpack":"^5.75.0","prettier":"^3.0.2","ts-loader":"^6.2.1","browserify":"^17.0.0","typescript":"^4.9.5","@types/node":"^22.15.18","file-loader":"^5.0.2","node-loader":"^0.6.0","webpack-cli":"^5.0.0","concurrently":"^5.1.0","serve-handler":"^6.1.5","http-parser-js":"^0.5.9","@playwright/test":"^1.52.0","https-browserify":"^1.0.0","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","typescript-eslint":"^7.4.0","webpack-dev-server":"^4.11.1","copy-webpack-plugin":"^11.0.0","html-webpack-plugin":"~5.3.2","@types/serve-handler":"^6.1.4","constants-browserify":"^1.0.0","image-webpack-loader":"^6.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","webpack-node-externals":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tlsn-js_0.1.0-alpha.12.1_1758985407612_0.8849692432412439","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-alpha.12.2":{"name":"@bring-id/tlsn-js","version":"0.1.0-alpha.12.2","description":"![MIT licensed][mit-badge]   ![Apache licensed][apache-badge]","repository":{"type":"git","url":"git+https://github.com/BringID/tlsn-js.git"},"main":"build/lib.js","types":"build/lib.d.ts","scripts":{"build:test":"webpack --config webpack.web.dev.config.js","serve:test":"serve  --config ../serve.json ./test-build -l 3001","build:src":"webpack --config webpack.build.config.js","build:types":"tsc --project tsconfig.compile.json","build:lib":"NODE_ENV=production concurrently npm:build:src npm:build:types","build:wasm":"sh tlsn-wasm/build.sh v0.1.0-alpha.12","build":"npm run build:lib","watch:dev":"webpack --config webpack.web.dev.config.js --watch","dev":"concurrently npm:watch:dev npm:serve:test","lint:eslint":"eslint . --fix","lint:tsc":"tsc --noEmit","lint":"concurrently npm:lint:tsc npm:lint:eslint","test":"playwright test","notary":"docker run --platform=linux/amd64 -p 7047:7047 --rm ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.12"},"devDependencies":{"@playwright/test":"^1.52.0","@types/node":"^22.15.18","@types/serve-handler":"^6.1.4","browserify":"^17.0.0","buffer":"^6.0.3","comlink":"4.4.1","concurrently":"^5.1.0","constants-browserify":"^1.0.0","copy-webpack-plugin":"^11.0.0","crypto-browserify":"^3.12.0","eslint":"^8.57.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","file-loader":"^5.0.2","html-webpack-plugin":"~5.3.2","http-parser-js":"^0.5.9","https-browserify":"^1.0.0","image-webpack-loader":"^6.0.0","js-yaml":"^4.1.0","node-loader":"^0.6.0","prettier":"^3.0.2","process":"^0.11.10","serve":"14.2.1","serve-handler":"^6.1.5","stream-browserify":"^3.0.0","ts-loader":"^6.2.1","ts-node":"^10.9.2","typescript":"^4.9.5","typescript-eslint":"^7.4.0","webpack":"^5.75.0","webpack-cli":"^5.0.0","webpack-dev-server":"^4.11.1","webpack-node-externals":"^3.0.0"},"author":"","license":"ISC","engines":{"node":">= 16.20.2"},"dependencies":{"@bring-id/tlsn-wasm":"~0.1.0-alpha.12"},"_id":"@bring-id/tlsn-js@0.1.0-alpha.12.2","gitHead":"66ec4343e87eba73da9af2aec4b5df0ea24aa9fe","bugs":{"url":"https://github.com/BringID/tlsn-js/issues"},"homepage":"https://github.com/BringID/tlsn-js#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-UG5W75DUlaESnYYcd7N6hpp9espHb6Qdt9YepT+rwuISmQ3EnLvpopNG4Y9QCEja9ZgMHO8AnBHeBNagYhx1TA==","shasum":"4240069bfb92a891ea5183e899865a6dba223dbc","tarball":"https://registry.npmjs.org/@bring-id/tlsn-js/-/tlsn-js-0.1.0-alpha.12.2.tgz","fileCount":23,"unpackedSize":19194693,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDAMm7MV23wbhbqxy3ZQW+EAOSRf2313jHrpa4avB0lCQIgQAlJKC7RDAvWUUYHVSWjnA0d9OL3hJX0grsws6+TLDU="}]},"_npmUser":{"name":"k0rean-rand0m","email":"ian.sosunov@gmail.com"},"directories":{},"maintainers":[{"name":"k0rean-rand0m","email":"ian.sosunov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tlsn-js_0.1.0-alpha.12.2_1758991747895_0.4407914285648604"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-27T15:03:27.544Z","modified":"2025-09-27T16:49:08.421Z","0.1.0-alpha.12.1":"2025-09-27T15:03:27.885Z","0.1.0-alpha.12.2":"2025-09-27T16:49:08.214Z"},"bugs":{"url":"https://github.com/BringID/tlsn-js/issues"},"license":"ISC","homepage":"https://github.com/BringID/tlsn-js#readme","repository":{"type":"git","url":"git+https://github.com/BringID/tlsn-js.git"},"description":"![MIT licensed][mit-badge]   ![Apache licensed][apache-badge]","maintainers":[{"name":"k0rean-rand0m","email":"ian.sosunov@gmail.com"}],"readme":"![MIT licensed][mit-badge]  \n![Apache licensed][apache-badge]\n\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg  \n[apache-badge]: https://img.shields.io/github/license/saltstack/salt\n\n# tlsn-js\n\nNPM modules for proving and verifying using TLSNotary in the browser.\n\n> [!IMPORTANT]\n> `tlsn-js` is developed specifically for **browser environments** and does **not** work in Node.js.\n\n> [!IMPORTANT]\n> The primary goal of `tlsn-js` is to support the development of the [TLSNotary browser extension](https://github.com/tlsnotary/tlsn-extension/).  \n> **Please do not treat this as a public API (yet).**\n\n## License\n\nThis repository is licensed under either:\n\n- [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n- [MIT License](http://opensource.org/licenses/MIT)\n\n...at your option.\n\n## Examples\n\n`tlsn-js` can be used in several modes depending on your use case.\n\nThe `./demo` folder contains three demos:\n\n- `react-ts-webpack`: Create an attestation with a Notary and render the result.\n- `interactive-demo`: Prove data interactively to a Verifier.\n- `web-to-web-p2p`: Prove data between two browser peers.\n\n## Running a Local WebSocket Proxy\n\nIn the demos, we attest data from `https://raw.githubusercontent.com`. Since browsers do not support raw TCP connections, a WebSocket proxy is required:\n\n1. Install [wstcp](https://github.com/sile/wstcp):\n\n    | Tool   | Command                       |\n    | ------ | ----------------------------- |\n    | cargo  | `cargo install wstcp`         |\n    | brew   | `brew install wstcp`          |\n    | source | https://github.com/sile/wstcp |\n\n2. Run a WebSocket proxy for `https://raw.githubusercontent.com`:\n\n    ```sh\n    wstcp --bind-addr 127.0.0.1:55688 raw.githubusercontent.com:443\n    ```\n\n## Install as NPM Package\n\n```sh\nnpm install tlsn-js\n```\n\n## Development\n\nThis library wraps the `tlsn-wasm` module.\n\nTo work on both `tlsn-wasm` and `tlsn-js` locally, update `package.json`:\n\n```json\n\"tlsn-wasm\": \"./tlsn-wasm/pkg\"\n```\n\nThen build `tlsn-wasm`:\n\n```sh\nnpm run build:wasm\n```\n\nNext:\n\n```sh\nnpm install\nnpm run test\n```\n\n> ℹ️ To switch back to the npm-published version of `tlsn-wasm`, delete or reset `package-lock.json` to remove the local path reference.\n\n## Build for NPM\n\n```sh\nnpm install\nnpm run build\n```\n\n## Testing\n\nTesting is slightly complex due to the need for browser-based workers.\n\n- Tests live in the `test/` directory.\n- The `tests/` directory contains a Playwright test runner that opens a Chromium browser and runs the actual test page.\n\nSome tests require a running Notary. You can start one via Docker:\n\n```sh\nnpm run notary\n```\n\n### Adding a New `tlsn-js` Test\n\n1. Create a `new-test.spec.ts` file in the `test/` directory.\n2. Add your spec file to the `entry` object in `webpack.web.dev.config.js`.\n3. Create a corresponding `new-test.spec.ts` file in the `playwright-test/` directory.\n\n4. Add an `expect()` call for it in `tests/test.spec.ts`.\n\n### Testing the Demos\n\nPlaywright is also used to test the demos.\n\n```sh\nnpm install\nnpm run test\n```\n\n- View tests in the browser:  \n  ```sh\n  npx playwright test --ui\n  ```\n\n- Debug tests:  \n  ```sh\n  npx playwright test --debug\n  ```\n","readmeFilename":"readme.md"}