@cipherstash/protect-ffi 0.26.0 → 0.28.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.
Files changed (142) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +130 -14
  3. package/dist/wasm/protect_ffi_bg.js +53 -11
  4. package/dist/wasm/protect_ffi_bg.wasm +0 -0
  5. package/dist/wasm/protect_ffi_bg.wasm.d.ts +7 -7
  6. package/dist/wasm/protect_ffi_inline.js +1 -1
  7. package/lib/bigintWire.d.ts +56 -0
  8. package/lib/bigintWire.js +83 -0
  9. package/lib/eql-v3-types/Bigint.d.ts +13 -0
  10. package/lib/eql-v3-types/Bigint.js +2 -0
  11. package/lib/eql-v3-types/BigintEq.d.ts +15 -0
  12. package/lib/eql-v3-types/BigintEq.js +2 -0
  13. package/lib/eql-v3-types/BigintOrd.d.ts +15 -0
  14. package/lib/eql-v3-types/BigintOrd.js +2 -0
  15. package/lib/eql-v3-types/BigintOrdOpe.d.ts +15 -0
  16. package/lib/eql-v3-types/BigintOrdOpe.js +2 -0
  17. package/lib/eql-v3-types/BigintOrdOre.d.ts +15 -0
  18. package/lib/eql-v3-types/BigintOrdOre.js +2 -0
  19. package/lib/eql-v3-types/BloomFilter.d.ts +9 -0
  20. package/lib/eql-v3-types/BloomFilter.js +5 -0
  21. package/lib/eql-v3-types/Boolean.d.ts +13 -0
  22. package/lib/eql-v3-types/Boolean.js +2 -0
  23. package/lib/eql-v3-types/Ciphertext.d.ts +6 -0
  24. package/lib/eql-v3-types/Ciphertext.js +5 -0
  25. package/lib/eql-v3-types/Date.d.ts +13 -0
  26. package/lib/eql-v3-types/Date.js +2 -0
  27. package/lib/eql-v3-types/DateEq.d.ts +15 -0
  28. package/lib/eql-v3-types/DateEq.js +2 -0
  29. package/lib/eql-v3-types/DateOrd.d.ts +15 -0
  30. package/lib/eql-v3-types/DateOrd.js +2 -0
  31. package/lib/eql-v3-types/DateOrdOpe.d.ts +15 -0
  32. package/lib/eql-v3-types/DateOrdOpe.js +2 -0
  33. package/lib/eql-v3-types/DateOrdOre.d.ts +15 -0
  34. package/lib/eql-v3-types/DateOrdOre.js +2 -0
  35. package/lib/eql-v3-types/Double.d.ts +13 -0
  36. package/lib/eql-v3-types/Double.js +2 -0
  37. package/lib/eql-v3-types/DoubleEq.d.ts +15 -0
  38. package/lib/eql-v3-types/DoubleEq.js +2 -0
  39. package/lib/eql-v3-types/DoubleOrd.d.ts +15 -0
  40. package/lib/eql-v3-types/DoubleOrd.js +2 -0
  41. package/lib/eql-v3-types/DoubleOrdOpe.d.ts +15 -0
  42. package/lib/eql-v3-types/DoubleOrdOpe.js +2 -0
  43. package/lib/eql-v3-types/DoubleOrdOre.d.ts +15 -0
  44. package/lib/eql-v3-types/DoubleOrdOre.js +2 -0
  45. package/lib/eql-v3-types/Hmac256.d.ts +5 -0
  46. package/lib/eql-v3-types/Hmac256.js +5 -0
  47. package/lib/eql-v3-types/Identifier.d.ts +15 -0
  48. package/lib/eql-v3-types/Identifier.js +5 -0
  49. package/lib/eql-v3-types/Integer.d.ts +13 -0
  50. package/lib/eql-v3-types/Integer.js +2 -0
  51. package/lib/eql-v3-types/IntegerEq.d.ts +15 -0
  52. package/lib/eql-v3-types/IntegerEq.js +2 -0
  53. package/lib/eql-v3-types/IntegerOrd.d.ts +15 -0
  54. package/lib/eql-v3-types/IntegerOrd.js +2 -0
  55. package/lib/eql-v3-types/IntegerOrdOpe.d.ts +15 -0
  56. package/lib/eql-v3-types/IntegerOrdOpe.js +2 -0
  57. package/lib/eql-v3-types/IntegerOrdOre.d.ts +15 -0
  58. package/lib/eql-v3-types/IntegerOrdOre.js +2 -0
  59. package/lib/eql-v3-types/Numeric.d.ts +13 -0
  60. package/lib/eql-v3-types/Numeric.js +2 -0
  61. package/lib/eql-v3-types/NumericEq.d.ts +15 -0
  62. package/lib/eql-v3-types/NumericEq.js +2 -0
  63. package/lib/eql-v3-types/NumericOrd.d.ts +15 -0
  64. package/lib/eql-v3-types/NumericOrd.js +2 -0
  65. package/lib/eql-v3-types/NumericOrdOpe.d.ts +15 -0
  66. package/lib/eql-v3-types/NumericOrdOpe.js +2 -0
  67. package/lib/eql-v3-types/NumericOrdOre.d.ts +15 -0
  68. package/lib/eql-v3-types/NumericOrdOre.js +2 -0
  69. package/lib/eql-v3-types/OpeCllw.d.ts +9 -0
  70. package/lib/eql-v3-types/OpeCllw.js +5 -0
  71. package/lib/eql-v3-types/OreBlock256.d.ts +9 -0
  72. package/lib/eql-v3-types/OreBlock256.js +5 -0
  73. package/lib/eql-v3-types/OreCllw.d.ts +7 -0
  74. package/lib/eql-v3-types/OreCllw.js +5 -0
  75. package/lib/eql-v3-types/Real.d.ts +13 -0
  76. package/lib/eql-v3-types/Real.js +2 -0
  77. package/lib/eql-v3-types/RealEq.d.ts +15 -0
  78. package/lib/eql-v3-types/RealEq.js +2 -0
  79. package/lib/eql-v3-types/RealOrd.d.ts +15 -0
  80. package/lib/eql-v3-types/RealOrd.js +2 -0
  81. package/lib/eql-v3-types/RealOrdOpe.d.ts +15 -0
  82. package/lib/eql-v3-types/RealOrdOpe.js +2 -0
  83. package/lib/eql-v3-types/RealOrdOre.d.ts +15 -0
  84. package/lib/eql-v3-types/RealOrdOre.js +2 -0
  85. package/lib/eql-v3-types/SchemaVersion.d.ts +10 -0
  86. package/lib/eql-v3-types/SchemaVersion.js +5 -0
  87. package/lib/eql-v3-types/Selector.d.ts +5 -0
  88. package/lib/eql-v3-types/Selector.js +5 -0
  89. package/lib/eql-v3-types/Smallint.d.ts +13 -0
  90. package/lib/eql-v3-types/Smallint.js +2 -0
  91. package/lib/eql-v3-types/SmallintEq.d.ts +15 -0
  92. package/lib/eql-v3-types/SmallintEq.js +2 -0
  93. package/lib/eql-v3-types/SmallintOrd.d.ts +15 -0
  94. package/lib/eql-v3-types/SmallintOrd.js +2 -0
  95. package/lib/eql-v3-types/SmallintOrdOpe.d.ts +15 -0
  96. package/lib/eql-v3-types/SmallintOrdOpe.js +2 -0
  97. package/lib/eql-v3-types/SmallintOrdOre.d.ts +15 -0
  98. package/lib/eql-v3-types/SmallintOrdOre.js +2 -0
  99. package/lib/eql-v3-types/SteVecDocument.d.ts +15 -0
  100. package/lib/eql-v3-types/SteVecDocument.js +2 -0
  101. package/lib/eql-v3-types/SteVecEntry.d.ts +19 -0
  102. package/lib/eql-v3-types/SteVecEntry.js +2 -0
  103. package/lib/eql-v3-types/SteVecForm.d.ts +18 -0
  104. package/lib/eql-v3-types/SteVecForm.js +5 -0
  105. package/lib/eql-v3-types/SteVecQuery.d.ts +7 -0
  106. package/lib/eql-v3-types/SteVecQuery.js +2 -0
  107. package/lib/eql-v3-types/SteVecQueryEntry.d.ts +15 -0
  108. package/lib/eql-v3-types/SteVecQueryEntry.js +2 -0
  109. package/lib/eql-v3-types/SteVecTerm.d.ts +11 -0
  110. package/lib/eql-v3-types/SteVecTerm.js +2 -0
  111. package/lib/eql-v3-types/Text.d.ts +13 -0
  112. package/lib/eql-v3-types/Text.js +2 -0
  113. package/lib/eql-v3-types/TextEq.d.ts +15 -0
  114. package/lib/eql-v3-types/TextEq.js +2 -0
  115. package/lib/eql-v3-types/TextMatch.d.ts +15 -0
  116. package/lib/eql-v3-types/TextMatch.js +2 -0
  117. package/lib/eql-v3-types/TextOrd.d.ts +17 -0
  118. package/lib/eql-v3-types/TextOrd.js +2 -0
  119. package/lib/eql-v3-types/TextOrdOpe.d.ts +17 -0
  120. package/lib/eql-v3-types/TextOrdOpe.js +2 -0
  121. package/lib/eql-v3-types/TextOrdOre.d.ts +17 -0
  122. package/lib/eql-v3-types/TextOrdOre.js +2 -0
  123. package/lib/eql-v3-types/TextSearch.d.ts +19 -0
  124. package/lib/eql-v3-types/TextSearch.js +2 -0
  125. package/lib/eql-v3-types/Timestamp.d.ts +13 -0
  126. package/lib/eql-v3-types/Timestamp.js +2 -0
  127. package/lib/eql-v3-types/TimestampEq.d.ts +15 -0
  128. package/lib/eql-v3-types/TimestampEq.js +2 -0
  129. package/lib/eql-v3-types/TimestampOrd.d.ts +15 -0
  130. package/lib/eql-v3-types/TimestampOrd.js +2 -0
  131. package/lib/eql-v3-types/TimestampOrdOpe.d.ts +15 -0
  132. package/lib/eql-v3-types/TimestampOrdOpe.js +2 -0
  133. package/lib/eql-v3-types/TimestampOrdOre.d.ts +15 -0
  134. package/lib/eql-v3-types/TimestampOrdOre.js +2 -0
  135. package/lib/eql-v3.d.ts +90 -0
  136. package/lib/eql-v3.js +6 -0
  137. package/lib/errors.d.ts +14 -0
  138. package/lib/errors.js +77 -0
  139. package/lib/index.cjs +43 -63
  140. package/lib/index.d.cts +86 -25
  141. package/lib/normalizeEncryptConfig.d.ts +1 -1
  142. package/package.json +12 -12
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 CipherStash
3
+ Copyright (c) 2024-2026 CipherStash
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # Protect.js CipherStash Client FFI
1
+ # CipherStash Client FFI (`@cipherstash/protect-ffi`)
2
2
 
3
3
  > [!IMPORTANT]
4
- > If you are looking to implement this package into your application please use the official [protect package](https://github.com/cipherstash/protectjs).
4
+ > If you are looking to implement this package into your application please use the official [`@cipherstash/stack` package](https://github.com/cipherstash/stack).
5
5
 
6
6
  This project provides the JS bindings for the CipherStash Client Rust SDK and is bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon).
7
7
 
@@ -19,19 +19,18 @@ This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli)
19
19
 
20
20
  ## Local setup
21
21
 
22
- You can use the `stash` CLI tool to set up your local environment.
23
-
24
- You will be prompted to sign in or create an account and follow steps to create a keyset and client key.
22
+ Authenticate the `stash` CLI to set up your local environment. It runs via `npx` — no separate install needed:
25
23
 
26
24
  ```sh
27
- brew install cipherstash/tap/stash
28
- stash setup
25
+ npx stash auth login
29
26
  ```
30
27
 
28
+ You will be prompted to sign in or create an account.
29
+
31
30
  ## Exploring
32
31
 
33
32
  After building `protect-ffi`, you can explore its exports at the Node console.
34
- `CS_CLIENT_ID` and `CS_CLIENT_KEY` must be set in your environment for the call to `newClient()` to succeed.
33
+ Credentials must be available for the call to `newClient()` to succeed resolved from the CipherStash profile store, from environment variables, or from an explicit `strategy` passed to `newClient()`. For local development the simplest option is `npx stash auth login`, which populates the profile store. Alternatively, set `CS_WORKSPACE_CRN`, `CS_ACCESS_KEY`, and the `CS_CLIENT_ID`/`CS_CLIENT_KEY` keypair in your environment.
35
34
 
36
35
  ```sh
37
36
  $ npm i
@@ -44,6 +43,115 @@ $ node
44
43
  > console.log({ciphertext, plaintext});
45
44
  ```
46
45
 
46
+ ## EQL version selection
47
+
48
+ `newClient` accepts an `eqlVersion` option selecting the wire format that
49
+ `encrypt` / `encryptBulk` / `encryptQuery` emit:
50
+
51
+ ```js
52
+ // EQL v2 (default) — the `eql_v2_encrypted` payload format
53
+ const v2 = await addon.newClient({ encryptConfig })
54
+
55
+ // EQL v3 — payloads for the per-capability `eql_v3` domains
56
+ const v3 = await addon.newClient({ encryptConfig, eqlVersion: 3 })
57
+ ```
58
+
59
+ With `eqlVersion: 3`, each column's payload targets the `eql_v3` domain
60
+ derived from its `cast_as` and indexes:
61
+
62
+ | `cast_as` | family | indexes | domain |
63
+ |-----------|--------|---------|--------|
64
+ | `text` | `text` | `unique` + `ore` + `match` | `text_search` |
65
+ | `text` | `text` | `unique` + `ore` | `text_ord_ore` |
66
+ | `text` | `text` | `match` | `text_match` |
67
+ | `text` | `text` | `unique` | `text_eq` |
68
+ | `int` / `small_int` / `bigint` | `integer` / `smallint` / `bigint` | `ore` (with or without `unique`) | `<family>_ord_ore` |
69
+ | `int` / `small_int` / `bigint` | `integer` / `smallint` / `bigint` | `unique` | `<family>_eq` |
70
+ | `number` / `decimal` / `date` / `timestamp` | `double` / `numeric` / `date` / `timestamp` | as above | as above |
71
+ | any scalar | — | none | storage-only domain (`text`, `integer`, …) |
72
+ | `boolean` | `boolean` | none only | `boolean` (storage-only — any index errors) |
73
+ | `json` | `json` | `ste_vec` (required) | `json` |
74
+
75
+ Notes:
76
+
77
+ - The richest matching domain wins, and it must cover every configured
78
+ capability — a combination that would silently drop a term errors instead
79
+ (e.g. `unique` + `match`, `unique` + `ope` + `match`, or `ore` + `match`
80
+ on text: no single domain carries those term sets, so add the missing
81
+ index to reach `text_search`, split the capabilities across columns, or
82
+ use `eqlVersion: 2`).
83
+ - Exception: dropping a *term* is fine when the *capability* survives.
84
+ Non-text ordering domains carry only `ob`, so `unique` + `ore` on a
85
+ numeric column drops `hm` — equality still works via the ORE operators.
86
+ - Ordered text requires a `unique` index (`text_ord_ore`/`text_ord_ope`
87
+ carry `hm` + `ob`/`op`); `ore`-only text errors.
88
+ - `decrypt` accepts **both** formats regardless of `eqlVersion`, so v2 and
89
+ v3 data can coexist during a migration.
90
+ - v3 query encryption currently supports JSON containment only; scalar and
91
+ selector queries throw `EQL_V3_QUERY_UNSUPPORTED` and need an
92
+ `eqlVersion: 2` client.
93
+ - `ope`-indexed columns map to `<family>_ord_ope` and carry the `op`
94
+ (CLLW-OPE) term (emitted since cipherstash-client 0.38.1).
95
+
96
+ > [!NOTE]
97
+ > **Breaking TypeScript change:** `encrypt`/`encryptBulk` now return
98
+ > `EncryptedPayload` (`Encrypted | EncryptedV3`) instead of `Encrypted`.
99
+ > Runtime output is unchanged for v2 clients, but code that accessed `.k`
100
+ > or assigned the result to `Encrypted` must narrow first. v3 scalars carry
101
+ > no `k`, so guard its presence before reading it:
102
+ > `'k' in payload && payload.k === 'ct'` (a v2 scalar), or check
103
+ > `payload.v === 3` to detect the v3 members. (A bare `payload.k === 'ct'`
104
+ > does not compile against the union.)
105
+
106
+ ## BigInt plaintexts
107
+
108
+ Encrypted `cast_as: 'bigint'` columns store signed 64-bit integers
109
+ (PostgreSQL `bigint`). `encrypt` / `encryptBulk` / `encryptQuery` /
110
+ `encryptQueryBulk` accept the plaintext as either a JS `number` or a JS
111
+ `bigint`:
112
+
113
+ - `bigint` inputs are exact and bounds-checked against the full i64 range:
114
+ **-9223372036854775808 to 9223372036854775807** (-2^63 to 2^63 - 1).
115
+ Values outside that range throw a `RangeError` (a plain `RangeError`, not
116
+ a `ProtectError`) naming the bounds and the offending direction. Search
117
+ index terms (`hm`, `ob`, `op`) are derived from the same value, so the
118
+ boundary check covers index-term generation too.
119
+ - `number` inputs keep the existing exact-integer guard: fractional,
120
+ non-finite, or out-of-range values error instead of being silently
121
+ truncated.
122
+ - A `bigint` is only accepted as the top-level plaintext of a scalar
123
+ column. JSON has no bigint, so bigints nested inside `cast_as: 'json'`
124
+ documents (or JSON containment query terms) are rejected with a
125
+ `TypeError` on both Neon and wasm. More generally, plaintexts follow
126
+ `JSON.stringify` semantics on both platforms: `toJSON` is honored (a
127
+ `Date` becomes its ISO string), `undefined` properties are dropped, and
128
+ non-finite numbers become `null`.
129
+ - The internal wire form `{"__protect_ffi_bigint__": "<digits>"}` is
130
+ reserved: a `cast_as: 'json'` plaintext consisting of exactly that
131
+ single-key shape (with an in-range i64 decimal string) is read as a
132
+ bigint at the boundary and rejected for json columns. Nested
133
+ occurrences of the key inside a larger document are unaffected.
134
+
135
+ ```js
136
+ const ciphertext = await addon.encrypt(client, {
137
+ plaintext: 9007199254740993n, // beyond Number.MAX_SAFE_INTEGER — stays exact
138
+ column: 'score',
139
+ table: 'users',
140
+ })
141
+ const decrypted = await addon.decrypt(client, { ciphertext })
142
+ // decrypted === 9007199254740993n (a JS bigint)
143
+ ```
144
+
145
+ > [!WARNING]
146
+ > **Breaking change:** `decrypt` / `decryptBulk` / `decryptBulkFallible`
147
+ > now ALWAYS return a JS `bigint` for `cast_as: 'bigint'` columns — even
148
+ > for values that fit in a JS number. Previous releases returned a
149
+ > `number`, silently losing precision beyond `Number.MAX_SAFE_INTEGER`
150
+ > (2^53 - 1). Code comparing or doing arithmetic on decrypted bigint
151
+ > columns must be updated (e.g. `decrypted === 123n` instead of
152
+ > `decrypted === 123`, or `Number(decrypted)` when the value is known to
153
+ > be small).
154
+
47
155
  ## Errors
48
156
 
49
157
  Async API calls throw `ProtectError` with a stable `code` for programmatic handling.
@@ -91,8 +199,7 @@ Initiate a dry run of a patch release of this library via GitHub Actions. This p
91
199
 
92
200
  #### `npm test`
93
201
 
94
- Formats and lints Rust and TypeScript code.
95
- Also runs Rust tests.
202
+ Typechecks the TypeScript and runs the unit tests (tsc + vitest), formats and lints Rust and TypeScript code, and runs Rust tests.
96
203
 
97
204
  Note: `npm test` at project root does not run integration tests.
98
205
  For integration tests, see [below](#integration-tests).
@@ -115,6 +222,8 @@ protect-ffi/
115
222
  | └── src/
116
223
  | └── lib.rs
117
224
  ├── platforms/
225
+ ├── docs/
226
+ ├── scripts/
118
227
  ├── package.json
119
228
  └── target/
120
229
  ```
@@ -131,6 +240,8 @@ protect-ffi/
131
240
  | `crates/` | The directory tree containing the Rust source code for the project. |
132
241
  | `lib.rs` | Entry point for the Rust source code. |
133
242
  | `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. |
243
+ | `docs/` | JSONB integration docs and migration notes. |
244
+ | `scripts/` | Build helper scripts (e.g. WASM inlining). |
134
245
  | `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. |
135
246
  | `target/` | Binary artifacts generated by the Rust build. |
136
247
 
@@ -148,9 +259,11 @@ Example environment variables:
148
259
  ```
149
260
  CS_CLIENT_ID=
150
261
  CS_CLIENT_KEY=
262
+ # The integration tests read CS_CLIENT_ACCESS_KEY; the library itself reads CS_ACCESS_KEY
151
263
  CS_CLIENT_ACCESS_KEY=
152
264
  CS_WORKSPACE_CRN=
153
- PGPORT=5432
265
+ # Must match the port used by the integration-test setup (mise.toml)
266
+ PGPORT=5436
154
267
  PGDATABASE=cipherstash
155
268
  PGUSER=cipherstash
156
269
  PGPASSWORD=password
@@ -189,7 +302,7 @@ The release workflow is responsible for:
189
302
 
190
303
  To perform a release:
191
304
 
192
- 1. Navigate to the ["Release" workflow page](https://github.com/cipherstash/protect-ffi/actions/workflows/release.yml) in GitHub.
305
+ 1. Navigate to the ["Release" workflow page](https://github.com/cipherstash/protectjs-ffi/actions/workflows/release.yml) in GitHub.
193
306
  1. Click on "Run workflow".
194
307
  1. Select the branch to release from.
195
308
  Use the default of `main` unless you want to do a pre-release version or dry run from a branch.
@@ -200,8 +313,11 @@ To perform a release:
200
313
  Select "custom" in the dropdown and fill in the "Custom version" text box if you want to use a semver string instead of the shorthand (patch, minor, major, etc.).
201
314
  1. Click "Run workflow".
202
315
 
203
- Note that we currently don't have any automation around release notes or a changelog.
204
- However, you can add release notes after running the workflow by editing the release on GitHub.
316
+ Release notes and the changelog are automated. Add notes for your changes under the
317
+ `[Unreleased]` heading in [`CHANGELOG.md`](./CHANGELOG.md). On release, the `version`
318
+ npm lifecycle hook promotes that section to a dated release entry
319
+ (`scripts/changelog-release.mjs`), and the workflow publishes the promoted section as
320
+ the GitHub release notes (`scripts/changelog-extract.mjs`).
205
321
 
206
322
  ## Learn More
207
323
 
@@ -247,6 +247,10 @@ export function newClient(opts) {
247
247
  const ret = wasm.newClient(opts);
248
248
  return ret;
249
249
  }
250
+ export function __wbg_BigInt_7882274c8d2ac74c() { return handleError(function (arg0) {
251
+ const ret = BigInt(arg0);
252
+ return ret;
253
+ }, arguments); }
250
254
  export function __wbg_Error_83742b46f01ce22d(arg0, arg1) {
251
255
  const ret = Error(getStringFromWasm0(arg0, arg1));
252
256
  return ret;
@@ -350,6 +354,10 @@ export function __wbg_arrayBuffer_eb8e9ca620af2a19() { return handleError(functi
350
354
  const ret = arg0.arrayBuffer();
351
355
  return ret;
352
356
  }, arguments); }
357
+ export function __wbg_assign_2c1c53ce7e57ea6e(arg0, arg1) {
358
+ const ret = Object.assign(arg0, arg1);
359
+ return ret;
360
+ }
353
361
  export function __wbg_buffer_60b8043cd926067d(arg0) {
354
362
  const ret = arg0.buffer;
355
363
  return ret;
@@ -473,6 +481,16 @@ export function __wbg_instanceof_Map_f194b366846aca0c(arg0) {
473
481
  const ret = result;
474
482
  return ret;
475
483
  }
484
+ export function __wbg_instanceof_Object_be1962063fcc0c9f(arg0) {
485
+ let result;
486
+ try {
487
+ result = arg0 instanceof Object;
488
+ } catch (_) {
489
+ result = false;
490
+ }
491
+ const ret = result;
492
+ return ret;
493
+ }
476
494
  export function __wbg_instanceof_Promise_7c3bdd7805c2c6e6(arg0) {
477
495
  let result;
478
496
  try {
@@ -551,6 +569,10 @@ export function __wbg_new_ab79df5bd7c26067() {
551
569
  const ret = new Object();
552
570
  return ret;
553
571
  }
572
+ export function __wbg_new_aff07d10ed2fdd7f(arg0, arg1) {
573
+ const ret = new RangeError(getStringFromWasm0(arg0, arg1));
574
+ return ret;
575
+ }
554
576
  export function __wbg_new_c518c60af666645b() { return handleError(function () {
555
577
  const ret = new AbortController();
556
578
  return ret;
@@ -570,7 +592,7 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
570
592
  const a = state0.a;
571
593
  state0.a = 0;
572
594
  try {
573
- return wasm_bindgen__convert__closures_____invoke__h1201fec59d36da32(a, state0.b, arg0, arg1);
595
+ return wasm_bindgen__convert__closures_____invoke__h0cb80728b35f261e(a, state0.b, arg0, arg1);
574
596
  } finally {
575
597
  state0.a = a;
576
598
  }
@@ -605,6 +627,10 @@ export function __wbg_node_84ea875411254db1(arg0) {
605
627
  const ret = arg0.node;
606
628
  return ret;
607
629
  }
630
+ export function __wbg_parse_e9eddd2a82c706eb() { return handleError(function (arg0, arg1) {
631
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
632
+ return ret;
633
+ }, arguments); }
608
634
  export function __wbg_process_44c7a14e11e9f69e(arg0) {
609
635
  const ret = arg0.process;
610
636
  return ret;
@@ -612,6 +638,10 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
612
638
  export function __wbg_prototypesetcall_d62e5099504357e6(arg0, arg1, arg2) {
613
639
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
614
640
  }
641
+ export function __wbg_push_e87b0e732085a946(arg0, arg1) {
642
+ const ret = arg0.push(arg1);
643
+ return ret;
644
+ }
615
645
  export function __wbg_queueMicrotask_0c399741342fb10f(arg0) {
616
646
  const ret = arg0.queueMicrotask;
617
647
  return ret;
@@ -643,6 +673,10 @@ export function __wbg_set_282384002438957f(arg0, arg1, arg2) {
643
673
  export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
644
674
  arg0[arg1] = arg2;
645
675
  }
676
+ export function __wbg_set_7eaa4f96924fd6b3() { return handleError(function (arg0, arg1, arg2) {
677
+ const ret = Reflect.set(arg0, arg1, arg2);
678
+ return ret;
679
+ }, arguments); }
646
680
  export function __wbg_set_8c0b3ffcf05d61c2(arg0, arg1, arg2) {
647
681
  arg0.set(getArrayU8FromWasm0(arg1, arg2));
648
682
  }
@@ -702,6 +736,10 @@ export function __wbg_status_318629ab93a22955(arg0) {
702
736
  const ret = arg0.status;
703
737
  return ret;
704
738
  }
739
+ export function __wbg_stringify_5ae93966a84901ac() { return handleError(function (arg0) {
740
+ const ret = JSON.stringify(arg0);
741
+ return ret;
742
+ }, arguments); }
705
743
  export function __wbg_subarray_a068d24e39478a8a(arg0, arg1, arg2) {
706
744
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
707
745
  return ret;
@@ -718,6 +756,10 @@ export function __wbg_then_9e335f6dd892bc11(arg0, arg1, arg2) {
718
756
  const ret = arg0.then(arg1, arg2);
719
757
  return ret;
720
758
  }
759
+ export function __wbg_toString_68d455d069f7169a() { return handleError(function (arg0, arg1) {
760
+ const ret = arg0.toString(arg1);
761
+ return ret;
762
+ }, arguments); }
721
763
  export function __wbg_url_7fefc1820fba4e0c(arg0, arg1) {
722
764
  const ret = arg1.url;
723
765
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -742,13 +784,13 @@ export function __wbg_wasmclient_new(arg0) {
742
784
  return ret;
743
785
  }
744
786
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
745
- // Cast intrinsic for `Closure(Closure { dtor_idx: 495, function: Function { arguments: [], shim_idx: 496, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
746
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h379cc5f9ba73967b, wasm_bindgen__convert__closures_____invoke__hc060a2339985e908);
787
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 893, function: Function { arguments: [], shim_idx: 894, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
788
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9dedd770edb0aa1, wasm_bindgen__convert__closures_____invoke__h8b170b34f8b593df);
747
789
  return ret;
748
790
  }
749
791
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
750
- // Cast intrinsic for `Closure(Closure { dtor_idx: 543, function: Function { arguments: [Externref], shim_idx: 544, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
751
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h18e55ed08acd10aa, wasm_bindgen__convert__closures_____invoke__h425499e9ab8a95b4);
792
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 946, function: Function { arguments: [Externref], shim_idx: 947, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
793
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h94971d029da3e81d, wasm_bindgen__convert__closures_____invoke__hacad64c6c6b78997);
752
794
  return ret;
753
795
  }
754
796
  export function __wbindgen_cast_0000000000000003(arg0) {
@@ -785,19 +827,19 @@ export function __wbindgen_init_externref_table() {
785
827
  table.set(offset + 2, true);
786
828
  table.set(offset + 3, false);
787
829
  }
788
- function wasm_bindgen__convert__closures_____invoke__hc060a2339985e908(arg0, arg1) {
789
- wasm.wasm_bindgen__convert__closures_____invoke__hc060a2339985e908(arg0, arg1);
830
+ function wasm_bindgen__convert__closures_____invoke__h8b170b34f8b593df(arg0, arg1) {
831
+ wasm.wasm_bindgen__convert__closures_____invoke__h8b170b34f8b593df(arg0, arg1);
790
832
  }
791
833
 
792
- function wasm_bindgen__convert__closures_____invoke__h425499e9ab8a95b4(arg0, arg1, arg2) {
793
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h425499e9ab8a95b4(arg0, arg1, arg2);
834
+ function wasm_bindgen__convert__closures_____invoke__hacad64c6c6b78997(arg0, arg1, arg2) {
835
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__hacad64c6c6b78997(arg0, arg1, arg2);
794
836
  if (ret[1]) {
795
837
  throw takeFromExternrefTable0(ret[0]);
796
838
  }
797
839
  }
798
840
 
799
- function wasm_bindgen__convert__closures_____invoke__h1201fec59d36da32(arg0, arg1, arg2, arg3) {
800
- wasm.wasm_bindgen__convert__closures_____invoke__h1201fec59d36da32(arg0, arg1, arg2, arg3);
841
+ function wasm_bindgen__convert__closures_____invoke__h0cb80728b35f261e(arg0, arg1, arg2, arg3) {
842
+ wasm.wasm_bindgen__convert__closures_____invoke__h0cb80728b35f261e(arg0, arg1, arg2, arg3);
801
843
  }
802
844
 
803
845
 
Binary file
@@ -25,16 +25,16 @@ export const intounderlyingbytesource_cancel: (a: number) => void;
25
25
  export const intounderlyingbytesource_pull: (a: number, b: any) => any;
26
26
  export const intounderlyingbytesource_start: (a: number, b: any) => void;
27
27
  export const intounderlyingbytesource_type: (a: number) => number;
28
- export const wasm_bindgen__closure__destroy__h379cc5f9ba73967b: (a: number, b: number) => void;
29
- export const wasm_bindgen__closure__destroy__h18e55ed08acd10aa: (a: number, b: number) => void;
30
- export const wasm_bindgen__convert__closures_____invoke__h425499e9ab8a95b4: (a: number, b: number, c: any) => [number, number];
31
- export const wasm_bindgen__convert__closures_____invoke__h1201fec59d36da32: (a: number, b: number, c: any, d: any) => void;
32
- export const wasm_bindgen__convert__closures_____invoke__hc060a2339985e908: (a: number, b: number) => void;
33
- export const __wbindgen_malloc: (a: number, b: number) => number;
34
- export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
+ export const wasm_bindgen__closure__destroy__hd9dedd770edb0aa1: (a: number, b: number) => void;
29
+ export const wasm_bindgen__closure__destroy__h94971d029da3e81d: (a: number, b: number) => void;
30
+ export const wasm_bindgen__convert__closures_____invoke__hacad64c6c6b78997: (a: number, b: number, c: any) => [number, number];
31
+ export const wasm_bindgen__convert__closures_____invoke__h0cb80728b35f261e: (a: number, b: number, c: any, d: any) => void;
32
+ export const wasm_bindgen__convert__closures_____invoke__h8b170b34f8b593df: (a: number, b: number) => void;
35
33
  export const __wbindgen_exn_store: (a: number) => void;
36
34
  export const __externref_table_alloc: () => number;
37
35
  export const __wbindgen_externrefs: WebAssembly.Table;
36
+ export const __wbindgen_malloc: (a: number, b: number) => number;
37
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
38
38
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
39
39
  export const __externref_table_dealloc: (a: number) => void;
40
40
  export const __wbindgen_start: () => void;