@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
|
@@ -30,20 +30,35 @@ export declare function eth_get_address(privateKey: string): string;
|
|
|
30
30
|
* from `${baseUrl}/status` on first invocation and caches the encoded
|
|
31
31
|
* response for subsequent calls.
|
|
32
32
|
*
|
|
33
|
-
* @param baseUrl -
|
|
34
|
-
*
|
|
33
|
+
* @param baseUrl - **Required**. The node URL whose `/status` endpoint should
|
|
34
|
+
* serve the ML-KEM public key. Must be the same URL the
|
|
35
|
+
* T3nClient is constructed with — otherwise the handshake
|
|
36
|
+
* encrypts to one node and sends ciphertext to another.
|
|
37
|
+
*
|
|
38
|
+
* Was optional in 0.3.x, where omitting it caused the lazy
|
|
39
|
+
* fetch to silently fall back to `NODE_URLS[currentEnv]` and
|
|
40
|
+
* hit the wrong node. Three downstream consumers (demo.ts,
|
|
41
|
+
* t3-apps dev wallet hooks, t3n-mcp session manager) all
|
|
42
|
+
* hit this trap before we tightened the type.
|
|
35
43
|
*/
|
|
36
|
-
export declare function createMlKemPublicKeyHandler(baseUrl
|
|
44
|
+
export declare function createMlKemPublicKeyHandler(baseUrl: string): GuestToHostHandler;
|
|
37
45
|
/**
|
|
38
46
|
* Create Random handler backed by crypto.getRandomValues
|
|
39
47
|
* Note: The Rust Vec<u8> type serializes as an array of bytes, not a base64 string
|
|
40
48
|
*/
|
|
41
49
|
export declare function createRandomHandler(): GuestToHostHandler;
|
|
42
50
|
/**
|
|
43
|
-
* Create the default handler set required by the T3n handshake
|
|
51
|
+
* Create the default handler set required by the T3n handshake.
|
|
52
|
+
*
|
|
53
|
+
* @param baseUrl - **Required**. Forwarded to `createMlKemPublicKeyHandler`
|
|
54
|
+
* so the lazy /status fetch hits the right node.
|
|
44
55
|
*/
|
|
45
|
-
export declare function createDefaultHandlers(baseUrl
|
|
56
|
+
export declare function createDefaultHandlers(baseUrl: string): GuestToHostHandlers;
|
|
46
57
|
/**
|
|
47
|
-
* Merge consumer-provided handlers with defaults (user handlers take precedence)
|
|
58
|
+
* Merge consumer-provided handlers with defaults (user handlers take precedence).
|
|
59
|
+
*
|
|
60
|
+
* @param handlers - Optional consumer overrides.
|
|
61
|
+
* @param baseUrl - **Required**. Forwarded to the default handler set so the
|
|
62
|
+
* ML-KEM key fetch hits the right node.
|
|
48
63
|
*/
|
|
49
|
-
export declare function mergeWithDefaultHandlers(handlers
|
|
64
|
+
export declare function mergeWithDefaultHandlers(handlers: GuestToHostHandlers | undefined, baseUrl: string): GuestToHostHandlers;
|