@k9o/kibo-react-native 1.2.0 → 1.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/CHANGELOG.md +22 -0
- package/README.md +31 -21
- package/package.json +3 -2
- package/src/KiboError.ts +2 -1
- package/src/crypto-types.ts +2 -2
- package/src/crypto.ts +93 -25
- package/src/index.ts +4 -5
- package/wasm/kibo_kms_rest_ffi.d.ts +3 -3
- package/wasm/kibo_kms_rest_ffi.js +9 -9
- package/wasm/kibo_kms_rest_ffi_bg.wasm +0 -0
- package/wasm/kibo_kms_rest_ffi_bg.wasm.d.ts +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @k9o/kibo-react-native — Changelog
|
|
2
|
+
|
|
3
|
+
## 1.3.0 — 2026-10-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- The web glue of the Kibo core initialises lazily on the first `encrypt` or `decrypt`.
|
|
8
|
+
- A core that was supplied but cannot start fails with the new `KIBO_WASM_INIT_FAILED`. A later call retries.
|
|
9
|
+
- README: the core ships inside the package under `wasm/`. It is not something your app has to bundle.
|
|
10
|
+
|
|
11
|
+
### Removed
|
|
12
|
+
|
|
13
|
+
- Nothing.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `init({ core, wasm? })` supplies the core and initialises it now. `wasm` takes the compiled `.wasm` bytes.
|
|
18
|
+
- Types `ZkCoreModule` and `InitOptions`.
|
|
19
|
+
|
|
20
|
+
## 1.0.0
|
|
21
|
+
|
|
22
|
+
First public release.
|
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Kibo for React Native. Encrypt and decrypt on the device with keys held in your own KMS, so the platform never sees your plaintext.
|
|
4
4
|
|
|
5
|
-
Kilimanjaro is
|
|
5
|
+
Kilimanjaro is the AI-native foundation for building critical applications. Its products are Keep (AI Security and Governance),
|
|
6
|
+
Pulse (Data Intelligence), Gate (Customer Identity and Access Management) and Kibo (Keys and Secrets Management).
|
|
6
7
|
|
|
7
8
|
## Contents
|
|
8
9
|
|
|
@@ -13,6 +14,11 @@ Kilimanjaro is an AI-native platform on a Governed Database. Its products are Ke
|
|
|
13
14
|
- [Encrypt and decrypt](#encrypt-and-decrypt)
|
|
14
15
|
- [Handle errors](#handle-errors)
|
|
15
16
|
- [Appendix](#appendix)
|
|
17
|
+
- [Requirements](#requirements)
|
|
18
|
+
- [Methods](#methods)
|
|
19
|
+
- [Encrypt and decrypt fields](#encrypt-and-decrypt-fields)
|
|
20
|
+
- [Error codes](#error-codes)
|
|
21
|
+
- [Related packages](#related-packages)
|
|
16
22
|
|
|
17
23
|
## Links
|
|
18
24
|
|
|
@@ -20,11 +26,6 @@ Kilimanjaro is an AI-native platform on a Governed Database. Its products are Ke
|
|
|
20
26
|
- Documentation / Developer Hub: <https://docs.kilimanjaro.dev>
|
|
21
27
|
- Platform API: <https://api.k9o.io>
|
|
22
28
|
- Platform Console: <https://console.k9o.io>
|
|
23
|
-
- [Requirements](#requirements)
|
|
24
|
-
- [Methods](#methods)
|
|
25
|
-
- [Encrypt and decrypt fields](#encrypt-and-decrypt-fields)
|
|
26
|
-
- [Error codes](#error-codes)
|
|
27
|
-
- [Related packages](#related-packages)
|
|
28
29
|
|
|
29
30
|
## Install
|
|
30
31
|
|
|
@@ -36,25 +37,29 @@ Yarn works too: `yarn add @k9o/kibo-react-native`. See [requirements](#requireme
|
|
|
36
37
|
|
|
37
38
|
## Quick start
|
|
38
39
|
|
|
39
|
-
-
|
|
40
|
+
- Hand the Kibo core to the package once at app start. See [load the core](#load-the-core).
|
|
40
41
|
- Call `encrypt` and `decrypt`. See [encrypt and decrypt](#encrypt-and-decrypt).
|
|
41
42
|
|
|
42
43
|
This package has no cryptography of its own. It passes typed input to the Kibo core, a WebAssembly module, and returns the result.
|
|
44
|
+
The core ships inside the package, under `wasm/`.
|
|
43
45
|
|
|
44
46
|
## Load the core
|
|
45
47
|
|
|
46
|
-
React Native cannot import the WebAssembly core on demand. Your app
|
|
48
|
+
React Native cannot import the WebAssembly core on demand. Your app imports it and hands it over once with `init`.
|
|
47
49
|
|
|
48
50
|
```ts
|
|
49
|
-
import {
|
|
50
|
-
import * as core from "
|
|
51
|
+
import { init } from "@k9o/kibo-react-native";
|
|
52
|
+
import * as core from "@k9o/kibo-react-native/wasm/kibo_kms_rest_ffi.js";
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
await init({ core });
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
57
|
+
- `init` is optional. Without it, the core is initialised on the first `encrypt` or `decrypt`.
|
|
58
|
+
- `setZkWasm(core)` supplies the core without initialising it. `init({ core })` does both.
|
|
59
|
+
- If your runtime cannot fetch the `.wasm` file itself, pass its bytes: `init({ core, wasm })`.
|
|
60
|
+
- The module must expose async `zk_encrypt` and `zk_decrypt` functions (the `ZkWasm` type).
|
|
61
|
+
- Before a core is supplied, `encrypt` and `decrypt` fail with `KIBO_WASM_NOT_LOADED`.
|
|
62
|
+
- If the core is supplied but cannot start, they fail with `KIBO_WASM_INIT_FAILED`. A later call retries.
|
|
58
63
|
|
|
59
64
|
## Encrypt and decrypt
|
|
60
65
|
|
|
@@ -62,12 +67,13 @@ The example encrypts the title of a task. `kms_cred.secret` is a short-lived fed
|
|
|
62
67
|
|
|
63
68
|
```ts
|
|
64
69
|
import { encrypt, decrypt } from "@k9o/kibo-react-native";
|
|
70
|
+
import type { KiboEncryptInput } from "@k9o/kibo-react-native";
|
|
65
71
|
|
|
66
72
|
const kmsToken = "FEDERATED_TOKEN";
|
|
67
73
|
const context = [{ key: "collection", value: "tasks" }];
|
|
68
74
|
const title = new TextEncoder().encode("Write the README");
|
|
69
75
|
|
|
70
|
-
const
|
|
76
|
+
const input: KiboEncryptInput = {
|
|
71
77
|
provider: "aws-kms",
|
|
72
78
|
posture: "byok",
|
|
73
79
|
kms_cred: { secret: kmsToken, expires_at_unix_secs: 1_800_000_000 },
|
|
@@ -76,7 +82,9 @@ const sealed = await encrypt({
|
|
|
76
82
|
attestation_tier: "software",
|
|
77
83
|
encryption_context: context,
|
|
78
84
|
plaintext: title,
|
|
79
|
-
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const sealed = await encrypt(input);
|
|
80
88
|
|
|
81
89
|
const opened = await decrypt({
|
|
82
90
|
kms_cred: { secret: kmsToken, expires_at_unix_secs: 1_800_000_000 },
|
|
@@ -100,7 +108,7 @@ Write the README
|
|
|
100
108
|
|
|
101
109
|
## Handle errors
|
|
102
110
|
|
|
103
|
-
Every failure is a `KiboError` with `code`, `message` and `context`.
|
|
111
|
+
Every failure is a `KiboError` with `code`, `message` and `context`. The `input` is the one from the previous section.
|
|
104
112
|
|
|
105
113
|
```ts
|
|
106
114
|
import { KiboError } from "@k9o/kibo-react-native";
|
|
@@ -114,7 +122,7 @@ try {
|
|
|
114
122
|
}
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
If
|
|
125
|
+
If no core was supplied, this prints:
|
|
118
126
|
|
|
119
127
|
```text
|
|
120
128
|
KIBO_WASM_NOT_LOADED
|
|
@@ -130,13 +138,14 @@ See [error codes](#error-codes) for the full list.
|
|
|
130
138
|
|---|---|
|
|
131
139
|
| React | 18 or later |
|
|
132
140
|
| React Native | 0.74 or later |
|
|
133
|
-
| Kibo core (WebAssembly) |
|
|
141
|
+
| Kibo core (WebAssembly) | Shipped in the package under `wasm/` |
|
|
134
142
|
|
|
135
143
|
### Methods
|
|
136
144
|
|
|
137
145
|
| Function | What it does |
|
|
138
146
|
|---|---|
|
|
139
|
-
| `
|
|
147
|
+
| `init({ core, wasm? })` | Supply the core and initialise it now; optional, `encrypt` initialises on first use |
|
|
148
|
+
| `setZkWasm(core)` | Supply the core; it is initialised on first use |
|
|
140
149
|
| `encrypt(input)` | Encrypt bytes with your KMS; returns `{ envelope }` |
|
|
141
150
|
| `decrypt(input)` | Decrypt an envelope; returns `{ plaintext }` |
|
|
142
151
|
|
|
@@ -163,7 +172,8 @@ Codes from the core are passed through unchanged.
|
|
|
163
172
|
|
|
164
173
|
| Code | When |
|
|
165
174
|
|---|---|
|
|
166
|
-
| `KIBO_WASM_NOT_LOADED` | `
|
|
175
|
+
| `KIBO_WASM_NOT_LOADED` | No core was supplied with `init` or `setZkWasm` |
|
|
176
|
+
| `KIBO_WASM_INIT_FAILED` | A core was supplied but failed to initialise; `context.cause` has the reason |
|
|
167
177
|
| `K9O_CRYPTO_POSTURE_FLOOR_VIOLATION` | `posture` is below the floor in `posture_policy`; `context` has `dimension`, `requested`, `declared` |
|
|
168
178
|
| `UPSTREAM_KMS_ERROR` | Your own KMS rejected or failed the call |
|
|
169
179
|
| `KIBO_WASM_DECODE_ERROR` | The core returned something other than bytes |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k9o/kibo-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Kibo Zero-Knowledge BYOK/HYOK vault SDK for React Native — client-side encrypt/decrypt against your own KMS, over the audited Rust core (kibo-kms-rest-ffi) compiled to wasm. The platform never sees plaintext.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"!src/__tests__",
|
|
11
11
|
"LICENSE",
|
|
12
12
|
"NOTICE",
|
|
13
|
-
"README.md"
|
|
13
|
+
"README.md",
|
|
14
|
+
"CHANGELOG.md"
|
|
14
15
|
],
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
package/src/KiboError.ts
CHANGED
|
@@ -15,8 +15,9 @@ export class KiboError extends Error {
|
|
|
15
15
|
readonly code: string;
|
|
16
16
|
readonly context: Record<string, unknown>;
|
|
17
17
|
|
|
18
|
-
constructor(opts: { code: string; message: string; context?: Record<string, unknown
|
|
18
|
+
constructor(opts: { code: string; message: string; context?: Record<string, unknown>; cause?: unknown }) {
|
|
19
19
|
super(opts.message);
|
|
20
|
+
if (opts.cause !== undefined) (this as { cause?: unknown }).cause = opts.cause;
|
|
20
21
|
this.name = "KiboError";
|
|
21
22
|
this.code = opts.code;
|
|
22
23
|
this.context = opts.context ?? {};
|
package/src/crypto-types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TS contract for the ZK encrypt/decrypt FFI surface — mirrors the Rust
|
|
3
|
-
* `kibo-kms-rest-ffi::types` (the bound core
|
|
3
|
+
* `kibo-kms-rest-ffi::types` (the bound core) field-for-field.
|
|
4
4
|
*
|
|
5
5
|
* These types cross the wasm boundary as plain JS objects (serde-wasm-bindgen),
|
|
6
6
|
* so the field names + enum wire-tokens must match the Rust serde exactly:
|
|
@@ -42,7 +42,7 @@ export interface KiboAllowedOracleModes {
|
|
|
42
42
|
direct: boolean;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** Project-declared crypto-posture floor. Omit fields for the
|
|
45
|
+
/** Project-declared crypto-posture floor . Omit fields for the
|
|
46
46
|
* most-permissive default (`platform_managed` floor + both oracle modes). */
|
|
47
47
|
export interface KiboPosturePolicy {
|
|
48
48
|
min_custody_posture?: KiboMinPosture;
|
package/src/crypto.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ZK encrypt/decrypt
|
|
3
|
-
* (`kibo-kms-rest-ffi
|
|
2
|
+
* ZK encrypt/decrypt - the thin React Native wrapper over the bound crypto core
|
|
3
|
+
* (`kibo-kms-rest-ffi`) compiled to wasm. ZERO crypto here: every
|
|
4
4
|
* wrap/unwrap, envelope framing, posture-floor enforcement, and KMS round-trip
|
|
5
|
-
* lives in the
|
|
6
|
-
* across the wasm boundary and maps the core's error string
|
|
5
|
+
* lives in the Rust core. This layer only marshals the typed input
|
|
6
|
+
* across the wasm boundary and maps the core's error string to `KiboError`.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
11
|
-
* `
|
|
8
|
+
* The core is the wasm-bindgen web-target module (`wasm/kibo_kms_rest_ffi.js`, shipped in this package). That module
|
|
9
|
+
* must be initialised (its default export instantiates the `.wasm`) before `zk_encrypt` / `zk_decrypt` exist in a
|
|
10
|
+
* usable state. `init()` does that; `encrypt` / `decrypt` call it for you on first use when a core has been supplied
|
|
11
|
+
* with `init({ core })` or `setZkWasm(core)`. React Native cannot `import()` the artifact on demand, so the app
|
|
12
|
+
* imports the module itself and hands it over.
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
import { KiboError } from "./KiboError";
|
|
@@ -25,35 +26,102 @@ export interface ZkWasm {
|
|
|
25
26
|
zk_decrypt(input: unknown): Promise<unknown>;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
/** The wasm-bindgen web-target module namespace: `ZkWasm` plus its initialisers. */
|
|
30
|
+
export interface ZkCoreModule extends ZkWasm {
|
|
31
|
+
/** Instantiates the `.wasm`. Takes the module bytes, a `WebAssembly.Module`, a `URL`/string, or nothing (then the glue fetches
|
|
32
|
+
* its sibling `.wasm`, which works on the web but usually not in React Native). */
|
|
33
|
+
default?: (input?: unknown) => Promise<unknown>;
|
|
34
|
+
/** Synchronous instantiation from bytes or a `WebAssembly.Module`. */
|
|
35
|
+
initSync?: (input: unknown) => unknown;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface InitOptions {
|
|
39
|
+
/** The core module: `import * as core from "@k9o/kibo-react-native/wasm/kibo_kms_rest_ffi.js"`. Optional when `setZkWasm` was called. */
|
|
40
|
+
core?: ZkCoreModule;
|
|
41
|
+
/** The compiled `.wasm`, as bytes (`ArrayBuffer`/typed array), a `WebAssembly.Module`, or whatever your runtime can hand the glue
|
|
42
|
+
* (URL, string, `Response`). Omit it to let the glue locate its own `.wasm`. */
|
|
43
|
+
wasm?: unknown;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
let core: ZkCoreModule | undefined;
|
|
47
|
+
let wasmInput: unknown;
|
|
48
|
+
let ready: ZkWasm | undefined;
|
|
49
|
+
let pending: Promise<ZkWasm> | undefined;
|
|
29
50
|
|
|
30
51
|
/**
|
|
31
|
-
*
|
|
32
|
-
* (
|
|
52
|
+
* Supply the core module. Call it once at app start, or use `init({ core })`. If the module still needs
|
|
53
|
+
* instantiating (it has a default export), that happens on the first `encrypt` / `decrypt`, or earlier via `init()`.
|
|
54
|
+
* A module with only `zk_encrypt` / `zk_decrypt` (already instantiated, or a test double) is used as is.
|
|
33
55
|
*/
|
|
34
|
-
export function setZkWasm(mod: ZkWasm): void {
|
|
35
|
-
|
|
56
|
+
export function setZkWasm(mod: ZkWasm | ZkCoreModule | undefined): void {
|
|
57
|
+
core = mod as ZkCoreModule | undefined;
|
|
58
|
+
ready = undefined;
|
|
59
|
+
pending = undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function isSyncInput(v: unknown): boolean {
|
|
63
|
+
if (v === undefined || v === null) return false;
|
|
64
|
+
const W = (globalThis as { WebAssembly?: { Module?: new (...a: never[]) => unknown } }).WebAssembly;
|
|
65
|
+
return v instanceof ArrayBuffer || ArrayBuffer.isView(v) || (W?.Module !== undefined && v instanceof (W.Module as new (...a: never[]) => object));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Initialise the core now (optional: `encrypt` / `decrypt` do it on first use). Safe to call more than once; concurrent
|
|
70
|
+
* calls share one initialisation, and a failed one can be retried.
|
|
71
|
+
*/
|
|
72
|
+
export async function init(options: InitOptions = {}): Promise<void> {
|
|
73
|
+
if (options.core !== undefined) setZkWasm(options.core);
|
|
74
|
+
if (options.wasm !== undefined) {
|
|
75
|
+
wasmInput = options.wasm;
|
|
76
|
+
ready = undefined;
|
|
77
|
+
pending = undefined;
|
|
78
|
+
}
|
|
79
|
+
await ensureReady();
|
|
36
80
|
}
|
|
37
81
|
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
82
|
+
function ensureReady(): Promise<ZkWasm> {
|
|
83
|
+
if (ready) return Promise.resolve(ready);
|
|
84
|
+
if (!core) {
|
|
85
|
+
return Promise.reject(
|
|
86
|
+
new KiboError({
|
|
87
|
+
code: "KIBO_WASM_NOT_LOADED",
|
|
88
|
+
message:
|
|
89
|
+
"The Kibo core (wasm) has not been supplied. Call init({ core }) or setZkWasm(core) once, with the module from wasm/kibo_kms_rest_ffi.js in this package (or a build your app bundles), before encrypt/decrypt.",
|
|
90
|
+
context: {},
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
46
93
|
}
|
|
47
|
-
|
|
94
|
+
const mod = core;
|
|
95
|
+
pending ??= (async () => {
|
|
96
|
+
try {
|
|
97
|
+
if (typeof mod.initSync === "function" && isSyncInput(wasmInput)) mod.initSync(wasmInput);
|
|
98
|
+
else if (typeof mod.default === "function") await mod.default(wasmInput);
|
|
99
|
+
if (typeof mod.zk_encrypt !== "function" || typeof mod.zk_decrypt !== "function") {
|
|
100
|
+
throw new Error("the module does not export zk_encrypt and zk_decrypt");
|
|
101
|
+
}
|
|
102
|
+
ready = mod;
|
|
103
|
+
return mod;
|
|
104
|
+
} catch (e) {
|
|
105
|
+
pending = undefined; // allow a retry
|
|
106
|
+
const why = e instanceof Error ? e.message : String(e);
|
|
107
|
+
throw new KiboError({
|
|
108
|
+
code: "KIBO_WASM_INIT_FAILED",
|
|
109
|
+
message: `The Kibo core (wasm) was supplied but failed to initialise: ${why}`,
|
|
110
|
+
context: { cause: why },
|
|
111
|
+
cause: e,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
})();
|
|
115
|
+
return pending;
|
|
48
116
|
}
|
|
49
117
|
|
|
50
118
|
/**
|
|
51
119
|
* Encrypt `input.plaintext` via the customer KMS, client-side. Returns the
|
|
52
|
-
* opaque ZKFE envelope
|
|
120
|
+
* opaque ZKFE envelope - store it via the gateway ZK-DEK surface or keep
|
|
53
121
|
* it yourself; it is meaningless to the platform.
|
|
54
122
|
*/
|
|
55
123
|
export async function encrypt(input: KiboEncryptInput): Promise<KiboEncryptOutput> {
|
|
56
|
-
const wasm =
|
|
124
|
+
const wasm = await ensureReady();
|
|
57
125
|
let out: unknown;
|
|
58
126
|
try {
|
|
59
127
|
out = await wasm.zk_encrypt(input);
|
|
@@ -69,7 +137,7 @@ export async function encrypt(input: KiboEncryptInput): Promise<KiboEncryptOutpu
|
|
|
69
137
|
* and never recovered from the envelope (anti-substitution discipline).
|
|
70
138
|
*/
|
|
71
139
|
export async function decrypt(input: KiboDecryptInput): Promise<KiboDecryptOutput> {
|
|
72
|
-
const wasm =
|
|
140
|
+
const wasm = await ensureReady();
|
|
73
141
|
let out: unknown;
|
|
74
142
|
try {
|
|
75
143
|
out = await wasm.zk_decrypt(input);
|
package/src/index.ts
CHANGED
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `encrypt` / `decrypt` run entirely client-side against the customer's own KMS;
|
|
5
5
|
* the platform never sees plaintext or unwrapped keys. All cryptography lives in
|
|
6
|
-
* the
|
|
6
|
+
* the Rust core (`kibo-kms-rest-ffi`) compiled to wasm; this package only
|
|
7
7
|
* marshals typed input across the wasm boundary.
|
|
8
8
|
*
|
|
9
|
-
* The
|
|
10
|
-
* (
|
|
11
|
-
* (envelope persistence over the gateway) is separate + decoupled.
|
|
9
|
+
* The core ships in this package under `wasm/`. The app imports it and hands it over once with `init({ core })` (or
|
|
10
|
+
* `setZkWasm(core)`); `encrypt` / `decrypt` initialise it on first use if `init()` was not awaited earlier.
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
|
-
export { encrypt, decrypt, setZkWasm, type ZkWasm } from "./crypto";
|
|
13
|
+
export { encrypt, decrypt, init, setZkWasm, type ZkWasm, type ZkCoreModule, type InitOptions } from "./crypto";
|
|
15
14
|
export { KiboError } from "./KiboError";
|
|
16
15
|
export type {
|
|
17
16
|
KmsProvider,
|
|
@@ -72,9 +72,9 @@ export interface InitOutput {
|
|
|
72
72
|
readonly intounderlyingsink_write: (a: number, b: number) => number;
|
|
73
73
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
74
74
|
readonly intounderlyingsource_pull: (a: number, b: number) => number;
|
|
75
|
-
readonly
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
75
|
+
readonly __wasm_bindgen_func_elem_440: (a: number, b: number, c: number, d: number) => void;
|
|
76
|
+
readonly __wasm_bindgen_func_elem_721: (a: number, b: number, c: number, d: number) => void;
|
|
77
|
+
readonly __wasm_bindgen_func_elem_1520: (a: number, b: number) => void;
|
|
78
78
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
79
79
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
80
80
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -412,7 +412,7 @@ function __wbg_get_imports() {
|
|
|
412
412
|
const a = state0.a;
|
|
413
413
|
state0.a = 0;
|
|
414
414
|
try {
|
|
415
|
-
return
|
|
415
|
+
return __wasm_bindgen_func_elem_721(a, state0.b, arg0, arg1);
|
|
416
416
|
} finally {
|
|
417
417
|
state0.a = a;
|
|
418
418
|
}
|
|
@@ -570,12 +570,12 @@ function __wbg_get_imports() {
|
|
|
570
570
|
},
|
|
571
571
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
572
572
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 39, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
573
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
573
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_440);
|
|
574
574
|
return addHeapObject(ret);
|
|
575
575
|
},
|
|
576
576
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
577
577
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 73, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
578
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
578
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1520);
|
|
579
579
|
return addHeapObject(ret);
|
|
580
580
|
},
|
|
581
581
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -612,14 +612,14 @@ function __wbg_get_imports() {
|
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
function
|
|
616
|
-
wasm.
|
|
615
|
+
function __wasm_bindgen_func_elem_1520(arg0, arg1) {
|
|
616
|
+
wasm.__wasm_bindgen_func_elem_1520(arg0, arg1);
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
function
|
|
619
|
+
function __wasm_bindgen_func_elem_440(arg0, arg1, arg2) {
|
|
620
620
|
try {
|
|
621
621
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
622
|
-
wasm.
|
|
622
|
+
wasm.__wasm_bindgen_func_elem_440(retptr, arg0, arg1, addHeapObject(arg2));
|
|
623
623
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
624
624
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
625
625
|
if (r1) {
|
|
@@ -630,8 +630,8 @@ function __wasm_bindgen_func_elem_441(arg0, arg1, arg2) {
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
-
function
|
|
634
|
-
wasm.
|
|
633
|
+
function __wasm_bindgen_func_elem_721(arg0, arg1, arg2, arg3) {
|
|
634
|
+
wasm.__wasm_bindgen_func_elem_721(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
|
|
Binary file
|
|
@@ -16,9 +16,9 @@ export const intounderlyingsink_close: (a: number) => number;
|
|
|
16
16
|
export const intounderlyingsink_write: (a: number, b: number) => number;
|
|
17
17
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
18
18
|
export const intounderlyingsource_pull: (a: number, b: number) => number;
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
19
|
+
export const __wasm_bindgen_func_elem_440: (a: number, b: number, c: number, d: number) => void;
|
|
20
|
+
export const __wasm_bindgen_func_elem_721: (a: number, b: number, c: number, d: number) => void;
|
|
21
|
+
export const __wasm_bindgen_func_elem_1520: (a: number, b: number) => void;
|
|
22
22
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
23
23
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
24
24
|
export const __wbindgen_export3: (a: number) => void;
|