From e9b40dca7c0bb3d19317ddf166c09e01c24ed8a8 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 23 Jun 2026 09:16:02 -0300 Subject: [PATCH] nip46: support client metadata for the bunker:// flow. --- nip46.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nip46.ts b/nip46.ts index 25669f2..664e8ed 100644 --- a/nip46.ts +++ b/nip46.ts @@ -77,15 +77,18 @@ export async function queryBunkerProfile(nip05: string): Promise { - await this.sendRequest('connect', [this.bp.pubkey, this.bp.secret || '']) + async connect(clientMetadata?: ClientMetadata): Promise { + const params = [this.bp.pubkey, this.bp.secret || ''] + if (clientMetadata) { + params.push('') + params.push(JSON.stringify(clientMetadata)) + } + await this.sendRequest('connect', params) } /**