@terminal3/t3n-sdk 0.4.1 → 0.5.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.
@@ -75,11 +75,10 @@ export interface SessionCrypto {
75
75
  /**
76
76
  * Encrypt plaintext using session
77
77
  * @param session - Session state (opaque bytes)
78
- * @param nonce - Nonce to use for encryption
79
78
  * @param plaintext - Data to encrypt
80
79
  * @returns Promise with encrypted bytes
81
80
  */
82
- encrypt(session: Uint8Array, nonce: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>;
81
+ encrypt(session: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>;
83
82
  /**
84
83
  * Decrypt ciphertext using session
85
84
  * @param session - Session state (opaque bytes)
@@ -0,0 +1,8 @@
1
+ /** @module Interface component:session/cookie@0.1.0 **/
2
+ export function validate(cookieValue: string, teeAddress: Uint8Array, nowSec: bigint): Validation;
3
+ export interface Validation {
4
+ authenticated: boolean,
5
+ did?: string,
6
+ exp: bigint,
7
+ }
8
+ export type Error = Uint8Array;
@@ -1,8 +1,7 @@
1
1
  /** @module Interface component:session/session@0.1.0 **/
2
- export function encrypt(session: Session, nonce: Nonce, plaintext: Plaintext): Ciphertext;
2
+ export function encrypt(session: Session, plaintext: Plaintext): Ciphertext;
3
3
  export function decrypt(session: Session, ciphertext: Ciphertext): Plaintext;
4
4
  export type Error = Uint8Array;
5
5
  export type Session = Uint8Array;
6
6
  export type Plaintext = Uint8Array;
7
7
  export type Ciphertext = Uint8Array;
8
- export type Nonce = Uint8Array;
@@ -1,2 +1,2 @@
1
- /** @module Interface wasi:cli/environment@0.2.4 **/
1
+ /** @module Interface wasi:cli/environment@0.2.9 **/
2
2
  export function getEnvironment(): Array<[string, string]>;
@@ -1,3 +1,3 @@
1
- /** @module Interface wasi:cli/exit@0.2.4 **/
1
+ /** @module Interface wasi:cli/exit@0.2.9 **/
2
2
  export function exit(status: Result<void, void>): void;
3
3
  export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E };
@@ -1,3 +1,3 @@
1
- /** @module Interface wasi:cli/stderr@0.2.4 **/
1
+ /** @module Interface wasi:cli/stderr@0.2.9 **/
2
2
  export function getStderr(): OutputStream;
3
3
  export type OutputStream = import('./wasi-io-streams.js').OutputStream;
@@ -1,8 +1,9 @@
1
- /** @module Interface wasi:io/error@0.2.4 **/
1
+ /** @module Interface wasi:io/error@0.2.9 **/
2
2
 
3
3
  export class Error {
4
4
  /**
5
5
  * This type does not have a public constructor.
6
6
  */
7
7
  private constructor();
8
+ toDebugString(): string;
8
9
  }
@@ -1,4 +1,4 @@
1
- /** @module Interface wasi:io/streams@0.2.4 **/
1
+ /** @module Interface wasi:io/streams@0.2.9 **/
2
2
  export type Error = import('./wasi-io-error.js').Error;
3
3
  export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
4
4
  export interface StreamErrorLastOperationFailed {
@@ -9,20 +9,10 @@ export interface StreamErrorClosed {
9
9
  tag: 'closed',
10
10
  }
11
11
 
12
- export class InputStream {
13
- /**
14
- * This type does not have a public constructor.
15
- */
16
- private constructor();
17
- }
18
-
19
12
  export class OutputStream {
20
13
  /**
21
14
  * This type does not have a public constructor.
22
15
  */
23
16
  private constructor();
24
- checkWrite(): bigint;
25
- write(contents: Uint8Array): void;
26
17
  blockingWriteAndFlush(contents: Uint8Array): void;
27
- blockingFlush(): void;
28
18
  }
@@ -0,0 +1,2 @@
1
+ /** @module Interface wasi:random/random@0.2.9 **/
2
+ export function getRandomU64(): bigint;
@@ -1,16 +1,13 @@
1
1
  // world root:component/root
2
- export type * as WasiCliEnvironment024 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.4
3
- export type * as WasiCliExit024 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.4
4
- export type * as WasiCliStderr024 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.4
5
- export type * as WasiCliStdin024 from './interfaces/wasi-cli-stdin.js'; // import wasi:cli/stdin@0.2.4
6
- export type * as WasiCliStdout024 from './interfaces/wasi-cli-stdout.js'; // import wasi:cli/stdout@0.2.4
7
- export type * as WasiClocksWallClock024 from './interfaces/wasi-clocks-wall-clock.js'; // import wasi:clocks/wall-clock@0.2.4
8
- export type * as WasiFilesystemPreopens024 from './interfaces/wasi-filesystem-preopens.js'; // import wasi:filesystem/preopens@0.2.4
9
- export type * as WasiFilesystemTypes024 from './interfaces/wasi-filesystem-types.js'; // import wasi:filesystem/types@0.2.4
10
- export type * as WasiIoError024 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.4
11
- export type * as WasiIoStreams024 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.4
2
+ export type * as WasiCliEnvironment029 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.9
3
+ export type * as WasiCliExit029 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.9
4
+ export type * as WasiCliStderr029 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.9
5
+ export type * as WasiIoError029 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.9
6
+ export type * as WasiIoStreams029 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.9
7
+ export type * as WasiRandomRandom029 from './interfaces/wasi-random-random.js'; // import wasi:random/random@0.2.9
12
8
  export * as clientAuth from './interfaces/component-session-client-auth.js'; // export component:session/client-auth@0.1.0
13
9
  export * as serverAuth from './interfaces/component-session-server-auth.js'; // export component:session/server-auth@0.1.0
14
10
  export * as clientHandshake from './interfaces/component-session-client-handshake.js'; // export component:session/client-handshake@0.1.0
15
11
  export * as serverHandshake from './interfaces/component-session-server-handshake.js'; // export component:session/server-handshake@0.1.0
16
12
  export * as session from './interfaces/component-session-session.js'; // export component:session/session@0.1.0
13
+ export * as cookie from './interfaces/component-session-cookie.js'; // export component:session/cookie@0.1.0