Add anonymous session, re-work thunk utilities

This commit is contained in:
Jon Staab
2025-08-19 13:24:15 -07:00
parent d0d13433c3
commit 00c0497892
4 changed files with 123 additions and 91 deletions
+6
View File
@@ -19,6 +19,7 @@ export enum SessionMethod {
Nip46 = "nip46",
Nip55 = "nip55",
Pubkey = "pubkey",
Anonymous = "anonymous",
}
export type SessionNip01 = {
@@ -53,12 +54,17 @@ export type SessionPubkey = {
pubkey: string
}
export type SessionAnonymous = {
method: SessionMethod.Anonymous
}
export type SessionAnyMethod =
| SessionNip01
| SessionNip07
| SessionNip46
| SessionNip55
| SessionPubkey
| SessionAnonymous
export type Session = SessionAnyMethod & {wallet?: Wallet} & Record<string, any>