Auto-acquire Cashu tokens for NIP-46 bunker connections (v0.2.0)
- Add acquireTokenIfNeeded() in BunkerSigner to get CAT before connecting - Check /cashu/info to detect CAT-enabled relays - Request token via cashuTokenService with NIP-98 auth using ephemeral key - Store and reuse tokens across sessions - Pass token as query parameter on WebSocket connection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
5
src/types/index.d.ts
vendored
5
src/types/index.d.ts
vendored
@@ -98,7 +98,7 @@ export interface ISigner {
|
||||
nip04Decrypt: (pubkey: string, cipherText: string) => Promise<string>
|
||||
}
|
||||
|
||||
export type TSignerType = 'nsec' | 'nip-07' | 'browser-nsec' | 'ncryptsec' | 'npub'
|
||||
export type TSignerType = 'nsec' | 'nip-07' | 'browser-nsec' | 'ncryptsec' | 'npub' | 'bunker'
|
||||
|
||||
export type TAccount = {
|
||||
pubkey: string
|
||||
@@ -106,6 +106,9 @@ export type TAccount = {
|
||||
ncryptsec?: string
|
||||
nsec?: string
|
||||
npub?: string
|
||||
bunkerPubkey?: string
|
||||
bunkerRelays?: string[]
|
||||
bunkerSecret?: string
|
||||
}
|
||||
|
||||
export type TAccountPointer = Pick<TAccount, 'pubkey' | 'signerType'>
|
||||
|
||||
Reference in New Issue
Block a user