@terminal3/t3n-sdk 4.33.0 → 4.35.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/README.md +6 -0
- package/dist/cli/index.js +1 -1
- package/dist/index.d.ts +42 -4
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
createEthAuthInput,
|
|
36
36
|
eth_get_address,
|
|
37
37
|
metamask_sign,
|
|
38
|
+
fetchTrustedManifest,
|
|
38
39
|
} from "@terminal3/t3n-sdk";
|
|
39
40
|
|
|
40
41
|
const wasmComponent = await loadWasmComponent();
|
|
@@ -43,6 +44,8 @@ const address = eth_get_address(privateKey);
|
|
|
43
44
|
|
|
44
45
|
const client = new T3nClient({
|
|
45
46
|
baseUrl: "https://t3n-node.example.com",
|
|
47
|
+
// For a purely local dev node, use `{ unsafe_trust_server: true }` instead — it disables attestation verification.
|
|
48
|
+
trustAnchor: await fetchTrustedManifest("testnet", { baseUrl: "https://t3n-node.example.com" }),
|
|
46
49
|
wasmComponent,
|
|
47
50
|
handlers: {
|
|
48
51
|
EthSign: metamask_sign(address, undefined, privateKey),
|
|
@@ -65,12 +68,15 @@ import {
|
|
|
65
68
|
createEthAuthInput,
|
|
66
69
|
eth_get_address,
|
|
67
70
|
metamask_sign,
|
|
71
|
+
fetchTrustedManifest,
|
|
68
72
|
} from "@terminal3/t3n-sdk";
|
|
69
73
|
|
|
70
74
|
const privateKey = "0x...";
|
|
71
75
|
const address = eth_get_address(privateKey);
|
|
72
76
|
|
|
73
77
|
const client = new T3nClient({
|
|
78
|
+
// For a purely local dev node, use `{ unsafe_trust_server: true }` instead — it disables attestation verification.
|
|
79
|
+
trustAnchor: await fetchTrustedManifest("testnet"),
|
|
74
80
|
wasmComponent: await loadWasmComponent(),
|
|
75
81
|
handlers: {
|
|
76
82
|
EthSign: metamask_sign(address, undefined, privateKey),
|