Move key stuff to util, add pow util

This commit is contained in:
Jon Staab
2025-12-02 13:15:24 -08:00
parent 6da8e6c654
commit 351b60631e
18 changed files with 253 additions and 91 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
import {PublishStatus, LOCAL_RELAY_URL} from "@welshman/net"
import {NOTE, DIRECT_MESSAGE, WRAP, makeEvent} from "@welshman/util"
import {getPubkey, makeSecret, prep} from "@welshman/signer"
import {NOTE, DIRECT_MESSAGE, WRAP, makeEvent, getPubkey, makeSecret, prep} from "@welshman/util"
import {afterEach, beforeEach, describe, expect, it, vi} from "vitest"
import {repository, tracker} from "../src/core"
import {addSession, dropSession, makeNip01Session} from "../src/session"
+1 -1
View File
@@ -8,6 +8,7 @@ import {
HashedEvent,
StampedEvent,
SignedEvent,
getPubkey,
} from "@welshman/util"
import {
Nip59,
@@ -17,7 +18,6 @@ import {
Nip07Signer,
Nip01Signer,
Nip55Signer,
getPubkey,
ISigner,
} from "@welshman/signer"
import {WrapManager} from "@welshman/net"
+9 -2
View File
@@ -12,7 +12,14 @@ import {
nth,
without,
} from "@welshman/lib"
import {HashedEvent, EventTemplate, SignedEvent, isSignedEvent, WRAPPED_KINDS} from "@welshman/util"
import {
HashedEvent,
EventTemplate,
SignedEvent,
isSignedEvent,
WRAPPED_KINDS,
prep,
} from "@welshman/util"
import {
publish,
PublishStatus,
@@ -20,7 +27,7 @@ import {
PublishOptions,
PublishResultsByRelay,
} from "@welshman/net"
import {ISigner, Nip59, prep} from "@welshman/signer"
import {ISigner, Nip59} from "@welshman/signer"
import {repository, tracker} from "./core.js"
import {pubkey, signer, wrapManager} from "./session.js"