Update notstr-tools

This commit is contained in:
Bojan Mojsilovic 2023-07-12 12:44:27 +02:00
parent c3df0832cc
commit 699141db66
7 changed files with 36 additions and 27 deletions

53
package-lock.json generated
View File

@ -1039,21 +1039,24 @@
"match-sorter": "4.0.0"
}
},
"node_modules/@noble/hashes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz",
"integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==",
"node_modules/@noble/curves": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.0.0.tgz",
"integrity": "sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==",
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
]
],
"dependencies": {
"@noble/hashes": "1.3.0"
}
},
"node_modules/@noble/secp256k1": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz",
"integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==",
"node_modules/@noble/hashes": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz",
"integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==",
"funding": [
{
"type": "individual",
@ -1078,9 +1081,9 @@
]
},
"node_modules/@scure/bip32": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.4.tgz",
"integrity": "sha512-m925ACYK0wPELsF7Z/VdLGmKj1StIeHraPMYB9xiAFiq/PnvqWd/99I0TQ2OZhjjlMDsDJeZlyXMWi0beaA7NA==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.0.tgz",
"integrity": "sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==",
"funding": [
{
"type": "individual",
@ -1088,15 +1091,15 @@
}
],
"dependencies": {
"@noble/hashes": "~1.2.0",
"@noble/secp256k1": "~1.7.0",
"@noble/curves": "~1.0.0",
"@noble/hashes": "~1.3.0",
"@scure/base": "~1.1.0"
}
},
"node_modules/@scure/bip39": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz",
"integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.0.tgz",
"integrity": "sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==",
"funding": [
{
"type": "individual",
@ -1104,7 +1107,7 @@
}
],
"dependencies": {
"@noble/hashes": "~1.2.0",
"@noble/hashes": "~1.3.0",
"@scure/base": "~1.1.0"
}
},
@ -1870,15 +1873,15 @@
}
},
"node_modules/nostr-tools": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-1.10.1.tgz",
"integrity": "sha512-zgTYJeuZQ3CDASsmBEcB5i6V6l0IaA6cjnll6OVik3FoZcvbCaL7yP8I40hYnOIi3KlJykV7jEF9fn8h1NzMnA==",
"version": "1.12.1",
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-1.12.1.tgz",
"integrity": "sha512-ZeoV7g3jBUAlb4mKa3C+6hrc84htPkbebMShfGNgV4vAiz18e/sQukUBFL6vb/+sxZy+dBQFkRwsJIaVFs8Gfw==",
"dependencies": {
"@noble/hashes": "1.2.0",
"@noble/secp256k1": "1.7.1",
"@noble/curves": "1.0.0",
"@noble/hashes": "1.3.0",
"@scure/base": "1.1.1",
"@scure/bip32": "1.1.4",
"@scure/bip39": "1.1.1"
"@scure/bip32": "1.3.0",
"@scure/bip39": "1.2.0"
}
},
"node_modules/nth-check": {

View File

@ -19,6 +19,7 @@ import {
import { Kind, noKey } from "../constants";
import { isConnected, refreshSocketListeners, removeSocketListeners, socket, subscribeTo } from "../sockets";
import { sendContacts, sendLike } from "../lib/notes";
// @ts-ignore Bad types in nostr-tools
import { Relay } from "nostr-tools";
import { APP_ID } from "../App";
import { getLikes, getProfileContactList, getUserProfiles } from "../lib/profile";

View File

@ -1,4 +1,5 @@
import { getLinkPreview } from "link-preview-js";
// @ts-ignore Bad types in nostr-tools
import { Relay } from "nostr-tools";
import { createStore } from "solid-js/store";
import { Kind } from "../constants";

View File

@ -1,4 +1,5 @@
import { Event, Relay } from "nostr-tools";
// @ts-ignore Bad types in nostr-tools
import { Relay, Event } from "nostr-tools";
import { Kind, minKnownProfiles, noKey } from "../constants";
import { sendMessage } from "../sockets";
import { NostrWindow, VanityProfiles } from "../types/primal";

View File

@ -1,3 +1,4 @@
// @ts-ignore Bad types in nostr-tools
import { relayInit, Relay } from "nostr-tools";
import { relayConnectingTimeout } from "../constants";
import { NostrRelays } from "../types/primal";
@ -34,7 +35,7 @@ const connectToRelay = (relay: Relay) => new Promise(
clearTimeout(timeout);
resolve(true);
})
.catch((e) => {
.catch((e: any) => {
logError(relay, e);
reject();
});

View File

@ -1,4 +1,5 @@
import { bech32 } from "@scure/base";
// @ts-ignore Bad types in nostr-tools
import { nip57, Relay, utils } from "nostr-tools";
import { NostrWindow, PrimalNote, PrimalUser } from "../types/primal";

View File

@ -1,4 +1,5 @@
import { MessageDescriptor } from "@cookbook/solid-intl";
// @ts-ignore Bad types in nostr-tools
import { Relay } from "nostr-tools";
import { JSX } from "solid-js";
import { SetStoreFunction } from "solid-js/store";