@ecency/sdk 2.3.77 → 2.3.78

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.
@@ -634,8 +634,28 @@ interface AuthContext {
634
634
  /** Login method used ('key', 'hivesigner', 'keychain', 'hiveauth') */
635
635
  loginType?: string | null;
636
636
  /**
637
- * Custom broadcast function for platform-specific signing.
638
- * @deprecated Use platform adapter's broadcastWithKeychain/broadcastWithHiveAuth instead.
637
+ * A caller-supplied broadcaster for signing operations that the platform adapter cannot perform.
638
+ *
639
+ * NOT deprecated, and not a legacy path. `useBroadcastMutation` reaches it as
640
+ * `case 'custom'`, the last link of the default fallback chain, and two call
641
+ * sites in the web app need it because no adapter method fits:
642
+ *
643
+ * - `use-login-by-key.ts` grants posting permission DURING login, before the
644
+ * user exists to the adapter, so the key comes from a ref instead.
645
+ * - `wallet-operations-sign.tsx` dispatches on a signing method the user picks
646
+ * mid-flow, which is a decision the adapter has no way to know about.
647
+ *
648
+ * It carried an `@deprecated` tag pointing at `broadcastWithKeychain`, and
649
+ * that reading is what went wrong: four SDK mutations treated this as "the
650
+ * keychain path", checked it, and threw when a caller passed an
651
+ * `AuthContextV2` that legitimately has no `broadcast`. Every field here is
652
+ * optional, so V2 satisfies `AuthContext` structurally and the type checker
653
+ * saw nothing; each site failed only when a real user reached it. Migrated in
654
+ * #1376.
655
+ *
656
+ * So: reach for the adapter when you mean "sign with the user's wallet". Reach
657
+ * for this only when you are supplying the signing yourself, and never as a
658
+ * way to detect Keychain.
639
659
  */
640
660
  broadcast?: (operations: Operation[], authority?: "active" | "posting" | "owner" | "memo") => Promise<unknown>;
641
661
  }