ox 1.1.2 → 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.
Files changed (296) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/core/AbiFunction.d.ts +1 -1
  3. package/dist/core/AbiFunction.d.ts.map +1 -1
  4. package/dist/core/AbiFunction.js +6 -2
  5. package/dist/core/AbiFunction.js.map +1 -1
  6. package/dist/core/AbiParameters.d.ts +1 -1
  7. package/dist/core/AbiParameters.d.ts.map +1 -1
  8. package/dist/core/AbiParameters.js +1 -13
  9. package/dist/core/AbiParameters.js.map +1 -1
  10. package/dist/core/AesGcm.d.ts +36 -1
  11. package/dist/core/AesGcm.d.ts.map +1 -1
  12. package/dist/core/AesGcm.js +44 -0
  13. package/dist/core/AesGcm.js.map +1 -1
  14. package/dist/core/Ed25519.d.ts +46 -1
  15. package/dist/core/Ed25519.d.ts.map +1 -1
  16. package/dist/core/Ed25519.js +43 -0
  17. package/dist/core/Ed25519.js.map +1 -1
  18. package/dist/core/Engine.d.ts +1 -1
  19. package/dist/core/Engine.d.ts.map +1 -1
  20. package/dist/core/Engine.js.map +1 -1
  21. package/dist/core/Hash.d.ts +200 -1
  22. package/dist/core/Hash.d.ts.map +1 -1
  23. package/dist/core/Hash.js +207 -0
  24. package/dist/core/Hash.js.map +1 -1
  25. package/dist/core/Hex.d.ts.map +1 -1
  26. package/dist/core/Hex.js +1 -4
  27. package/dist/core/Hex.js.map +1 -1
  28. package/dist/core/Rlp.d.ts +32 -0
  29. package/dist/core/Rlp.d.ts.map +1 -1
  30. package/dist/core/Rlp.js +146 -0
  31. package/dist/core/Rlp.js.map +1 -1
  32. package/dist/core/Secp256k1.d.ts +46 -1
  33. package/dist/core/Secp256k1.d.ts.map +1 -1
  34. package/dist/core/Secp256k1.js +48 -0
  35. package/dist/core/Secp256k1.js.map +1 -1
  36. package/dist/core/WebAuthn.d.ts +224 -0
  37. package/dist/core/WebAuthn.d.ts.map +1 -0
  38. package/dist/core/WebAuthn.js +343 -0
  39. package/dist/core/WebAuthn.js.map +1 -0
  40. package/dist/core/WebAuthnP256.d.ts +46 -50
  41. package/dist/core/WebAuthnP256.d.ts.map +1 -1
  42. package/dist/core/WebAuthnP256.js +44 -50
  43. package/dist/core/WebAuthnP256.js.map +1 -1
  44. package/dist/core/internal/abiParameters.d.ts +7 -87
  45. package/dist/core/internal/abiParameters.d.ts.map +1 -1
  46. package/dist/core/internal/abiParameters.js +339 -194
  47. package/dist/core/internal/abiParameters.js.map +1 -1
  48. package/dist/core/internal/engine.d.ts +35 -2
  49. package/dist/core/internal/engine.d.ts.map +1 -1
  50. package/dist/core/internal/engine.js +12 -1
  51. package/dist/core/internal/engine.js.map +1 -1
  52. package/dist/core/internal/hash.d.ts +10 -0
  53. package/dist/core/internal/hash.d.ts.map +1 -1
  54. package/dist/core/internal/hash.js +26 -1
  55. package/dist/core/internal/hash.js.map +1 -1
  56. package/dist/index.d.ts +23 -14
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +23 -14
  59. package/dist/index.js.map +1 -1
  60. package/dist/node/Engine.d.ts +1 -1
  61. package/dist/node/Engine.d.ts.map +1 -1
  62. package/dist/node/Engine.js.map +1 -1
  63. package/dist/node/Hash.d.ts +6 -4
  64. package/dist/node/Hash.d.ts.map +1 -1
  65. package/dist/node/Hash.js +35 -3
  66. package/dist/node/Hash.js.map +1 -1
  67. package/dist/tempo/AuthorizationTempo.d.ts +6 -6
  68. package/dist/tempo/AuthorizationTempo.js +6 -6
  69. package/dist/tempo/KeyAuthorization.d.ts +3 -8
  70. package/dist/tempo/KeyAuthorization.d.ts.map +1 -1
  71. package/dist/tempo/KeyAuthorization.js +3 -8
  72. package/dist/tempo/KeyAuthorization.js.map +1 -1
  73. package/dist/tempo/SignatureEnvelope.d.ts +8 -8
  74. package/dist/tempo/SignatureEnvelope.js +8 -8
  75. package/dist/trusted-setups/Paths.d.ts +1 -0
  76. package/dist/trusted-setups/Paths.d.ts.map +1 -1
  77. package/dist/trusted-setups/Paths.js +1 -0
  78. package/dist/trusted-setups/Paths.js.map +1 -1
  79. package/dist/trusted-setups/Setups.d.ts +35 -0
  80. package/dist/trusted-setups/Setups.d.ts.map +1 -0
  81. package/dist/trusted-setups/Setups.js +29 -0
  82. package/dist/trusted-setups/Setups.js.map +1 -0
  83. package/dist/trusted-setups/index.d.ts +20 -0
  84. package/dist/trusted-setups/index.d.ts.map +1 -1
  85. package/dist/trusted-setups/index.js +20 -0
  86. package/dist/trusted-setups/index.js.map +1 -1
  87. package/dist/trusted-setups/internal/paths.d.ts.map +1 -1
  88. package/dist/trusted-setups/internal/paths.js +1 -1
  89. package/dist/trusted-setups/internal/paths.js.map +1 -1
  90. package/dist/trusted-setups/internal/setups/mainnet.d.ts +7 -0
  91. package/dist/trusted-setups/internal/setups/mainnet.d.ts.map +1 -0
  92. package/dist/trusted-setups/internal/setups/mainnet.js +11 -0
  93. package/dist/trusted-setups/internal/setups/mainnet.js.map +1 -0
  94. package/dist/wasm/Engine.d.ts +4 -3
  95. package/dist/wasm/Engine.d.ts.map +1 -1
  96. package/dist/wasm/Engine.js +5 -5
  97. package/dist/wasm/Engine.js.map +1 -1
  98. package/dist/wasm/Hash.d.ts +1 -1
  99. package/dist/wasm/Hash.d.ts.map +1 -1
  100. package/dist/wasm/Hash.js +5 -0
  101. package/dist/wasm/Hash.js.map +1 -1
  102. package/dist/wasm/Keystore.d.ts +23 -9
  103. package/dist/wasm/Keystore.d.ts.map +1 -1
  104. package/dist/wasm/Keystore.js +30 -13
  105. package/dist/wasm/Keystore.js.map +1 -1
  106. package/dist/wasm/Kzg.d.ts +112 -0
  107. package/dist/wasm/Kzg.d.ts.map +1 -0
  108. package/dist/wasm/Kzg.js +333 -0
  109. package/dist/wasm/Kzg.js.map +1 -0
  110. package/dist/wasm/Secp256k1.d.ts +55 -0
  111. package/dist/wasm/Secp256k1.d.ts.map +1 -0
  112. package/dist/wasm/Secp256k1.js +181 -0
  113. package/dist/wasm/Secp256k1.js.map +1 -0
  114. package/dist/wasm/index.d.ts +44 -1
  115. package/dist/wasm/index.d.ts.map +1 -1
  116. package/dist/wasm/index.js +44 -1
  117. package/dist/wasm/index.js.map +1 -1
  118. package/dist/wasm/internal/blake3.d.ts +10 -1
  119. package/dist/wasm/internal/blake3.d.ts.map +1 -1
  120. package/dist/wasm/internal/blake3.js +12 -1
  121. package/dist/wasm/internal/blake3.js.map +1 -1
  122. package/dist/wasm/internal/blake3.wasm.d.ts +3 -1
  123. package/dist/wasm/internal/blake3.wasm.d.ts.map +1 -1
  124. package/dist/wasm/internal/blake3.wasm.js +3 -1
  125. package/dist/wasm/internal/blake3.wasm.js.map +1 -1
  126. package/dist/wasm/internal/hash.d.ts +9 -0
  127. package/dist/wasm/internal/hash.d.ts.map +1 -1
  128. package/dist/wasm/internal/hash.js +13 -1
  129. package/dist/wasm/internal/hash.js.map +1 -1
  130. package/dist/wasm/internal/hashState.d.ts +25 -0
  131. package/dist/wasm/internal/hashState.d.ts.map +1 -0
  132. package/dist/wasm/internal/hashState.js +105 -0
  133. package/dist/wasm/internal/hashState.js.map +1 -0
  134. package/dist/wasm/internal/hashes.d.ts +12 -1
  135. package/dist/wasm/internal/hashes.d.ts.map +1 -1
  136. package/dist/wasm/internal/hashes.js +18 -1
  137. package/dist/wasm/internal/hashes.js.map +1 -1
  138. package/dist/wasm/internal/hashes.wasm.d.ts +11 -3
  139. package/dist/wasm/internal/hashes.wasm.d.ts.map +1 -1
  140. package/dist/wasm/internal/hashes.wasm.js +11 -3
  141. package/dist/wasm/internal/hashes.wasm.js.map +1 -1
  142. package/dist/wasm/internal/instantiate.d.ts +12 -0
  143. package/dist/wasm/internal/instantiate.d.ts.map +1 -1
  144. package/dist/wasm/internal/instantiate.js +23 -7
  145. package/dist/wasm/internal/instantiate.js.map +1 -1
  146. package/dist/wasm/internal/keystore.d.ts +10 -0
  147. package/dist/wasm/internal/keystore.d.ts.map +1 -0
  148. package/dist/wasm/internal/keystore.js +10 -0
  149. package/dist/wasm/internal/keystore.js.map +1 -0
  150. package/dist/wasm/internal/kzg.d.ts +17 -0
  151. package/dist/wasm/internal/kzg.d.ts.map +1 -0
  152. package/dist/wasm/internal/kzg.js +8 -0
  153. package/dist/wasm/internal/kzg.js.map +1 -0
  154. package/dist/wasm/internal/kzg.wasm.d.ts +3 -0
  155. package/dist/wasm/internal/kzg.wasm.d.ts.map +1 -0
  156. package/dist/wasm/internal/kzg.wasm.js +10 -0
  157. package/dist/wasm/internal/kzg.wasm.js.map +1 -0
  158. package/dist/wasm/internal/scrypt.d.ts +16 -0
  159. package/dist/wasm/internal/scrypt.d.ts.map +1 -0
  160. package/dist/wasm/internal/scrypt.js +78 -0
  161. package/dist/wasm/internal/scrypt.js.map +1 -0
  162. package/dist/wasm/internal/scrypt.wasm.d.ts +7 -0
  163. package/dist/wasm/internal/scrypt.wasm.d.ts.map +1 -0
  164. package/dist/wasm/internal/scrypt.wasm.js +14 -0
  165. package/dist/wasm/internal/scrypt.wasm.js.map +1 -0
  166. package/dist/wasm/internal/secp256k1.d.ts +16 -0
  167. package/dist/wasm/internal/secp256k1.d.ts.map +1 -0
  168. package/dist/wasm/internal/secp256k1.js +20 -0
  169. package/dist/wasm/internal/secp256k1.js.map +1 -0
  170. package/dist/wasm/internal/secp256k1.wasm.d.ts +3 -0
  171. package/dist/wasm/internal/secp256k1.wasm.d.ts.map +1 -0
  172. package/dist/wasm/internal/secp256k1.wasm.js +10 -0
  173. package/dist/wasm/internal/secp256k1.wasm.js.map +1 -0
  174. package/dist/webauthn/Authentication.d.ts +2 -0
  175. package/dist/webauthn/Authentication.d.ts.map +1 -1
  176. package/dist/webauthn/Authentication.js +2 -1
  177. package/dist/webauthn/Authentication.js.map +1 -1
  178. package/dist/webauthn/Registration.d.ts.map +1 -1
  179. package/dist/webauthn/Registration.js +2 -1
  180. package/dist/webauthn/Registration.js.map +1 -1
  181. package/dist/webauthn/Types.d.ts +27 -6
  182. package/dist/webauthn/Types.d.ts.map +1 -1
  183. package/dist/webauthn/internal/utils.d.ts.map +1 -1
  184. package/dist/webauthn/internal/utils.js +35 -9
  185. package/dist/webauthn/internal/utils.js.map +1 -1
  186. package/dist/zod/TypedData.d.ts +2 -2
  187. package/package.json +27 -2
  188. package/src/benchmarks/Ox.bench.ts +6 -0
  189. package/src/benchmarks/OxNode.bench.ts +8 -0
  190. package/src/benchmarks/OxV0.bench.ts +4 -0
  191. package/src/benchmarks/OxWasm.bench.ts +22 -0
  192. package/src/core/AbiFunction.ts +5 -5
  193. package/src/core/AbiParameters.ts +8 -20
  194. package/src/core/AesGcm.ts +86 -1
  195. package/src/core/Ed25519.ts +87 -1
  196. package/src/core/Engine.ts +1 -0
  197. package/src/core/Hash.ts +321 -1
  198. package/src/core/Hex.ts +1 -4
  199. package/src/core/Rlp.ts +172 -5
  200. package/src/core/Secp256k1.ts +92 -1
  201. package/src/core/WebAuthn.ts +579 -0
  202. package/src/core/WebAuthnP256.ts +47 -50
  203. package/src/core/_test/AbiFunction.test.ts +9 -0
  204. package/src/core/_test/AbiParameters.differential.fuzz.ts +156 -0
  205. package/src/core/_test/AbiParameters.encode.test.ts +22 -0
  206. package/src/core/_test/AbiParameters.fuzz.ts +4 -0
  207. package/src/core/_test/AesGcm.test.ts +76 -0
  208. package/src/core/_test/Block.test.ts +9 -2
  209. package/src/core/_test/Ed25519.test-d.ts +13 -1
  210. package/src/core/_test/Ed25519.test.ts +120 -1
  211. package/src/core/_test/Engine.test-d.ts +9 -0
  212. package/src/core/_test/Engine.test.ts +1 -1
  213. package/src/core/_test/Hash.test-d.ts +41 -0
  214. package/src/core/_test/Hash.test.ts +278 -1
  215. package/src/core/_test/Hash.vectors.test.ts +1 -2
  216. package/src/core/_test/Hex.test.ts +2 -0
  217. package/src/core/_test/Rlp.test-d.ts +18 -0
  218. package/src/core/_test/Rlp.test.ts +109 -0
  219. package/src/core/_test/Secp256k1.test-d.ts +14 -0
  220. package/src/core/_test/Secp256k1.test.ts +91 -1
  221. package/src/core/_test/Transaction.test.ts +11 -2
  222. package/src/core/_test/WebAuthn.test-d.ts +142 -0
  223. package/src/core/_test/WebAuthn.test.ts +766 -0
  224. package/src/core/_test/index.test.ts +1 -0
  225. package/src/core/internal/abiParameters.ts +466 -326
  226. package/src/core/internal/engine.ts +47 -2
  227. package/src/core/internal/hash.ts +53 -1
  228. package/src/index.ts +24 -14
  229. package/src/node/Engine.ts +1 -0
  230. package/src/node/Hash.ts +43 -6
  231. package/src/node/_test/Engine.test-d.ts +1 -0
  232. package/src/node/_test/Engine.test.ts +2 -0
  233. package/src/node/_test/Hash.test-d.ts +11 -0
  234. package/src/node/_test/Hash.test.ts +46 -0
  235. package/src/tempo/AuthorizationTempo.ts +6 -6
  236. package/src/tempo/KeyAuthorization.ts +3 -8
  237. package/src/tempo/SignatureEnvelope.ts +8 -8
  238. package/src/trusted-setups/Paths.ts +1 -0
  239. package/src/trusted-setups/README.md +39 -0
  240. package/src/trusted-setups/Setups.ts +46 -0
  241. package/src/trusted-setups/_test/Paths.test.ts +16 -0
  242. package/src/trusted-setups/_test/Setups.test-d.ts +7 -0
  243. package/src/trusted-setups/_test/Setups.test.ts +43 -0
  244. package/src/trusted-setups/_test/index.test.ts +1 -0
  245. package/src/trusted-setups/index.ts +21 -0
  246. package/src/trusted-setups/internal/paths.ts +4 -1
  247. package/src/trusted-setups/internal/setups/mainnet.source.json +7 -0
  248. package/src/trusted-setups/internal/setups/mainnet.ts +16 -0
  249. package/src/version.ts +1 -1
  250. package/src/wasm/Engine.ts +9 -6
  251. package/src/wasm/Hash.ts +10 -0
  252. package/src/wasm/Keystore.bench.ts +26 -0
  253. package/src/wasm/Keystore.ts +32 -14
  254. package/src/wasm/Kzg.bench.ts +63 -0
  255. package/src/wasm/Kzg.ts +518 -0
  256. package/src/wasm/Secp256k1.bench.ts +79 -0
  257. package/src/wasm/Secp256k1.ts +248 -0
  258. package/src/wasm/_test/Engine.test-d.ts +2 -0
  259. package/src/wasm/_test/Engine.test.ts +5 -0
  260. package/src/wasm/_test/Hash.browser.test.ts +31 -0
  261. package/src/wasm/_test/Hash.test-d.ts +17 -0
  262. package/src/wasm/_test/Hash.test.ts +252 -3
  263. package/src/wasm/_test/Keystore.browser.test.ts +31 -0
  264. package/src/wasm/_test/Keystore.fuzz.ts +50 -0
  265. package/src/wasm/_test/Keystore.test-d.ts +10 -1
  266. package/src/wasm/_test/Keystore.test.ts +289 -4
  267. package/src/wasm/_test/Kzg.test-d.ts +19 -0
  268. package/src/wasm/_test/Kzg.test.ts +220 -0
  269. package/src/wasm/_test/Runtime.test.ts +9 -0
  270. package/src/wasm/_test/Secp256k1.test-d.ts +35 -0
  271. package/src/wasm/_test/Secp256k1.test.ts +354 -0
  272. package/src/wasm/index.ts +46 -1
  273. package/src/wasm/internal/blake3.ts +23 -2
  274. package/src/wasm/internal/blake3.wasm.ts +4 -1
  275. package/src/wasm/internal/hash.ts +27 -1
  276. package/src/wasm/internal/hashState.ts +154 -0
  277. package/src/wasm/internal/hashes.ts +56 -15
  278. package/src/wasm/internal/hashes.wasm.ts +15 -3
  279. package/src/wasm/internal/instantiate.ts +29 -9
  280. package/src/wasm/internal/keystore.ts +19 -0
  281. package/src/wasm/internal/kzg.ts +50 -0
  282. package/src/wasm/internal/kzg.wasm.ts +11 -0
  283. package/src/wasm/internal/scrypt.ts +131 -0
  284. package/src/wasm/internal/scrypt.wasm.ts +17 -0
  285. package/src/wasm/internal/secp256k1.ts +62 -0
  286. package/src/wasm/internal/secp256k1.wasm.ts +11 -0
  287. package/src/webauthn/Authentication.ts +4 -0
  288. package/src/webauthn/Registration.ts +2 -0
  289. package/src/webauthn/Types.ts +32 -2
  290. package/src/webauthn/_test/Authentication.test.ts +123 -1
  291. package/src/webauthn/_test/Registration.test.ts +26 -6
  292. package/src/webauthn/_test/WebAuthn.browser.test.ts +28 -0
  293. package/src/webauthn/internal/utils.ts +41 -8
  294. package/wasm/vendor/c-kzg-4844/LICENSE +201 -0
  295. package/wasm/vendor/c-kzg-4844/blst/LICENSE +201 -0
  296. package/src/trusted-setups/internal/setups/mainnet.txt +0 -4163
@@ -12,9 +12,9 @@ export declare const createChallenge: Uint8Array;
12
12
  *
13
13
  * @example
14
14
  * ```ts twoslash
15
- * import { WebAuthnP256 } from 'ox'
15
+ * import { WebAuthn } from 'ox'
16
16
  *
17
- * const credential = await WebAuthnP256.createCredential({
17
+ * const credential = await WebAuthn.createCredential({
18
18
  * name: 'Example'
19
19
  * }) // [!code focus]
20
20
  * // @log: {
@@ -23,7 +23,7 @@ export declare const createChallenge: Uint8Array;
23
23
  * // @log: raw: PublicKeyCredential {},
24
24
  * // @log: }
25
25
  *
26
- * const { metadata, signature } = await WebAuthnP256.sign({
26
+ * const { metadata, signature } = await WebAuthn.sign({
27
27
  * credentialId: credential.id,
28
28
  * challenge: '0xdeadbeef'
29
29
  * })
@@ -39,27 +39,25 @@ export declare namespace createCredential {
39
39
  }
40
40
  /**
41
41
  * Gets the authenticator data which contains information about the
42
- * processing of an authenticator request (ie. from `WebAuthnP256.sign`).
42
+ * processing of an authenticator request (ie. from `WebAuthn.sign`).
43
43
  *
44
44
  * :::warning
45
45
  *
46
46
  * This function is mainly for testing purposes or for manually constructing
47
47
  * autenticator data. In most cases you will not need this function.
48
48
  * `authenticatorData` is typically returned as part of the
49
- * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).
49
+ * {@link ox#WebAuthn.(sign:function)} response (ie. an authenticator response).
50
50
  *
51
51
  * :::
52
52
  *
53
53
  * @example
54
54
  * ```ts twoslash
55
- * import { WebAuthnP256 } from 'ox'
55
+ * import { WebAuthn } from 'ox'
56
56
  *
57
- * const authenticatorData = WebAuthnP256.getAuthenticatorData(
58
- * {
59
- * rpId: 'example.com',
60
- * signCount: 420
61
- * }
62
- * )
57
+ * const authenticatorData = WebAuthn.getAuthenticatorData({
58
+ * rpId: 'example.com',
59
+ * signCount: 420
60
+ * })
63
61
  * // @log: "0xa379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce194705000001a4"
64
62
  * ```
65
63
  *
@@ -69,20 +67,18 @@ export declare namespace createCredential {
69
67
  * Include a credential ID and public key in the authenticator data (for registration responses):
70
68
  *
71
69
  * ```ts twoslash
72
- * import { P256, WebAuthnP256 } from 'ox'
70
+ * import { P256, WebAuthn } from 'ox'
73
71
  *
74
72
  * const { publicKey } = P256.createKeyPair()
75
73
  *
76
- * const authenticatorData = WebAuthnP256.getAuthenticatorData(
77
- * {
78
- * rpId: 'example.com',
79
- * flag: 0x41, // UP + AT
80
- * credential: {
81
- * id: new Uint8Array(32),
82
- * publicKey
83
- * }
74
+ * const authenticatorData = WebAuthn.getAuthenticatorData({
75
+ * rpId: 'example.com',
76
+ * flag: 0x41, // UP + AT
77
+ * credential: {
78
+ * id: new Uint8Array(32),
79
+ * publicKey
84
80
  * }
85
- * )
81
+ * })
86
82
  * ```
87
83
  *
88
84
  * @param options - Options to construct the authenticator data.
@@ -95,22 +91,22 @@ export declare namespace getAuthenticatorData {
95
91
  }
96
92
  /**
97
93
  * Constructs the Client Data in stringified JSON format which represents client data that
98
- * was passed to `credentials.get()` in {@link ox#WebAuthnP256.(sign:function)}.
94
+ * was passed to `credentials.get()` in {@link ox#WebAuthn.(sign:function)}.
99
95
  *
100
96
  * :::warning
101
97
  *
102
98
  * This function is mainly for testing purposes or for manually constructing
103
99
  * client data. In most cases you will not need this function.
104
100
  * `clientDataJSON` is typically returned as part of the
105
- * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).
101
+ * {@link ox#WebAuthn.(sign:function)} response (ie. an authenticator response).
106
102
  *
107
103
  * :::
108
104
  *
109
105
  * @example
110
106
  * ```ts twoslash
111
- * import { WebAuthnP256 } from 'ox'
107
+ * import { WebAuthn } from 'ox'
112
108
  *
113
- * const clientDataJSON = WebAuthnP256.getClientDataJSON({
109
+ * const clientDataJSON = WebAuthn.getClientDataJSON({
114
110
  * challenge: '0xdeadbeef',
115
111
  * origin: 'https://example.com'
116
112
  * })
@@ -138,19 +134,17 @@ export declare namespace getClientDataJSON {
138
134
  *
139
135
  * @example
140
136
  * ```ts twoslash
141
- * import { P256, WebAuthnP256 } from 'ox'
137
+ * import { P256, WebAuthn } from 'ox'
142
138
  *
143
139
  * const { publicKey } = P256.createKeyPair()
144
140
  *
145
- * const attestationObject = WebAuthnP256.getAttestationObject(
146
- * {
147
- * authData: WebAuthnP256.getAuthenticatorData({
148
- * rpId: 'example.com',
149
- * flag: 0x41,
150
- * credential: { id: new Uint8Array(32), publicKey }
151
- * })
152
- * }
153
- * )
141
+ * const attestationObject = WebAuthn.getAttestationObject({
142
+ * authData: WebAuthn.getAuthenticatorData({
143
+ * rpId: 'example.com',
144
+ * flag: 0x41,
145
+ * credential: { id: new Uint8Array(32), publicKey }
146
+ * })
147
+ * })
154
148
  * ```
155
149
  *
156
150
  * @param options - Options to construct the attestation object.
@@ -167,9 +161,9 @@ export declare namespace getAttestationObject {
167
161
  *
168
162
  * @example
169
163
  * ```ts twoslash
170
- * import { WebAuthnP256 } from 'ox'
164
+ * import { WebAuthn } from 'ox'
171
165
  *
172
- * const options = WebAuthnP256.getCredentialCreationOptions({
166
+ * const options = WebAuthn.getCredentialCreationOptions({
173
167
  * name: 'Example'
174
168
  * })
175
169
  *
@@ -190,9 +184,9 @@ export declare namespace getCredentialCreationOptions {
190
184
  *
191
185
  * @example
192
186
  * ```ts twoslash
193
- * import { WebAuthnP256 } from 'ox'
187
+ * import { WebAuthn } from 'ox'
194
188
  *
195
- * const options = WebAuthnP256.getCredentialRequestOptions({
189
+ * const options = WebAuthn.getCredentialRequestOptions({
196
190
  * challenge: '0xdeadbeef'
197
191
  * })
198
192
  *
@@ -218,15 +212,15 @@ export declare namespace getCredentialRequestOptions {
218
212
  *
219
213
  * This function is mainly for testing purposes or for manually constructing
220
214
  * signing payloads. In most cases you will not need this function and
221
- * instead use {@link ox#WebAuthnP256.(sign:function)}.
215
+ * instead use {@link ox#WebAuthn.(sign:function)}.
222
216
  *
223
217
  * :::
224
218
  *
225
219
  * @example
226
220
  * ```ts twoslash
227
- * import { WebAuthnP256, WebCryptoP256 } from 'ox'
221
+ * import { WebAuthn, WebCryptoP256 } from 'ox'
228
222
  *
229
- * const { metadata, payload } = WebAuthnP256.getSignPayload({
223
+ * const { metadata, payload } = WebAuthn.getSignPayload({
230
224
  * // [!code focus]
231
225
  * challenge: '0xdeadbeef' // [!code focus]
232
226
  * }) // [!code focus]
@@ -266,13 +260,13 @@ export declare namespace getSignPayload {
266
260
  *
267
261
  * @example
268
262
  * ```ts twoslash
269
- * import { WebAuthnP256 } from 'ox'
263
+ * import { WebAuthn } from 'ox'
270
264
  *
271
- * const credential = await WebAuthnP256.createCredential({
265
+ * const credential = await WebAuthn.createCredential({
272
266
  * name: 'Example'
273
267
  * })
274
268
  *
275
- * const { metadata, signature } = await WebAuthnP256.sign({
269
+ * const { metadata, signature } = await WebAuthn.sign({
276
270
  * // [!code focus]
277
271
  * credentialId: credential.id, // [!code focus]
278
272
  * challenge: '0xdeadbeef' // [!code focus]
@@ -303,18 +297,18 @@ export declare namespace sign {
303
297
  *
304
298
  * @example
305
299
  * ```ts twoslash
306
- * import { WebAuthnP256 } from 'ox'
300
+ * import { WebAuthn } from 'ox'
307
301
  *
308
- * const credential = await WebAuthnP256.createCredential({
302
+ * const credential = await WebAuthn.createCredential({
309
303
  * name: 'Example'
310
304
  * })
311
305
  *
312
- * const { metadata, signature } = await WebAuthnP256.sign({
306
+ * const { metadata, signature } = await WebAuthn.sign({
313
307
  * credentialId: credential.id,
314
308
  * challenge: '0xdeadbeef'
315
309
  * })
316
310
  *
317
- * const result = await WebAuthnP256.verify({
311
+ * const result = await WebAuthn.verify({
318
312
  * // [!code focus]
319
313
  * metadata, // [!code focus]
320
314
  * challenge: '0xdeadbeef', // [!code focus]
@@ -333,4 +327,6 @@ export declare namespace verify {
333
327
  type ErrorType = Authentication.verify.ErrorType;
334
328
  }
335
329
  export type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticatorAttachment, AuthenticatorSelectionCriteria, AuthenticatorTransport, BufferSource, COSEAlgorithmIdentifier, Credential, CredentialCreationOptions, CredentialMediationRequirement, CredentialRequestOptions, LargeBlobSupport, PrfExtension, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialEntity, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, PublicKeyCredentialUserEntity, ResidentKeyRequirement, UserVerificationRequirement, } from '../webauthn/Types.js';
330
+ /** @deprecated Use `WebAuthn` instead. */
331
+ declare module './WebAuthnP256.js' { }
336
332
  //# sourceMappingURL=WebAuthnP256.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebAuthnP256.d.ts","sourceRoot":"","sources":["../../src/core/WebAuthnP256.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,aAAa,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,KAAK,WAAW,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAA;AAE3D,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,CAAA;AAEnD,8CAA8C;AAC9C,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAA;AAEnD,eAAO,MAAM,eAAe,YAA+B,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,gBAAgB,CAAC,OAAO,GAChC,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,KAAK,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,CAAA;IAC1C,KAAK,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAA;CAC/C;AAED;;;;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,0CAA0C;AAC1C,OAAO,QAAQ,mBAAmB,CAAC,GAAE"}
@@ -7,9 +7,9 @@ export const createChallenge = Registration.createChallenge;
7
7
  *
8
8
  * @example
9
9
  * ```ts twoslash
10
- * import { WebAuthnP256 } from 'ox'
10
+ * import { WebAuthn } from 'ox'
11
11
  *
12
- * const credential = await WebAuthnP256.createCredential({
12
+ * const credential = await WebAuthn.createCredential({
13
13
  * name: 'Example'
14
14
  * }) // [!code focus]
15
15
  * // @log: {
@@ -18,7 +18,7 @@ export const createChallenge = Registration.createChallenge;
18
18
  * // @log: raw: PublicKeyCredential {},
19
19
  * // @log: }
20
20
  *
21
- * const { metadata, signature } = await WebAuthnP256.sign({
21
+ * const { metadata, signature } = await WebAuthn.sign({
22
22
  * credentialId: credential.id,
23
23
  * challenge: '0xdeadbeef'
24
24
  * })
@@ -32,27 +32,25 @@ export async function createCredential(options) {
32
32
  }
33
33
  /**
34
34
  * Gets the authenticator data which contains information about the
35
- * processing of an authenticator request (ie. from `WebAuthnP256.sign`).
35
+ * processing of an authenticator request (ie. from `WebAuthn.sign`).
36
36
  *
37
37
  * :::warning
38
38
  *
39
39
  * This function is mainly for testing purposes or for manually constructing
40
40
  * autenticator data. In most cases you will not need this function.
41
41
  * `authenticatorData` is typically returned as part of the
42
- * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).
42
+ * {@link ox#WebAuthn.(sign:function)} response (ie. an authenticator response).
43
43
  *
44
44
  * :::
45
45
  *
46
46
  * @example
47
47
  * ```ts twoslash
48
- * import { WebAuthnP256 } from 'ox'
48
+ * import { WebAuthn } from 'ox'
49
49
  *
50
- * const authenticatorData = WebAuthnP256.getAuthenticatorData(
51
- * {
52
- * rpId: 'example.com',
53
- * signCount: 420
54
- * }
55
- * )
50
+ * const authenticatorData = WebAuthn.getAuthenticatorData({
51
+ * rpId: 'example.com',
52
+ * signCount: 420
53
+ * })
56
54
  * // @log: "0xa379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce194705000001a4"
57
55
  * ```
58
56
  *
@@ -62,20 +60,18 @@ export async function createCredential(options) {
62
60
  * Include a credential ID and public key in the authenticator data (for registration responses):
63
61
  *
64
62
  * ```ts twoslash
65
- * import { P256, WebAuthnP256 } from 'ox'
63
+ * import { P256, WebAuthn } from 'ox'
66
64
  *
67
65
  * const { publicKey } = P256.createKeyPair()
68
66
  *
69
- * const authenticatorData = WebAuthnP256.getAuthenticatorData(
70
- * {
71
- * rpId: 'example.com',
72
- * flag: 0x41, // UP + AT
73
- * credential: {
74
- * id: new Uint8Array(32),
75
- * publicKey
76
- * }
67
+ * const authenticatorData = WebAuthn.getAuthenticatorData({
68
+ * rpId: 'example.com',
69
+ * flag: 0x41, // UP + AT
70
+ * credential: {
71
+ * id: new Uint8Array(32),
72
+ * publicKey
77
73
  * }
78
- * )
74
+ * })
79
75
  * ```
80
76
  *
81
77
  * @param options - Options to construct the authenticator data.
@@ -84,22 +80,22 @@ export async function createCredential(options) {
84
80
  export const getAuthenticatorData = Authenticator.getAuthenticatorData;
85
81
  /**
86
82
  * Constructs the Client Data in stringified JSON format which represents client data that
87
- * was passed to `credentials.get()` in {@link ox#WebAuthnP256.(sign:function)}.
83
+ * was passed to `credentials.get()` in {@link ox#WebAuthn.(sign:function)}.
88
84
  *
89
85
  * :::warning
90
86
  *
91
87
  * This function is mainly for testing purposes or for manually constructing
92
88
  * client data. In most cases you will not need this function.
93
89
  * `clientDataJSON` is typically returned as part of the
94
- * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).
90
+ * {@link ox#WebAuthn.(sign:function)} response (ie. an authenticator response).
95
91
  *
96
92
  * :::
97
93
  *
98
94
  * @example
99
95
  * ```ts twoslash
100
- * import { WebAuthnP256 } from 'ox'
96
+ * import { WebAuthn } from 'ox'
101
97
  *
102
- * const clientDataJSON = WebAuthnP256.getClientDataJSON({
98
+ * const clientDataJSON = WebAuthn.getClientDataJSON({
103
99
  * challenge: '0xdeadbeef',
104
100
  * origin: 'https://example.com'
105
101
  * })
@@ -123,19 +119,17 @@ export const getClientDataJSON = Authenticator.getClientDataJSON;
123
119
  *
124
120
  * @example
125
121
  * ```ts twoslash
126
- * import { P256, WebAuthnP256 } from 'ox'
122
+ * import { P256, WebAuthn } from 'ox'
127
123
  *
128
124
  * const { publicKey } = P256.createKeyPair()
129
125
  *
130
- * const attestationObject = WebAuthnP256.getAttestationObject(
131
- * {
132
- * authData: WebAuthnP256.getAuthenticatorData({
133
- * rpId: 'example.com',
134
- * flag: 0x41,
135
- * credential: { id: new Uint8Array(32), publicKey }
136
- * })
137
- * }
138
- * )
126
+ * const attestationObject = WebAuthn.getAttestationObject({
127
+ * authData: WebAuthn.getAuthenticatorData({
128
+ * rpId: 'example.com',
129
+ * flag: 0x41,
130
+ * credential: { id: new Uint8Array(32), publicKey }
131
+ * })
132
+ * })
139
133
  * ```
140
134
  *
141
135
  * @param options - Options to construct the attestation object.
@@ -148,9 +142,9 @@ export const getAttestationObject = Authenticator.getAttestationObject;
148
142
  *
149
143
  * @example
150
144
  * ```ts twoslash
151
- * import { WebAuthnP256 } from 'ox'
145
+ * import { WebAuthn } from 'ox'
152
146
  *
153
- * const options = WebAuthnP256.getCredentialCreationOptions({
147
+ * const options = WebAuthn.getCredentialCreationOptions({
154
148
  * name: 'Example'
155
149
  * })
156
150
  *
@@ -167,9 +161,9 @@ export const getCredentialCreationOptions = Registration.getOptions;
167
161
  *
168
162
  * @example
169
163
  * ```ts twoslash
170
- * import { WebAuthnP256 } from 'ox'
164
+ * import { WebAuthn } from 'ox'
171
165
  *
172
- * const options = WebAuthnP256.getCredentialRequestOptions({
166
+ * const options = WebAuthn.getCredentialRequestOptions({
173
167
  * challenge: '0xdeadbeef'
174
168
  * })
175
169
  *
@@ -191,15 +185,15 @@ export const getCredentialRequestOptions = Authentication.getOptions;
191
185
  *
192
186
  * This function is mainly for testing purposes or for manually constructing
193
187
  * signing payloads. In most cases you will not need this function and
194
- * instead use {@link ox#WebAuthnP256.(sign:function)}.
188
+ * instead use {@link ox#WebAuthn.(sign:function)}.
195
189
  *
196
190
  * :::
197
191
  *
198
192
  * @example
199
193
  * ```ts twoslash
200
- * import { WebAuthnP256, WebCryptoP256 } from 'ox'
194
+ * import { WebAuthn, WebCryptoP256 } from 'ox'
201
195
  *
202
- * const { metadata, payload } = WebAuthnP256.getSignPayload({
196
+ * const { metadata, payload } = WebAuthn.getSignPayload({
203
197
  * // [!code focus]
204
198
  * challenge: '0xdeadbeef' // [!code focus]
205
199
  * }) // [!code focus]
@@ -234,13 +228,13 @@ export const getSignPayload = Authentication.getSignPayload;
234
228
  *
235
229
  * @example
236
230
  * ```ts twoslash
237
- * import { WebAuthnP256 } from 'ox'
231
+ * import { WebAuthn } from 'ox'
238
232
  *
239
- * const credential = await WebAuthnP256.createCredential({
233
+ * const credential = await WebAuthn.createCredential({
240
234
  * name: 'Example'
241
235
  * })
242
236
  *
243
- * const { metadata, signature } = await WebAuthnP256.sign({
237
+ * const { metadata, signature } = await WebAuthn.sign({
244
238
  * // [!code focus]
245
239
  * credentialId: credential.id, // [!code focus]
246
240
  * challenge: '0xdeadbeef' // [!code focus]
@@ -268,18 +262,18 @@ export async function sign(options) {
268
262
  *
269
263
  * @example
270
264
  * ```ts twoslash
271
- * import { WebAuthnP256 } from 'ox'
265
+ * import { WebAuthn } from 'ox'
272
266
  *
273
- * const credential = await WebAuthnP256.createCredential({
267
+ * const credential = await WebAuthn.createCredential({
274
268
  * name: 'Example'
275
269
  * })
276
270
  *
277
- * const { metadata, signature } = await WebAuthnP256.sign({
271
+ * const { metadata, signature } = await WebAuthn.sign({
278
272
  * credentialId: credential.id,
279
273
  * challenge: '0xdeadbeef'
280
274
  * })
281
275
  *
282
- * const result = await WebAuthnP256.verify({
276
+ * const result = await WebAuthn.verify({
283
277
  * // [!code focus]
284
278
  * metadata, // [!code focus]
285
279
  * challenge: '0xdeadbeef', // [!code focus]
@@ -1 +1 @@
1
- {"version":3,"file":"WebAuthnP256.js","sourceRoot":"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cAAc,GAAG,cAAc,CAAC,cAAc,CAAA;AAU3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,OAAqB;IAC9C,OAAO,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AACrC,CAAC;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,MAAM,CAAC,OAAuB;IAC5C,OAAO,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC"}
@@ -12,11 +12,6 @@ export type ParameterToPrimitiveType<abiParameter extends AbiParameter | {
12
12
  type: unknown;
13
13
  }, abiParameterKind extends AbiParameterKind = AbiParameterKind> = AbiParameterToPrimitiveType<abiParameter, abiParameterKind>;
14
14
  /** @internal */
15
- export type PreparedParameter = {
16
- dynamic: boolean;
17
- encoded: Hex.Hex;
18
- };
19
- /** @internal */
20
15
  export type ToObject<parameters extends readonly AbiParameter[], kind extends AbiParameterKind = AbiParameterKind> = IsNarrowable<parameters, AbiParameters.AbiParameters> extends true ? Compute<UnionToIntersection<{
21
16
  [index in keyof parameters]: parameters[index] extends {
22
17
  name: infer name extends string;
@@ -91,88 +86,13 @@ export declare namespace decodeString {
91
86
  type ErrorType = Bytes.toNumber.ErrorType | Bytes.toString.ErrorType | Errors.GlobalErrorType;
92
87
  }
93
88
  /** @internal */
94
- export declare function prepareParameters<const parameters extends AbiParameters.AbiParameters>({ checksumAddress, parameters, values, }: {
95
- checksumAddress?: boolean | undefined;
96
- parameters: parameters;
97
- values: parameters extends AbiParameters.AbiParameters ? ToPrimitiveTypes<parameters> : never;
98
- }): PreparedParameter[];
99
- /** @internal */
100
- export declare namespace prepareParameters {
101
- type ErrorType = prepareParameter.ErrorType | Errors.GlobalErrorType;
102
- }
103
- /** @internal */
104
- export declare function prepareParameter<const parameter extends AbiParameters.Parameter>({ checksumAddress, parameter: parameter_, value, }: {
105
- parameter: parameter;
106
- value: parameter extends AbiParameters.Parameter ? ParameterToPrimitiveType<parameter> : never;
107
- checksumAddress?: boolean | undefined;
108
- }): PreparedParameter;
109
- /** @internal */
110
- export declare namespace prepareParameter {
111
- type ErrorType = encodeArray.ErrorType | encodeTuple.ErrorType | encodeAddress.ErrorType | encodeBoolean.ErrorType | encodeBytes.ErrorType | encodeString.ErrorType | AbiParameters.InvalidTypeError | Errors.GlobalErrorType;
112
- }
113
- /** @internal */
114
- export declare function encode(preparedParameters: PreparedParameter[]): Hex.Hex;
115
- /** @internal */
116
- export declare namespace encode {
117
- type ErrorType = Hex.concat.ErrorType | Hex.fromNumber.ErrorType | Hex.size.ErrorType | Errors.GlobalErrorType;
118
- }
119
- /** @internal */
120
- export declare function encodeAddress(value: Hex.Hex, options: {
121
- checksum: boolean;
122
- }): PreparedParameter;
123
- /** @internal */
124
- export declare namespace encodeAddress {
125
- type ErrorType = Address.assert.ErrorType | Hex.padLeft.ErrorType | Errors.GlobalErrorType;
126
- }
127
- /** @internal */
128
- export declare function encodeArray<const parameter extends AbiParameters.Parameter>(value: ParameterToPrimitiveType<parameter>, options: {
129
- checksumAddress?: boolean | undefined;
130
- length: number | null;
131
- parameter: parameter;
132
- }): PreparedParameter;
133
- /** @internal */
134
- export declare namespace encodeArray {
135
- type ErrorType = AbiParameters.InvalidArrayError | AbiParameters.ArrayLengthMismatchError | Hex.concat.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
136
- }
137
- /** @internal */
138
- export declare function encodeBytes(value: Hex.Hex, { type }: {
139
- type: string;
140
- }): PreparedParameter;
141
- /** @internal */
142
- export declare namespace encodeBytes {
143
- type ErrorType = Hex.padLeft.ErrorType | Hex.padRight.ErrorType | Hex.fromNumber.ErrorType | Hex.slice.ErrorType | Errors.GlobalErrorType;
144
- }
145
- /** @internal */
146
- export declare function encodeBoolean(value: boolean): PreparedParameter;
147
- /** @internal */
148
- export declare namespace encodeBoolean {
149
- type ErrorType = Hex.padLeft.ErrorType | Hex.fromBoolean.ErrorType | Errors.GlobalErrorType;
150
- }
151
- /** @internal */
152
- export declare function encodeNumber(value: number, { signed, size }: {
153
- signed: boolean;
154
- size: number;
155
- }): PreparedParameter;
156
- /** @internal */
157
- export declare namespace encodeNumber {
158
- type ErrorType = Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
159
- }
160
- /** @internal */
161
- export declare function encodeString(value: string): PreparedParameter;
162
- /** @internal */
163
- export declare namespace encodeString {
164
- type ErrorType = Hex.fromNumber.ErrorType | Hex.padRight.ErrorType | Hex.slice.ErrorType | Hex.size.ErrorType | Errors.GlobalErrorType;
165
- }
166
- /** @internal */
167
- export declare function encodeTuple<const parameter extends AbiParameters.Parameter & {
168
- components: readonly AbiParameters.Parameter[];
169
- }>(value: ParameterToPrimitiveType<parameter>, options: {
170
- checksumAddress?: boolean | undefined;
171
- parameter: parameter;
172
- }): PreparedParameter;
173
- /** @internal */
174
- export declare namespace encodeTuple {
175
- type ErrorType = Hex.concat.ErrorType | Errors.GlobalErrorType;
89
+ export declare function encodeParameters(parameters: readonly AbiParameters.Parameter[], values: readonly unknown[], options?: encodeParameters.Options): Hex.Hex;
90
+ export declare namespace encodeParameters {
91
+ type Options = {
92
+ checksumAddress?: boolean | undefined;
93
+ prefix?: Hex.Hex | undefined;
94
+ };
95
+ type ErrorType = AbiParameters.LengthMismatchError | AbiParameters.InvalidArrayError | AbiParameters.ArrayLengthMismatchError | AbiParameters.BytesSizeMismatchError | AbiParameters.InvalidTypeError | Address.assert.ErrorType | Hex.IntegerOutOfRangeError | Hex.fromBytes.ErrorType | Errors.GlobalErrorType;
176
96
  }
177
97
  /** @internal */
178
98
  export declare function getArrayComponents(type: string): [length: number | null, innerType: string] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"abiParameters.d.ts","sourceRoot":"","sources":["../../../src/core/internal/abiParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,6BAA6B,EAC7B,2BA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