@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.
- package/README.md +2 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/wasm/interface.d.ts +1 -2
- package/dist/wasm/generated/interfaces/component-session-cookie.d.ts +8 -0
- package/dist/wasm/generated/interfaces/component-session-session.d.ts +1 -2
- package/dist/wasm/generated/interfaces/wasi-cli-environment.d.ts +1 -1
- package/dist/wasm/generated/interfaces/wasi-cli-exit.d.ts +1 -1
- package/dist/wasm/generated/interfaces/wasi-cli-stderr.d.ts +1 -1
- package/dist/wasm/generated/interfaces/wasi-io-error.d.ts +2 -1
- package/dist/wasm/generated/interfaces/wasi-io-streams.d.ts +1 -11
- package/dist/wasm/generated/interfaces/wasi-random-random.d.ts +2 -0
- package/dist/wasm/generated/session.core.wasm +0 -0
- package/dist/wasm/generated/session.d.ts +7 -10
- package/dist/wasm/generated/session.js +239 -1674
- package/package.json +25 -24
- package/dist/wasm/generated/interfaces/wasi-cli-stdin.d.ts +0 -3
- package/dist/wasm/generated/interfaces/wasi-cli-stdout.d.ts +0 -3
- package/dist/wasm/generated/interfaces/wasi-clocks-wall-clock.d.ts +0 -5
- package/dist/wasm/generated/interfaces/wasi-filesystem-preopens.d.ts +0 -3
- package/dist/wasm/generated/interfaces/wasi-filesystem-types.d.ts +0 -124
- package/dist/wasm/generated/session.core2.wasm +0 -0
|
@@ -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,
|
|
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,
|
|
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.
|
|
1
|
+
/** @module Interface wasi:cli/environment@0.2.9 **/
|
|
2
2
|
export function getEnvironment(): Array<[string, string]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @module Interface wasi:io/streams@0.2.
|
|
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
|
}
|
|
Binary file
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
// world root:component/root
|
|
2
|
-
export type * as
|
|
3
|
-
export type * as
|
|
4
|
-
export type * as
|
|
5
|
-
export type * as
|
|
6
|
-
export type * as
|
|
7
|
-
export type * as
|
|
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
|