cvm-nostr-transport.ts — concrete ContextVM transport for NAP-CVM.
Implements CvmTransport over Nostr, exactly as validated against live
ContextVM servers (e.g. Relatr):
MCP JSON-RPC messages ride in kind-25910 event content.
Requests are CEP-4 gift-wrapped: the inner kind-25910 event is signed with
the shell's ephemeral client key, NIP-44-encrypted to the server, and
placed in a kind-21059 (ephemeral) / 1059 (regular) wrap signed by a fresh
random key, p-tagged to the server. Responses arrive the same way,
p-tagged to the client, and are correlated by the inner JSON-RPC id.
cvm-nostr-transport.ts — concrete ContextVM transport for NAP-CVM.
Implements CvmTransport over Nostr, exactly as validated against live ContextVM servers (e.g. Relatr):
content.p-tagged to the server. Responses arrive the same way,p-tagged to the client, and are correlated by the inner JSON-RPCid.Shipped on a separate entry (
@kehto/services/cvm-nostr-transport) so thenostr-toolsdependency stays out of the core@kehto/servicesbundle.The client key is ephemeral and shell-owned: napplets never see keys, relay sockets, or NIP-44 material (NAP-CVM §Security).
Example