@terminal3/t3n-sdk 4.1.0 → 4.3.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/cli/index.js +1 -1
- package/dist/index.d.ts +205 -68
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -282,7 +282,8 @@ declare enum SessionStatus {
|
|
|
282
282
|
declare enum AuthMethod {
|
|
283
283
|
Ethereum = "eth",
|
|
284
284
|
OIDC = "oidc",
|
|
285
|
-
EmailOtp = "email_otp"
|
|
285
|
+
EmailOtp = "email_otp",
|
|
286
|
+
Workload = "workload"
|
|
286
287
|
}
|
|
287
288
|
/**
|
|
288
289
|
* OIDC credentials interface.
|
|
@@ -344,16 +345,42 @@ interface EmailOtpAuthInput extends BaseAuthInput {
|
|
|
344
345
|
method: AuthMethod.EmailOtp;
|
|
345
346
|
credentials: EmailOtpCredentials;
|
|
346
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Workload authentication input (keyless hosted-agent auth).
|
|
350
|
+
*
|
|
351
|
+
* Unlike {@link OidcAuthInput}, this is a SINGLE-call flow: there is no
|
|
352
|
+
* session-binding nonce and no `InitOidcAuth` round-trip. The caller
|
|
353
|
+
* supplies a pre-fetched OIDC **workload** `idToken` (the agent's own
|
|
354
|
+
* machine identity — its `(iss, sub)`) directly by value, and the node
|
|
355
|
+
* verifies it and mints/resolves the DID `oidc:<iss>:<sub>` server-side
|
|
356
|
+
* via a single `SubmitWorkloadToken` action.
|
|
357
|
+
*
|
|
358
|
+
* The token is carried by value (not behind a `getIdToken(nonce)`
|
|
359
|
+
* callback like {@link OidcCredentials}) because callers re-source a
|
|
360
|
+
* fresh token per session open — `id_token`s expire, so nothing here
|
|
361
|
+
* should be cached across sessions.
|
|
362
|
+
*/
|
|
363
|
+
interface WorkloadAuthInput extends BaseAuthInput {
|
|
364
|
+
method: AuthMethod.Workload;
|
|
365
|
+
provider: string;
|
|
366
|
+
idToken: string;
|
|
367
|
+
}
|
|
347
368
|
/**
|
|
348
369
|
* Union type for all supported authentication inputs
|
|
349
370
|
*/
|
|
350
|
-
type AuthInput = EthAuthInput | OidcAuthInput | EmailOtpAuthInput;
|
|
371
|
+
type AuthInput = EthAuthInput | OidcAuthInput | EmailOtpAuthInput | WorkloadAuthInput;
|
|
351
372
|
/**
|
|
352
373
|
* Helper functions to create auth inputs
|
|
353
374
|
*/
|
|
354
375
|
declare function createEthAuthInput(address: string, options?: EthAuthOptions): EthAuthInput;
|
|
355
376
|
declare function createOidcAuthInput(credentials: OidcCredentials): OidcAuthInput;
|
|
356
377
|
declare function createEmailOtpAuthInput(credentials: EmailOtpCredentials): EmailOtpAuthInput;
|
|
378
|
+
/**
|
|
379
|
+
* Build a keyless workload auth input from a pre-fetched OIDC workload
|
|
380
|
+
* `id_token`. Single-call (no nonce round-trip); the token must be the
|
|
381
|
+
* agent's OWN machine identity — see {@link WorkloadAuthInput}.
|
|
382
|
+
*/
|
|
383
|
+
declare function createWorkloadAuthInput(provider: string, idToken: string): WorkloadAuthInput;
|
|
357
384
|
|
|
358
385
|
/**
|
|
359
386
|
* Error classes for T3n SDK
|
|
@@ -1236,6 +1263,7 @@ declare class HttpTransport implements Transport {
|
|
|
1236
1263
|
* mockTransport.mockResponse("auth.handshake", { result: "..." });
|
|
1237
1264
|
*
|
|
1238
1265
|
* const client = new T3nClient({
|
|
1266
|
+
* trustAnchor: { unsafe_trust_server: true },
|
|
1239
1267
|
* transport: mockTransport,
|
|
1240
1268
|
* wasmComponent: mockWasm,
|
|
1241
1269
|
* });
|
|
@@ -1290,6 +1318,112 @@ declare class MockTransport implements Transport {
|
|
|
1290
1318
|
send(request: JsonRpcRequest, headers: Record<string, string>): Promise<JsonRpcResponse>;
|
|
1291
1319
|
}
|
|
1292
1320
|
|
|
1321
|
+
/**
|
|
1322
|
+
* TDX quote verifier backed by the Rust `signature` crate compiled to
|
|
1323
|
+
* WASM. Full cryptographic verification: ECDSA P-256 attestation-key
|
|
1324
|
+
* signature, PCK certificate chain walk to Intel's root CA, and
|
|
1325
|
+
* report_data + RTMR comparison.
|
|
1326
|
+
*
|
|
1327
|
+
* The WASM bytes are inlined as base64 (see quote_verifier_bytes.ts)
|
|
1328
|
+
* so the SDK works without bundler WASM plugins and without runtime
|
|
1329
|
+
* asset URL resolution.
|
|
1330
|
+
*/
|
|
1331
|
+
interface QuoteVerifyResult {
|
|
1332
|
+
valid: boolean;
|
|
1333
|
+
error?: string;
|
|
1334
|
+
rtmr3?: string;
|
|
1335
|
+
report_data?: string;
|
|
1336
|
+
}
|
|
1337
|
+
interface PeerQuoteResult {
|
|
1338
|
+
peer_id: string;
|
|
1339
|
+
valid: boolean;
|
|
1340
|
+
error?: string;
|
|
1341
|
+
rtmr3?: string;
|
|
1342
|
+
}
|
|
1343
|
+
interface DkgVerifyResult {
|
|
1344
|
+
valid: boolean;
|
|
1345
|
+
results: PeerQuoteResult[];
|
|
1346
|
+
valid_count: number;
|
|
1347
|
+
expected_count: number;
|
|
1348
|
+
error?: string;
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Client-pinned anchor the DKG attestation bundle is verified against.
|
|
1352
|
+
*
|
|
1353
|
+
* Without it, "the server proved it runs in a TEE" only means "*some*
|
|
1354
|
+
* TDX box somewhere" — any attacker with their own TDX cloud VM can
|
|
1355
|
+
* forge a complete, cryptographically-valid bundle for their own key
|
|
1356
|
+
* (SP-003). The anchor is the independent ground truth that closes it:
|
|
1357
|
+
* the bundle must describe *our* cluster (`expected_peer_ids`) running
|
|
1358
|
+
* *our* image (`rtmr3_allowlist`).
|
|
1359
|
+
*/
|
|
1360
|
+
interface TrustAnchor {
|
|
1361
|
+
/**
|
|
1362
|
+
* Base58 peer IDs the client expects in the cluster. The bundle's
|
|
1363
|
+
* `peer_ids` must equal this set exactly (order-insensitive) — a MITM
|
|
1364
|
+
* cannot substitute its own single-node participant set.
|
|
1365
|
+
*/
|
|
1366
|
+
expected_peer_ids: string[];
|
|
1367
|
+
/**
|
|
1368
|
+
* Base64-encoded 48-byte RTMR3 measurements of the expected node
|
|
1369
|
+
* image. Every quote's RTMR3 must be a member. **Must be non-empty.**
|
|
1370
|
+
* An array (not a singleton) so a rolling deploy's two in-flight
|
|
1371
|
+
* image measurements both verify.
|
|
1372
|
+
*/
|
|
1373
|
+
rtmr3_allowlist: string[];
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Escape hatch for local dev / tests against a node whose attestation
|
|
1377
|
+
* can't be anchored (e.g. a mock signer that publishes no bundle).
|
|
1378
|
+
*
|
|
1379
|
+
* The name is deliberately alarming so it stands out in code review and
|
|
1380
|
+
* grep — it is the *only* way to skip DKG attestation verification on
|
|
1381
|
+
* the handshake path.
|
|
1382
|
+
*/
|
|
1383
|
+
interface UnsafeTrustServer {
|
|
1384
|
+
unsafe_trust_server: true;
|
|
1385
|
+
}
|
|
1386
|
+
type TrustAnchorOrUnsafe = TrustAnchor | UnsafeTrustServer;
|
|
1387
|
+
/** Narrow a {@link TrustAnchorOrUnsafe} to the explicit opt-out arm. */
|
|
1388
|
+
declare function isUnsafeTrustServer(anchor: TrustAnchorOrUnsafe): anchor is UnsafeTrustServer;
|
|
1389
|
+
/**
|
|
1390
|
+
* Verify a single TDX attestation quote with full cryptographic verification.
|
|
1391
|
+
*
|
|
1392
|
+
* @param quoteB64 - Base64-encoded raw TDX v4 quote
|
|
1393
|
+
* @param attestationMsgB64 - Base64-encoded attestation message
|
|
1394
|
+
* (for DKG: encaps_key || sorted_peer_id_bytes)
|
|
1395
|
+
* @param expectedRtmr3B64 - Optional base64-encoded 48-byte RTMR3
|
|
1396
|
+
* @returns Verification result with extracted measurements
|
|
1397
|
+
*/
|
|
1398
|
+
declare function verifyTdxQuote(quoteB64: string, attestationMsgB64: string, expectedRtmr3B64?: string): Promise<QuoteVerifyResult>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Verify a full DKG attestation bundle against a client-pinned
|
|
1401
|
+
* {@link TrustAnchor}: multiple TDX quotes from all participating
|
|
1402
|
+
* nodes, plus the binding between the quotes and the ML-KEM
|
|
1403
|
+
* encapsulation key. Checks:
|
|
1404
|
+
* 1. `expected_peer_ids` / `rtmr3_allowlist` are both non-empty
|
|
1405
|
+
* 2. the bundle's `peer_ids` equal the pinned set exactly
|
|
1406
|
+
* 3. attestationMsg starts with encapsKey (server can't swap the key)
|
|
1407
|
+
* 4. every quote's ECDSA signature chains to Intel's SGX root CA
|
|
1408
|
+
* 5. every quote's report_data == keccak512(attestationMsg)
|
|
1409
|
+
* 6. every quote's RTMR3 is a member of `rtmr3_allowlist`
|
|
1410
|
+
*
|
|
1411
|
+
* The anchor is **required**: there is no unauthenticated mode. Callers
|
|
1412
|
+
* that genuinely want to trust the server must not call this at all —
|
|
1413
|
+
* see `unsafe_trust_server` on the client config, which branches around
|
|
1414
|
+
* the whole verify path.
|
|
1415
|
+
*
|
|
1416
|
+
* @param encapsKeyB64 - Base64-encoded ML-KEM encapsulation key
|
|
1417
|
+
* (from `/status.encaps_key`)
|
|
1418
|
+
* @param attestationMsgB64 - Base64-encoded raw attestation message
|
|
1419
|
+
* (from `/status.dkg_attestation.attestation_msg`)
|
|
1420
|
+
* @param peerIds - Base58 peer IDs as reported by the bundle
|
|
1421
|
+
* @param quotes - Map of peer_id → base64-encoded TDX quote
|
|
1422
|
+
* @param anchor - Client-pinned expected peer IDs + RTMR3 allowlist
|
|
1423
|
+
* @returns Per-peer verification results and overall validity
|
|
1424
|
+
*/
|
|
1425
|
+
declare function verifyDkgAttestation(encapsKeyB64: string, attestationMsgB64: string, peerIds: string[], quotes: Record<string, string>, anchor: TrustAnchor): Promise<DkgVerifyResult>;
|
|
1426
|
+
|
|
1293
1427
|
/**
|
|
1294
1428
|
* Configuration types for T3n Client
|
|
1295
1429
|
*/
|
|
@@ -1319,6 +1453,20 @@ interface T3nClientConfig {
|
|
|
1319
1453
|
logger?: Logger;
|
|
1320
1454
|
/** Optional guest-to-host request handlers - provides custom behavior for WASM requests */
|
|
1321
1455
|
handlers?: GuestToHostHandlers;
|
|
1456
|
+
/**
|
|
1457
|
+
* **Required.** Client-pinned trust anchor the node's DKG attestation
|
|
1458
|
+
* is verified against before the handshake trusts its ML-KEM key
|
|
1459
|
+
* (SP-003). Either a {@link TrustAnchor} (`expected_peer_ids` +
|
|
1460
|
+
* `rtmr3_allowlist`) or the explicit `{ unsafe_trust_server: true }`
|
|
1461
|
+
* opt-out for local dev / mock-signer nodes.
|
|
1462
|
+
*
|
|
1463
|
+
* Without this, a network attacker with their own TDX VM can hand the
|
|
1464
|
+
* SDK a forged-but-valid attestation for a key it controls and read
|
|
1465
|
+
* every session. It is a required field precisely so no caller can
|
|
1466
|
+
* omit it by accident — bypassing verification must be a visible,
|
|
1467
|
+
* grep-able choice.
|
|
1468
|
+
*/
|
|
1469
|
+
trustAnchor: TrustAnchorOrUnsafe;
|
|
1322
1470
|
}
|
|
1323
1471
|
|
|
1324
1472
|
/**
|
|
@@ -1713,6 +1861,35 @@ declare class T3nClient {
|
|
|
1713
1861
|
* returns `Finish { did }`.
|
|
1714
1862
|
*/
|
|
1715
1863
|
private authenticateOidc;
|
|
1864
|
+
/**
|
|
1865
|
+
* Parse a `Finish { did }` reply shared by the manual (non-WASM) auth flows
|
|
1866
|
+
* that bypass the client state machine (interactive OIDC, keyless workload).
|
|
1867
|
+
*
|
|
1868
|
+
* Validates the `oidc_auth_action` tag before reading `did`: a decodable but
|
|
1869
|
+
* non-`Finish` reply is reported as such rather than silently misread as a
|
|
1870
|
+
* missing DID (which would discard whatever the server actually said). Returns
|
|
1871
|
+
* the session {@link Did}.
|
|
1872
|
+
*/
|
|
1873
|
+
private parseFinishDid;
|
|
1874
|
+
/**
|
|
1875
|
+
* Workload (keyless hosted-agent) single-call authentication.
|
|
1876
|
+
*
|
|
1877
|
+
* A hosted agent authenticates with its OWN OIDC workload identity —
|
|
1878
|
+
* a machine `id_token` whose `(iss, sub)` the caller has already
|
|
1879
|
+
* fetched — forwarded through this transport by value. Distinct from
|
|
1880
|
+
* the interactive {@link authenticateOidc} flow: there is NO
|
|
1881
|
+
* session-binding nonce and NO `InitOidcAuth` round-trip. We make a
|
|
1882
|
+
* SINGLE encrypted RPC call:
|
|
1883
|
+
*
|
|
1884
|
+
* 1. `SubmitWorkloadToken { provider, id_token }` → the node verifies
|
|
1885
|
+
* the token and mints/resolves the DID `oidc:<iss>:<sub>` →
|
|
1886
|
+
* returns `Finish { did }`.
|
|
1887
|
+
*
|
|
1888
|
+
* Bypasses the WASM client state machine (mirrors `authenticateOidc` /
|
|
1889
|
+
* `authenticateEmailOtp`); the `SubmitWorkloadToken` action tag is
|
|
1890
|
+
* matched server-side.
|
|
1891
|
+
*/
|
|
1892
|
+
private authenticateWorkload;
|
|
1716
1893
|
/**
|
|
1717
1894
|
* Email-OTP two-step authentication.
|
|
1718
1895
|
*
|
|
@@ -2342,8 +2519,9 @@ declare function metamask_get_address(): Promise<string>;
|
|
|
2342
2519
|
declare function eth_get_address(privateKey: string): string;
|
|
2343
2520
|
/**
|
|
2344
2521
|
* Create an MlKemPublicKey handler that lazily fetches the root public key
|
|
2345
|
-
* from `${baseUrl}/status` on first invocation
|
|
2346
|
-
*
|
|
2522
|
+
* from `${baseUrl}/status` on first invocation, verifies it against the
|
|
2523
|
+
* DKG attestation trust anchor (SP-003), and caches the encoded response
|
|
2524
|
+
* for subsequent calls.
|
|
2347
2525
|
*
|
|
2348
2526
|
* @param baseUrl - **Required**. The node URL whose `/status` endpoint should
|
|
2349
2527
|
* serve the ML-KEM public key. Must be the same URL the
|
|
@@ -2355,8 +2533,12 @@ declare function eth_get_address(privateKey: string): string;
|
|
|
2355
2533
|
* hit the wrong node. Three downstream consumers (demo.ts,
|
|
2356
2534
|
* t3-apps dev wallet hooks, t3n-mcp session manager) all
|
|
2357
2535
|
* hit this trap before we tightened the type.
|
|
2536
|
+
* @param trustAnchor - **Required**. Client-pinned expected peer IDs +
|
|
2537
|
+
* RTMR3 allowlist the DKG bundle is verified against, or
|
|
2538
|
+
* `{ unsafe_trust_server: true }` to skip verification.
|
|
2539
|
+
* The key is only cached/returned once verification passes.
|
|
2358
2540
|
*/
|
|
2359
|
-
declare function createMlKemPublicKeyHandler(baseUrl: string): GuestToHostHandler;
|
|
2541
|
+
declare function createMlKemPublicKeyHandler(baseUrl: string, trustAnchor: TrustAnchorOrUnsafe): GuestToHostHandler;
|
|
2360
2542
|
/**
|
|
2361
2543
|
* Create Random handler backed by crypto.getRandomValues
|
|
2362
2544
|
* Note: The Rust Vec<u8> type serializes as an array of bytes, not a base64 string
|
|
@@ -2367,8 +2549,11 @@ declare function createRandomHandler(): GuestToHostHandler;
|
|
|
2367
2549
|
*
|
|
2368
2550
|
* @param baseUrl - **Required**. Forwarded to `createMlKemPublicKeyHandler`
|
|
2369
2551
|
* so the lazy /status fetch hits the right node.
|
|
2552
|
+
* @param trustAnchor - **Required**. Forwarded to the ML-KEM handler so the
|
|
2553
|
+
* fetched key is verified against the DKG attestation
|
|
2554
|
+
* (SP-003) before the handshake trusts it.
|
|
2370
2555
|
*/
|
|
2371
|
-
declare function createDefaultHandlers(baseUrl: string): GuestToHostHandlers;
|
|
2556
|
+
declare function createDefaultHandlers(baseUrl: string, trustAnchor: TrustAnchorOrUnsafe): GuestToHostHandlers;
|
|
2372
2557
|
|
|
2373
2558
|
/**
|
|
2374
2559
|
* Payroll request shapes + shared encoding utilities.
|
|
@@ -2594,6 +2779,17 @@ interface OrgDataClientOptions extends ExecuteOrgDataActionOptions {
|
|
|
2594
2779
|
* header (e.g. the staging Cloud Armor bypass token).
|
|
2595
2780
|
*/
|
|
2596
2781
|
headers?: Record<string, string>;
|
|
2782
|
+
/**
|
|
2783
|
+
* **Required.** Trust anchor for the internal `T3nClient`'s DKG
|
|
2784
|
+
* attestation check (SP-003). Mirrors `T3nClientConfig.trustAnchor`:
|
|
2785
|
+
* either a pinned {@link TrustAnchor} or the explicit
|
|
2786
|
+
* `{ unsafe_trust_server: true }` opt-out. Required (no silent default)
|
|
2787
|
+
* so bypassing verification is always a visible, grep-able choice —
|
|
2788
|
+
* an authenticated ETH-key caller is still MITM-able on the ML-KEM key.
|
|
2789
|
+
* Signed trust-anchor manifests are not published yet, so most callers
|
|
2790
|
+
* pass `{ unsafe_trust_server: true }` today.
|
|
2791
|
+
*/
|
|
2792
|
+
trustAnchor: TrustAnchorOrUnsafe;
|
|
2597
2793
|
}
|
|
2598
2794
|
/**
|
|
2599
2795
|
* Client for session-authenticated org-data contract execution.
|
|
@@ -2610,7 +2806,7 @@ declare class OrgDataClient {
|
|
|
2610
2806
|
private readonly userDid;
|
|
2611
2807
|
private readonly opts;
|
|
2612
2808
|
private clientPromise;
|
|
2613
|
-
constructor(baseUrl: string, ethSecret: Uint8Array, userDid: string, opts
|
|
2809
|
+
constructor(baseUrl: string, ethSecret: Uint8Array, userDid: string, opts: OrgDataClientOptions);
|
|
2614
2810
|
private getAuthenticatedClient;
|
|
2615
2811
|
private initialiseClient;
|
|
2616
2812
|
private call;
|
|
@@ -2935,65 +3131,6 @@ interface ConfigValidationResult {
|
|
|
2935
3131
|
errors: string[];
|
|
2936
3132
|
}
|
|
2937
3133
|
|
|
2938
|
-
/**
|
|
2939
|
-
* TDX quote verifier backed by the Rust `signature` crate compiled to
|
|
2940
|
-
* WASM. Full cryptographic verification: ECDSA P-256 attestation-key
|
|
2941
|
-
* signature, PCK certificate chain walk to Intel's root CA, and
|
|
2942
|
-
* report_data + RTMR comparison.
|
|
2943
|
-
*
|
|
2944
|
-
* The WASM bytes are inlined as base64 (see quote_verifier_bytes.ts)
|
|
2945
|
-
* so the SDK works without bundler WASM plugins and without runtime
|
|
2946
|
-
* asset URL resolution.
|
|
2947
|
-
*/
|
|
2948
|
-
interface QuoteVerifyResult {
|
|
2949
|
-
valid: boolean;
|
|
2950
|
-
error?: string;
|
|
2951
|
-
rtmr3?: string;
|
|
2952
|
-
report_data?: string;
|
|
2953
|
-
}
|
|
2954
|
-
interface PeerQuoteResult {
|
|
2955
|
-
peer_id: string;
|
|
2956
|
-
valid: boolean;
|
|
2957
|
-
error?: string;
|
|
2958
|
-
rtmr3?: string;
|
|
2959
|
-
}
|
|
2960
|
-
interface DkgVerifyResult {
|
|
2961
|
-
valid: boolean;
|
|
2962
|
-
results: PeerQuoteResult[];
|
|
2963
|
-
valid_count: number;
|
|
2964
|
-
expected_count: number;
|
|
2965
|
-
error?: string;
|
|
2966
|
-
}
|
|
2967
|
-
/**
|
|
2968
|
-
* Verify a single TDX attestation quote with full cryptographic verification.
|
|
2969
|
-
*
|
|
2970
|
-
* @param quoteB64 - Base64-encoded raw TDX v4 quote
|
|
2971
|
-
* @param attestationMsgB64 - Base64-encoded attestation message
|
|
2972
|
-
* (for DKG: encaps_key || sorted_peer_id_bytes)
|
|
2973
|
-
* @param expectedRtmr3B64 - Optional base64-encoded 48-byte RTMR3
|
|
2974
|
-
* @returns Verification result with extracted measurements
|
|
2975
|
-
*/
|
|
2976
|
-
declare function verifyTdxQuote(quoteB64: string, attestationMsgB64: string, expectedRtmr3B64?: string): Promise<QuoteVerifyResult>;
|
|
2977
|
-
/**
|
|
2978
|
-
* Verify a full DKG attestation bundle: multiple TDX quotes from all
|
|
2979
|
-
* participating nodes, plus the binding between the quotes and the
|
|
2980
|
-
* ML-KEM encapsulation key. Checks:
|
|
2981
|
-
* 1. attestationMsg starts with encapsKey (server can't swap the key)
|
|
2982
|
-
* 2. Every quote's ECDSA signature chains to Intel's SGX root CA
|
|
2983
|
-
* 3. Every quote's report_data == keccak512(attestationMsg)
|
|
2984
|
-
* 4. Optional RTMR3 pinning per quote
|
|
2985
|
-
*
|
|
2986
|
-
* @param encapsKeyB64 - Base64-encoded ML-KEM encapsulation key
|
|
2987
|
-
* (from `/status.encaps_key`)
|
|
2988
|
-
* @param attestationMsgB64 - Base64-encoded raw attestation message
|
|
2989
|
-
* (from `/status.dkg_attestation.attestation_msg`)
|
|
2990
|
-
* @param peerIds - Sorted array of base58 peer IDs
|
|
2991
|
-
* @param quotes - Map of peer_id → base64-encoded TDX quote
|
|
2992
|
-
* @param expectedRtmr3B64 - Optional base64-encoded 48-byte RTMR3
|
|
2993
|
-
* @returns Per-peer verification results and overall validity
|
|
2994
|
-
*/
|
|
2995
|
-
declare function verifyDkgAttestation(encapsKeyB64: string, attestationMsgB64: string, peerIds: string[], quotes: Record<string, string>, expectedRtmr3B64?: string): Promise<DkgVerifyResult>;
|
|
2996
|
-
|
|
2997
3134
|
/**
|
|
2998
3135
|
* Configuration validation for T3n SDK
|
|
2999
3136
|
*/
|
|
@@ -3403,5 +3540,5 @@ declare function tenantDidHex(tenantDid: string): string;
|
|
|
3403
3540
|
declare function validateTail(tail: string): string;
|
|
3404
3541
|
declare function canonicalTenantName(tenantDid: string, tail: string): string;
|
|
3405
3542
|
|
|
3406
|
-
export { AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_ENVIRONMENT, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, HandshakeError, HttpTransport, KycStatusTimeoutError, LogLevel, MockTransport, NODE_URLS, OrgDataClient, OtpRateLimitedError, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, T3nClient, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, WasmError, Z_PAYROLL_AUDIT_READ_FUNCTIONS, Z_PAYROLL_RUN_FUNCTIONS, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, bytesToString, canonicalTenantName, clearKeyCache, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, decodeWasmErrorMessage, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, isDataGetResponse, isDataListResponse, isMutationResponse, isObject, isOrgContractGrants, isOrgPolicyMeta, isOrgPolicyView, isOrgWriters, loadConfig, loadWasmComponent, maskKeyMaterial, mergeAgentAuthEntries, metamask_get_address, metamask_sign, parseAgentAuthGet, parseContractResponse, redactSecrets, redactSecretsFromJson, setEnvironment, setGlobalLogLevel, setNodeUrl, stringToBytes, tenantDidHex, toAgentAuthUpdateWire, toBaseUnits, validateConfig, validateTail, verifyDkgAttestation, verifyTdxQuote };
|
|
3407
|
-
export type { AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthScriptGrant, AgentAuthUpdateInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractExecuteInput, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, GetUsageOptions, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, Logger, MapCreateInput, MapResponse, MapUpdateInput, MapVisibility, MutationResponse, OidcAuthInput, OidcCredentials, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, QuoteVerifyResult, ReaderSet, SdkConfig, SessionCrypto, SessionId, SetGrantsInput, SetWritersInput, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, UpdateMetaInput, UsageEntry, UsagePage, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WriteDataInput, WriterSet, WritersGetInput };
|
|
3543
|
+
export { AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_ENVIRONMENT, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, HandshakeError, HttpTransport, KycStatusTimeoutError, LogLevel, MockTransport, NODE_URLS, OrgDataClient, OtpRateLimitedError, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, T3nClient, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, WasmError, Z_PAYROLL_AUDIT_READ_FUNCTIONS, Z_PAYROLL_RUN_FUNCTIONS, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, bytesToString, canonicalTenantName, clearKeyCache, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, createWorkloadAuthInput, decodeWasmErrorMessage, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, isDataGetResponse, isDataListResponse, isMutationResponse, isObject, isOrgContractGrants, isOrgPolicyMeta, isOrgPolicyView, isOrgWriters, isUnsafeTrustServer, loadConfig, loadWasmComponent, maskKeyMaterial, mergeAgentAuthEntries, metamask_get_address, metamask_sign, parseAgentAuthGet, parseContractResponse, redactSecrets, redactSecretsFromJson, setEnvironment, setGlobalLogLevel, setNodeUrl, stringToBytes, tenantDidHex, toAgentAuthUpdateWire, toBaseUnits, validateConfig, validateTail, verifyDkgAttestation, verifyTdxQuote };
|
|
3544
|
+
export type { AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthScriptGrant, AgentAuthUpdateInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractExecuteInput, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, GetUsageOptions, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, Logger, MapCreateInput, MapResponse, MapUpdateInput, MapVisibility, MutationResponse, OidcAuthInput, OidcCredentials, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, QuoteVerifyResult, ReaderSet, SdkConfig, SessionCrypto, SessionId, SetGrantsInput, SetWritersInput, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, TrustAnchor, TrustAnchorOrUnsafe, UnsafeTrustServer, UpdateMetaInput, UsageEntry, UsagePage, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WorkloadAuthInput, WriteDataInput, WriterSet, WritersGetInput };
|