@yieldfabric/wallet 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -166,7 +166,12 @@ const modules = [
166
166
  Array order is display order. Route selection closes before using the host's
167
167
  `onNavigate`; panel renderers receive `{ close, back, navigate }`; directory
168
168
  groups may be mobile- or desktop-only. `useWalletCenter()` is the headless
169
- open/close API for avatar buttons and other custom triggers.
169
+ open/close API for avatar buttons and other custom triggers. It also lets a
170
+ frame *host* the center: `setHost(element)` makes `<WalletCenter>` render
171
+ inside that element as a page of the host's own frame (no overlay, no close
172
+ control — the frame's own navigation is the way out) instead of as a drawer
173
+ over the app; `setHost(null)` on unmount hands it back. A phone frame with a
174
+ Wallet tab is the intended host.
170
175
 
171
176
  ```tsx
172
177
  // app/login/page.tsx
@@ -989,3 +994,13 @@ agreement does not grant runtime or integration rights.
989
994
  Ownership remains with YieldFabric Technologies Ltd, subject to the
990
995
  [third-party notices](NOTICE.md). No rights are granted merely by repository
991
996
  access, possession of a package, or the technical examples in this README.
997
+
998
+ ### Authenticated JSON event streams
999
+
1000
+ `subscribeJsonEvents({ url, token, onEvent, onError })` returns an unsubscribe
1001
+ function. `url` and `token` are callbacks evaluated on every connection, so a
1002
+ reconnect uses the current token and service context. It sends an Authorization
1003
+ header, never a token query parameter. Errors reconnect with bounded backoff;
1004
+ call unsubscribe on sign-out, scope changes and component unmount. The stream
1005
+ uses fetch and therefore requires the server's CORS configuration to permit
1006
+ Authorization headers. Entity subscriptions use this helper automatically.