Remove tsc-multi, re-install gts, apply autoformatting and linting

This commit is contained in:
Jon Staab
2024-12-17 10:59:27 -08:00
parent 0b86613161
commit f33e03740e
122 changed files with 2243 additions and 2178 deletions
+12 -12
View File
@@ -4,18 +4,18 @@ import {withGetter, synced} from "@welshman/store"
import {Nip46Broker, Nip46Signer, Nip07Signer, Nip01Signer, Nip55Signer} from "@welshman/signer"
export type SessionNip01 = {
method: 'nip01'
method: "nip01"
pubkey: string
secret: string
}
export type SessionNip07 = {
method: 'nip07'
method: "nip07"
pubkey: string
}
export type SessionNip46 = {
method: 'nip46'
method: "nip46"
pubkey: string
secret: string
handler: {
@@ -25,22 +25,22 @@ export type SessionNip46 = {
}
export type SessionNip55 = {
method: 'nip55'
method: "nip55"
pubkey: string
signer: string
}
export type SessionPubkey = {
method: 'pubkey'
method: "pubkey"
pubkey: string
}
export type SessionAnyMethod =
SessionNip01 |
SessionNip07 |
SessionNip46 |
SessionNip55 |
SessionPubkey
| SessionNip01
| SessionNip07
| SessionNip46
| SessionNip55
| SessionPubkey
export type Session = SessionAnyMethod & Record<string, any>
@@ -88,14 +88,14 @@ export const getSigner = cached({
clientSecret: session.secret!,
relays: session.handler!.relays,
signerPubkey: session.handler!.pubkey,
})
}),
)
case "nip55":
return new Nip55Signer(session.signer!)
default:
return null
}
}
},
})
export const signer = withGetter(derived(session, getSigner))