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) } /**