Skip to content

@keymaster/connect / AppMsgRecipient

Interface: AppMsgRecipient

公开目标:app / plugin 调用 sendMessage 时指定的目标只能取这两种之一。

平台内部会按以下规则映射成真实的内部 endpoint:

  • origin{ kind: "origin", id: <exact origin> }
  • appId{ kind: "plugin", id: <appId> }

外部 app 通过 keymaster 协议调用 appmsg.send 时:sender 投影为 session 绑定 owner + event.origin;因此发送方需要在 params 里带 senderOrigin——它由 endpoint service 内部按"调用端来自哪个 endpoint"决定。

Properties overview

PropertyTypeRequiredDescription
recipientPublicKeyHexstringYes
recipientOrigin?stringNo外部 app 形式的目标:exact origin(scheme + host + port)。
recipientAppId?stringNo内部插件 / 系统应用形式的目标:pluginEndpointId / appId。

Properties

recipientPublicKeyHex

recipientPublicKeyHex: string


recipientOrigin?

optional recipientOrigin?: string

外部 app 形式的目标:exact origin(scheme + host + port)。


recipientAppId?

optional recipientAppId?: string

内部插件 / 系统应用形式的目标:pluginEndpointId / appId。

Capability access without key custody.