@terminal3/t3n-sdk 0.3.0 → 0.4.0
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.ts +16 -5
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/client/handlers.d.ts +22 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -591,19 +591,30 @@ declare function eth_get_address(privateKey: string): string;
|
|
|
591
591
|
* from `${baseUrl}/status` on first invocation and caches the encoded
|
|
592
592
|
* response for subsequent calls.
|
|
593
593
|
*
|
|
594
|
-
* @param baseUrl -
|
|
595
|
-
*
|
|
594
|
+
* @param baseUrl - **Required**. The node URL whose `/status` endpoint should
|
|
595
|
+
* serve the ML-KEM public key. Must be the same URL the
|
|
596
|
+
* T3nClient is constructed with — otherwise the handshake
|
|
597
|
+
* encrypts to one node and sends ciphertext to another.
|
|
598
|
+
*
|
|
599
|
+
* Was optional in 0.3.x, where omitting it caused the lazy
|
|
600
|
+
* fetch to silently fall back to `NODE_URLS[currentEnv]` and
|
|
601
|
+
* hit the wrong node. Three downstream consumers (demo.ts,
|
|
602
|
+
* t3-apps dev wallet hooks, t3n-mcp session manager) all
|
|
603
|
+
* hit this trap before we tightened the type.
|
|
596
604
|
*/
|
|
597
|
-
declare function createMlKemPublicKeyHandler(baseUrl
|
|
605
|
+
declare function createMlKemPublicKeyHandler(baseUrl: string): GuestToHostHandler;
|
|
598
606
|
/**
|
|
599
607
|
* Create Random handler backed by crypto.getRandomValues
|
|
600
608
|
* Note: The Rust Vec<u8> type serializes as an array of bytes, not a base64 string
|
|
601
609
|
*/
|
|
602
610
|
declare function createRandomHandler(): GuestToHostHandler;
|
|
603
611
|
/**
|
|
604
|
-
* Create the default handler set required by the T3n handshake
|
|
612
|
+
* Create the default handler set required by the T3n handshake.
|
|
613
|
+
*
|
|
614
|
+
* @param baseUrl - **Required**. Forwarded to `createMlKemPublicKeyHandler`
|
|
615
|
+
* so the lazy /status fetch hits the right node.
|
|
605
616
|
*/
|
|
606
|
-
declare function createDefaultHandlers(baseUrl
|
|
617
|
+
declare function createDefaultHandlers(baseUrl: string): GuestToHostHandlers;
|
|
607
618
|
|
|
608
619
|
/**
|
|
609
620
|
* Cryptographic utilities for T3n SDK
|