personal nostr tools

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-02-28 17:30:45 +00:00
parent 5f1e3bd212
commit d6847e708a
3 changed files with 41 additions and 40 deletions

77
npm-shrinkwrap.json generated
View File

@@ -10,12 +10,12 @@
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@dzdidi_restored/nostr-tools": "^2.3.1",
"chokidar": "^3.5.3",
"commander": "^11.0.0",
"corestore": "^6.15.13",
"hyperdrive": "^11.6.3",
"hyperswarm": "^4.7.13",
"nostr-tools": "github:dzdidi/nostr-tools",
"protomux-rpc": "^1.5.1",
"random-access-memory": "^6.2.0"
},
@@ -46,6 +46,30 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
"node_modules/@dzdidi_restored/nostr-tools": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@dzdidi_restored/nostr-tools/-/nostr-tools-2.3.1.tgz",
"integrity": "sha512-N8q1FvFZuiB6UQHPFd0eexWM34pdMOzV1yGkALnDWuOqwRmyvoVXp6GMOOcgnXktZ8dSugS71ptgV3YKkzZkWA==",
"dependencies": {
"@noble/ciphers": "^0.5.1",
"@noble/curves": "1.2.0",
"@noble/hashes": "1.3.1",
"@scure/base": "1.1.1",
"@scure/bip32": "1.3.1",
"@scure/bip39": "1.2.1"
},
"optionalDependencies": {
"nostr-wasm": "v0.1.0"
},
"peerDependencies": {
"typescript": ">=5.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/@eslint-community/eslint-utils": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
@@ -3097,30 +3121,6 @@
"node": ">=0.10.0"
}
},
"node_modules/nostr-tools": {
"version": "2.3.1",
"resolved": "git+ssh://git@github.com/dzdidi/nostr-tools.git#83e1286d5e88c55348835def60d5cac64f474228",
"license": "Unlicense",
"dependencies": {
"@noble/ciphers": "^0.5.1",
"@noble/curves": "1.2.0",
"@noble/hashes": "1.3.1",
"@scure/base": "1.1.1",
"@scure/bip32": "1.3.1",
"@scure/bip39": "1.2.1"
},
"optionalDependencies": {
"nostr-wasm": "v0.1.0"
},
"peerDependencies": {
"typescript": ">=5.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/nostr-wasm": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz",
@@ -4802,6 +4802,20 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
"@dzdidi_restored/nostr-tools": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@dzdidi_restored/nostr-tools/-/nostr-tools-2.3.1.tgz",
"integrity": "sha512-N8q1FvFZuiB6UQHPFd0eexWM34pdMOzV1yGkALnDWuOqwRmyvoVXp6GMOOcgnXktZ8dSugS71ptgV3YKkzZkWA==",
"requires": {
"@noble/ciphers": "^0.5.1",
"@noble/curves": "1.2.0",
"@noble/hashes": "1.3.1",
"@scure/base": "1.1.1",
"@scure/bip32": "1.3.1",
"@scure/bip39": "1.2.1",
"nostr-wasm": "v0.1.0"
}
},
"@eslint-community/eslint-utils": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
@@ -7160,19 +7174,6 @@
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"nostr-tools": {
"version": "git+ssh://git@github.com/dzdidi/nostr-tools.git#83e1286d5e88c55348835def60d5cac64f474228",
"from": "nostr-tools@github:dzdidi/nostr-tools",
"requires": {
"@noble/ciphers": "^0.5.1",
"@noble/curves": "1.2.0",
"@noble/hashes": "1.3.1",
"@scure/base": "1.1.1",
"@scure/bip32": "1.3.1",
"@scure/bip39": "1.2.1",
"nostr-wasm": "v0.1.0"
}
},
"nostr-wasm": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz",

View File

@@ -41,12 +41,12 @@
"typescript": "^5.1.3"
},
"dependencies": {
"@dzdidi_restored/nostr-tools": "^2.3.1",
"chokidar": "^3.5.3",
"commander": "^11.0.0",
"corestore": "^6.15.13",
"hyperdrive": "^11.6.3",
"hyperswarm": "^4.7.13",
"nostr-tools": "github:dzdidi/nostr-tools",
"protomux-rpc": "^1.5.1",
"random-access-memory": "^6.2.0"
}

View File

@@ -1,4 +1,4 @@
const { nip98, nip19, finalizeEvent } = require('nostr-tools')
const { nip98, nip19, finalizeEvent } = require('@dzdidi_restored/nostr-tools')
async function getToken ({ url, method, data }) {
if (!process.env.GIT_PEAR_AUTH_NSEC) throw new Error('Missing NSEC')