UNPKG

applesauce-wallet-connect

Version:

NIP-47 Nostr Wallet Connect implementation for both clients and services.

11 lines (10 loc) 780 B
import { blueprint } from "applesauce-factory"; import { setContent } from "applesauce-factory/operations/content"; import { includeSingletonTag } from "applesauce-factory/operations"; import { WALLET_INFO_KIND } from "../helpers/support.js"; /** Creates a wallet info event */ export function WalletSupportBlueprint(info, client) { return blueprint(WALLET_INFO_KIND, setContent(info.methods.join(" ")), info.encryption ? includeSingletonTag(["encryption", info.encryption.join(" ")]) : undefined, info.notifications ? includeSingletonTag(["notifications", info.notifications.join(" ")]) : undefined, // An optional client pubkey to notify the service is created (used for nostr+walletauth URI connections) client ? includeSingletonTag(["p", client]) : undefined); }