@blockrun/llm 3.12.0 → 3.13.1

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/dist/index.d.cts CHANGED
@@ -2716,6 +2716,20 @@ declare function extractPaymentDetails(paymentRequired: PaymentRequired, preferr
2716
2716
  * - Auto-creates wallet if none exists
2717
2717
  * - Stores key securely at ~/.blockrun/.session
2718
2718
  * - Generates EIP-681 URIs for easy MetaMask funding
2719
+ *
2720
+ * Key resolution, discovery, and adoption are delegated to `@blockrun/core`, the
2721
+ * shared kernel every BlockRun product reads. That is what guarantees this SDK,
2722
+ * the `blockrun` CLI, and clawrouter-codex all resolve the SAME wallet — the
2723
+ * behaviour is defined in one place instead of being re-implemented per product
2724
+ * and drifting. Kept SDK-local: the funding/messaging surface (SDK-specific),
2725
+ * plus createWallet()/saveWallet() as thin persistence wrappers for API
2726
+ * compatibility — they write to the same core-resolved path, per call.
2727
+ *
2728
+ * Because path resolution now comes from core, `BLOCKRUN_HOME` overrides the base
2729
+ * directory (previously this module always used the OS home directory). Treat
2730
+ * that variable as security-sensitive: it redirects where the signing key is
2731
+ * read from AND written to, so an environment that can set it controls the
2732
+ * wallet as surely as one that can set BLOCKRUN_WALLET_KEY.
2719
2733
  */
2720
2734
  declare const USDC_BASE_CONTRACT = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
2721
2735
  interface WalletInfo {
@@ -2748,12 +2762,15 @@ declare function saveWallet(privateKey: string): string;
2748
2762
  /**
2749
2763
  * Discover ~/.<dir>/wallet.json files from other providers.
2750
2764
  *
2751
- * Each file should contain JSON with "privateKey" and "address" fields.
2752
- * Results are sorted by modification time (most recent first). Discovery is
2753
- * intentionally opt-in: a provider wallet must never replace the canonical
2754
- * BlockRun wallet merely because it was written more recently.
2765
+ * Each file should contain JSON with a "privateKey" field; the returned
2766
+ * address is DERIVED from that key (any "address" field in the file is
2767
+ * ignored, so a file cannot claim an address it holds no key for), and
2768
+ * entries whose key does not parse are dropped. Results are sorted by
2769
+ * modification time (most recent first). Discovery is intentionally opt-in:
2770
+ * a provider wallet must never replace the canonical BlockRun wallet merely
2771
+ * because it was written more recently.
2755
2772
  *
2756
- * @returns Array of wallet objects with privateKey and address
2773
+ * @returns Array of wallet objects with privateKey and derived address
2757
2774
  */
2758
2775
  declare function scanWallets(): Array<{
2759
2776
  privateKey: string;
@@ -2786,6 +2803,12 @@ declare function listDiscoveredWallets(): Array<{
2786
2803
  * The current `~/.blockrun/.session` is backed up beside itself before being
2787
2804
  * overwritten, so adopting a wallet can't strand the funds in the old one.
2788
2805
  *
2806
+ * NOTE: this is NOT `@blockrun/core`'s `importWallet(rawPrivateKey)` — that
2807
+ * one persists a raw key and refuses to overwrite without `force`. This SDK
2808
+ * function adopts a DISCOVERED wallet by address and maps onto core's
2809
+ * `adoptWallet()`. Same name, different operation; don't mix them up when
2810
+ * importing from core directly.
2811
+ *
2789
2812
  * @param address Address to adopt, as shown by `listDiscoveredWallets()`
2790
2813
  * @returns The adopted address
2791
2814
  * @throws If no discovered wallet derives to that address
package/dist/index.d.ts CHANGED
@@ -2716,6 +2716,20 @@ declare function extractPaymentDetails(paymentRequired: PaymentRequired, preferr
2716
2716
  * - Auto-creates wallet if none exists
2717
2717
  * - Stores key securely at ~/.blockrun/.session
2718
2718
  * - Generates EIP-681 URIs for easy MetaMask funding
2719
+ *
2720
+ * Key resolution, discovery, and adoption are delegated to `@blockrun/core`, the
2721
+ * shared kernel every BlockRun product reads. That is what guarantees this SDK,
2722
+ * the `blockrun` CLI, and clawrouter-codex all resolve the SAME wallet — the
2723
+ * behaviour is defined in one place instead of being re-implemented per product
2724
+ * and drifting. Kept SDK-local: the funding/messaging surface (SDK-specific),
2725
+ * plus createWallet()/saveWallet() as thin persistence wrappers for API
2726
+ * compatibility — they write to the same core-resolved path, per call.
2727
+ *
2728
+ * Because path resolution now comes from core, `BLOCKRUN_HOME` overrides the base
2729
+ * directory (previously this module always used the OS home directory). Treat
2730
+ * that variable as security-sensitive: it redirects where the signing key is
2731
+ * read from AND written to, so an environment that can set it controls the
2732
+ * wallet as surely as one that can set BLOCKRUN_WALLET_KEY.
2719
2733
  */
2720
2734
  declare const USDC_BASE_CONTRACT = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
2721
2735
  interface WalletInfo {
@@ -2748,12 +2762,15 @@ declare function saveWallet(privateKey: string): string;
2748
2762
  /**
2749
2763
  * Discover ~/.<dir>/wallet.json files from other providers.
2750
2764
  *
2751
- * Each file should contain JSON with "privateKey" and "address" fields.
2752
- * Results are sorted by modification time (most recent first). Discovery is
2753
- * intentionally opt-in: a provider wallet must never replace the canonical
2754
- * BlockRun wallet merely because it was written more recently.
2765
+ * Each file should contain JSON with a "privateKey" field; the returned
2766
+ * address is DERIVED from that key (any "address" field in the file is
2767
+ * ignored, so a file cannot claim an address it holds no key for), and
2768
+ * entries whose key does not parse are dropped. Results are sorted by
2769
+ * modification time (most recent first). Discovery is intentionally opt-in:
2770
+ * a provider wallet must never replace the canonical BlockRun wallet merely
2771
+ * because it was written more recently.
2755
2772
  *
2756
- * @returns Array of wallet objects with privateKey and address
2773
+ * @returns Array of wallet objects with privateKey and derived address
2757
2774
  */
2758
2775
  declare function scanWallets(): Array<{
2759
2776
  privateKey: string;
@@ -2786,6 +2803,12 @@ declare function listDiscoveredWallets(): Array<{
2786
2803
  * The current `~/.blockrun/.session` is backed up beside itself before being
2787
2804
  * overwritten, so adopting a wallet can't strand the funds in the old one.
2788
2805
  *
2806
+ * NOTE: this is NOT `@blockrun/core`'s `importWallet(rawPrivateKey)` — that
2807
+ * one persists a raw key and refuses to overwrite without `force`. This SDK
2808
+ * function adopts a DISCOVERED wallet by address and maps onto core's
2809
+ * `adoptWallet()`. Same name, different operation; don't mix them up when
2810
+ * importing from core directly.
2811
+ *
2789
2812
  * @param address Address to adopt, as shown by `listDiscoveredWallets()`
2790
2813
  * @returns The adopted address
2791
2814
  * @throws If no discovered wallet derives to that address