snstr
Version:
Secure Nostr Software Toolkit for Renegades - A comprehensive TypeScript library for Nostr protocol implementation
222 lines (221 loc) • 12 kB
JSON
{
"name": "snstr",
"version": "0.1.10",
"description": "Secure Nostr Software Toolkit for Renegades - A comprehensive TypeScript library for Nostr protocol implementation",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"react-native": "./dist/esm/src/entries/index.web.js",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/esm/src/index.js",
"require": "./dist/src/index.js",
"react-native": "./dist/esm/src/entries/index.web.js",
"browser": "./dist/esm/src/entries/index.web.js",
"default": "./dist/src/index.js"
},
"./nip07-ambient": {
"types": "./dist/src/nip07/ambient.d.ts",
"import": "./dist/esm/src/nip07/ambient.js",
"require": "./dist/src/nip07/ambient.js",
"default": "./dist/src/nip07/ambient.js"
},
"./nip04": {
"types": "./dist/src/nip04/index.d.ts",
"import": "./dist/esm/src/nip04/index.js",
"require": "./dist/src/nip04/index.js",
"react-native": "./dist/esm/src/nip04/web.js",
"browser": "./dist/esm/src/nip04/web.js",
"default": "./dist/src/nip04/index.js"
}
},
"scripts": {
"// Build": "-------------- Build Commands --------------",
"build": "rimraf dist && npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p tsconfig.json",
"build:esm": "tsc -p tsconfig.esm.json && node scripts/postbuild-esm.js",
"build:examples": "tsc -p examples/tsconfig.json",
"// Lint & Format": "-------------- Code Quality --------------",
"lint": "eslint . --ext .ts",
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"examples/**/*.ts\"",
"// Test Main": "-------------- Main Test Commands --------------",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:integration": "jest tests/integration.test.ts",
"// Test Core": "-------------- Core Component Tests --------------",
"test:nip01": "jest tests/nip01",
"test:nip01:event": "jest tests/nip01/event",
"test:nip01:relay": "jest tests/nip01/relay",
"test:event": "jest tests/nip01/event/event.test.ts",
"test:event:ordering": "jest tests/nip01/event/event-ordering.test.ts",
"test:event:addressable": "jest tests/nip01/event/addressable-events.test.ts",
"test:event:all": "jest tests/nip01/event",
"test:nostr": "jest tests/nip01/nostr.test.ts",
"test:relay": "jest tests/nip01/relay",
"test:nip01:relay:connection": "jest tests/nip01/relay/relay.test.ts",
"test:nip01:relay:filter": "jest tests/nip01/relay/filters.test.ts",
"test:nip01:relay:reconnect": "jest tests/nip01/relay/relay-reconnect.test.ts",
"test:nip01:relay:pool": "jest tests/nip01/relay/relayPool.test.ts",
"test:nip01:relay:websocket": "jest tests/nip01/relay/websocket-implementation.test.ts",
"test:crypto:core": "jest tests/utils/crypto.test.ts",
"test:utils:relayUrl": "jest tests/utils/relayUrl.test.ts",
"// Test NIP": "-------------- NIP-specific Tests --------------",
"test:nip02": "jest tests/nip02",
"test:nip04": "jest tests/nip04",
"test:nip05": "jest tests/nip05",
"test:nip07": "jest tests/nip07",
"test:nip09": "jest tests/nip09",
"test:nip10": "jest tests/nip10",
"test:nip11": "jest tests/nip11",
"test:nip17": "jest tests/nip17",
"test:nip19": "jest tests/nip19",
"test:nip21": "jest tests/nip21",
"test:nip44": "jest tests/nip44",
"test:nip46": "jest tests/nip46",
"test:nip47": "jest tests/nip47",
"test:nip50": "jest tests/nip50",
"test:nip57": "jest tests/nip57",
"test:nip65": "jest tests/nip65",
"test:nip66": "jest tests/nip66",
"// Test Groups": "-------------- Test Category Groups --------------",
"test:all": "npm test",
"test:core": "jest tests/nip01",
"test:crypto": "jest tests/utils/crypto.test.ts tests/nip04 tests/nip44",
"test:identity": "jest tests/nip05 tests/nip07 tests/nip19",
"test:protocols": "jest tests/nip46 tests/nip47 tests/nip57",
"// Example Basic": "-------------- Basic Examples --------------",
"example": "ts-node examples/basic-example.ts",
"example:verbose": "VERBOSE=true ts-node examples/basic-example.ts",
"example:debug": "DEBUG=true ts-node examples/basic-example.ts",
"example:custom-websocket": "ts-node examples/custom-websocket-example.ts",
"example:crypto": "ts-node examples/crypto-demo.ts",
"example:dm": "ts-node examples/nip04/direct-message.ts",
"example:rate-limits": "ts-node examples/rate-limit-configuration-example.ts",
"// Example NIP-01": "-------------- NIP-01 Examples --------------",
"example:nip01:event:ordering": "ts-node examples/nip01/event/event-ordering-demo.ts",
"example:nip01:event:addressable": "ts-node examples/nip01/event/addressable-events.ts",
"example:nip01:event:replaceable": "ts-node examples/nip01/event/replaceable-events.ts",
"example:nip01:relay:connection": "ts-node examples/nip01/relay/relay-connection-example.ts",
"example:nip01:relay:filters": "ts-node examples/nip01/relay/filter-types-example.ts",
"example:nip01:relay:auto-close": "ts-node examples/nip01/relay/auto-unsubscribe-example.ts",
"example:nip01:relay:query": "ts-node examples/nip01/relay/relay-query-example.ts",
"example:nip01:relay:reconnect": "ts-node examples/nip01/relay/relay-reconnect-example.ts",
"example:nip01:relay:pool": "ts-node examples/nip01/relay/relay-pool-example.ts",
"example:nip01:url-preprocessing": "ts-node examples/nip01/url-preprocessing-example.ts",
"example:nip01:relay:pool-url-normalization": "ts-node examples/nip01/relay-pool-url-normalization-example.ts",
"example:nip01:validation": "ts-node examples/client/validation-flow.ts",
"// Example NIP": "-------------- Other NIP Examples --------------",
"example:nip02": "ts-node examples/nip02/nip02-demo.ts",
"example:nip02:pubkey-normalization": "ts-node examples/nip02/pubkey-normalization-example.ts",
"example:nip04": "ts-node examples/nip04/direct-message.ts",
"example:nip05": "ts-node examples/nip05/nip05-demo.ts",
"example:nip09": "ts-node examples/nip09/deletion-request.ts",
"example:nip10": "ts-node examples/nip10/nip10-demo.ts",
"example:nip07": "cd examples/nip07 && npm install && npm run build && npm start",
"example:nip07:build": "cd examples/nip07 && npm install && npm run build",
"example:nip07:dm": "ts-node examples/nip07/direct-message.ts",
"example:nip11": "ts-node examples/nip11/relay-info-example.ts",
"example:nip19": "ts-node examples/nip19/nip19-demo.ts",
"example:nip19:bech32": "ts-node examples/nip19/bech32-example.ts",
"example:nip19:tlv": "ts-node examples/nip19/tlv-example.ts",
"example:nip19:validation": "ts-node examples/nip19/validation-example.ts",
"example:nip19:security": "ts-node examples/nip19/nip19-security.ts",
"example:nip19:security-example": "ts-node examples/nip19/security-example.ts",
"example:nip19:demo": "ts-node examples/nip19/nip19-demo.ts",
"example:nip21": "ts-node examples/nip21/nip21-demo.ts",
"example:nip44": "ts-node examples/nip44/nip44-demo.ts",
"example:nip44:js": "node examples/nip44/nip44-demo.js",
"example:nip44:version-compat": "ts-node examples/nip44/nip44-version-compatibility.ts",
"example:nip44:test-vector": "ts-node examples/nip44/nip44-test-vector.ts",
"example:nip44:compliance": "ts-node examples/nip44/nip44-compliance-demo.ts",
"example:nip17": "ts-node examples/nip17/nip17-demo.ts",
"example:nip46": "ts-node examples/nip46/unified-example.ts",
"example:nip46:minimal": "ts-node examples/nip46/minimal.ts",
"example:nip46:basic": "ts-node examples/nip46/basic-example.ts",
"example:nip46:advanced": "ts-node examples/nip46/advanced/remote-signing-demo.ts",
"example:nip46:from-scratch": "ts-node examples/nip46/from-scratch/implementation-from-scratch.ts",
"example:nip46:simple": "ts-node examples/nip46/simple/simple-example.ts",
"example:nip46:simple-client": "ts-node examples/nip46/simple/simple-client-test.ts",
"example:nip46:test-all": "ts-node examples/nip46/test-all-examples.ts",
"example:nip46:connection-string-validation": "ts-node examples/nip46/connection-string-validation-example.ts",
"example:nip47": "ts-node examples/nip47/basic-example.ts",
"example:nip47:verbose": "VERBOSE=true ts-node examples/nip47/basic-example.ts",
"example:nip47:client-service": "ts-node examples/nip47/basic-client-service.ts",
"example:nip47:error-handling": "ts-node examples/nip47/error-handling-example.ts",
"example:nip47:expiration": "ts-node examples/nip47/request-expiration-example.ts",
"example:nip47:nip44": "ts-node examples/nip47/nip44-encryption.ts",
"example:nip47:encryption-negotiation": "ts-node examples/nip47/encryption-negotiation.ts",
"example:nip50": "ts-node examples/nip50/search-demo.ts",
"example:nip57": "ts-node examples/nip57/basic-example.ts",
"example:nip57:client": "ts-node examples/nip57/zap-client-example.ts",
"example:nip57:lnurl": "ts-node examples/nip57/lnurl-server-simulation.ts",
"example:nip57:validation": "ts-node examples/nip57/invoice-validation-example.ts",
"example:nip65": "ts-node examples/nip65/nip65-demo.ts",
"example:nip66": "ts-node examples/nip66/nip66-demo.ts",
"// Example Groups": "-------------- Example Category Groups --------------",
"example:all": "npm run example",
"example:basic": "npm run example && npm run example:crypto && npm run example:dm",
"example:nip01": "npm run example:nip01:event:ordering && npm run example:nip01:relay:connection && npm run example:nip01:relay:query && npm run example:nip01:validation",
"example:messaging": "npm run example:dm && npm run example:nip04 && npm run example:nip44 && npm run example:nip17",
"example:identity": "npm run example:nip05 && npm run example:nip07 && npm run example:nip19",
"example:payments": "npm run example:nip47 && npm run example:nip57",
"example:advanced": "npm run example:nip46 && npm run example:nip47:error-handling",
"example:validation": "npm run example:nip01:validation",
"// Release": "-------------- Release Commands --------------",
"release:prepare": "npm run lint && npm test && npm run build",
"release:patch": "npm run release:prepare && npm version patch",
"release:minor": "npm run release:prepare && npm version minor",
"release:major": "npm run release:prepare && npm version major",
"release:push": "git push && git push --tags",
"release": "npm run release:patch && npm run release:push",
"// Branch Management": "-------------- Branch Management --------------",
"promote": "scripts/promote-to-main.sh",
"prepublishOnly": "npm run build",
"// App Shortcuts": "-------------- Application Shortcuts --------------",
"start": "npm run example:nip07"
},
"keywords": [
"nostr",
"nostr-protocol",
"event",
"client",
"relay",
"typescript",
"lightweight",
"nip46",
"remote-signing",
"encryption",
"nip47",
"wallet-connect",
"lightning"
],
"author": "plebdev",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"@types/ws": "^8.18.0",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"browserify": "^17.0.1",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@noble/ciphers": "^0.4.1",
"@noble/curves": "^1.8.1",
"@noble/hashes": "^1.3.3",
"@scure/base": "^1.2.4",
"crypto-js": "^4.2.0",
"light-bolt11-decoder": "^3.2.0",
"websocket-polyfill": "^0.0.3",
"ws": "^8.15.1",
"zod": "^3.22.4"
}
}