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

View File

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

View File

@ -1,4 +1,5 @@
import { getLinkPreview } from "link-preview-js"; import { getLinkPreview } from "link-preview-js";
// @ts-ignore Bad types in nostr-tools
import { Relay } from "nostr-tools"; import { Relay } from "nostr-tools";
import { createStore } from "solid-js/store"; import { createStore } from "solid-js/store";
import { Kind } from "../constants"; 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 { Kind, minKnownProfiles, noKey } from "../constants";
import { sendMessage } from "../sockets"; import { sendMessage } from "../sockets";
import { NostrWindow, VanityProfiles } from "../types/primal"; 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 { relayInit, Relay } from "nostr-tools";
import { relayConnectingTimeout } from "../constants"; import { relayConnectingTimeout } from "../constants";
import { NostrRelays } from "../types/primal"; import { NostrRelays } from "../types/primal";
@ -34,7 +35,7 @@ const connectToRelay = (relay: Relay) => new Promise(
clearTimeout(timeout); clearTimeout(timeout);
resolve(true); resolve(true);
}) })
.catch((e) => { .catch((e: any) => {
logError(relay, e); logError(relay, e);
reject(); reject();
}); });

View File

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

View File

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