ox 0.14.29 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2487) hide show
  1. package/LICENSE +2 -2
  2. package/dist/core/Abi.d.ts +102 -0
  3. package/dist/core/Abi.d.ts.map +1 -0
  4. package/dist/core/Abi.js +13 -0
  5. package/dist/core/Abi.js.map +1 -0
  6. package/dist/core/AbiConstructor.d.ts +319 -0
  7. package/dist/core/AbiConstructor.d.ts.map +1 -0
  8. package/dist/core/AbiConstructor.js +91 -0
  9. package/dist/core/AbiConstructor.js.map +1 -0
  10. package/dist/core/AbiError.d.ts +507 -0
  11. package/dist/core/AbiError.d.ts.map +1 -0
  12. package/dist/core/AbiError.js +303 -0
  13. package/dist/core/AbiError.js.map +1 -0
  14. package/dist/core/AbiEvent.d.ts +1041 -0
  15. package/dist/core/AbiEvent.d.ts.map +1 -0
  16. package/dist/core/AbiEvent.js +1200 -0
  17. package/dist/core/AbiEvent.js.map +1 -0
  18. package/dist/core/AbiFunction.d.ts +662 -0
  19. package/dist/core/AbiFunction.d.ts.map +1 -0
  20. package/dist/core/AbiFunction.js +290 -0
  21. package/dist/core/AbiFunction.js.map +1 -0
  22. package/dist/core/AbiItem.d.ts +504 -0
  23. package/dist/core/AbiItem.d.ts.map +1 -0
  24. package/dist/core/AbiItem.js +432 -0
  25. package/dist/core/AbiItem.js.map +1 -0
  26. package/dist/core/AbiParameters.d.ts +465 -0
  27. package/dist/core/AbiParameters.d.ts.map +1 -0
  28. package/dist/core/AbiParameters.js +517 -0
  29. package/dist/core/AbiParameters.js.map +1 -0
  30. package/dist/core/AccessList.d.ts +84 -0
  31. package/dist/core/AccessList.d.ts.map +1 -0
  32. package/dist/core/AccessList.js +105 -0
  33. package/dist/core/AccessList.js.map +1 -0
  34. package/dist/core/AccountProof.d.ts +115 -0
  35. package/dist/core/AccountProof.d.ts.map +1 -0
  36. package/dist/core/AccountProof.js +106 -0
  37. package/dist/core/AccountProof.js.map +1 -0
  38. package/dist/core/Address.d.ts +233 -0
  39. package/dist/core/Address.d.ts.map +1 -0
  40. package/dist/core/Address.js +271 -0
  41. package/dist/core/Address.js.map +1 -0
  42. package/dist/core/AesGcm.d.ts.map +1 -0
  43. package/dist/core/AesGcm.js +116 -0
  44. package/dist/core/AesGcm.js.map +1 -0
  45. package/dist/core/Authorization.d.ts +464 -0
  46. package/dist/core/Authorization.d.ts.map +1 -0
  47. package/dist/core/Authorization.js +448 -0
  48. package/dist/core/Authorization.js.map +1 -0
  49. package/dist/core/Base32.d.ts +86 -0
  50. package/dist/core/Base32.d.ts.map +1 -0
  51. package/dist/core/Base32.js +112 -0
  52. package/dist/core/Base32.js.map +1 -0
  53. package/dist/core/Base58.d.ts +122 -0
  54. package/dist/core/Base58.d.ts.map +1 -0
  55. package/dist/core/Base58.js +137 -0
  56. package/dist/core/Base58.js.map +1 -0
  57. package/dist/core/Base64.d.ts +262 -0
  58. package/dist/core/Base64.d.ts.map +1 -0
  59. package/dist/core/Base64.js +318 -0
  60. package/dist/core/Base64.js.map +1 -0
  61. package/dist/core/Bech32m.d.ts +99 -0
  62. package/dist/core/Bech32m.d.ts.map +1 -0
  63. package/dist/core/Bech32m.js +179 -0
  64. package/dist/core/Bech32m.js.map +1 -0
  65. package/dist/core/BinaryStateTree.d.ts +91 -0
  66. package/dist/core/BinaryStateTree.d.ts.map +1 -0
  67. package/dist/core/BinaryStateTree.js +205 -0
  68. package/dist/core/BinaryStateTree.js.map +1 -0
  69. package/dist/core/BlobCells.d.ts +202 -0
  70. package/dist/core/BlobCells.d.ts.map +1 -0
  71. package/dist/core/BlobCells.js +181 -0
  72. package/dist/core/BlobCells.js.map +1 -0
  73. package/dist/core/Blobs.d.ts +436 -0
  74. package/dist/core/Blobs.d.ts.map +1 -0
  75. package/dist/core/Blobs.js +498 -0
  76. package/dist/core/Blobs.js.map +1 -0
  77. package/dist/core/Block.d.ts +195 -0
  78. package/dist/core/Block.d.ts.map +1 -0
  79. package/dist/core/Block.js +158 -0
  80. package/dist/core/Block.js.map +1 -0
  81. package/dist/core/BlockOverrides.d.ts +91 -0
  82. package/dist/core/BlockOverrides.d.ts.map +1 -0
  83. package/dist/core/BlockOverrides.js +103 -0
  84. package/dist/core/BlockOverrides.js.map +1 -0
  85. package/dist/core/Bloom.d.ts +141 -0
  86. package/dist/core/Bloom.d.ts.map +1 -0
  87. package/dist/core/Bloom.js +140 -0
  88. package/dist/core/Bloom.js.map +1 -0
  89. package/dist/core/Bls.d.ts +443 -0
  90. package/dist/core/Bls.d.ts.map +1 -0
  91. package/dist/core/Bls.js +300 -0
  92. package/dist/core/Bls.js.map +1 -0
  93. package/dist/core/BlsPoint.d.ts +212 -0
  94. package/dist/core/BlsPoint.d.ts.map +1 -0
  95. package/dist/core/BlsPoint.js +122 -0
  96. package/dist/core/BlsPoint.js.map +1 -0
  97. package/dist/core/Bytes.d.ts +616 -0
  98. package/dist/core/Bytes.d.ts.map +1 -0
  99. package/dist/core/Bytes.js +638 -0
  100. package/dist/core/Bytes.js.map +1 -0
  101. package/dist/core/Caches.d.ts +13 -0
  102. package/dist/core/Caches.d.ts.map +1 -0
  103. package/dist/core/Caches.js +19 -0
  104. package/dist/core/Caches.js.map +1 -0
  105. package/dist/core/Cbor.d.ts.map +1 -0
  106. package/dist/core/Cbor.js +758 -0
  107. package/dist/core/Cbor.js.map +1 -0
  108. package/dist/core/CompactSize.d.ts +121 -0
  109. package/dist/core/CompactSize.d.ts.map +1 -0
  110. package/dist/core/CompactSize.js +167 -0
  111. package/dist/core/CompactSize.js.map +1 -0
  112. package/dist/core/ContractAddress.d.ts +108 -0
  113. package/dist/core/ContractAddress.d.ts.map +1 -0
  114. package/dist/core/ContractAddress.js +103 -0
  115. package/dist/core/ContractAddress.js.map +1 -0
  116. package/dist/core/CoseKey.d.ts +93 -0
  117. package/dist/core/CoseKey.d.ts.map +1 -0
  118. package/dist/core/CoseKey.js +171 -0
  119. package/dist/core/CoseKey.js.map +1 -0
  120. package/dist/core/Ed25519.d.ts +231 -0
  121. package/dist/core/Ed25519.d.ts.map +1 -0
  122. package/dist/core/Ed25519.js +184 -0
  123. package/dist/core/Ed25519.js.map +1 -0
  124. package/dist/core/Ens.d.ts +88 -0
  125. package/dist/core/Ens.d.ts.map +1 -0
  126. package/dist/core/Ens.js +107 -0
  127. package/dist/core/Ens.js.map +1 -0
  128. package/dist/core/Errors.d.ts.map +1 -0
  129. package/dist/core/Errors.js +95 -0
  130. package/dist/core/Errors.js.map +1 -0
  131. package/dist/core/Fee.d.ts +172 -0
  132. package/dist/core/Fee.d.ts.map +1 -0
  133. package/dist/core/Fee.js +141 -0
  134. package/dist/core/Fee.js.map +1 -0
  135. package/dist/core/Filter.d.ts +103 -0
  136. package/dist/core/Filter.d.ts.map +1 -0
  137. package/dist/core/Filter.js +97 -0
  138. package/dist/core/Filter.js.map +1 -0
  139. package/dist/core/Hash.d.ts +164 -0
  140. package/dist/core/Hash.d.ts.map +1 -0
  141. package/dist/core/Hash.js +164 -0
  142. package/dist/core/Hash.js.map +1 -0
  143. package/dist/core/HdKey.d.ts +138 -0
  144. package/dist/core/HdKey.d.ts.map +1 -0
  145. package/dist/core/HdKey.js +100 -0
  146. package/dist/core/HdKey.js.map +1 -0
  147. package/dist/core/Hex.d.ts +643 -0
  148. package/dist/core/Hex.d.ts.map +1 -0
  149. package/dist/core/Hex.js +718 -0
  150. package/dist/core/Hex.js.map +1 -0
  151. package/dist/core/Json.d.ts +83 -0
  152. package/dist/core/Json.d.ts.map +1 -0
  153. package/dist/core/Json.js +134 -0
  154. package/dist/core/Json.js.map +1 -0
  155. package/dist/core/Keystore.d.ts +332 -0
  156. package/dist/core/Keystore.d.ts.map +1 -0
  157. package/dist/core/Keystore.js +371 -0
  158. package/dist/core/Keystore.js.map +1 -0
  159. package/dist/core/Kzg.d.ts +59 -0
  160. package/dist/core/Kzg.d.ts.map +1 -0
  161. package/dist/core/Kzg.js +30 -0
  162. package/dist/core/Kzg.js.map +1 -0
  163. package/dist/core/Log.d.ts +190 -0
  164. package/dist/core/Log.d.ts.map +1 -0
  165. package/dist/core/Log.js +183 -0
  166. package/dist/core/Log.js.map +1 -0
  167. package/dist/core/Mnemonic.d.ts +163 -0
  168. package/dist/core/Mnemonic.d.ts.map +1 -0
  169. package/dist/core/Mnemonic.js +141 -0
  170. package/dist/core/Mnemonic.js.map +1 -0
  171. package/dist/core/P256.d.ts +271 -0
  172. package/dist/core/P256.d.ts.map +1 -0
  173. package/dist/core/P256.js +185 -0
  174. package/dist/core/P256.js.map +1 -0
  175. package/dist/core/PersonalMessage.d.ts +50 -0
  176. package/dist/core/PersonalMessage.d.ts.map +1 -0
  177. package/dist/core/PersonalMessage.js +58 -0
  178. package/dist/core/PersonalMessage.js.map +1 -0
  179. package/dist/core/Provider.d.ts +402 -0
  180. package/dist/core/Provider.d.ts.map +1 -0
  181. package/dist/core/Provider.js +257 -0
  182. package/dist/core/Provider.js.map +1 -0
  183. package/dist/core/PublicKey.d.ts +323 -0
  184. package/dist/core/PublicKey.d.ts.map +1 -0
  185. package/dist/core/PublicKey.js +393 -0
  186. package/dist/core/PublicKey.js.map +1 -0
  187. package/dist/core/Rlp.d.ts +147 -0
  188. package/dist/core/Rlp.d.ts.map +1 -0
  189. package/dist/core/Rlp.js +485 -0
  190. package/dist/core/Rlp.js.map +1 -0
  191. package/dist/core/RpcRequest.d.ts +152 -0
  192. package/dist/core/RpcRequest.d.ts.map +1 -0
  193. package/dist/core/RpcRequest.js +134 -0
  194. package/dist/core/RpcRequest.js.map +1 -0
  195. package/dist/core/RpcResponse.d.ts +302 -0
  196. package/dist/core/RpcResponse.d.ts.map +1 -0
  197. package/dist/core/RpcResponse.js +348 -0
  198. package/dist/core/RpcResponse.js.map +1 -0
  199. package/dist/core/RpcSchema.d.ts +311 -0
  200. package/dist/core/RpcSchema.d.ts.map +1 -0
  201. package/dist/core/RpcSchema.js +41 -0
  202. package/dist/core/RpcSchema.js.map +1 -0
  203. package/dist/core/RpcTransport.d.ts +66 -0
  204. package/dist/core/RpcTransport.d.ts.map +1 -0
  205. package/dist/core/RpcTransport.js +118 -0
  206. package/dist/core/RpcTransport.js.map +1 -0
  207. package/dist/core/Secp256k1.d.ts +346 -0
  208. package/dist/core/Secp256k1.d.ts.map +1 -0
  209. package/dist/core/Secp256k1.js +238 -0
  210. package/dist/core/Secp256k1.js.map +1 -0
  211. package/dist/core/Signature.d.ts +660 -0
  212. package/dist/core/Signature.d.ts.map +1 -0
  213. package/dist/core/Signature.js +760 -0
  214. package/dist/core/Signature.js.map +1 -0
  215. package/dist/core/Siwe.d.ts +247 -0
  216. package/dist/core/Siwe.d.ts.map +1 -0
  217. package/dist/core/Siwe.js +367 -0
  218. package/dist/core/Siwe.js.map +1 -0
  219. package/dist/core/Solidity.d.ts +142 -0
  220. package/dist/core/Solidity.d.ts.map +1 -0
  221. package/dist/core/Solidity.js +154 -0
  222. package/dist/core/Solidity.js.map +1 -0
  223. package/dist/core/StateOverrides.d.ts +79 -0
  224. package/dist/core/StateOverrides.d.ts.map +1 -0
  225. package/dist/core/StateOverrides.js +78 -0
  226. package/dist/core/StateOverrides.js.map +1 -0
  227. package/dist/core/Transaction.d.ts +230 -0
  228. package/dist/core/Transaction.d.ts.map +1 -0
  229. package/dist/core/Transaction.js +184 -0
  230. package/dist/core/Transaction.js.map +1 -0
  231. package/dist/core/TransactionReceipt.d.ts +265 -0
  232. package/dist/core/TransactionReceipt.d.ts.map +1 -0
  233. package/dist/core/TransactionReceipt.js +223 -0
  234. package/dist/core/TransactionReceipt.js.map +1 -0
  235. package/dist/core/TransactionRequest.d.ts +182 -0
  236. package/dist/core/TransactionRequest.d.ts.map +1 -0
  237. package/dist/core/TransactionRequest.js +338 -0
  238. package/dist/core/TransactionRequest.js.map +1 -0
  239. package/dist/core/TxEnvelope.d.ts +465 -0
  240. package/dist/core/TxEnvelope.d.ts.map +1 -0
  241. package/dist/core/TxEnvelope.js +517 -0
  242. package/dist/core/TxEnvelope.js.map +1 -0
  243. package/dist/core/TxEnvelopeEip1559.d.ts +354 -0
  244. package/dist/core/TxEnvelopeEip1559.d.ts.map +1 -0
  245. package/dist/core/TxEnvelopeEip1559.js +457 -0
  246. package/dist/core/TxEnvelopeEip1559.js.map +1 -0
  247. package/dist/core/TxEnvelopeEip2930.d.ts +349 -0
  248. package/dist/core/TxEnvelopeEip2930.d.ts.map +1 -0
  249. package/dist/core/TxEnvelopeEip2930.js +437 -0
  250. package/dist/core/TxEnvelopeEip2930.js.map +1 -0
  251. package/dist/core/TxEnvelopeEip4844.d.ts +463 -0
  252. package/dist/core/TxEnvelopeEip4844.d.ts.map +1 -0
  253. package/dist/core/TxEnvelopeEip4844.js +623 -0
  254. package/dist/core/TxEnvelopeEip4844.js.map +1 -0
  255. package/dist/core/TxEnvelopeEip7702.d.ts +407 -0
  256. package/dist/core/TxEnvelopeEip7702.d.ts.map +1 -0
  257. package/dist/core/TxEnvelopeEip7702.js +513 -0
  258. package/dist/core/TxEnvelopeEip7702.js.map +1 -0
  259. package/dist/core/TxEnvelopeLegacy.d.ts +345 -0
  260. package/dist/core/TxEnvelopeLegacy.d.ts.map +1 -0
  261. package/dist/core/TxEnvelopeLegacy.js +496 -0
  262. package/dist/core/TxEnvelopeLegacy.js.map +1 -0
  263. package/dist/core/TypedData.d.ts +512 -0
  264. package/dist/core/TypedData.d.ts.map +1 -0
  265. package/dist/core/TypedData.js +690 -0
  266. package/dist/core/TypedData.js.map +1 -0
  267. package/dist/core/ValidatorData.d.ts +62 -0
  268. package/dist/core/ValidatorData.d.ts.map +1 -0
  269. package/dist/core/ValidatorData.js +54 -0
  270. package/dist/core/ValidatorData.js.map +1 -0
  271. package/dist/core/Value.d.ts +158 -0
  272. package/dist/core/Value.d.ts.map +1 -0
  273. package/dist/core/Value.js +230 -0
  274. package/dist/core/Value.js.map +1 -0
  275. package/dist/core/WebAuthnP256.d.ts +336 -0
  276. package/dist/core/WebAuthnP256.d.ts.map +1 -0
  277. package/dist/core/WebAuthnP256.js +298 -0
  278. package/dist/core/WebAuthnP256.js.map +1 -0
  279. package/dist/core/WebCryptoP256.d.ts +226 -0
  280. package/dist/core/WebCryptoP256.d.ts.map +1 -0
  281. package/dist/core/WebCryptoP256.js +215 -0
  282. package/dist/core/WebCryptoP256.js.map +1 -0
  283. package/dist/core/Withdrawal.d.ts +68 -0
  284. package/dist/core/Withdrawal.d.ts.map +1 -0
  285. package/dist/core/Withdrawal.js +66 -0
  286. package/dist/core/Withdrawal.js.map +1 -0
  287. package/dist/core/X25519.d.ts +158 -0
  288. package/dist/core/X25519.d.ts.map +1 -0
  289. package/dist/core/X25519.js +99 -0
  290. package/dist/core/X25519.js.map +1 -0
  291. package/dist/core/internal/abi.d.ts.map +1 -0
  292. package/dist/core/internal/abi.js.map +1 -0
  293. package/dist/core/internal/abiConstructor.d.ts.map +1 -0
  294. package/dist/core/internal/abiConstructor.js.map +1 -0
  295. package/dist/core/internal/abiError.d.ts.map +1 -0
  296. package/dist/core/internal/abiError.js.map +1 -0
  297. package/dist/core/internal/abiEvent.d.ts.map +1 -0
  298. package/dist/core/internal/abiEvent.js.map +1 -0
  299. package/dist/core/internal/abiFunction.d.ts.map +1 -0
  300. package/dist/core/internal/abiFunction.js.map +1 -0
  301. package/dist/core/internal/abiItem.d.ts.map +1 -0
  302. package/dist/core/internal/abiItem.js +142 -0
  303. package/dist/core/internal/abiItem.js.map +1 -0
  304. package/dist/core/internal/abiParameters.d.ts.map +1 -0
  305. package/dist/core/internal/abiParameters.js +473 -0
  306. package/dist/core/internal/abiParameters.js.map +1 -0
  307. package/dist/core/internal/address.d.ts +33 -0
  308. package/dist/core/internal/address.d.ts.map +1 -0
  309. package/dist/core/internal/address.js +80 -0
  310. package/dist/core/internal/address.js.map +1 -0
  311. package/dist/core/internal/base58.d.ts.map +1 -0
  312. package/dist/core/internal/base58.js +86 -0
  313. package/dist/core/internal/base58.js.map +1 -0
  314. package/dist/core/internal/bytes.d.ts +52 -0
  315. package/dist/core/internal/bytes.d.ts.map +1 -0
  316. package/dist/core/internal/bytes.js +78 -0
  317. package/dist/core/internal/bytes.js.map +1 -0
  318. package/dist/core/internal/codec/bech32-base32.d.ts +29 -0
  319. package/dist/core/internal/codec/bech32-base32.d.ts.map +1 -0
  320. package/dist/core/internal/codec/bech32-base32.js +53 -0
  321. package/dist/core/internal/codec/bech32-base32.js.map +1 -0
  322. package/dist/core/internal/codec/errors.d.ts +25 -0
  323. package/dist/core/internal/codec/errors.d.ts.map +1 -0
  324. package/dist/core/internal/codec/errors.js +23 -0
  325. package/dist/core/internal/codec/errors.js.map +1 -0
  326. package/dist/core/internal/codec/hex.d.ts +40 -0
  327. package/dist/core/internal/codec/hex.d.ts.map +1 -0
  328. package/dist/core/internal/codec/hex.js +112 -0
  329. package/dist/core/internal/codec/hex.js.map +1 -0
  330. package/dist/core/internal/codec/int.d.ts +54 -0
  331. package/dist/core/internal/codec/int.d.ts.map +1 -0
  332. package/dist/core/internal/codec/int.js +141 -0
  333. package/dist/core/internal/codec/int.js.map +1 -0
  334. package/dist/core/internal/codec/utf8.d.ts +11 -0
  335. package/dist/core/internal/codec/utf8.d.ts.map +1 -0
  336. package/dist/core/internal/codec/utf8.js +11 -0
  337. package/dist/core/internal/codec/utf8.js.map +1 -0
  338. package/dist/core/internal/cryptoIo.d.ts +37 -0
  339. package/dist/core/internal/cryptoIo.d.ts.map +1 -0
  340. package/dist/core/internal/cryptoIo.js +59 -0
  341. package/dist/core/internal/cryptoIo.js.map +1 -0
  342. package/dist/core/internal/cursor.d.ts +71 -0
  343. package/dist/core/internal/cursor.d.ts.map +1 -0
  344. package/dist/core/internal/cursor.js +193 -0
  345. package/dist/core/internal/cursor.js.map +1 -0
  346. package/dist/core/internal/ens.d.ts +24 -0
  347. package/dist/core/internal/ens.d.ts.map +1 -0
  348. package/dist/core/internal/ens.js +48 -0
  349. package/dist/core/internal/ens.js.map +1 -0
  350. package/dist/core/internal/entropy.d.ts.map +1 -0
  351. package/dist/core/internal/entropy.js.map +1 -0
  352. package/dist/core/internal/errors.d.ts.map +1 -0
  353. package/dist/core/internal/errors.js.map +1 -0
  354. package/dist/core/internal/hdKey.d.ts.map +1 -0
  355. package/dist/core/internal/hdKey.js.map +1 -0
  356. package/dist/core/internal/hex.d.ts +39 -0
  357. package/dist/core/internal/hex.d.ts.map +1 -0
  358. package/dist/core/internal/hex.js +67 -0
  359. package/dist/core/internal/hex.js.map +1 -0
  360. package/dist/core/internal/lru.d.ts +25 -0
  361. package/dist/core/internal/lru.d.ts.map +1 -0
  362. package/dist/core/internal/lru.js +53 -0
  363. package/dist/core/internal/lru.js.map +1 -0
  364. package/dist/core/internal/mnemonic/wordlists.d.ts +11 -0
  365. package/dist/core/internal/mnemonic/wordlists.d.ts.map +1 -0
  366. package/dist/core/internal/mnemonic/wordlists.js +11 -0
  367. package/dist/core/internal/mnemonic/wordlists.js.map +1 -0
  368. package/dist/core/internal/promise.d.ts.map +1 -0
  369. package/dist/core/internal/promise.js +46 -0
  370. package/dist/core/internal/promise.js.map +1 -0
  371. package/dist/core/internal/quantity.d.ts +46 -0
  372. package/dist/core/internal/quantity.d.ts.map +1 -0
  373. package/dist/core/internal/quantity.js +68 -0
  374. package/dist/core/internal/quantity.js.map +1 -0
  375. package/dist/core/internal/register.d.ts.map +1 -0
  376. package/dist/core/internal/register.js.map +1 -0
  377. package/dist/core/internal/rpcSchema.d.ts.map +1 -0
  378. package/dist/core/internal/rpcSchema.js.map +1 -0
  379. package/dist/core/internal/rpcSchemas/eth.d.ts +753 -0
  380. package/dist/core/internal/rpcSchemas/eth.d.ts.map +1 -0
  381. package/dist/core/internal/rpcSchemas/eth.js.map +1 -0
  382. package/dist/core/internal/rpcSchemas/wallet.d.ts +441 -0
  383. package/dist/core/internal/rpcSchemas/wallet.d.ts.map +1 -0
  384. package/dist/core/internal/rpcSchemas/wallet.js.map +1 -0
  385. package/dist/core/internal/rpcTransport.d.ts +35 -0
  386. package/dist/core/internal/rpcTransport.d.ts.map +1 -0
  387. package/dist/core/internal/rpcTransport.js +19 -0
  388. package/dist/core/internal/rpcTransport.js.map +1 -0
  389. package/dist/core/internal/signature.d.ts +2 -0
  390. package/dist/core/internal/signature.d.ts.map +1 -0
  391. package/dist/core/internal/signature.js +5 -0
  392. package/dist/core/internal/signature.js.map +1 -0
  393. package/dist/core/internal/tx.d.ts +103 -0
  394. package/dist/core/internal/tx.d.ts.map +1 -0
  395. package/dist/core/internal/tx.js +167 -0
  396. package/dist/core/internal/tx.js.map +1 -0
  397. package/dist/core/internal/types.d.ts +320 -0
  398. package/dist/core/internal/types.d.ts.map +1 -0
  399. package/dist/core/internal/types.js.map +1 -0
  400. package/dist/core/internal/webauthn.d.ts +26 -0
  401. package/dist/core/internal/webauthn.d.ts.map +1 -0
  402. package/dist/core/internal/webauthn.js +91 -0
  403. package/dist/core/internal/webauthn.js.map +1 -0
  404. package/dist/core/version.d.ts.map +1 -0
  405. package/dist/core/version.js.map +1 -0
  406. package/dist/erc4337/EntryPoint.d.ts.map +1 -0
  407. package/dist/erc4337/EntryPoint.js.map +1 -0
  408. package/dist/erc4337/RpcSchema.d.ts +139 -0
  409. package/dist/erc4337/RpcSchema.d.ts.map +1 -0
  410. package/dist/erc4337/RpcSchema.js.map +1 -0
  411. package/dist/erc4337/UserOperation.d.ts +550 -0
  412. package/dist/erc4337/UserOperation.d.ts.map +1 -0
  413. package/dist/erc4337/UserOperation.js +615 -0
  414. package/dist/erc4337/UserOperation.js.map +1 -0
  415. package/dist/erc4337/UserOperationGas.d.ts +66 -0
  416. package/dist/erc4337/UserOperationGas.d.ts.map +1 -0
  417. package/dist/erc4337/UserOperationGas.js +61 -0
  418. package/dist/erc4337/UserOperationGas.js.map +1 -0
  419. package/dist/erc4337/UserOperationReceipt.d.ts.map +1 -0
  420. package/dist/erc4337/UserOperationReceipt.js.map +1 -0
  421. package/dist/erc4337/index.d.ts +32 -0
  422. package/dist/erc4337/index.d.ts.map +1 -0
  423. package/dist/erc4337/index.js +33 -0
  424. package/dist/erc4337/index.js.map +1 -0
  425. package/dist/erc6492/SignatureErc6492.d.ts +188 -0
  426. package/dist/erc6492/SignatureErc6492.d.ts.map +1 -0
  427. package/dist/erc6492/SignatureErc6492.js +212 -0
  428. package/dist/erc6492/SignatureErc6492.js.map +1 -0
  429. package/dist/erc6492/index.d.ts +27 -0
  430. package/dist/erc6492/index.d.ts.map +1 -0
  431. package/dist/erc6492/index.js +28 -0
  432. package/dist/erc6492/index.js.map +1 -0
  433. package/dist/erc7821/Calls.d.ts +132 -0
  434. package/dist/erc7821/Calls.d.ts.map +1 -0
  435. package/dist/erc7821/Calls.js +112 -0
  436. package/dist/erc7821/Calls.js.map +1 -0
  437. package/dist/erc7821/Execute.d.ts +126 -0
  438. package/dist/erc7821/Execute.d.ts.map +1 -0
  439. package/dist/erc7821/Execute.js +149 -0
  440. package/dist/erc7821/Execute.js.map +1 -0
  441. package/dist/erc7821/index.d.ts +70 -0
  442. package/dist/erc7821/index.d.ts.map +1 -0
  443. package/dist/erc7821/index.js +71 -0
  444. package/dist/erc7821/index.js.map +1 -0
  445. package/dist/erc8010/SignatureErc8010.d.ts +176 -0
  446. package/dist/erc8010/SignatureErc8010.d.ts.map +1 -0
  447. package/dist/erc8010/SignatureErc8010.js +203 -0
  448. package/dist/erc8010/SignatureErc8010.js.map +1 -0
  449. package/dist/erc8010/index.d.ts +50 -0
  450. package/dist/erc8010/index.d.ts.map +1 -0
  451. package/dist/erc8010/index.js +51 -0
  452. package/dist/erc8010/index.js.map +1 -0
  453. package/dist/erc8021/Attribution.d.ts +227 -0
  454. package/dist/erc8021/Attribution.d.ts.map +1 -0
  455. package/dist/erc8021/Attribution.js +330 -0
  456. package/dist/erc8021/Attribution.js.map +1 -0
  457. package/dist/erc8021/index.d.ts +44 -0
  458. package/dist/erc8021/index.d.ts.map +1 -0
  459. package/dist/erc8021/index.js +45 -0
  460. package/dist/erc8021/index.js.map +1 -0
  461. package/dist/index.d.ts +3788 -0
  462. package/dist/index.d.ts.map +1 -0
  463. package/dist/index.docs.d.ts +11 -0
  464. package/dist/index.docs.d.ts.map +1 -0
  465. package/dist/index.docs.js +13 -0
  466. package/dist/index.docs.js.map +1 -0
  467. package/dist/index.js +3788 -0
  468. package/dist/index.js.map +1 -0
  469. package/dist/tempo/AuthorizationTempo.d.ts +745 -0
  470. package/dist/tempo/AuthorizationTempo.d.ts.map +1 -0
  471. package/dist/tempo/AuthorizationTempo.js +728 -0
  472. package/dist/tempo/AuthorizationTempo.js.map +1 -0
  473. package/dist/tempo/Channel.d.ts +184 -0
  474. package/dist/tempo/Channel.d.ts.map +1 -0
  475. package/dist/tempo/Channel.js +165 -0
  476. package/dist/tempo/Channel.js.map +1 -0
  477. package/dist/tempo/KeyAuthorization.d.ts +692 -0
  478. package/dist/tempo/KeyAuthorization.d.ts.map +1 -0
  479. package/dist/tempo/KeyAuthorization.js +790 -0
  480. package/dist/tempo/KeyAuthorization.js.map +1 -0
  481. package/dist/tempo/MultisigConfig.d.ts +357 -0
  482. package/dist/tempo/MultisigConfig.d.ts.map +1 -0
  483. package/dist/tempo/MultisigConfig.js +389 -0
  484. package/dist/tempo/MultisigConfig.js.map +1 -0
  485. package/dist/tempo/Period.d.ts.map +1 -0
  486. package/dist/tempo/Period.js.map +1 -0
  487. package/dist/tempo/PoolId.d.ts +33 -0
  488. package/dist/tempo/PoolId.d.ts.map +1 -0
  489. package/dist/tempo/PoolId.js +31 -0
  490. package/dist/tempo/PoolId.js.map +1 -0
  491. package/dist/tempo/ReceivePolicyReceipt.d.ts +171 -0
  492. package/dist/tempo/ReceivePolicyReceipt.d.ts.map +1 -0
  493. package/dist/tempo/ReceivePolicyReceipt.js +187 -0
  494. package/dist/tempo/ReceivePolicyReceipt.js.map +1 -0
  495. package/dist/tempo/RpcSchemaTempo.d.ts +51 -0
  496. package/dist/tempo/RpcSchemaTempo.d.ts.map +1 -0
  497. package/dist/tempo/RpcSchemaTempo.js.map +1 -0
  498. package/dist/tempo/SignatureEnvelope.d.ts +910 -0
  499. package/dist/tempo/SignatureEnvelope.d.ts.map +1 -0
  500. package/dist/tempo/SignatureEnvelope.js +1224 -0
  501. package/dist/tempo/SignatureEnvelope.js.map +1 -0
  502. package/dist/tempo/Tick.d.ts.map +1 -0
  503. package/dist/tempo/Tick.js +132 -0
  504. package/dist/tempo/Tick.js.map +1 -0
  505. package/dist/tempo/TokenId.d.ts +87 -0
  506. package/dist/tempo/TokenId.d.ts.map +1 -0
  507. package/dist/tempo/TokenId.js +123 -0
  508. package/dist/tempo/TokenId.js.map +1 -0
  509. package/dist/tempo/TokenRole.d.ts.map +1 -0
  510. package/dist/tempo/TokenRole.js.map +1 -0
  511. package/dist/tempo/Transaction.d.ts +210 -0
  512. package/dist/tempo/Transaction.d.ts.map +1 -0
  513. package/dist/tempo/Transaction.js +169 -0
  514. package/dist/tempo/Transaction.js.map +1 -0
  515. package/dist/tempo/TransactionReceipt.d.ts +165 -0
  516. package/dist/tempo/TransactionReceipt.d.ts.map +1 -0
  517. package/dist/tempo/TransactionReceipt.js +138 -0
  518. package/dist/tempo/TransactionReceipt.js.map +1 -0
  519. package/dist/tempo/TransactionRequest.d.ts +164 -0
  520. package/dist/tempo/TransactionRequest.d.ts.map +1 -0
  521. package/dist/tempo/TransactionRequest.js +271 -0
  522. package/dist/tempo/TransactionRequest.js.map +1 -0
  523. package/dist/tempo/TxEnvelopeTempo.d.ts +677 -0
  524. package/dist/tempo/TxEnvelopeTempo.d.ts.map +1 -0
  525. package/dist/tempo/TxEnvelopeTempo.js +760 -0
  526. package/dist/tempo/TxEnvelopeTempo.js.map +1 -0
  527. package/dist/tempo/VirtualAddress.d.ts +128 -0
  528. package/dist/tempo/VirtualAddress.d.ts.map +1 -0
  529. package/dist/tempo/VirtualAddress.js +155 -0
  530. package/dist/tempo/VirtualAddress.js.map +1 -0
  531. package/dist/tempo/VirtualMaster.d.ts +248 -0
  532. package/dist/tempo/VirtualMaster.d.ts.map +1 -0
  533. package/dist/tempo/VirtualMaster.js +508 -0
  534. package/dist/tempo/VirtualMaster.js.map +1 -0
  535. package/dist/tempo/ZoneId.d.ts.map +1 -0
  536. package/dist/tempo/ZoneId.js.map +1 -0
  537. package/dist/tempo/ZoneRpcAuthentication.d.ts +278 -0
  538. package/dist/tempo/ZoneRpcAuthentication.d.ts.map +1 -0
  539. package/dist/tempo/ZoneRpcAuthentication.js +255 -0
  540. package/dist/tempo/ZoneRpcAuthentication.js.map +1 -0
  541. package/dist/tempo/index.d.ts +584 -0
  542. package/dist/tempo/index.d.ts.map +1 -0
  543. package/dist/tempo/index.js +585 -0
  544. package/dist/tempo/index.js.map +1 -0
  545. package/dist/tempo/internal/mine.wasm.d.ts.map +1 -0
  546. package/dist/tempo/internal/mine.wasm.js.map +1 -0
  547. package/dist/tempo/internal/virtualMasterPool.d.ts.map +1 -0
  548. package/dist/tempo/internal/virtualMasterPool.js.map +1 -0
  549. package/dist/trusted-setups/Paths.d.ts.map +1 -0
  550. package/dist/trusted-setups/Paths.js.map +1 -0
  551. package/dist/trusted-setups/index.d.ts.map +1 -0
  552. package/dist/trusted-setups/index.js.map +1 -0
  553. package/dist/trusted-setups/internal/paths.d.ts.map +1 -0
  554. package/dist/trusted-setups/internal/paths.js.map +1 -0
  555. package/dist/webauthn/Authentication.d.ts +339 -0
  556. package/dist/webauthn/Authentication.d.ts.map +1 -0
  557. package/dist/webauthn/Authentication.js +481 -0
  558. package/dist/webauthn/Authentication.js.map +1 -0
  559. package/dist/webauthn/Authenticator.d.ts +188 -0
  560. package/dist/webauthn/Authenticator.d.ts.map +1 -0
  561. package/dist/webauthn/Authenticator.js +217 -0
  562. package/dist/webauthn/Authenticator.js.map +1 -0
  563. package/dist/webauthn/Credential.d.ts +83 -0
  564. package/dist/webauthn/Credential.d.ts.map +1 -0
  565. package/dist/webauthn/Credential.js +105 -0
  566. package/dist/webauthn/Credential.js.map +1 -0
  567. package/dist/webauthn/Registration.d.ts +326 -0
  568. package/dist/webauthn/Registration.d.ts.map +1 -0
  569. package/dist/webauthn/Registration.js +523 -0
  570. package/dist/webauthn/Registration.js.map +1 -0
  571. package/dist/webauthn/Types.d.ts.map +1 -0
  572. package/dist/webauthn/Types.js.map +1 -0
  573. package/dist/webauthn/index.d.ts +32 -0
  574. package/dist/webauthn/index.d.ts.map +1 -0
  575. package/dist/webauthn/index.js +33 -0
  576. package/dist/webauthn/index.js.map +1 -0
  577. package/dist/webauthn/internal/utils.d.ts +61 -0
  578. package/dist/webauthn/internal/utils.d.ts.map +1 -0
  579. package/dist/webauthn/internal/utils.js +105 -0
  580. package/dist/webauthn/internal/utils.js.map +1 -0
  581. package/dist/window/index.d.ts.map +1 -0
  582. package/dist/window/index.js.map +1 -0
  583. package/dist/zod/AccessList.d.ts +16 -0
  584. package/dist/zod/AccessList.d.ts.map +1 -0
  585. package/dist/zod/AccessList.js +16 -0
  586. package/dist/zod/AccessList.js.map +1 -0
  587. package/dist/zod/AccountProof.d.ts +22 -0
  588. package/dist/zod/AccountProof.d.ts.map +1 -0
  589. package/dist/zod/AccountProof.js +23 -0
  590. package/dist/zod/AccountProof.js.map +1 -0
  591. package/dist/zod/Address.d.ts +4 -0
  592. package/dist/zod/Address.d.ts.map +1 -0
  593. package/dist/zod/Address.js +7 -0
  594. package/dist/zod/Address.js.map +1 -0
  595. package/dist/zod/Authorization.d.ts +71 -0
  596. package/dist/zod/Authorization.d.ts.map +1 -0
  597. package/dist/zod/Authorization.js +49 -0
  598. package/dist/zod/Authorization.js.map +1 -0
  599. package/dist/zod/BigInt.d.ts +4 -0
  600. package/dist/zod/BigInt.d.ts.map +1 -0
  601. package/dist/zod/BigInt.js +10 -0
  602. package/dist/zod/BigInt.js.map +1 -0
  603. package/dist/zod/Block.d.ts +456 -0
  604. package/dist/zod/Block.d.ts.map +1 -0
  605. package/dist/zod/Block.js +86 -0
  606. package/dist/zod/Block.js.map +1 -0
  607. package/dist/zod/BlockOverrides.d.ts +18 -0
  608. package/dist/zod/BlockOverrides.d.ts.map +1 -0
  609. package/dist/zod/BlockOverrides.js +17 -0
  610. package/dist/zod/BlockOverrides.js.map +1 -0
  611. package/dist/zod/Bytes.d.ts +8 -0
  612. package/dist/zod/Bytes.d.ts.map +1 -0
  613. package/dist/zod/Bytes.js +38 -0
  614. package/dist/zod/Bytes.js.map +1 -0
  615. package/dist/zod/Fee.d.ts +35 -0
  616. package/dist/zod/Fee.d.ts.map +1 -0
  617. package/dist/zod/Fee.js +32 -0
  618. package/dist/zod/Fee.js.map +1 -0
  619. package/dist/zod/Filter.d.ts +20 -0
  620. package/dist/zod/Filter.d.ts.map +1 -0
  621. package/dist/zod/Filter.js +46 -0
  622. package/dist/zod/Filter.js.map +1 -0
  623. package/dist/zod/Hash.d.ts +3 -0
  624. package/dist/zod/Hash.d.ts.map +1 -0
  625. package/dist/zod/Hash.js +5 -0
  626. package/dist/zod/Hash.js.map +1 -0
  627. package/dist/zod/Hex.d.ts +76 -0
  628. package/dist/zod/Hex.d.ts.map +1 -0
  629. package/dist/zod/Hex.js +82 -0
  630. package/dist/zod/Hex.js.map +1 -0
  631. package/dist/zod/Int.d.ts +68 -0
  632. package/dist/zod/Int.d.ts.map +1 -0
  633. package/dist/zod/Int.js +86 -0
  634. package/dist/zod/Int.js.map +1 -0
  635. package/dist/zod/Log.d.ts +28 -0
  636. package/dist/zod/Log.d.ts.map +1 -0
  637. package/dist/zod/Log.js +34 -0
  638. package/dist/zod/Log.js.map +1 -0
  639. package/dist/zod/Number.d.ts +4 -0
  640. package/dist/zod/Number.d.ts.map +1 -0
  641. package/dist/zod/Number.js +10 -0
  642. package/dist/zod/Number.js.map +1 -0
  643. package/dist/zod/RpcResponse.d.ts +24 -0
  644. package/dist/zod/RpcResponse.d.ts.map +1 -0
  645. package/dist/zod/RpcResponse.js +26 -0
  646. package/dist/zod/RpcResponse.js.map +1 -0
  647. package/dist/zod/RpcSchema.d.ts +3114 -0
  648. package/dist/zod/RpcSchema.d.ts.map +1 -0
  649. package/dist/zod/RpcSchema.js +131 -0
  650. package/dist/zod/RpcSchema.js.map +1 -0
  651. package/dist/zod/Signature.d.ts +22 -0
  652. package/dist/zod/Signature.d.ts.map +1 -0
  653. package/dist/zod/Signature.js +27 -0
  654. package/dist/zod/Signature.js.map +1 -0
  655. package/dist/zod/StateOverrides.d.ts +36 -0
  656. package/dist/zod/StateOverrides.d.ts.map +1 -0
  657. package/dist/zod/StateOverrides.js +29 -0
  658. package/dist/zod/StateOverrides.js.map +1 -0
  659. package/dist/zod/Transaction.d.ts +670 -0
  660. package/dist/zod/Transaction.d.ts.map +1 -0
  661. package/dist/zod/Transaction.js +204 -0
  662. package/dist/zod/Transaction.js.map +1 -0
  663. package/dist/zod/TransactionEnvelope.d.ts +482 -0
  664. package/dist/zod/TransactionEnvelope.d.ts.map +1 -0
  665. package/dist/zod/TransactionEnvelope.js +127 -0
  666. package/dist/zod/TransactionEnvelope.js.map +1 -0
  667. package/dist/zod/TransactionReceipt.d.ts +37 -0
  668. package/dist/zod/TransactionReceipt.d.ts.map +1 -0
  669. package/dist/zod/TransactionReceipt.js +60 -0
  670. package/dist/zod/TransactionReceipt.js.map +1 -0
  671. package/dist/zod/TransactionRequest.d.ts +36 -0
  672. package/dist/zod/TransactionRequest.d.ts.map +1 -0
  673. package/dist/zod/TransactionRequest.js +51 -0
  674. package/dist/zod/TransactionRequest.js.map +1 -0
  675. package/dist/zod/TxEnvelopeEip1559.d.ts +46 -0
  676. package/dist/zod/TxEnvelopeEip1559.d.ts.map +1 -0
  677. package/dist/zod/TxEnvelopeEip1559.js +21 -0
  678. package/dist/zod/TxEnvelopeEip1559.js.map +1 -0
  679. package/dist/zod/TxEnvelopeEip2930.d.ts +44 -0
  680. package/dist/zod/TxEnvelopeEip2930.d.ts.map +1 -0
  681. package/dist/zod/TxEnvelopeEip2930.js +19 -0
  682. package/dist/zod/TxEnvelopeEip2930.js.map +1 -0
  683. package/dist/zod/TxEnvelopeEip4844.d.ts +66 -0
  684. package/dist/zod/TxEnvelopeEip4844.d.ts.map +1 -0
  685. package/dist/zod/TxEnvelopeEip4844.js +34 -0
  686. package/dist/zod/TxEnvelopeEip4844.js.map +1 -0
  687. package/dist/zod/TxEnvelopeEip7702.d.ts +62 -0
  688. package/dist/zod/TxEnvelopeEip7702.d.ts.map +1 -0
  689. package/dist/zod/TxEnvelopeEip7702.js +24 -0
  690. package/dist/zod/TxEnvelopeEip7702.js.map +1 -0
  691. package/dist/zod/TxEnvelopeLegacy.d.ts +36 -0
  692. package/dist/zod/TxEnvelopeLegacy.d.ts.map +1 -0
  693. package/dist/zod/TxEnvelopeLegacy.js +16 -0
  694. package/dist/zod/TxEnvelopeLegacy.js.map +1 -0
  695. package/dist/zod/Uint.d.ts +68 -0
  696. package/dist/zod/Uint.d.ts.map +1 -0
  697. package/dist/zod/Uint.js +86 -0
  698. package/dist/zod/Uint.js.map +1 -0
  699. package/dist/zod/Withdrawal.d.ts +9 -0
  700. package/dist/zod/Withdrawal.d.ts.map +1 -0
  701. package/dist/zod/Withdrawal.js +13 -0
  702. package/dist/zod/Withdrawal.js.map +1 -0
  703. package/dist/zod/index.d.ts +20 -0
  704. package/dist/zod/index.d.ts.map +1 -0
  705. package/dist/zod/index.js +20 -0
  706. package/dist/zod/index.js.map +1 -0
  707. package/dist/zod/internal/Integer.d.ts +10 -0
  708. package/dist/zod/internal/Integer.d.ts.map +1 -0
  709. package/dist/zod/internal/Integer.js +60 -0
  710. package/dist/zod/internal/Integer.js.map +1 -0
  711. package/dist/zod/internal/TransactionEnvelope.d.ts +63 -0
  712. package/dist/zod/internal/TransactionEnvelope.d.ts.map +1 -0
  713. package/dist/zod/internal/TransactionEnvelope.js +49 -0
  714. package/dist/zod/internal/TransactionEnvelope.js.map +1 -0
  715. package/dist/zod/internal/rpcSchemas/Eth.d.ts +2814 -0
  716. package/dist/zod/internal/rpcSchemas/Eth.d.ts.map +1 -0
  717. package/dist/zod/internal/rpcSchemas/Eth.js +279 -0
  718. package/dist/zod/internal/rpcSchemas/Eth.js.map +1 -0
  719. package/dist/zod/internal/rpcSchemas/Wallet.d.ts +224 -0
  720. package/dist/zod/internal/rpcSchemas/Wallet.d.ts.map +1 -0
  721. package/dist/zod/internal/rpcSchemas/Wallet.js +202 -0
  722. package/dist/zod/internal/rpcSchemas/Wallet.js.map +1 -0
  723. package/dist/zod/internal/rpcSchemas/from.d.ts +34 -0
  724. package/dist/zod/internal/rpcSchemas/from.d.ts.map +1 -0
  725. package/dist/zod/internal/rpcSchemas/from.js +28 -0
  726. package/dist/zod/internal/rpcSchemas/from.js.map +1 -0
  727. package/dist/zod/tempo/AuthorizationTempo.d.ts +637 -0
  728. package/dist/zod/tempo/AuthorizationTempo.d.ts.map +1 -0
  729. package/dist/zod/tempo/AuthorizationTempo.js +56 -0
  730. package/dist/zod/tempo/AuthorizationTempo.js.map +1 -0
  731. package/dist/zod/tempo/KeyAuthorization.d.ts +419 -0
  732. package/dist/zod/tempo/KeyAuthorization.d.ts.map +1 -0
  733. package/dist/zod/tempo/KeyAuthorization.js +62 -0
  734. package/dist/zod/tempo/KeyAuthorization.js.map +1 -0
  735. package/dist/zod/tempo/MultisigConfig.d.ts +16 -0
  736. package/dist/zod/tempo/MultisigConfig.d.ts.map +1 -0
  737. package/dist/zod/tempo/MultisigConfig.js +16 -0
  738. package/dist/zod/tempo/MultisigConfig.js.map +1 -0
  739. package/dist/zod/tempo/PoolId.d.ts +3 -0
  740. package/dist/zod/tempo/PoolId.d.ts.map +1 -0
  741. package/dist/zod/tempo/PoolId.js +5 -0
  742. package/dist/zod/tempo/PoolId.js.map +1 -0
  743. package/dist/zod/tempo/RpcSchemaTempo.d.ts +1838 -0
  744. package/dist/zod/tempo/RpcSchemaTempo.d.ts.map +1 -0
  745. package/dist/zod/tempo/RpcSchemaTempo.js +60 -0
  746. package/dist/zod/tempo/RpcSchemaTempo.js.map +1 -0
  747. package/dist/zod/tempo/SignatureEnvelope.d.ts +317 -0
  748. package/dist/zod/tempo/SignatureEnvelope.d.ts.map +1 -0
  749. package/dist/zod/tempo/SignatureEnvelope.js +268 -0
  750. package/dist/zod/tempo/SignatureEnvelope.js.map +1 -0
  751. package/dist/zod/tempo/Tick.d.ts +4 -0
  752. package/dist/zod/tempo/Tick.d.ts.map +1 -0
  753. package/dist/zod/tempo/Tick.js +10 -0
  754. package/dist/zod/tempo/Tick.js.map +1 -0
  755. package/dist/zod/tempo/TokenId.d.ts +6 -0
  756. package/dist/zod/tempo/TokenId.d.ts.map +1 -0
  757. package/dist/zod/tempo/TokenId.js +14 -0
  758. package/dist/zod/tempo/TokenId.js.map +1 -0
  759. package/dist/zod/tempo/TokenRole.d.ts +4 -0
  760. package/dist/zod/tempo/TokenRole.d.ts.map +1 -0
  761. package/dist/zod/tempo/TokenRole.js +6 -0
  762. package/dist/zod/tempo/TokenRole.js.map +1 -0
  763. package/dist/zod/tempo/Transaction.d.ts +1018 -0
  764. package/dist/zod/tempo/Transaction.d.ts.map +1 -0
  765. package/dist/zod/tempo/Transaction.js +74 -0
  766. package/dist/zod/tempo/Transaction.js.map +1 -0
  767. package/dist/zod/tempo/TransactionReceipt.d.ts +39 -0
  768. package/dist/zod/tempo/TransactionReceipt.d.ts.map +1 -0
  769. package/dist/zod/tempo/TransactionReceipt.js +64 -0
  770. package/dist/zod/tempo/TransactionReceipt.js.map +1 -0
  771. package/dist/zod/tempo/TransactionRequest.d.ts +828 -0
  772. package/dist/zod/tempo/TransactionRequest.d.ts.map +1 -0
  773. package/dist/zod/tempo/TransactionRequest.js +242 -0
  774. package/dist/zod/tempo/TransactionRequest.js.map +1 -0
  775. package/dist/zod/tempo/TxEnvelopeTempo.d.ts +646 -0
  776. package/dist/zod/tempo/TxEnvelopeTempo.d.ts.map +1 -0
  777. package/dist/zod/tempo/TxEnvelopeTempo.js +57 -0
  778. package/dist/zod/tempo/TxEnvelopeTempo.js.map +1 -0
  779. package/dist/zod/tempo/VirtualAddress.d.ts +9 -0
  780. package/dist/zod/tempo/VirtualAddress.d.ts.map +1 -0
  781. package/dist/zod/tempo/VirtualAddress.js +13 -0
  782. package/dist/zod/tempo/VirtualAddress.js.map +1 -0
  783. package/dist/zod/tempo/ZoneId.d.ts +6 -0
  784. package/dist/zod/tempo/ZoneId.d.ts.map +1 -0
  785. package/dist/zod/tempo/ZoneId.js +13 -0
  786. package/dist/zod/tempo/ZoneId.js.map +1 -0
  787. package/dist/zod/tempo/ZoneRpcAuthentication.d.ts +210 -0
  788. package/dist/zod/tempo/ZoneRpcAuthentication.d.ts.map +1 -0
  789. package/dist/zod/tempo/ZoneRpcAuthentication.js +37 -0
  790. package/dist/zod/tempo/ZoneRpcAuthentication.js.map +1 -0
  791. package/dist/zod/tempo/z.d.ts +17 -0
  792. package/dist/zod/tempo/z.d.ts.map +1 -0
  793. package/dist/zod/tempo/z.js +18 -0
  794. package/dist/zod/tempo/z.js.map +1 -0
  795. package/dist/zod/z.d.ts +33 -0
  796. package/dist/zod/z.d.ts.map +1 -0
  797. package/dist/zod/z.js +34 -0
  798. package/dist/zod/z.js.map +1 -0
  799. package/package.json +657 -405
  800. package/src/CHANGELOG.md +820 -0
  801. package/src/LICENSE +21 -0
  802. package/src/README.md +92 -0
  803. package/src/core/Abi.ts +126 -0
  804. package/src/core/AbiConstructor.ts +488 -0
  805. package/src/core/AbiError.ts +832 -0
  806. package/src/core/AbiEvent.bench.ts +29 -0
  807. package/src/core/AbiEvent.ts +1976 -0
  808. package/src/core/AbiFunction.bench.ts +54 -0
  809. package/src/core/AbiFunction.ts +1090 -0
  810. package/src/core/AbiItem.bench.ts +40 -0
  811. package/src/core/AbiItem.ts +794 -0
  812. package/src/core/AbiParameters.bench.ts +82 -0
  813. package/src/core/AbiParameters.ts +749 -0
  814. package/src/core/AccessList.ts +126 -0
  815. package/src/core/AccountProof.bench.ts +66 -0
  816. package/src/core/AccountProof.ts +151 -0
  817. package/src/core/Address.bench.ts +92 -0
  818. package/src/core/Address.ts +373 -0
  819. package/src/core/AesGcm.bench.ts +25 -0
  820. package/src/core/AesGcm.ts +208 -0
  821. package/src/core/Authorization.ts +651 -0
  822. package/src/core/Base32.ts +138 -0
  823. package/src/core/Base58.ts +170 -0
  824. package/src/core/Base64.bench.ts +70 -0
  825. package/src/core/Base64.ts +437 -0
  826. package/src/core/Bech32m.ts +242 -0
  827. package/src/core/BinaryStateTree.ts +280 -0
  828. package/src/core/BlobCells.ts +379 -0
  829. package/src/core/Blobs.ts +754 -0
  830. package/src/core/Block.bench.ts +115 -0
  831. package/src/core/Block.ts +306 -0
  832. package/src/core/BlockOverrides.ts +135 -0
  833. package/src/core/Bloom.ts +188 -0
  834. package/src/core/Bls.bench.ts +32 -0
  835. package/src/core/Bls.ts +766 -0
  836. package/src/core/BlsPoint.ts +310 -0
  837. package/src/core/Bls_crypto.bench.ts +23 -0
  838. package/src/core/Bytes.bench.ts +121 -0
  839. package/src/core/Bytes.ts +889 -0
  840. package/src/core/Caches.ts +21 -0
  841. package/src/core/Cbor.bench.ts +58 -0
  842. package/src/core/Cbor.ts +969 -0
  843. package/src/core/CompactSize.ts +203 -0
  844. package/src/core/ContractAddress.ts +171 -0
  845. package/src/core/CoseKey.ts +221 -0
  846. package/src/core/Ed25519.ts +347 -0
  847. package/src/core/Ens.ts +141 -0
  848. package/src/core/Errors.ts +140 -0
  849. package/src/core/Fee.ts +237 -0
  850. package/src/core/Filter.ts +151 -0
  851. package/src/core/Hash.bench.ts +31 -0
  852. package/src/core/Hash.ts +269 -0
  853. package/src/core/HdKey.ts +164 -0
  854. package/src/core/Hex.bench.ts +121 -0
  855. package/src/core/Hex.ts +1002 -0
  856. package/src/core/Json.bench.ts +65 -0
  857. package/src/core/Json.ts +160 -0
  858. package/src/core/Keystore.ts +579 -0
  859. package/src/core/Kzg.ts +80 -0
  860. package/src/core/Log.bench.ts +53 -0
  861. package/src/core/Log.ts +250 -0
  862. package/src/core/Mnemonic.bench.ts +16 -0
  863. package/src/core/Mnemonic.ts +231 -0
  864. package/src/core/P256.ts +415 -0
  865. package/src/core/PersonalMessage.ts +80 -0
  866. package/src/core/Provider.bench.ts +31 -0
  867. package/src/core/Provider.ts +680 -0
  868. package/src/core/PublicKey.ts +567 -0
  869. package/src/core/Rlp.bench.ts +73 -0
  870. package/src/core/Rlp.ts +645 -0
  871. package/src/core/Rlp_tx.bench.ts +97 -0
  872. package/src/core/RpcRequest.bench.ts +41 -0
  873. package/src/core/RpcRequest.ts +207 -0
  874. package/src/core/RpcResponse.bench.ts +65 -0
  875. package/src/core/RpcResponse.ts +640 -0
  876. package/src/core/RpcSchema.ts +364 -0
  877. package/src/core/RpcTransport.bench.ts +42 -0
  878. package/src/core/RpcTransport.ts +225 -0
  879. package/src/core/Secp256k1.ts +510 -0
  880. package/src/core/Signature.bench.ts +56 -0
  881. package/src/core/Signature.ts +1005 -0
  882. package/src/core/Siwe.ts +512 -0
  883. package/src/core/Solidity.ts +166 -0
  884. package/src/core/StateOverrides.ts +134 -0
  885. package/src/core/Transaction.ts +434 -0
  886. package/src/core/TransactionReceipt.ts +333 -0
  887. package/src/core/TransactionRequest.ts +451 -0
  888. package/src/core/TxEnvelope.ts +944 -0
  889. package/src/core/TxEnvelopeEip1559.bench.ts +75 -0
  890. package/src/core/TxEnvelopeEip1559.ts +644 -0
  891. package/src/core/TxEnvelopeEip2930.ts +605 -0
  892. package/src/core/TxEnvelopeEip4844.ts +877 -0
  893. package/src/core/TxEnvelopeEip7702.ts +704 -0
  894. package/src/core/TxEnvelopeLegacy.ts +659 -0
  895. package/src/core/TypedData.ts +1039 -0
  896. package/src/core/ValidatorData.ts +86 -0
  897. package/src/core/Value.ts +278 -0
  898. package/src/core/WebAuthnP256.ts +400 -0
  899. package/src/core/WebCryptoP256.bench.ts +38 -0
  900. package/src/core/WebCryptoP256.ts +388 -0
  901. package/src/core/Withdrawal.ts +87 -0
  902. package/src/core/X25519.ts +204 -0
  903. package/src/core/_test/Abi.test-d.ts +74 -0
  904. package/src/core/_test/Abi.test.ts +124 -0
  905. package/src/core/_test/AbiConstructor.test-d.ts +149 -0
  906. package/src/core/_test/AbiConstructor.test.ts +380 -0
  907. package/src/core/_test/AbiError.test-d.ts +128 -0
  908. package/src/core/_test/AbiError.test.ts +1144 -0
  909. package/src/core/_test/AbiEvent.snap-d.ts +330 -0
  910. package/src/core/_test/AbiEvent.test-d.ts +94 -0
  911. package/src/core/_test/AbiEvent.test.ts +1937 -0
  912. package/src/core/_test/AbiFunction.snap-d.ts +276 -0
  913. package/src/core/_test/AbiFunction.test.ts +1272 -0
  914. package/src/core/_test/AbiItem.snap-d.ts +131 -0
  915. package/src/core/_test/AbiItem.test.ts +2121 -0
  916. package/src/core/_test/AbiParameters.adversarial.fuzz.ts +142 -0
  917. package/src/core/_test/AbiParameters.decode.test.ts +1800 -0
  918. package/src/core/_test/AbiParameters.encode.test.ts +1965 -0
  919. package/src/core/_test/AbiParameters.fuzz.ts +37 -0
  920. package/src/core/_test/AbiParameters.snap-d.ts +66 -0
  921. package/src/core/_test/AbiParameters.test.ts +377 -0
  922. package/src/core/_test/AccessList.test.ts +94 -0
  923. package/src/core/_test/AccountProof.test.ts +116 -0
  924. package/src/core/_test/Address.test.ts +252 -0
  925. package/src/core/_test/AesGcm.test.ts +112 -0
  926. package/src/core/_test/Authorization.test.ts +621 -0
  927. package/src/core/_test/Base.fuzz.ts +43 -0
  928. package/src/core/_test/Base32.test.ts +67 -0
  929. package/src/core/_test/Base58.test.ts +85 -0
  930. package/src/core/_test/Base64.test.ts +106 -0
  931. package/src/core/_test/Bech32m.test.ts +259 -0
  932. package/src/core/_test/BinaryStateTree.test.ts +182 -0
  933. package/src/core/_test/BlobCells.test.ts +276 -0
  934. package/src/core/_test/Blobs.test.ts +924 -0
  935. package/src/core/_test/Block.test.ts +641 -0
  936. package/src/core/_test/BlockOverrides.test.ts +110 -0
  937. package/src/core/_test/Bloom.test.ts +122 -0
  938. package/src/core/_test/Bls.test.ts +350 -0
  939. package/src/core/_test/BlsPoint.test.ts +251 -0
  940. package/src/core/_test/Bytes.test.ts +1659 -0
  941. package/src/core/_test/Caches.test.ts +20 -0
  942. package/src/core/_test/Cbor.fuzz.ts +89 -0
  943. package/src/core/_test/Cbor.test.ts +769 -0
  944. package/src/core/_test/CompactSize.test.ts +176 -0
  945. package/src/core/_test/ContractAddress.test.ts +147 -0
  946. package/src/core/_test/CoseKey.test.ts +107 -0
  947. package/src/core/_test/Ed25519.test-d.ts +155 -0
  948. package/src/core/_test/Ed25519.test.ts +438 -0
  949. package/src/core/_test/Ens.test.ts +212 -0
  950. package/src/core/_test/Errors.test.ts +285 -0
  951. package/src/core/_test/Fee.test.ts +89 -0
  952. package/src/core/_test/Filter.test.ts +149 -0
  953. package/src/core/_test/Hash.test.ts +540 -0
  954. package/src/core/_test/HdKey.test.ts +106 -0
  955. package/src/core/_test/Hex.fuzz.ts +73 -0
  956. package/src/core/_test/Hex.test-d.ts +16 -0
  957. package/src/core/_test/Hex.test.ts +787 -0
  958. package/src/core/_test/Json.test.ts +201 -0
  959. package/src/core/_test/Keystore.test.ts +628 -0
  960. package/src/core/_test/Kzg.test.ts +220 -0
  961. package/src/core/_test/Log.test.ts +223 -0
  962. package/src/core/_test/Mnemonic.test.ts +337 -0
  963. package/src/core/_test/P256.test.ts +612 -0
  964. package/src/core/_test/PersonalMessage.test.ts +56 -0
  965. package/src/core/_test/Provider.test-d.ts +304 -0
  966. package/src/core/_test/Provider.test.ts +914 -0
  967. package/src/core/_test/PublicKey.test-d.ts +52 -0
  968. package/src/core/_test/PublicKey.test.ts +576 -0
  969. package/src/core/_test/Rlp.fuzz.ts +63 -0
  970. package/src/core/_test/Rlp.test-d.ts +21 -0
  971. package/src/core/_test/Rlp.test.ts +339 -0
  972. package/src/core/_test/RpcRequest.test.ts +212 -0
  973. package/src/core/_test/RpcResponse.test.ts +725 -0
  974. package/src/core/_test/RpcSchema.test-d.ts +204 -0
  975. package/src/core/_test/RpcSchema.test.ts +10 -0
  976. package/src/core/_test/RpcTransport.test-d.ts +43 -0
  977. package/src/core/_test/RpcTransport.test.ts +255 -0
  978. package/src/core/_test/Secp256k1.snap-d.ts +44 -0
  979. package/src/core/_test/Secp256k1.test.ts +611 -0
  980. package/src/core/_test/Signature.fuzz.ts +66 -0
  981. package/src/core/_test/Signature.snap-d.ts +91 -0
  982. package/src/core/_test/Signature.test.ts +862 -0
  983. package/src/core/_test/Siwe.test.ts +792 -0
  984. package/src/core/_test/Solidity.test.ts +135 -0
  985. package/src/core/_test/StateOverrides.test.ts +104 -0
  986. package/src/core/_test/Transaction.test.ts +1975 -0
  987. package/src/core/_test/TransactionEnvelope.test-d.ts +182 -0
  988. package/src/core/_test/TransactionEnvelope.test.ts +384 -0
  989. package/src/core/_test/TransactionEnvelopeEip1559.test-d.ts +47 -0
  990. package/src/core/_test/TransactionEnvelopeEip1559.test.ts +790 -0
  991. package/src/core/_test/TransactionEnvelopeEip2930.test-d.ts +74 -0
  992. package/src/core/_test/TransactionEnvelopeEip2930.test.ts +592 -0
  993. package/src/core/_test/TransactionEnvelopeEip4844.test-d.ts +92 -0
  994. package/src/core/_test/TransactionEnvelopeEip4844.test.ts +795 -0
  995. package/src/core/_test/TransactionEnvelopeEip7702.test-d.ts +80 -0
  996. package/src/core/_test/TransactionEnvelopeEip7702.test.ts +984 -0
  997. package/src/core/_test/TransactionEnvelopeLegacy.test-d.ts +69 -0
  998. package/src/core/_test/TransactionEnvelopeLegacy.test.ts +949 -0
  999. package/src/core/_test/TransactionReceipt.test.ts +405 -0
  1000. package/src/core/_test/TransactionRequest.test-d.ts +125 -0
  1001. package/src/core/_test/TransactionRequest.test.ts +430 -0
  1002. package/src/core/_test/TypedData.test-d.ts +151 -0
  1003. package/src/core/_test/TypedData.test.ts +1595 -0
  1004. package/src/core/_test/ValidatorData.test.ts +79 -0
  1005. package/src/core/_test/Value.test.ts +715 -0
  1006. package/src/core/_test/WebAuthnP256.test.ts +1833 -0
  1007. package/src/core/_test/WebCryptoP256.test.ts +279 -0
  1008. package/src/core/_test/Withdrawal.test.ts +51 -0
  1009. package/src/core/_test/X25519.test-d.ts +132 -0
  1010. package/src/core/_test/X25519.test.ts +361 -0
  1011. package/src/core/_test/_snap/Block.test.ts.snap +3436 -0
  1012. package/src/core/_test/index.test.ts +82 -0
  1013. package/src/core/_test/internal/base58.test.ts +11 -0
  1014. package/src/core/_test/internal/cursor.test.ts +649 -0
  1015. package/src/core/_test/internal/ens.test.ts +76 -0
  1016. package/src/core/_test/internal/lru.test.ts +38 -0
  1017. package/src/core/_test/internal/promise.test.ts +64 -0
  1018. package/src/core/_test/internal/rpcTransport.test.ts +47 -0
  1019. package/src/core/_test/internal/uid.test.ts +7 -0
  1020. package/src/core/_test/internal/webauthn.test.ts +43 -0
  1021. package/src/core/internal/abiConstructor.ts +33 -0
  1022. package/src/core/internal/abiError.ts +31 -0
  1023. package/src/core/internal/abiEvent.ts +155 -0
  1024. package/src/core/internal/abiFunction.ts +33 -0
  1025. package/src/core/internal/abiItem.ts +687 -0
  1026. package/src/core/internal/abiParameters.ts +821 -0
  1027. package/src/core/internal/address.ts +79 -0
  1028. package/src/core/internal/base58.ts +102 -0
  1029. package/src/core/internal/bytes.ts +139 -0
  1030. package/src/core/internal/codec/bech32-base32.ts +64 -0
  1031. package/src/core/internal/codec/errors.ts +30 -0
  1032. package/src/core/internal/codec/hex.ts +145 -0
  1033. package/src/core/internal/codec/int.ts +186 -0
  1034. package/src/core/internal/codec/utf8.ts +11 -0
  1035. package/src/core/internal/cryptoIo.ts +74 -0
  1036. package/src/core/internal/cursor.ts +254 -0
  1037. package/src/core/internal/ens.ts +65 -0
  1038. package/src/core/internal/hex.ts +116 -0
  1039. package/src/core/internal/lru.ts +58 -0
  1040. package/src/core/internal/mnemonic/wordlists.ts +10 -0
  1041. package/src/core/internal/promise.ts +66 -0
  1042. package/src/core/internal/quantity.ts +83 -0
  1043. package/src/core/internal/rpcSchemas/eth.ts +767 -0
  1044. package/src/core/internal/rpcSchemas/wallet.ts +460 -0
  1045. package/src/core/internal/rpcTransport.ts +74 -0
  1046. package/src/core/internal/signature.ts +10 -0
  1047. package/src/core/internal/tx.ts +185 -0
  1048. package/src/core/internal/types.ts +450 -0
  1049. package/src/core/internal/webauthn.ts +105 -0
  1050. package/src/erc4337/RpcSchema.ts +159 -0
  1051. package/src/erc4337/UserOperation.bench.ts +87 -0
  1052. package/src/erc4337/UserOperation.ts +1012 -0
  1053. package/src/erc4337/UserOperationGas.ts +116 -0
  1054. package/src/erc4337/_test/UserOperation.snap-d.ts +56 -0
  1055. package/src/erc4337/_test/UserOperation.test.ts +1502 -0
  1056. package/src/erc4337/_test/UserOperationGas.test.ts +93 -0
  1057. package/src/erc4337/_test/UserOperationReceipt.test.ts +403 -0
  1058. package/src/erc4337/index.ts +37 -0
  1059. package/src/erc6492/SignatureErc6492.bench.ts +21 -0
  1060. package/src/erc6492/SignatureErc6492.ts +290 -0
  1061. package/src/erc6492/_test/SignatureErc6492.test.ts +161 -0
  1062. package/src/erc6492/_test/index.test.ts +10 -0
  1063. package/src/erc6492/index.ts +28 -0
  1064. package/src/erc7821/Calls.bench.ts +36 -0
  1065. package/src/erc7821/Calls.ts +161 -0
  1066. package/src/erc7821/Execute.ts +197 -0
  1067. package/src/erc7821/_test/Calls.test.ts +214 -0
  1068. package/src/erc7821/_test/Execute.test.ts +548 -0
  1069. package/src/erc7821/index.ts +72 -0
  1070. package/src/erc8010/SignatureErc8010.ts +266 -0
  1071. package/src/erc8010/_test/SignatureErc8010.test.ts +211 -0
  1072. package/src/erc8010/_test/index.test.ts +10 -0
  1073. package/src/erc8010/index.ts +51 -0
  1074. package/src/erc8021/Attribution.bench.ts +25 -0
  1075. package/src/erc8021/Attribution.ts +516 -0
  1076. package/src/erc8021/_test/Attribution.test.ts +772 -0
  1077. package/src/erc8021/_test/index.test.ts +10 -0
  1078. package/src/erc8021/index.ts +45 -0
  1079. package/src/index.docs.ts +12 -0
  1080. package/src/index.ts +3831 -0
  1081. package/src/tempo/AuthorizationTempo.test.ts +1378 -0
  1082. package/src/tempo/AuthorizationTempo.ts +946 -0
  1083. package/src/tempo/Channel.test.ts +203 -0
  1084. package/src/tempo/Channel.ts +303 -0
  1085. package/src/tempo/KeyAuthorization.test.ts +2443 -0
  1086. package/src/tempo/KeyAuthorization.ts +1183 -0
  1087. package/src/tempo/MultisigConfig.test.ts +236 -0
  1088. package/src/tempo/MultisigConfig.ts +532 -0
  1089. package/src/tempo/Period.test.ts +44 -0
  1090. package/src/tempo/PoolId.test.ts +58 -0
  1091. package/src/tempo/PoolId.ts +42 -0
  1092. package/src/tempo/ReceivePolicyReceipt.test.ts +198 -0
  1093. package/src/tempo/ReceivePolicyReceipt.ts +274 -0
  1094. package/src/tempo/RpcSchemaTempo.ts +55 -0
  1095. package/src/tempo/SignatureEnvelope.test.ts +3031 -0
  1096. package/src/tempo/SignatureEnvelope.ts +1785 -0
  1097. package/src/tempo/Tick.test.ts +281 -0
  1098. package/src/tempo/TokenId.bench.ts +36 -0
  1099. package/src/tempo/TokenId.test.ts +79 -0
  1100. package/src/tempo/TokenId.ts +141 -0
  1101. package/src/tempo/TokenRole.test.ts +16 -0
  1102. package/src/tempo/Transaction.test.ts +529 -0
  1103. package/src/tempo/Transaction.ts +341 -0
  1104. package/src/tempo/TransactionReceipt.ts +200 -0
  1105. package/src/tempo/TransactionRequest.test-d.ts +118 -0
  1106. package/src/tempo/TransactionRequest.test.ts +324 -0
  1107. package/src/tempo/TransactionRequest.ts +382 -0
  1108. package/src/tempo/TxEnvelopeTempo.test.ts +1643 -0
  1109. package/src/tempo/TxEnvelopeTempo.ts +1167 -0
  1110. package/src/tempo/VirtualAddress.bench.ts +43 -0
  1111. package/src/tempo/VirtualAddress.test.ts +78 -0
  1112. package/src/tempo/VirtualAddress.ts +206 -0
  1113. package/src/tempo/VirtualMaster.bench.ts +42 -0
  1114. package/src/tempo/VirtualMaster.test.ts +194 -0
  1115. package/src/tempo/VirtualMaster.ts +732 -0
  1116. package/src/tempo/ZoneId.test.ts +42 -0
  1117. package/src/tempo/ZoneRpcAuthentication.test.ts +226 -0
  1118. package/src/tempo/ZoneRpcAuthentication.ts +427 -0
  1119. package/src/tempo/e2e.test.ts +3207 -0
  1120. package/src/tempo/index.ts +588 -0
  1121. package/src/trusted-setups/_test/Paths.test.ts +10 -0
  1122. package/src/trusted-setups/_test/index.test.ts +10 -0
  1123. package/src/tsconfig.json +15 -0
  1124. package/src/version.ts +2 -0
  1125. package/src/webauthn/Authentication.bench.ts +94 -0
  1126. package/src/webauthn/Authentication.ts +701 -0
  1127. package/src/webauthn/Authenticator.bench.ts +63 -0
  1128. package/src/webauthn/Authenticator.ts +306 -0
  1129. package/src/webauthn/Credential.ts +165 -0
  1130. package/src/webauthn/Registration.bench.ts +108 -0
  1131. package/src/webauthn/Registration.ts +825 -0
  1132. package/src/webauthn/_test/Authentication.browser.test.ts +755 -0
  1133. package/src/webauthn/_test/Authentication.test.ts +1871 -0
  1134. package/src/webauthn/_test/Authenticator.test.ts +57 -0
  1135. package/src/webauthn/_test/Credential.test.ts +147 -0
  1136. package/src/webauthn/_test/Registration.browser.test.ts +899 -0
  1137. package/src/webauthn/_test/Registration.test.ts +1050 -0
  1138. package/src/webauthn/index.ts +37 -0
  1139. package/src/webauthn/internal/utils.ts +149 -0
  1140. package/src/zod/AccessList.ts +21 -0
  1141. package/src/zod/AccountProof.ts +24 -0
  1142. package/src/zod/Address.ts +9 -0
  1143. package/src/zod/Authorization.ts +70 -0
  1144. package/src/zod/BigInt.ts +10 -0
  1145. package/src/zod/Block.ts +108 -0
  1146. package/src/zod/BlockOverrides.ts +17 -0
  1147. package/src/zod/Bytes.ts +59 -0
  1148. package/src/zod/Fee.ts +36 -0
  1149. package/src/zod/Filter.ts +52 -0
  1150. package/src/zod/Hash.ts +5 -0
  1151. package/src/zod/Hex.ts +89 -0
  1152. package/src/zod/Int.ts +98 -0
  1153. package/src/zod/Log.ts +36 -0
  1154. package/src/zod/Number.ts +10 -0
  1155. package/src/zod/RpcResponse.ts +28 -0
  1156. package/src/zod/RpcSchema.ts +268 -0
  1157. package/src/zod/Signature.ts +38 -0
  1158. package/src/zod/StateOverrides.ts +32 -0
  1159. package/src/zod/Transaction.ts +250 -0
  1160. package/src/zod/TransactionEnvelope.ts +147 -0
  1161. package/src/zod/TransactionReceipt.ts +70 -0
  1162. package/src/zod/TransactionRequest.ts +54 -0
  1163. package/src/zod/TxEnvelopeEip1559.ts +27 -0
  1164. package/src/zod/TxEnvelopeEip2930.ts +25 -0
  1165. package/src/zod/TxEnvelopeEip4844.ts +41 -0
  1166. package/src/zod/TxEnvelopeEip7702.ts +30 -0
  1167. package/src/zod/TxEnvelopeLegacy.ts +22 -0
  1168. package/src/zod/Uint.ts +95 -0
  1169. package/src/zod/Withdrawal.ts +13 -0
  1170. package/src/zod/_test/AccessList.test-d.ts +13 -0
  1171. package/src/zod/_test/AccessList.test.ts +44 -0
  1172. package/src/zod/_test/AccountProof.test-d.ts +19 -0
  1173. package/src/zod/_test/AccountProof.test.ts +102 -0
  1174. package/src/zod/_test/Address.test-d.ts +13 -0
  1175. package/src/zod/_test/Address.test.ts +17 -0
  1176. package/src/zod/_test/Authorization.test-d.ts +40 -0
  1177. package/src/zod/_test/Authorization.test.ts +148 -0
  1178. package/src/zod/_test/BigInt.test-d.ts +9 -0
  1179. package/src/zod/_test/BigInt.test.ts +9 -0
  1180. package/src/zod/_test/Block.test-d.ts +30 -0
  1181. package/src/zod/_test/Block.test.ts +231 -0
  1182. package/src/zod/_test/BlockOverrides.test-d.ts +13 -0
  1183. package/src/zod/_test/BlockOverrides.test.ts +99 -0
  1184. package/src/zod/_test/Bytes.test-d.ts +16 -0
  1185. package/src/zod/_test/Bytes.test.ts +26 -0
  1186. package/src/zod/_test/Fee.test-d.ts +31 -0
  1187. package/src/zod/_test/Fee.test.ts +91 -0
  1188. package/src/zod/_test/Filter.test-d.ts +25 -0
  1189. package/src/zod/_test/Filter.test.ts +89 -0
  1190. package/src/zod/_test/Hash.test-d.ts +9 -0
  1191. package/src/zod/_test/Hash.test.ts +11 -0
  1192. package/src/zod/_test/Hex.test-d.ts +11 -0
  1193. package/src/zod/_test/Hex.test.ts +42 -0
  1194. package/src/zod/_test/Int.test-d.ts +15 -0
  1195. package/src/zod/_test/Int.test.ts +43 -0
  1196. package/src/zod/_test/Log.test-d.ts +15 -0
  1197. package/src/zod/_test/Log.test.ts +132 -0
  1198. package/src/zod/_test/Number.test-d.ts +9 -0
  1199. package/src/zod/_test/Number.test.ts +11 -0
  1200. package/src/zod/_test/RpcResponse.test-d.ts +13 -0
  1201. package/src/zod/_test/RpcResponse.test.ts +88 -0
  1202. package/src/zod/_test/RpcSchema.test-d.ts +79 -0
  1203. package/src/zod/_test/RpcSchema.test.ts +291 -0
  1204. package/src/zod/_test/Signature.test-d.ts +25 -0
  1205. package/src/zod/_test/Signature.test.ts +49 -0
  1206. package/src/zod/_test/StateOverrides.test-d.ts +25 -0
  1207. package/src/zod/_test/StateOverrides.test.ts +80 -0
  1208. package/src/zod/_test/Transaction.test-d.ts +49 -0
  1209. package/src/zod/_test/Transaction.test.ts +200 -0
  1210. package/src/zod/_test/TransactionEnvelope.test-d.ts +35 -0
  1211. package/src/zod/_test/TransactionEnvelope.test.ts +204 -0
  1212. package/src/zod/_test/TransactionReceipt.test-d.ts +25 -0
  1213. package/src/zod/_test/TransactionReceipt.test.ts +215 -0
  1214. package/src/zod/_test/TransactionRequest.test-d.ts +13 -0
  1215. package/src/zod/_test/TransactionRequest.test.ts +191 -0
  1216. package/src/zod/_test/TxEnvelope.test-d.ts +67 -0
  1217. package/src/zod/_test/TxEnvelope.test.ts +177 -0
  1218. package/src/zod/_test/Uint.test-d.ts +15 -0
  1219. package/src/zod/_test/Uint.test.ts +45 -0
  1220. package/src/zod/_test/Withdrawal.test-d.ts +13 -0
  1221. package/src/zod/_test/Withdrawal.test.ts +38 -0
  1222. package/src/zod/_test/z.test-d.ts +67 -0
  1223. package/src/zod/_test/z.test.ts +195 -0
  1224. package/src/zod/index.ts +19 -0
  1225. package/src/zod/internal/Integer.ts +73 -0
  1226. package/src/zod/internal/TransactionEnvelope.ts +64 -0
  1227. package/src/zod/internal/rpcSchemas/Eth.ts +337 -0
  1228. package/src/zod/internal/rpcSchemas/Wallet.ts +250 -0
  1229. package/src/zod/internal/rpcSchemas/from.ts +52 -0
  1230. package/src/zod/tempo/AuthorizationTempo.ts +73 -0
  1231. package/src/zod/tempo/KeyAuthorization.ts +70 -0
  1232. package/src/zod/tempo/MultisigConfig.ts +17 -0
  1233. package/src/zod/tempo/PoolId.ts +5 -0
  1234. package/src/zod/tempo/RpcSchemaTempo.ts +87 -0
  1235. package/src/zod/tempo/SignatureEnvelope.ts +319 -0
  1236. package/src/zod/tempo/Tick.ts +16 -0
  1237. package/src/zod/tempo/TokenId.ts +15 -0
  1238. package/src/zod/tempo/TokenRole.ts +6 -0
  1239. package/src/zod/tempo/Transaction.ts +83 -0
  1240. package/src/zod/tempo/TransactionReceipt.ts +74 -0
  1241. package/src/zod/tempo/TransactionRequest.ts +295 -0
  1242. package/src/zod/tempo/TxEnvelopeTempo.ts +69 -0
  1243. package/src/zod/tempo/VirtualAddress.ts +23 -0
  1244. package/src/zod/tempo/ZoneId.ts +19 -0
  1245. package/src/zod/tempo/ZoneRpcAuthentication.ts +46 -0
  1246. package/src/zod/tempo/_test/AuthorizationTempo.test-d.ts +10 -0
  1247. package/src/zod/tempo/_test/AuthorizationTempo.test.ts +50 -0
  1248. package/src/zod/tempo/_test/KeyAuthorization.test-d.ts +13 -0
  1249. package/src/zod/tempo/_test/KeyAuthorization.test.ts +58 -0
  1250. package/src/zod/tempo/_test/PoolId.test-d.ts +8 -0
  1251. package/src/zod/tempo/_test/PoolId.test.ts +16 -0
  1252. package/src/zod/tempo/_test/RpcSchemaTempo.test-d.ts +22 -0
  1253. package/src/zod/tempo/_test/RpcSchemaTempo.test.ts +56 -0
  1254. package/src/zod/tempo/_test/SignatureEnvelope.test-d.ts +19 -0
  1255. package/src/zod/tempo/_test/SignatureEnvelope.test.ts +83 -0
  1256. package/src/zod/tempo/_test/Tick.test-d.ts +8 -0
  1257. package/src/zod/tempo/_test/Tick.test.ts +20 -0
  1258. package/src/zod/tempo/_test/TokenId.test-d.ts +17 -0
  1259. package/src/zod/tempo/_test/TokenId.test.ts +21 -0
  1260. package/src/zod/tempo/_test/TokenRole.test-d.ts +10 -0
  1261. package/src/zod/tempo/_test/TokenRole.test.ts +18 -0
  1262. package/src/zod/tempo/_test/Transaction.test-d.ts +10 -0
  1263. package/src/zod/tempo/_test/Transaction.test.ts +88 -0
  1264. package/src/zod/tempo/_test/TransactionReceipt.test-d.ts +13 -0
  1265. package/src/zod/tempo/_test/TransactionReceipt.test.ts +54 -0
  1266. package/src/zod/tempo/_test/TransactionRequest.test-d.ts +13 -0
  1267. package/src/zod/tempo/_test/TransactionRequest.test.ts +54 -0
  1268. package/src/zod/tempo/_test/TxEnvelopeTempo.test-d.ts +16 -0
  1269. package/src/zod/tempo/_test/TxEnvelopeTempo.test.ts +79 -0
  1270. package/src/zod/tempo/_test/VirtualAddress.test-d.ts +13 -0
  1271. package/src/zod/tempo/_test/VirtualAddress.test.ts +37 -0
  1272. package/src/zod/tempo/_test/ZoneId.test.ts +17 -0
  1273. package/src/zod/tempo/_test/ZoneRpcAuthentication.test-d.ts +16 -0
  1274. package/src/zod/tempo/_test/ZoneRpcAuthentication.test.ts +47 -0
  1275. package/src/zod/tempo/z.ts +17 -0
  1276. package/src/zod/z.ts +101 -0
  1277. package/Abi/package.json +0 -6
  1278. package/AbiConstructor/package.json +0 -6
  1279. package/AbiError/package.json +0 -6
  1280. package/AbiEvent/package.json +0 -6
  1281. package/AbiFunction/package.json +0 -6
  1282. package/AbiItem/package.json +0 -6
  1283. package/AbiParameters/package.json +0 -6
  1284. package/AccessList/package.json +0 -6
  1285. package/AccountProof/package.json +0 -6
  1286. package/Address/package.json +0 -6
  1287. package/AesGcm/package.json +0 -6
  1288. package/Authorization/package.json +0 -6
  1289. package/Base32/package.json +0 -6
  1290. package/Base58/package.json +0 -6
  1291. package/Base64/package.json +0 -6
  1292. package/Bech32m/package.json +0 -6
  1293. package/BinaryStateTree/package.json +0 -6
  1294. package/Blobs/package.json +0 -6
  1295. package/Block/package.json +0 -6
  1296. package/BlockOverrides/package.json +0 -6
  1297. package/Bloom/package.json +0 -6
  1298. package/Bls/package.json +0 -6
  1299. package/BlsPoint/package.json +0 -6
  1300. package/Bytes/package.json +0 -6
  1301. package/CHANGELOG.md +0 -824
  1302. package/Caches/package.json +0 -6
  1303. package/Cbor/package.json +0 -6
  1304. package/CompactSize/package.json +0 -6
  1305. package/ContractAddress/package.json +0 -6
  1306. package/CoseKey/package.json +0 -6
  1307. package/Ed25519/package.json +0 -6
  1308. package/Ens/package.json +0 -6
  1309. package/Errors/package.json +0 -6
  1310. package/Fee/package.json +0 -6
  1311. package/Filter/package.json +0 -6
  1312. package/Hash/package.json +0 -6
  1313. package/HdKey/package.json +0 -6
  1314. package/Hex/package.json +0 -6
  1315. package/Json/package.json +0 -6
  1316. package/Keystore/package.json +0 -6
  1317. package/Kzg/package.json +0 -6
  1318. package/Log/package.json +0 -6
  1319. package/Mnemonic/package.json +0 -6
  1320. package/P256/package.json +0 -6
  1321. package/PersonalMessage/package.json +0 -6
  1322. package/Provider/package.json +0 -6
  1323. package/PublicKey/package.json +0 -6
  1324. package/README.md +0 -93
  1325. package/Rlp/package.json +0 -6
  1326. package/RpcRequest/package.json +0 -6
  1327. package/RpcResponse/package.json +0 -6
  1328. package/RpcSchema/package.json +0 -6
  1329. package/RpcTransport/package.json +0 -6
  1330. package/Secp256k1/package.json +0 -6
  1331. package/Signature/package.json +0 -6
  1332. package/Siwe/package.json +0 -6
  1333. package/Solidity/package.json +0 -6
  1334. package/StateOverrides/package.json +0 -6
  1335. package/Transaction/package.json +0 -6
  1336. package/TransactionReceipt/package.json +0 -6
  1337. package/TransactionRequest/package.json +0 -6
  1338. package/TxEnvelope/package.json +0 -6
  1339. package/TxEnvelopeEip1559/package.json +0 -6
  1340. package/TxEnvelopeEip2930/package.json +0 -6
  1341. package/TxEnvelopeEip4844/package.json +0 -6
  1342. package/TxEnvelopeEip7702/package.json +0 -6
  1343. package/TxEnvelopeLegacy/package.json +0 -6
  1344. package/TypedData/package.json +0 -6
  1345. package/ValidatorData/package.json +0 -6
  1346. package/Value/package.json +0 -6
  1347. package/WebAuthnP256/package.json +0 -6
  1348. package/WebCryptoP256/package.json +0 -6
  1349. package/Withdrawal/package.json +0 -6
  1350. package/X25519/package.json +0 -6
  1351. package/_cjs/core/Abi.js +0 -15
  1352. package/_cjs/core/Abi.js.map +0 -1
  1353. package/_cjs/core/AbiConstructor.js +0 -51
  1354. package/_cjs/core/AbiConstructor.js.map +0 -1
  1355. package/_cjs/core/AbiError.js +0 -108
  1356. package/_cjs/core/AbiError.js.map +0 -1
  1357. package/_cjs/core/AbiEvent.js +0 -348
  1358. package/_cjs/core/AbiEvent.js.map +0 -1
  1359. package/_cjs/core/AbiFunction.js +0 -107
  1360. package/_cjs/core/AbiFunction.js.map +0 -1
  1361. package/_cjs/core/AbiItem.js +0 -195
  1362. package/_cjs/core/AbiItem.js.map +0 -1
  1363. package/_cjs/core/AbiParameters.js +0 -227
  1364. package/_cjs/core/AbiParameters.js.map +0 -1
  1365. package/_cjs/core/AccessList.js +0 -51
  1366. package/_cjs/core/AccessList.js.map +0 -1
  1367. package/_cjs/core/AccountProof.js +0 -3
  1368. package/_cjs/core/AccountProof.js.map +0 -1
  1369. package/_cjs/core/Address.js +0 -116
  1370. package/_cjs/core/Address.js.map +0 -1
  1371. package/_cjs/core/AesGcm.js +0 -51
  1372. package/_cjs/core/AesGcm.js.map +0 -1
  1373. package/_cjs/core/Authorization.js +0 -96
  1374. package/_cjs/core/Authorization.js.map +0 -1
  1375. package/_cjs/core/Base32.js +0 -73
  1376. package/_cjs/core/Base32.js.map +0 -1
  1377. package/_cjs/core/Base58.js +0 -46
  1378. package/_cjs/core/Base58.js.map +0 -1
  1379. package/_cjs/core/Base64.js +0 -70
  1380. package/_cjs/core/Base64.js.map +0 -1
  1381. package/_cjs/core/Bech32m.js +0 -205
  1382. package/_cjs/core/Bech32m.js.map +0 -1
  1383. package/_cjs/core/BinaryStateTree.js +0 -141
  1384. package/_cjs/core/BinaryStateTree.js.map +0 -1
  1385. package/_cjs/core/Blobs.js +0 -244
  1386. package/_cjs/core/Blobs.js.map +0 -1
  1387. package/_cjs/core/Block.js +0 -85
  1388. package/_cjs/core/Block.js.map +0 -1
  1389. package/_cjs/core/BlockOverrides.js +0 -63
  1390. package/_cjs/core/BlockOverrides.js.map +0 -1
  1391. package/_cjs/core/Bloom.js +0 -21
  1392. package/_cjs/core/Bloom.js.map +0 -1
  1393. package/_cjs/core/Bls.js +0 -86
  1394. package/_cjs/core/Bls.js.map +0 -1
  1395. package/_cjs/core/BlsPoint.js +0 -28
  1396. package/_cjs/core/BlsPoint.js.map +0 -1
  1397. package/_cjs/core/Bytes.js +0 -257
  1398. package/_cjs/core/Bytes.js.map +0 -1
  1399. package/_cjs/core/Caches.js +0 -14
  1400. package/_cjs/core/Caches.js.map +0 -1
  1401. package/_cjs/core/Cbor.js +0 -748
  1402. package/_cjs/core/Cbor.js.map +0 -1
  1403. package/_cjs/core/CompactSize.js +0 -91
  1404. package/_cjs/core/CompactSize.js.map +0 -1
  1405. package/_cjs/core/ContractAddress.js +0 -36
  1406. package/_cjs/core/ContractAddress.js.map +0 -1
  1407. package/_cjs/core/CoseKey.js +0 -41
  1408. package/_cjs/core/CoseKey.js.map +0 -1
  1409. package/_cjs/core/Ed25519.js +0 -71
  1410. package/_cjs/core/Ed25519.js.map +0 -1
  1411. package/_cjs/core/Ens.js +0 -34
  1412. package/_cjs/core/Ens.js.map +0 -1
  1413. package/_cjs/core/Errors.js +0 -139
  1414. package/_cjs/core/Errors.js.map +0 -1
  1415. package/_cjs/core/Fee.js +0 -3
  1416. package/_cjs/core/Fee.js.map +0 -1
  1417. package/_cjs/core/Filter.js +0 -41
  1418. package/_cjs/core/Filter.js.map +0 -1
  1419. package/_cjs/core/Hash.js +0 -45
  1420. package/_cjs/core/Hash.js.map +0 -1
  1421. package/_cjs/core/HdKey.js +0 -26
  1422. package/_cjs/core/HdKey.js.map +0 -1
  1423. package/_cjs/core/Hex.js +0 -301
  1424. package/_cjs/core/Hex.js.map +0 -1
  1425. package/_cjs/core/Json.js +0 -49
  1426. package/_cjs/core/Json.js.map +0 -1
  1427. package/_cjs/core/Keystore.js +0 -183
  1428. package/_cjs/core/Keystore.js.map +0 -1
  1429. package/_cjs/core/Kzg.js +0 -13
  1430. package/_cjs/core/Kzg.js.map +0 -1
  1431. package/_cjs/core/Log.js +0 -33
  1432. package/_cjs/core/Log.js.map +0 -1
  1433. package/_cjs/core/Mnemonic.js +0 -51
  1434. package/_cjs/core/Mnemonic.js.map +0 -1
  1435. package/_cjs/core/P256.js +0 -79
  1436. package/_cjs/core/P256.js.map +0 -1
  1437. package/_cjs/core/PersonalMessage.js +0 -14
  1438. package/_cjs/core/PersonalMessage.js.map +0 -1
  1439. package/_cjs/core/Provider.js +0 -436
  1440. package/_cjs/core/Provider.js.map +0 -1
  1441. package/_cjs/core/PublicKey.js +0 -186
  1442. package/_cjs/core/PublicKey.js.map +0 -1
  1443. package/_cjs/core/Rlp.js +0 -173
  1444. package/_cjs/core/Rlp.js.map +0 -1
  1445. package/_cjs/core/RpcRequest.js +0 -25
  1446. package/_cjs/core/RpcRequest.js.map +0 -1
  1447. package/_cjs/core/RpcResponse.js +0 -444
  1448. package/_cjs/core/RpcResponse.js.map +0 -1
  1449. package/_cjs/core/RpcSchema.js +0 -7
  1450. package/_cjs/core/RpcSchema.js.map +0 -1
  1451. package/_cjs/core/RpcTransport.js +0 -94
  1452. package/_cjs/core/RpcTransport.js.map +0 -1
  1453. package/_cjs/core/Secp256k1.js +0 -80
  1454. package/_cjs/core/Secp256k1.js.map +0 -1
  1455. package/_cjs/core/Signature.js +0 -288
  1456. package/_cjs/core/Signature.js.map +0 -1
  1457. package/_cjs/core/Siwe.js +0 -230
  1458. package/_cjs/core/Siwe.js.map +0 -1
  1459. package/_cjs/core/Solidity.js +0 -104
  1460. package/_cjs/core/Solidity.js.map +0 -1
  1461. package/_cjs/core/StateOverrides.js +0 -48
  1462. package/_cjs/core/StateOverrides.js.map +0 -1
  1463. package/_cjs/core/Transaction.js +0 -114
  1464. package/_cjs/core/Transaction.js.map +0 -1
  1465. package/_cjs/core/TransactionReceipt.js +0 -74
  1466. package/_cjs/core/TransactionReceipt.js.map +0 -1
  1467. package/_cjs/core/TransactionRequest.js +0 -78
  1468. package/_cjs/core/TransactionRequest.js.map +0 -1
  1469. package/_cjs/core/TxEnvelope.js +0 -80
  1470. package/_cjs/core/TxEnvelope.js.map +0 -1
  1471. package/_cjs/core/TxEnvelopeEip1559.js +0 -174
  1472. package/_cjs/core/TxEnvelopeEip1559.js.map +0 -1
  1473. package/_cjs/core/TxEnvelopeEip2930.js +0 -158
  1474. package/_cjs/core/TxEnvelopeEip2930.js.map +0 -1
  1475. package/_cjs/core/TxEnvelopeEip4844.js +0 -216
  1476. package/_cjs/core/TxEnvelopeEip4844.js.map +0 -1
  1477. package/_cjs/core/TxEnvelopeEip7702.js +0 -149
  1478. package/_cjs/core/TxEnvelopeEip7702.js.map +0 -1
  1479. package/_cjs/core/TxEnvelopeLegacy.js +0 -213
  1480. package/_cjs/core/TxEnvelopeLegacy.js.map +0 -1
  1481. package/_cjs/core/TypedData.js +0 -325
  1482. package/_cjs/core/TypedData.js.map +0 -1
  1483. package/_cjs/core/ValidatorData.js +0 -14
  1484. package/_cjs/core/ValidatorData.js.map +0 -1
  1485. package/_cjs/core/Value.js +0 -90
  1486. package/_cjs/core/Value.js.map +0 -1
  1487. package/_cjs/core/WebAuthnP256.js +0 -26
  1488. package/_cjs/core/WebAuthnP256.js.map +0 -1
  1489. package/_cjs/core/WebCryptoP256.js +0 -76
  1490. package/_cjs/core/WebCryptoP256.js.map +0 -1
  1491. package/_cjs/core/Withdrawal.js +0 -22
  1492. package/_cjs/core/Withdrawal.js.map +0 -1
  1493. package/_cjs/core/X25519.js +0 -45
  1494. package/_cjs/core/X25519.js.map +0 -1
  1495. package/_cjs/core/internal/abi.js +0 -11
  1496. package/_cjs/core/internal/abi.js.map +0 -1
  1497. package/_cjs/core/internal/abiConstructor.js +0 -3
  1498. package/_cjs/core/internal/abiConstructor.js.map +0 -1
  1499. package/_cjs/core/internal/abiError.js +0 -3
  1500. package/_cjs/core/internal/abiError.js.map +0 -1
  1501. package/_cjs/core/internal/abiEvent.js +0 -3
  1502. package/_cjs/core/internal/abiEvent.js.map +0 -1
  1503. package/_cjs/core/internal/abiFunction.js +0 -3
  1504. package/_cjs/core/internal/abiFunction.js.map +0 -1
  1505. package/_cjs/core/internal/abiItem.js +0 -110
  1506. package/_cjs/core/internal/abiItem.js.map +0 -1
  1507. package/_cjs/core/internal/abiParameters.js +0 -422
  1508. package/_cjs/core/internal/abiParameters.js.map +0 -1
  1509. package/_cjs/core/internal/base58.js +0 -88
  1510. package/_cjs/core/internal/base58.js.map +0 -1
  1511. package/_cjs/core/internal/bytes.js +0 -88
  1512. package/_cjs/core/internal/bytes.js.map +0 -1
  1513. package/_cjs/core/internal/cursor.js +0 -210
  1514. package/_cjs/core/internal/cursor.js.map +0 -1
  1515. package/_cjs/core/internal/ens.js +0 -43
  1516. package/_cjs/core/internal/ens.js.map +0 -1
  1517. package/_cjs/core/internal/entropy.js +0 -9
  1518. package/_cjs/core/internal/entropy.js.map +0 -1
  1519. package/_cjs/core/internal/errors.js +0 -28
  1520. package/_cjs/core/internal/errors.js.map +0 -1
  1521. package/_cjs/core/internal/hdKey.js +0 -19
  1522. package/_cjs/core/internal/hdKey.js.map +0 -1
  1523. package/_cjs/core/internal/hex.js +0 -68
  1524. package/_cjs/core/internal/hex.js.map +0 -1
  1525. package/_cjs/core/internal/lru.js +0 -34
  1526. package/_cjs/core/internal/lru.js.map +0 -1
  1527. package/_cjs/core/internal/mnemonic/wordlists.js +0 -24
  1528. package/_cjs/core/internal/mnemonic/wordlists.js.map +0 -1
  1529. package/_cjs/core/internal/promise.js +0 -48
  1530. package/_cjs/core/internal/promise.js.map +0 -1
  1531. package/_cjs/core/internal/register.js +0 -3
  1532. package/_cjs/core/internal/register.js.map +0 -1
  1533. package/_cjs/core/internal/rpcSchema.js +0 -3
  1534. package/_cjs/core/internal/rpcSchema.js.map +0 -1
  1535. package/_cjs/core/internal/rpcSchemas/eth.js +0 -3
  1536. package/_cjs/core/internal/rpcSchemas/eth.js.map +0 -1
  1537. package/_cjs/core/internal/rpcSchemas/wallet.js +0 -3
  1538. package/_cjs/core/internal/rpcSchemas/wallet.js.map +0 -1
  1539. package/_cjs/core/internal/rpcTransport.js +0 -18
  1540. package/_cjs/core/internal/rpcTransport.js.map +0 -1
  1541. package/_cjs/core/internal/types.js +0 -3
  1542. package/_cjs/core/internal/types.js.map +0 -1
  1543. package/_cjs/core/internal/uid.js +0 -17
  1544. package/_cjs/core/internal/uid.js.map +0 -1
  1545. package/_cjs/core/internal/webauthn.js +0 -48
  1546. package/_cjs/core/internal/webauthn.js.map +0 -1
  1547. package/_cjs/core/version.js +0 -5
  1548. package/_cjs/core/version.js.map +0 -1
  1549. package/_cjs/erc4337/EntryPoint.js +0 -2011
  1550. package/_cjs/erc4337/EntryPoint.js.map +0 -1
  1551. package/_cjs/erc4337/RpcSchema.js +0 -3
  1552. package/_cjs/erc4337/RpcSchema.js.map +0 -1
  1553. package/_cjs/erc4337/UserOperation.js +0 -265
  1554. package/_cjs/erc4337/UserOperation.js.map +0 -1
  1555. package/_cjs/erc4337/UserOperationGas.js +0 -31
  1556. package/_cjs/erc4337/UserOperationGas.js.map +0 -1
  1557. package/_cjs/erc4337/UserOperationReceipt.js +0 -35
  1558. package/_cjs/erc4337/UserOperationReceipt.js.map +0 -1
  1559. package/_cjs/erc4337/index.js +0 -9
  1560. package/_cjs/erc4337/index.js.map +0 -1
  1561. package/_cjs/erc6492/SignatureErc6492.js +0 -101
  1562. package/_cjs/erc6492/SignatureErc6492.js.map +0 -1
  1563. package/_cjs/erc6492/index.js +0 -5
  1564. package/_cjs/erc6492/index.js.map +0 -1
  1565. package/_cjs/erc7821/Calls.js +0 -39
  1566. package/_cjs/erc7821/Calls.js.map +0 -1
  1567. package/_cjs/erc7821/Execute.js +0 -75
  1568. package/_cjs/erc7821/Execute.js.map +0 -1
  1569. package/_cjs/erc7821/index.js +0 -6
  1570. package/_cjs/erc7821/index.js.map +0 -1
  1571. package/_cjs/erc8010/SignatureErc8010.js +0 -90
  1572. package/_cjs/erc8010/SignatureErc8010.js.map +0 -1
  1573. package/_cjs/erc8010/index.js +0 -5
  1574. package/_cjs/erc8010/index.js.map +0 -1
  1575. package/_cjs/erc8021/Attribution.js +0 -170
  1576. package/_cjs/erc8021/Attribution.js.map +0 -1
  1577. package/_cjs/erc8021/index.js +0 -5
  1578. package/_cjs/erc8021/index.js.map +0 -1
  1579. package/_cjs/index.docs.js +0 -12
  1580. package/_cjs/index.docs.js.map +0 -1
  1581. package/_cjs/index.js +0 -77
  1582. package/_cjs/index.js.map +0 -1
  1583. package/_cjs/package.json +0 -1
  1584. package/_cjs/tempo/AuthorizationTempo.js +0 -106
  1585. package/_cjs/tempo/AuthorizationTempo.js.map +0 -1
  1586. package/_cjs/tempo/Channel.js +0 -71
  1587. package/_cjs/tempo/Channel.js.map +0 -1
  1588. package/_cjs/tempo/KeyAuthorization.js +0 -366
  1589. package/_cjs/tempo/KeyAuthorization.js.map +0 -1
  1590. package/_cjs/tempo/MultisigConfig.js +0 -135
  1591. package/_cjs/tempo/MultisigConfig.js.map +0 -1
  1592. package/_cjs/tempo/Period.js +0 -31
  1593. package/_cjs/tempo/Period.js.map +0 -1
  1594. package/_cjs/tempo/PoolId.js +0 -10
  1595. package/_cjs/tempo/PoolId.js.map +0 -1
  1596. package/_cjs/tempo/ReceivePolicyReceipt.js +0 -80
  1597. package/_cjs/tempo/ReceivePolicyReceipt.js.map +0 -1
  1598. package/_cjs/tempo/RpcSchemaTempo.js +0 -3
  1599. package/_cjs/tempo/RpcSchemaTempo.js.map +0 -1
  1600. package/_cjs/tempo/SignatureEnvelope.js +0 -643
  1601. package/_cjs/tempo/SignatureEnvelope.js.map +0 -1
  1602. package/_cjs/tempo/TempoAddress.js +0 -49
  1603. package/_cjs/tempo/TempoAddress.js.map +0 -1
  1604. package/_cjs/tempo/Tick.js +0 -77
  1605. package/_cjs/tempo/Tick.js.map +0 -1
  1606. package/_cjs/tempo/TokenId.js +0 -41
  1607. package/_cjs/tempo/TokenId.js.map +0 -1
  1608. package/_cjs/tempo/TokenRole.js +0 -26
  1609. package/_cjs/tempo/TokenRole.js.map +0 -1
  1610. package/_cjs/tempo/Transaction.js +0 -80
  1611. package/_cjs/tempo/Transaction.js.map +0 -1
  1612. package/_cjs/tempo/TransactionReceipt.js +0 -26
  1613. package/_cjs/tempo/TransactionReceipt.js.map +0 -1
  1614. package/_cjs/tempo/TransactionRequest.js +0 -96
  1615. package/_cjs/tempo/TransactionRequest.js.map +0 -1
  1616. package/_cjs/tempo/TxEnvelopeTempo.js +0 -315
  1617. package/_cjs/tempo/TxEnvelopeTempo.js.map +0 -1
  1618. package/_cjs/tempo/VirtualAddress.js +0 -70
  1619. package/_cjs/tempo/VirtualAddress.js.map +0 -1
  1620. package/_cjs/tempo/VirtualMaster.js +0 -278
  1621. package/_cjs/tempo/VirtualMaster.js.map +0 -1
  1622. package/_cjs/tempo/ZoneId.js +0 -13
  1623. package/_cjs/tempo/ZoneId.js.map +0 -1
  1624. package/_cjs/tempo/ZoneRpcAuthentication.js +0 -101
  1625. package/_cjs/tempo/ZoneRpcAuthentication.js.map +0 -1
  1626. package/_cjs/tempo/index.js +0 -25
  1627. package/_cjs/tempo/index.js.map +0 -1
  1628. package/_cjs/tempo/internal/mine.wasm.js +0 -6
  1629. package/_cjs/tempo/internal/mine.wasm.js.map +0 -1
  1630. package/_cjs/tempo/internal/virtualMasterPool.js +0 -187
  1631. package/_cjs/tempo/internal/virtualMasterPool.js.map +0 -1
  1632. package/_cjs/trusted-setups/Paths.js +0 -6
  1633. package/_cjs/trusted-setups/Paths.js.map +0 -1
  1634. package/_cjs/trusted-setups/index.js +0 -5
  1635. package/_cjs/trusted-setups/index.js.map +0 -1
  1636. package/_cjs/trusted-setups/internal/paths.js +0 -11
  1637. package/_cjs/trusted-setups/internal/paths.js.map +0 -1
  1638. package/_cjs/version.js +0 -5
  1639. package/_cjs/version.js.map +0 -1
  1640. package/_cjs/webauthn/Authentication.js +0 -257
  1641. package/_cjs/webauthn/Authentication.js.map +0 -1
  1642. package/_cjs/webauthn/Authenticator.js +0 -55
  1643. package/_cjs/webauthn/Authenticator.js.map +0 -1
  1644. package/_cjs/webauthn/Credential.js +0 -66
  1645. package/_cjs/webauthn/Credential.js.map +0 -1
  1646. package/_cjs/webauthn/Registration.js +0 -359
  1647. package/_cjs/webauthn/Registration.js.map +0 -1
  1648. package/_cjs/webauthn/Types.js +0 -3
  1649. package/_cjs/webauthn/Types.js.map +0 -1
  1650. package/_cjs/webauthn/index.js +0 -9
  1651. package/_cjs/webauthn/index.js.map +0 -1
  1652. package/_cjs/webauthn/internal/utils.js +0 -53
  1653. package/_cjs/webauthn/internal/utils.js.map +0 -1
  1654. package/_cjs/window/index.js +0 -3
  1655. package/_cjs/window/index.js.map +0 -1
  1656. package/_esm/core/Abi.js +0 -13
  1657. package/_esm/core/Abi.js.map +0 -1
  1658. package/_esm/core/AbiConstructor.js +0 -49
  1659. package/_esm/core/AbiConstructor.js.map +0 -1
  1660. package/_esm/core/AbiError.js +0 -315
  1661. package/_esm/core/AbiError.js.map +0 -1
  1662. package/_esm/core/AbiEvent.js +0 -852
  1663. package/_esm/core/AbiEvent.js.map +0 -1
  1664. package/_esm/core/AbiFunction.js +0 -332
  1665. package/_esm/core/AbiFunction.js.map +0 -1
  1666. package/_esm/core/AbiItem.js +0 -492
  1667. package/_esm/core/AbiItem.js.map +0 -1
  1668. package/_esm/core/AbiParameters.js +0 -532
  1669. package/_esm/core/AbiParameters.js.map +0 -1
  1670. package/_esm/core/AccessList.js +0 -105
  1671. package/_esm/core/AccessList.js.map +0 -1
  1672. package/_esm/core/AccountProof.js +0 -2
  1673. package/_esm/core/AccountProof.js.map +0 -1
  1674. package/_esm/core/Address.js +0 -255
  1675. package/_esm/core/Address.js.map +0 -1
  1676. package/_esm/core/AesGcm.js +0 -112
  1677. package/_esm/core/AesGcm.js.map +0 -1
  1678. package/_esm/core/Authorization.js +0 -416
  1679. package/_esm/core/Authorization.js.map +0 -1
  1680. package/_esm/core/Base32.js +0 -119
  1681. package/_esm/core/Base32.js.map +0 -1
  1682. package/_esm/core/Base58.js +0 -124
  1683. package/_esm/core/Base58.js.map +0 -1
  1684. package/_esm/core/Base64.js +0 -218
  1685. package/_esm/core/Base64.js.map +0 -1
  1686. package/_esm/core/Bech32m.js +0 -238
  1687. package/_esm/core/Bech32m.js.map +0 -1
  1688. package/_esm/core/BinaryStateTree.js +0 -196
  1689. package/_esm/core/BinaryStateTree.js.map +0 -1
  1690. package/_esm/core/Blobs.js +0 -596
  1691. package/_esm/core/Blobs.js.map +0 -1
  1692. package/_esm/core/Block.js +0 -171
  1693. package/_esm/core/Block.js.map +0 -1
  1694. package/_esm/core/BlockOverrides.js +0 -117
  1695. package/_esm/core/BlockOverrides.js.map +0 -1
  1696. package/_esm/core/Bloom.js +0 -52
  1697. package/_esm/core/Bloom.js.map +0 -1
  1698. package/_esm/core/Bls.js +0 -242
  1699. package/_esm/core/Bls.js.map +0 -1
  1700. package/_esm/core/BlsPoint.js +0 -51
  1701. package/_esm/core/BlsPoint.js.map +0 -1
  1702. package/_esm/core/Bytes.js +0 -666
  1703. package/_esm/core/Bytes.js.map +0 -1
  1704. package/_esm/core/Caches.js +0 -19
  1705. package/_esm/core/Caches.js.map +0 -1
  1706. package/_esm/core/Cbor.js +0 -830
  1707. package/_esm/core/Cbor.js.map +0 -1
  1708. package/_esm/core/CompactSize.js +0 -150
  1709. package/_esm/core/CompactSize.js.map +0 -1
  1710. package/_esm/core/ContractAddress.js +0 -101
  1711. package/_esm/core/ContractAddress.js.map +0 -1
  1712. package/_esm/core/CoseKey.js +0 -74
  1713. package/_esm/core/CoseKey.js.map +0 -1
  1714. package/_esm/core/Ed25519.js +0 -173
  1715. package/_esm/core/Ed25519.js.map +0 -1
  1716. package/_esm/core/Ens.js +0 -75
  1717. package/_esm/core/Ens.js.map +0 -1
  1718. package/_esm/core/Errors.js +0 -145
  1719. package/_esm/core/Errors.js.map +0 -1
  1720. package/_esm/core/Fee.js +0 -2
  1721. package/_esm/core/Fee.js.map +0 -1
  1722. package/_esm/core/Filter.js +0 -94
  1723. package/_esm/core/Filter.js.map +0 -1
  1724. package/_esm/core/Hash.js +0 -154
  1725. package/_esm/core/Hash.js.map +0 -1
  1726. package/_esm/core/HdKey.js +0 -96
  1727. package/_esm/core/HdKey.js.map +0 -1
  1728. package/_esm/core/Hex.js +0 -716
  1729. package/_esm/core/Hex.js.map +0 -1
  1730. package/_esm/core/Json.js +0 -108
  1731. package/_esm/core/Json.js.map +0 -1
  1732. package/_esm/core/Keystore.js +0 -343
  1733. package/_esm/core/Keystore.js.map +0 -1
  1734. package/_esm/core/Kzg.js +0 -28
  1735. package/_esm/core/Kzg.js.map +0 -1
  1736. package/_esm/core/Log.js +0 -175
  1737. package/_esm/core/Log.js.map +0 -1
  1738. package/_esm/core/Mnemonic.js +0 -139
  1739. package/_esm/core/Mnemonic.js.map +0 -1
  1740. package/_esm/core/P256.js +0 -183
  1741. package/_esm/core/P256.js.map +0 -1
  1742. package/_esm/core/PersonalMessage.js +0 -42
  1743. package/_esm/core/PersonalMessage.js.map +0 -1
  1744. package/_esm/core/Provider.js +0 -482
  1745. package/_esm/core/Provider.js.map +0 -1
  1746. package/_esm/core/PublicKey.js +0 -377
  1747. package/_esm/core/PublicKey.js.map +0 -1
  1748. package/_esm/core/Rlp.js +0 -249
  1749. package/_esm/core/Rlp.js.map +0 -1
  1750. package/_esm/core/RpcRequest.js +0 -125
  1751. package/_esm/core/RpcRequest.js.map +0 -1
  1752. package/_esm/core/RpcResponse.js +0 -547
  1753. package/_esm/core/RpcResponse.js.map +0 -1
  1754. package/_esm/core/RpcSchema.js +0 -46
  1755. package/_esm/core/RpcSchema.js.map +0 -1
  1756. package/_esm/core/RpcTransport.js +0 -107
  1757. package/_esm/core/RpcTransport.js.map +0 -1
  1758. package/_esm/core/Secp256k1.js +0 -218
  1759. package/_esm/core/Secp256k1.js.map +0 -1
  1760. package/_esm/core/Signature.js +0 -647
  1761. package/_esm/core/Signature.js.map +0 -1
  1762. package/_esm/core/Siwe.js +0 -371
  1763. package/_esm/core/Siwe.js.map +0 -1
  1764. package/_esm/core/Solidity.js +0 -104
  1765. package/_esm/core/Solidity.js.map +0 -1
  1766. package/_esm/core/StateOverrides.js +0 -78
  1767. package/_esm/core/StateOverrides.js.map +0 -1
  1768. package/_esm/core/Transaction.js +0 -180
  1769. package/_esm/core/Transaction.js.map +0 -1
  1770. package/_esm/core/TransactionReceipt.js +0 -223
  1771. package/_esm/core/TransactionReceipt.js.map +0 -1
  1772. package/_esm/core/TransactionRequest.js +0 -129
  1773. package/_esm/core/TransactionRequest.js.map +0 -1
  1774. package/_esm/core/TxEnvelope.js +0 -139
  1775. package/_esm/core/TxEnvelope.js.map +0 -1
  1776. package/_esm/core/TxEnvelopeEip1559.js +0 -433
  1777. package/_esm/core/TxEnvelopeEip1559.js.map +0 -1
  1778. package/_esm/core/TxEnvelopeEip2930.js +0 -416
  1779. package/_esm/core/TxEnvelopeEip2930.js.map +0 -1
  1780. package/_esm/core/TxEnvelopeEip4844.js +0 -518
  1781. package/_esm/core/TxEnvelopeEip4844.js.map +0 -1
  1782. package/_esm/core/TxEnvelopeEip7702.js +0 -421
  1783. package/_esm/core/TxEnvelopeEip7702.js.map +0 -1
  1784. package/_esm/core/TxEnvelopeLegacy.js +0 -471
  1785. package/_esm/core/TxEnvelopeLegacy.js.map +0 -1
  1786. package/_esm/core/TypedData.js +0 -627
  1787. package/_esm/core/TypedData.js.map +0 -1
  1788. package/_esm/core/ValidatorData.js +0 -48
  1789. package/_esm/core/ValidatorData.js.map +0 -1
  1790. package/_esm/core/Value.js +0 -184
  1791. package/_esm/core/Value.js.map +0 -1
  1792. package/_esm/core/WebAuthnP256.js +0 -282
  1793. package/_esm/core/WebAuthnP256.js.map +0 -1
  1794. package/_esm/core/WebCryptoP256.js +0 -182
  1795. package/_esm/core/WebCryptoP256.js.map +0 -1
  1796. package/_esm/core/Withdrawal.js +0 -66
  1797. package/_esm/core/Withdrawal.js.map +0 -1
  1798. package/_esm/core/X25519.js +0 -97
  1799. package/_esm/core/X25519.js.map +0 -1
  1800. package/_esm/core/internal/abi.js.map +0 -1
  1801. package/_esm/core/internal/abiConstructor.js.map +0 -1
  1802. package/_esm/core/internal/abiError.js.map +0 -1
  1803. package/_esm/core/internal/abiEvent.js.map +0 -1
  1804. package/_esm/core/internal/abiFunction.js.map +0 -1
  1805. package/_esm/core/internal/abiItem.js +0 -122
  1806. package/_esm/core/internal/abiItem.js.map +0 -1
  1807. package/_esm/core/internal/abiParameters.js +0 -465
  1808. package/_esm/core/internal/abiParameters.js.map +0 -1
  1809. package/_esm/core/internal/base58.js +0 -88
  1810. package/_esm/core/internal/base58.js.map +0 -1
  1811. package/_esm/core/internal/bytes.js +0 -86
  1812. package/_esm/core/internal/bytes.js.map +0 -1
  1813. package/_esm/core/internal/cursor.js +0 -207
  1814. package/_esm/core/internal/cursor.js.map +0 -1
  1815. package/_esm/core/internal/ens.js +0 -47
  1816. package/_esm/core/internal/ens.js.map +0 -1
  1817. package/_esm/core/internal/entropy.js.map +0 -1
  1818. package/_esm/core/internal/errors.js.map +0 -1
  1819. package/_esm/core/internal/hdKey.js.map +0 -1
  1820. package/_esm/core/internal/hex.js +0 -66
  1821. package/_esm/core/internal/hex.js.map +0 -1
  1822. package/_esm/core/internal/lru.js +0 -36
  1823. package/_esm/core/internal/lru.js.map +0 -1
  1824. package/_esm/core/internal/mnemonic/wordlists.js +0 -11
  1825. package/_esm/core/internal/mnemonic/wordlists.js.map +0 -1
  1826. package/_esm/core/internal/promise.js +0 -49
  1827. package/_esm/core/internal/promise.js.map +0 -1
  1828. package/_esm/core/internal/register.js.map +0 -1
  1829. package/_esm/core/internal/rpcSchema.js.map +0 -1
  1830. package/_esm/core/internal/rpcSchemas/eth.js.map +0 -1
  1831. package/_esm/core/internal/rpcSchemas/wallet.js.map +0 -1
  1832. package/_esm/core/internal/rpcTransport.js +0 -16
  1833. package/_esm/core/internal/rpcTransport.js.map +0 -1
  1834. package/_esm/core/internal/types.js.map +0 -1
  1835. package/_esm/core/internal/uid.js +0 -15
  1836. package/_esm/core/internal/uid.js.map +0 -1
  1837. package/_esm/core/internal/webauthn.js +0 -62
  1838. package/_esm/core/internal/webauthn.js.map +0 -1
  1839. package/_esm/core/version.js.map +0 -1
  1840. package/_esm/erc4337/EntryPoint.js.map +0 -1
  1841. package/_esm/erc4337/RpcSchema.js.map +0 -1
  1842. package/_esm/erc4337/UserOperation.js +0 -547
  1843. package/_esm/erc4337/UserOperation.js.map +0 -1
  1844. package/_esm/erc4337/UserOperationGas.js +0 -61
  1845. package/_esm/erc4337/UserOperationGas.js.map +0 -1
  1846. package/_esm/erc4337/UserOperationReceipt.js.map +0 -1
  1847. package/_esm/erc4337/index.js +0 -31
  1848. package/_esm/erc4337/index.js.map +0 -1
  1849. package/_esm/erc6492/SignatureErc6492.js +0 -197
  1850. package/_esm/erc6492/SignatureErc6492.js.map +0 -1
  1851. package/_esm/erc6492/index.js +0 -25
  1852. package/_esm/erc6492/index.js.map +0 -1
  1853. package/_esm/erc7821/Calls.js +0 -101
  1854. package/_esm/erc7821/Calls.js.map +0 -1
  1855. package/_esm/erc7821/Execute.js +0 -151
  1856. package/_esm/erc7821/Execute.js.map +0 -1
  1857. package/_esm/erc7821/index.js +0 -69
  1858. package/_esm/erc7821/index.js.map +0 -1
  1859. package/_esm/erc8010/SignatureErc8010.js +0 -180
  1860. package/_esm/erc8010/SignatureErc8010.js.map +0 -1
  1861. package/_esm/erc8010/index.js +0 -40
  1862. package/_esm/erc8010/index.js.map +0 -1
  1863. package/_esm/erc8021/Attribution.js +0 -327
  1864. package/_esm/erc8021/Attribution.js.map +0 -1
  1865. package/_esm/erc8021/index.js +0 -40
  1866. package/_esm/erc8021/index.js.map +0 -1
  1867. package/_esm/index.docs.js +0 -12
  1868. package/_esm/index.docs.js.map +0 -1
  1869. package/_esm/index.js +0 -3649
  1870. package/_esm/index.js.map +0 -1
  1871. package/_esm/package.json +0 -1
  1872. package/_esm/tempo/AuthorizationTempo.js +0 -669
  1873. package/_esm/tempo/AuthorizationTempo.js.map +0 -1
  1874. package/_esm/tempo/Channel.js +0 -158
  1875. package/_esm/tempo/Channel.js.map +0 -1
  1876. package/_esm/tempo/KeyAuthorization.js +0 -756
  1877. package/_esm/tempo/KeyAuthorization.js.map +0 -1
  1878. package/_esm/tempo/MultisigConfig.js +0 -363
  1879. package/_esm/tempo/MultisigConfig.js.map +0 -1
  1880. package/_esm/tempo/Period.js.map +0 -1
  1881. package/_esm/tempo/PoolId.js +0 -28
  1882. package/_esm/tempo/PoolId.js.map +0 -1
  1883. package/_esm/tempo/ReceivePolicyReceipt.js +0 -176
  1884. package/_esm/tempo/ReceivePolicyReceipt.js.map +0 -1
  1885. package/_esm/tempo/RpcSchemaTempo.js.map +0 -1
  1886. package/_esm/tempo/SignatureEnvelope.js +0 -1174
  1887. package/_esm/tempo/SignatureEnvelope.js.map +0 -1
  1888. package/_esm/tempo/TempoAddress.js +0 -112
  1889. package/_esm/tempo/TempoAddress.js.map +0 -1
  1890. package/_esm/tempo/Tick.js +0 -147
  1891. package/_esm/tempo/Tick.js.map +0 -1
  1892. package/_esm/tempo/TokenId.js +0 -103
  1893. package/_esm/tempo/TokenId.js.map +0 -1
  1894. package/_esm/tempo/TokenRole.js.map +0 -1
  1895. package/_esm/tempo/Transaction.js +0 -167
  1896. package/_esm/tempo/Transaction.js.map +0 -1
  1897. package/_esm/tempo/TransactionReceipt.js +0 -138
  1898. package/_esm/tempo/TransactionReceipt.js.map +0 -1
  1899. package/_esm/tempo/TransactionRequest.js +0 -161
  1900. package/_esm/tempo/TransactionRequest.js.map +0 -1
  1901. package/_esm/tempo/TxEnvelopeTempo.js +0 -693
  1902. package/_esm/tempo/TxEnvelopeTempo.js.map +0 -1
  1903. package/_esm/tempo/VirtualAddress.js +0 -154
  1904. package/_esm/tempo/VirtualAddress.js.map +0 -1
  1905. package/_esm/tempo/VirtualMaster.js +0 -483
  1906. package/_esm/tempo/VirtualMaster.js.map +0 -1
  1907. package/_esm/tempo/ZoneId.js.map +0 -1
  1908. package/_esm/tempo/ZoneRpcAuthentication.js +0 -256
  1909. package/_esm/tempo/ZoneRpcAuthentication.js.map +0 -1
  1910. package/_esm/tempo/index.js +0 -550
  1911. package/_esm/tempo/index.js.map +0 -1
  1912. package/_esm/tempo/internal/mine.wasm.js.map +0 -1
  1913. package/_esm/tempo/internal/virtualMasterPool.js.map +0 -1
  1914. package/_esm/trusted-setups/Paths.js.map +0 -1
  1915. package/_esm/trusted-setups/index.js.map +0 -1
  1916. package/_esm/trusted-setups/internal/paths.js.map +0 -1
  1917. package/_esm/version.js +0 -3
  1918. package/_esm/version.js.map +0 -1
  1919. package/_esm/webauthn/Authentication.js +0 -467
  1920. package/_esm/webauthn/Authentication.js.map +0 -1
  1921. package/_esm/webauthn/Authenticator.js +0 -176
  1922. package/_esm/webauthn/Authenticator.js.map +0 -1
  1923. package/_esm/webauthn/Credential.js +0 -114
  1924. package/_esm/webauthn/Credential.js.map +0 -1
  1925. package/_esm/webauthn/Registration.js +0 -525
  1926. package/_esm/webauthn/Registration.js.map +0 -1
  1927. package/_esm/webauthn/Types.js.map +0 -1
  1928. package/_esm/webauthn/index.js +0 -31
  1929. package/_esm/webauthn/index.js.map +0 -1
  1930. package/_esm/webauthn/internal/utils.js +0 -52
  1931. package/_esm/webauthn/internal/utils.js.map +0 -1
  1932. package/_esm/window/index.js.map +0 -1
  1933. package/_types/core/Abi.d.ts +0 -131
  1934. package/_types/core/Abi.d.ts.map +0 -1
  1935. package/_types/core/AbiConstructor.d.ts +0 -329
  1936. package/_types/core/AbiConstructor.d.ts.map +0 -1
  1937. package/_types/core/AbiError.d.ts +0 -517
  1938. package/_types/core/AbiError.d.ts.map +0 -1
  1939. package/_types/core/AbiEvent.d.ts +0 -930
  1940. package/_types/core/AbiEvent.d.ts.map +0 -1
  1941. package/_types/core/AbiFunction.d.ts +0 -669
  1942. package/_types/core/AbiFunction.d.ts.map +0 -1
  1943. package/_types/core/AbiItem.d.ts +0 -562
  1944. package/_types/core/AbiItem.d.ts.map +0 -1
  1945. package/_types/core/AbiParameters.d.ts +0 -465
  1946. package/_types/core/AbiParameters.d.ts.map +0 -1
  1947. package/_types/core/AccessList.d.ts +0 -83
  1948. package/_types/core/AccessList.d.ts.map +0 -1
  1949. package/_types/core/AccountProof.d.ts +0 -32
  1950. package/_types/core/AccountProof.d.ts.map +0 -1
  1951. package/_types/core/Address.d.ts +0 -229
  1952. package/_types/core/Address.d.ts.map +0 -1
  1953. package/_types/core/AesGcm.d.ts.map +0 -1
  1954. package/_types/core/Authorization.d.ts +0 -432
  1955. package/_types/core/Authorization.d.ts.map +0 -1
  1956. package/_types/core/Base32.d.ts +0 -79
  1957. package/_types/core/Base32.d.ts.map +0 -1
  1958. package/_types/core/Base58.d.ts +0 -113
  1959. package/_types/core/Base58.d.ts.map +0 -1
  1960. package/_types/core/Base64.d.ts +0 -226
  1961. package/_types/core/Base64.d.ts.map +0 -1
  1962. package/_types/core/Bech32m.d.ts +0 -93
  1963. package/_types/core/Bech32m.d.ts.map +0 -1
  1964. package/_types/core/BinaryStateTree.d.ts +0 -82
  1965. package/_types/core/BinaryStateTree.d.ts.map +0 -1
  1966. package/_types/core/Blobs.d.ts +0 -523
  1967. package/_types/core/Blobs.d.ts.map +0 -1
  1968. package/_types/core/Block.d.ts +0 -195
  1969. package/_types/core/Block.d.ts.map +0 -1
  1970. package/_types/core/BlockOverrides.d.ts +0 -89
  1971. package/_types/core/BlockOverrides.d.ts.map +0 -1
  1972. package/_types/core/Bloom.d.ts +0 -48
  1973. package/_types/core/Bloom.d.ts.map +0 -1
  1974. package/_types/core/Bls.d.ts +0 -480
  1975. package/_types/core/Bls.d.ts.map +0 -1
  1976. package/_types/core/BlsPoint.d.ts +0 -175
  1977. package/_types/core/BlsPoint.d.ts.map +0 -1
  1978. package/_types/core/Bytes.d.ts +0 -608
  1979. package/_types/core/Bytes.d.ts.map +0 -1
  1980. package/_types/core/Caches.d.ts +0 -13
  1981. package/_types/core/Caches.d.ts.map +0 -1
  1982. package/_types/core/Cbor.d.ts.map +0 -1
  1983. package/_types/core/CompactSize.d.ts +0 -107
  1984. package/_types/core/CompactSize.d.ts.map +0 -1
  1985. package/_types/core/ContractAddress.d.ts +0 -106
  1986. package/_types/core/ContractAddress.d.ts.map +0 -1
  1987. package/_types/core/CoseKey.d.ts +0 -56
  1988. package/_types/core/CoseKey.d.ts.map +0 -1
  1989. package/_types/core/Ed25519.d.ts +0 -220
  1990. package/_types/core/Ed25519.d.ts.map +0 -1
  1991. package/_types/core/Ens.d.ts +0 -63
  1992. package/_types/core/Ens.d.ts.map +0 -1
  1993. package/_types/core/Errors.d.ts.map +0 -1
  1994. package/_types/core/Fee.d.ts +0 -41
  1995. package/_types/core/Fee.d.ts.map +0 -1
  1996. package/_types/core/Filter.d.ts +0 -94
  1997. package/_types/core/Filter.d.ts.map +0 -1
  1998. package/_types/core/Hash.d.ts +0 -160
  1999. package/_types/core/Hash.d.ts.map +0 -1
  2000. package/_types/core/HdKey.d.ts +0 -134
  2001. package/_types/core/HdKey.d.ts.map +0 -1
  2002. package/_types/core/Hex.d.ts +0 -648
  2003. package/_types/core/Hex.d.ts.map +0 -1
  2004. package/_types/core/Json.d.ts +0 -78
  2005. package/_types/core/Json.d.ts.map +0 -1
  2006. package/_types/core/Keystore.d.ts +0 -322
  2007. package/_types/core/Keystore.d.ts.map +0 -1
  2008. package/_types/core/Kzg.d.ts +0 -39
  2009. package/_types/core/Kzg.d.ts.map +0 -1
  2010. package/_types/core/Log.d.ts +0 -188
  2011. package/_types/core/Log.d.ts.map +0 -1
  2012. package/_types/core/Mnemonic.d.ts +0 -161
  2013. package/_types/core/Mnemonic.d.ts.map +0 -1
  2014. package/_types/core/P256.d.ts +0 -225
  2015. package/_types/core/P256.d.ts.map +0 -1
  2016. package/_types/core/PersonalMessage.d.ts +0 -43
  2017. package/_types/core/PersonalMessage.d.ts.map +0 -1
  2018. package/_types/core/Provider.d.ts +0 -399
  2019. package/_types/core/Provider.d.ts.map +0 -1
  2020. package/_types/core/PublicKey.d.ts +0 -309
  2021. package/_types/core/PublicKey.d.ts.map +0 -1
  2022. package/_types/core/Rlp.d.ts +0 -136
  2023. package/_types/core/Rlp.d.ts.map +0 -1
  2024. package/_types/core/RpcRequest.d.ts +0 -140
  2025. package/_types/core/RpcRequest.d.ts.map +0 -1
  2026. package/_types/core/RpcResponse.d.ts +0 -304
  2027. package/_types/core/RpcResponse.d.ts.map +0 -1
  2028. package/_types/core/RpcSchema.d.ts +0 -310
  2029. package/_types/core/RpcSchema.d.ts.map +0 -1
  2030. package/_types/core/RpcTransport.d.ts +0 -62
  2031. package/_types/core/RpcTransport.d.ts.map +0 -1
  2032. package/_types/core/Secp256k1.d.ts +0 -279
  2033. package/_types/core/Secp256k1.d.ts.map +0 -1
  2034. package/_types/core/Signature.d.ts +0 -550
  2035. package/_types/core/Signature.d.ts.map +0 -1
  2036. package/_types/core/Siwe.d.ts +0 -246
  2037. package/_types/core/Siwe.d.ts.map +0 -1
  2038. package/_types/core/Solidity.d.ts +0 -100
  2039. package/_types/core/Solidity.d.ts.map +0 -1
  2040. package/_types/core/StateOverrides.d.ts +0 -79
  2041. package/_types/core/StateOverrides.d.ts.map +0 -1
  2042. package/_types/core/Transaction.d.ts +0 -230
  2043. package/_types/core/Transaction.d.ts.map +0 -1
  2044. package/_types/core/TransactionReceipt.d.ts +0 -265
  2045. package/_types/core/TransactionReceipt.d.ts.map +0 -1
  2046. package/_types/core/TransactionRequest.d.ts +0 -109
  2047. package/_types/core/TransactionRequest.d.ts.map +0 -1
  2048. package/_types/core/TxEnvelope.d.ts +0 -141
  2049. package/_types/core/TxEnvelope.d.ts.map +0 -1
  2050. package/_types/core/TxEnvelopeEip1559.d.ts +0 -343
  2051. package/_types/core/TxEnvelopeEip1559.d.ts.map +0 -1
  2052. package/_types/core/TxEnvelopeEip2930.d.ts +0 -340
  2053. package/_types/core/TxEnvelopeEip2930.d.ts.map +0 -1
  2054. package/_types/core/TxEnvelopeEip4844.d.ts +0 -395
  2055. package/_types/core/TxEnvelopeEip4844.d.ts.map +0 -1
  2056. package/_types/core/TxEnvelopeEip7702.d.ts +0 -354
  2057. package/_types/core/TxEnvelopeEip7702.d.ts.map +0 -1
  2058. package/_types/core/TxEnvelopeLegacy.d.ts +0 -334
  2059. package/_types/core/TxEnvelopeLegacy.d.ts.map +0 -1
  2060. package/_types/core/TypedData.d.ts +0 -473
  2061. package/_types/core/TypedData.d.ts.map +0 -1
  2062. package/_types/core/ValidatorData.d.ts +0 -58
  2063. package/_types/core/ValidatorData.d.ts.map +0 -1
  2064. package/_types/core/Value.d.ts +0 -141
  2065. package/_types/core/Value.d.ts.map +0 -1
  2066. package/_types/core/WebAuthnP256.d.ts +0 -320
  2067. package/_types/core/WebAuthnP256.d.ts.map +0 -1
  2068. package/_types/core/WebCryptoP256.d.ts +0 -187
  2069. package/_types/core/WebCryptoP256.d.ts.map +0 -1
  2070. package/_types/core/Withdrawal.d.ts +0 -68
  2071. package/_types/core/Withdrawal.d.ts.map +0 -1
  2072. package/_types/core/X25519.d.ts +0 -127
  2073. package/_types/core/X25519.d.ts.map +0 -1
  2074. package/_types/core/internal/abi.d.ts.map +0 -1
  2075. package/_types/core/internal/abiConstructor.d.ts.map +0 -1
  2076. package/_types/core/internal/abiError.d.ts.map +0 -1
  2077. package/_types/core/internal/abiEvent.d.ts.map +0 -1
  2078. package/_types/core/internal/abiFunction.d.ts.map +0 -1
  2079. package/_types/core/internal/abiItem.d.ts.map +0 -1
  2080. package/_types/core/internal/abiParameters.d.ts.map +0 -1
  2081. package/_types/core/internal/base58.d.ts.map +0 -1
  2082. package/_types/core/internal/bytes.d.ts +0 -52
  2083. package/_types/core/internal/bytes.d.ts.map +0 -1
  2084. package/_types/core/internal/cursor.d.ts +0 -70
  2085. package/_types/core/internal/cursor.d.ts.map +0 -1
  2086. package/_types/core/internal/ens.d.ts +0 -23
  2087. package/_types/core/internal/ens.d.ts.map +0 -1
  2088. package/_types/core/internal/entropy.d.ts.map +0 -1
  2089. package/_types/core/internal/errors.d.ts.map +0 -1
  2090. package/_types/core/internal/hdKey.d.ts.map +0 -1
  2091. package/_types/core/internal/hex.d.ts +0 -39
  2092. package/_types/core/internal/hex.d.ts.map +0 -1
  2093. package/_types/core/internal/lru.d.ts +0 -13
  2094. package/_types/core/internal/lru.d.ts.map +0 -1
  2095. package/_types/core/internal/mnemonic/wordlists.d.ts +0 -11
  2096. package/_types/core/internal/mnemonic/wordlists.d.ts.map +0 -1
  2097. package/_types/core/internal/promise.d.ts.map +0 -1
  2098. package/_types/core/internal/register.d.ts.map +0 -1
  2099. package/_types/core/internal/rpcSchema.d.ts.map +0 -1
  2100. package/_types/core/internal/rpcSchemas/eth.d.ts +0 -766
  2101. package/_types/core/internal/rpcSchemas/eth.d.ts.map +0 -1
  2102. package/_types/core/internal/rpcSchemas/wallet.d.ts +0 -452
  2103. package/_types/core/internal/rpcSchemas/wallet.d.ts.map +0 -1
  2104. package/_types/core/internal/rpcTransport.d.ts +0 -35
  2105. package/_types/core/internal/rpcTransport.d.ts.map +0 -1
  2106. package/_types/core/internal/types.d.ts +0 -284
  2107. package/_types/core/internal/types.d.ts.map +0 -1
  2108. package/_types/core/internal/uid.d.ts +0 -3
  2109. package/_types/core/internal/uid.d.ts.map +0 -1
  2110. package/_types/core/internal/webauthn.d.ts +0 -26
  2111. package/_types/core/internal/webauthn.d.ts.map +0 -1
  2112. package/_types/core/version.d.ts.map +0 -1
  2113. package/_types/erc4337/EntryPoint.d.ts.map +0 -1
  2114. package/_types/erc4337/RpcSchema.d.ts +0 -159
  2115. package/_types/erc4337/RpcSchema.d.ts.map +0 -1
  2116. package/_types/erc4337/UserOperation.d.ts +0 -524
  2117. package/_types/erc4337/UserOperation.d.ts.map +0 -1
  2118. package/_types/erc4337/UserOperationGas.d.ts +0 -62
  2119. package/_types/erc4337/UserOperationGas.d.ts.map +0 -1
  2120. package/_types/erc4337/UserOperationReceipt.d.ts.map +0 -1
  2121. package/_types/erc4337/index.d.ts +0 -33
  2122. package/_types/erc4337/index.d.ts.map +0 -1
  2123. package/_types/erc6492/SignatureErc6492.d.ts +0 -180
  2124. package/_types/erc6492/SignatureErc6492.d.ts.map +0 -1
  2125. package/_types/erc6492/index.d.ts +0 -27
  2126. package/_types/erc6492/index.d.ts.map +0 -1
  2127. package/_types/erc7821/Calls.d.ts +0 -102
  2128. package/_types/erc7821/Calls.d.ts.map +0 -1
  2129. package/_types/erc7821/Execute.d.ts +0 -126
  2130. package/_types/erc7821/Execute.d.ts.map +0 -1
  2131. package/_types/erc7821/index.d.ts +0 -71
  2132. package/_types/erc7821/index.d.ts.map +0 -1
  2133. package/_types/erc8010/SignatureErc8010.d.ts +0 -170
  2134. package/_types/erc8010/SignatureErc8010.d.ts.map +0 -1
  2135. package/_types/erc8010/index.d.ts +0 -42
  2136. package/_types/erc8010/index.d.ts.map +0 -1
  2137. package/_types/erc8021/Attribution.d.ts +0 -227
  2138. package/_types/erc8021/Attribution.d.ts.map +0 -1
  2139. package/_types/erc8021/index.d.ts +0 -42
  2140. package/_types/erc8021/index.d.ts.map +0 -1
  2141. package/_types/index.d.ts +0 -3652
  2142. package/_types/index.d.ts.map +0 -1
  2143. package/_types/index.docs.d.ts +0 -10
  2144. package/_types/index.docs.d.ts.map +0 -1
  2145. package/_types/tempo/AuthorizationTempo.d.ts +0 -688
  2146. package/_types/tempo/AuthorizationTempo.d.ts.map +0 -1
  2147. package/_types/tempo/Channel.d.ts +0 -175
  2148. package/_types/tempo/Channel.d.ts.map +0 -1
  2149. package/_types/tempo/KeyAuthorization.d.ts +0 -636
  2150. package/_types/tempo/KeyAuthorization.d.ts.map +0 -1
  2151. package/_types/tempo/MultisigConfig.d.ts +0 -326
  2152. package/_types/tempo/MultisigConfig.d.ts.map +0 -1
  2153. package/_types/tempo/Period.d.ts.map +0 -1
  2154. package/_types/tempo/PoolId.d.ts +0 -34
  2155. package/_types/tempo/PoolId.d.ts.map +0 -1
  2156. package/_types/tempo/ReceivePolicyReceipt.d.ts +0 -168
  2157. package/_types/tempo/ReceivePolicyReceipt.d.ts.map +0 -1
  2158. package/_types/tempo/RpcSchemaTempo.d.ts +0 -51
  2159. package/_types/tempo/RpcSchemaTempo.d.ts.map +0 -1
  2160. package/_types/tempo/SignatureEnvelope.d.ts +0 -833
  2161. package/_types/tempo/SignatureEnvelope.d.ts.map +0 -1
  2162. package/_types/tempo/TempoAddress.d.ts +0 -103
  2163. package/_types/tempo/TempoAddress.d.ts.map +0 -1
  2164. package/_types/tempo/Tick.d.ts.map +0 -1
  2165. package/_types/tempo/TokenId.d.ts +0 -86
  2166. package/_types/tempo/TokenId.d.ts.map +0 -1
  2167. package/_types/tempo/TokenRole.d.ts.map +0 -1
  2168. package/_types/tempo/Transaction.d.ts +0 -208
  2169. package/_types/tempo/Transaction.d.ts.map +0 -1
  2170. package/_types/tempo/TransactionReceipt.d.ts +0 -165
  2171. package/_types/tempo/TransactionReceipt.d.ts.map +0 -1
  2172. package/_types/tempo/TransactionRequest.d.ts +0 -116
  2173. package/_types/tempo/TransactionRequest.d.ts.map +0 -1
  2174. package/_types/tempo/TxEnvelopeTempo.d.ts +0 -593
  2175. package/_types/tempo/TxEnvelopeTempo.d.ts.map +0 -1
  2176. package/_types/tempo/VirtualAddress.d.ts +0 -129
  2177. package/_types/tempo/VirtualAddress.d.ts.map +0 -1
  2178. package/_types/tempo/VirtualMaster.d.ts +0 -237
  2179. package/_types/tempo/VirtualMaster.d.ts.map +0 -1
  2180. package/_types/tempo/ZoneId.d.ts.map +0 -1
  2181. package/_types/tempo/ZoneRpcAuthentication.d.ts +0 -268
  2182. package/_types/tempo/ZoneRpcAuthentication.d.ts.map +0 -1
  2183. package/_types/tempo/index.d.ts +0 -552
  2184. package/_types/tempo/index.d.ts.map +0 -1
  2185. package/_types/tempo/internal/mine.wasm.d.ts.map +0 -1
  2186. package/_types/tempo/internal/virtualMasterPool.d.ts.map +0 -1
  2187. package/_types/trusted-setups/Paths.d.ts.map +0 -1
  2188. package/_types/trusted-setups/index.d.ts.map +0 -1
  2189. package/_types/trusted-setups/internal/paths.d.ts.map +0 -1
  2190. package/_types/version.d.ts +0 -3
  2191. package/_types/version.d.ts.map +0 -1
  2192. package/_types/webauthn/Authentication.d.ts +0 -324
  2193. package/_types/webauthn/Authentication.d.ts.map +0 -1
  2194. package/_types/webauthn/Authenticator.d.ts +0 -182
  2195. package/_types/webauthn/Authenticator.d.ts.map +0 -1
  2196. package/_types/webauthn/Credential.d.ts +0 -77
  2197. package/_types/webauthn/Credential.d.ts.map +0 -1
  2198. package/_types/webauthn/Registration.d.ts +0 -308
  2199. package/_types/webauthn/Registration.d.ts.map +0 -1
  2200. package/_types/webauthn/Types.d.ts.map +0 -1
  2201. package/_types/webauthn/index.d.ts +0 -33
  2202. package/_types/webauthn/index.d.ts.map +0 -1
  2203. package/_types/webauthn/internal/utils.d.ts +0 -17
  2204. package/_types/webauthn/internal/utils.d.ts.map +0 -1
  2205. package/_types/window/index.d.ts.map +0 -1
  2206. package/core/Abi.ts +0 -155
  2207. package/core/AbiConstructor.ts +0 -477
  2208. package/core/AbiError.ts +0 -794
  2209. package/core/AbiEvent.ts +0 -1402
  2210. package/core/AbiFunction.ts +0 -1055
  2211. package/core/AbiItem.ts +0 -841
  2212. package/core/AbiParameters.ts +0 -716
  2213. package/core/AccessList.ts +0 -124
  2214. package/core/AccountProof.ts +0 -35
  2215. package/core/Address.ts +0 -341
  2216. package/core/AesGcm.ts +0 -204
  2217. package/core/Authorization.ts +0 -619
  2218. package/core/Base32.ts +0 -134
  2219. package/core/Base58.ts +0 -156
  2220. package/core/Base64.ts +0 -309
  2221. package/core/Bech32m.ts +0 -263
  2222. package/core/BinaryStateTree.ts +0 -271
  2223. package/core/Blobs.ts +0 -943
  2224. package/core/Block.ts +0 -324
  2225. package/core/BlockOverrides.ts +0 -146
  2226. package/core/Bloom.ts +0 -73
  2227. package/core/Bls.ts +0 -635
  2228. package/core/BlsPoint.ts +0 -220
  2229. package/core/Bytes.ts +0 -886
  2230. package/core/Caches.ts +0 -21
  2231. package/core/Cbor.ts +0 -976
  2232. package/core/CompactSize.ts +0 -169
  2233. package/core/ContractAddress.ts +0 -169
  2234. package/core/CoseKey.ts +0 -93
  2235. package/core/Ed25519.ts +0 -339
  2236. package/core/Ens.ts +0 -104
  2237. package/core/Errors.ts +0 -143
  2238. package/core/Fee.ts +0 -57
  2239. package/core/Filter.ts +0 -136
  2240. package/core/Hash.ts +0 -259
  2241. package/core/HdKey.ts +0 -160
  2242. package/core/Hex.ts +0 -970
  2243. package/core/Json.ts +0 -133
  2244. package/core/Keystore.ts +0 -546
  2245. package/core/Kzg.ts +0 -48
  2246. package/core/Log.ts +0 -240
  2247. package/core/Mnemonic.ts +0 -229
  2248. package/core/P256.ts +0 -356
  2249. package/core/PersonalMessage.ts +0 -63
  2250. package/core/Provider.ts +0 -685
  2251. package/core/PublicKey.ts +0 -521
  2252. package/core/Rlp.ts +0 -367
  2253. package/core/RpcRequest.ts +0 -198
  2254. package/core/RpcResponse.ts +0 -626
  2255. package/core/RpcSchema.ts +0 -356
  2256. package/core/RpcTransport.ts +0 -194
  2257. package/core/Secp256k1.ts +0 -425
  2258. package/core/Signature.ts +0 -843
  2259. package/core/Siwe.ts +0 -511
  2260. package/core/Solidity.ts +0 -109
  2261. package/core/StateOverrides.ts +0 -131
  2262. package/core/Transaction.ts +0 -431
  2263. package/core/TransactionReceipt.ts +0 -333
  2264. package/core/TransactionRequest.ts +0 -208
  2265. package/core/TxEnvelope.ts +0 -205
  2266. package/core/TxEnvelopeEip1559.ts +0 -618
  2267. package/core/TxEnvelopeEip2930.ts +0 -583
  2268. package/core/TxEnvelopeEip4844.ts +0 -724
  2269. package/core/TxEnvelopeEip7702.ts +0 -604
  2270. package/core/TxEnvelopeLegacy.ts +0 -634
  2271. package/core/TypedData.ts +0 -911
  2272. package/core/ValidatorData.ts +0 -80
  2273. package/core/Value.ts +0 -224
  2274. package/core/WebAuthnP256.ts +0 -384
  2275. package/core/WebCryptoP256.ts +0 -323
  2276. package/core/Withdrawal.ts +0 -87
  2277. package/core/X25519.ts +0 -202
  2278. package/core/internal/abiConstructor.ts +0 -32
  2279. package/core/internal/abiError.ts +0 -30
  2280. package/core/internal/abiEvent.ts +0 -154
  2281. package/core/internal/abiFunction.ts +0 -32
  2282. package/core/internal/abiItem.ts +0 -593
  2283. package/core/internal/abiParameters.ts +0 -811
  2284. package/core/internal/base58.ts +0 -103
  2285. package/core/internal/bytes.ts +0 -152
  2286. package/core/internal/cursor.ts +0 -252
  2287. package/core/internal/ens.ts +0 -64
  2288. package/core/internal/hex.ts +0 -124
  2289. package/core/internal/lru.ts +0 -34
  2290. package/core/internal/mnemonic/wordlists.ts +0 -10
  2291. package/core/internal/promise.ts +0 -65
  2292. package/core/internal/rpcSchemas/eth.ts +0 -820
  2293. package/core/internal/rpcSchemas/wallet.ts +0 -471
  2294. package/core/internal/rpcTransport.ts +0 -69
  2295. package/core/internal/types.ts +0 -414
  2296. package/core/internal/webauthn.ts +0 -83
  2297. package/erc4337/EntryPoint/package.json +0 -6
  2298. package/erc4337/RpcSchema/package.json +0 -6
  2299. package/erc4337/RpcSchema.ts +0 -179
  2300. package/erc4337/UserOperation/package.json +0 -6
  2301. package/erc4337/UserOperation.ts +0 -943
  2302. package/erc4337/UserOperationGas/package.json +0 -6
  2303. package/erc4337/UserOperationGas.ts +0 -109
  2304. package/erc4337/UserOperationReceipt/package.json +0 -6
  2305. package/erc4337/index.ts +0 -38
  2306. package/erc4337/package.json +0 -6
  2307. package/erc6492/SignatureErc6492/package.json +0 -6
  2308. package/erc6492/SignatureErc6492.ts +0 -263
  2309. package/erc6492/index.ts +0 -28
  2310. package/erc6492/package.json +0 -6
  2311. package/erc7821/Calls/package.json +0 -6
  2312. package/erc7821/Calls.ts +0 -148
  2313. package/erc7821/Execute/package.json +0 -6
  2314. package/erc7821/Execute.ts +0 -197
  2315. package/erc7821/index.ts +0 -73
  2316. package/erc7821/package.json +0 -6
  2317. package/erc8010/SignatureErc8010/package.json +0 -6
  2318. package/erc8010/SignatureErc8010.ts +0 -228
  2319. package/erc8010/index.ts +0 -43
  2320. package/erc8010/package.json +0 -6
  2321. package/erc8021/Attribution/package.json +0 -6
  2322. package/erc8021/Attribution.ts +0 -519
  2323. package/erc8021/index.ts +0 -43
  2324. package/erc8021/package.json +0 -6
  2325. package/index.docs/package.json +0 -6
  2326. package/index.docs.ts +0 -11
  2327. package/index.ts +0 -3694
  2328. package/tempo/AuthorizationTempo/package.json +0 -6
  2329. package/tempo/AuthorizationTempo.test.ts +0 -1306
  2330. package/tempo/AuthorizationTempo.ts +0 -893
  2331. package/tempo/Channel/package.json +0 -6
  2332. package/tempo/Channel.test.ts +0 -203
  2333. package/tempo/Channel.ts +0 -299
  2334. package/tempo/KeyAuthorization/package.json +0 -6
  2335. package/tempo/KeyAuthorization.test.ts +0 -2468
  2336. package/tempo/KeyAuthorization.ts +0 -1155
  2337. package/tempo/MultisigConfig/package.json +0 -6
  2338. package/tempo/MultisigConfig.test.ts +0 -236
  2339. package/tempo/MultisigConfig.ts +0 -501
  2340. package/tempo/Period/package.json +0 -6
  2341. package/tempo/Period.test.ts +0 -44
  2342. package/tempo/PoolId/package.json +0 -6
  2343. package/tempo/PoolId.test.ts +0 -42
  2344. package/tempo/PoolId.ts +0 -43
  2345. package/tempo/ReceivePolicyReceipt/package.json +0 -6
  2346. package/tempo/ReceivePolicyReceipt.test.ts +0 -198
  2347. package/tempo/ReceivePolicyReceipt.ts +0 -263
  2348. package/tempo/RpcSchemaTempo/package.json +0 -6
  2349. package/tempo/RpcSchemaTempo.ts +0 -55
  2350. package/tempo/SignatureEnvelope/package.json +0 -6
  2351. package/tempo/SignatureEnvelope.test.ts +0 -3003
  2352. package/tempo/SignatureEnvelope.ts +0 -1714
  2353. package/tempo/TempoAddress/package.json +0 -6
  2354. package/tempo/TempoAddress.test.ts +0 -89
  2355. package/tempo/TempoAddress.ts +0 -144
  2356. package/tempo/Tick/package.json +0 -6
  2357. package/tempo/Tick.test.ts +0 -281
  2358. package/tempo/TokenId/package.json +0 -6
  2359. package/tempo/TokenId.test.ts +0 -93
  2360. package/tempo/TokenId.ts +0 -128
  2361. package/tempo/TokenRole/package.json +0 -6
  2362. package/tempo/TokenRole.test.ts +0 -16
  2363. package/tempo/Transaction/package.json +0 -6
  2364. package/tempo/Transaction.test.ts +0 -529
  2365. package/tempo/Transaction.ts +0 -339
  2366. package/tempo/TransactionReceipt/package.json +0 -6
  2367. package/tempo/TransactionReceipt.ts +0 -200
  2368. package/tempo/TransactionRequest/package.json +0 -6
  2369. package/tempo/TransactionRequest.test.ts +0 -198
  2370. package/tempo/TransactionRequest.ts +0 -245
  2371. package/tempo/TxEnvelopeTempo/package.json +0 -6
  2372. package/tempo/TxEnvelopeTempo.test.ts +0 -1646
  2373. package/tempo/TxEnvelopeTempo.ts +0 -1100
  2374. package/tempo/VirtualAddress/package.json +0 -6
  2375. package/tempo/VirtualAddress.test.ts +0 -88
  2376. package/tempo/VirtualAddress.ts +0 -201
  2377. package/tempo/VirtualMaster/package.json +0 -6
  2378. package/tempo/VirtualMaster.test.ts +0 -204
  2379. package/tempo/VirtualMaster.ts +0 -711
  2380. package/tempo/ZoneId/package.json +0 -6
  2381. package/tempo/ZoneId.test.ts +0 -42
  2382. package/tempo/ZoneRpcAuthentication/package.json +0 -6
  2383. package/tempo/ZoneRpcAuthentication.test.ts +0 -226
  2384. package/tempo/ZoneRpcAuthentication.ts +0 -423
  2385. package/tempo/e2e.test.ts +0 -3196
  2386. package/tempo/index.ts +0 -556
  2387. package/tempo/package.json +0 -6
  2388. package/trusted-setups/Paths/package.json +0 -6
  2389. package/trusted-setups/package.json +0 -6
  2390. package/version.ts +0 -2
  2391. package/webauthn/Authentication/package.json +0 -6
  2392. package/webauthn/Authentication.ts +0 -683
  2393. package/webauthn/Authenticator/package.json +0 -6
  2394. package/webauthn/Authenticator.ts +0 -259
  2395. package/webauthn/Credential/package.json +0 -6
  2396. package/webauthn/Credential.ts +0 -171
  2397. package/webauthn/Registration/package.json +0 -6
  2398. package/webauthn/Registration.ts +0 -820
  2399. package/webauthn/Types/package.json +0 -6
  2400. package/webauthn/index.ts +0 -38
  2401. package/webauthn/internal/utils.ts +0 -63
  2402. package/webauthn/package.json +0 -6
  2403. package/window/package.json +0 -6
  2404. /package/{_types → dist}/core/AesGcm.d.ts +0 -0
  2405. /package/{_types → dist}/core/Cbor.d.ts +0 -0
  2406. /package/{_types → dist}/core/Errors.d.ts +0 -0
  2407. /package/{_types → dist}/core/internal/abi.d.ts +0 -0
  2408. /package/{_esm → dist}/core/internal/abi.js +0 -0
  2409. /package/{_types → dist}/core/internal/abiConstructor.d.ts +0 -0
  2410. /package/{_esm → dist}/core/internal/abiConstructor.js +0 -0
  2411. /package/{_types → dist}/core/internal/abiError.d.ts +0 -0
  2412. /package/{_esm → dist}/core/internal/abiError.js +0 -0
  2413. /package/{_types → dist}/core/internal/abiEvent.d.ts +0 -0
  2414. /package/{_esm → dist}/core/internal/abiEvent.js +0 -0
  2415. /package/{_types → dist}/core/internal/abiFunction.d.ts +0 -0
  2416. /package/{_esm → dist}/core/internal/abiFunction.js +0 -0
  2417. /package/{_types → dist}/core/internal/abiItem.d.ts +0 -0
  2418. /package/{_types → dist}/core/internal/abiParameters.d.ts +0 -0
  2419. /package/{_types → dist}/core/internal/base58.d.ts +0 -0
  2420. /package/{_types → dist}/core/internal/entropy.d.ts +0 -0
  2421. /package/{_esm → dist}/core/internal/entropy.js +0 -0
  2422. /package/{_types → dist}/core/internal/errors.d.ts +0 -0
  2423. /package/{_esm → dist}/core/internal/errors.js +0 -0
  2424. /package/{_types → dist}/core/internal/hdKey.d.ts +0 -0
  2425. /package/{_esm → dist}/core/internal/hdKey.js +0 -0
  2426. /package/{_types → dist}/core/internal/promise.d.ts +0 -0
  2427. /package/{_types → dist}/core/internal/register.d.ts +0 -0
  2428. /package/{_esm → dist}/core/internal/register.js +0 -0
  2429. /package/{_types → dist}/core/internal/rpcSchema.d.ts +0 -0
  2430. /package/{_esm → dist}/core/internal/rpcSchema.js +0 -0
  2431. /package/{_esm → dist}/core/internal/rpcSchemas/eth.js +0 -0
  2432. /package/{_esm → dist}/core/internal/rpcSchemas/wallet.js +0 -0
  2433. /package/{_esm → dist}/core/internal/types.js +0 -0
  2434. /package/{_types → dist}/core/version.d.ts +0 -0
  2435. /package/{_esm → dist}/core/version.js +0 -0
  2436. /package/{_types → dist}/erc4337/EntryPoint.d.ts +0 -0
  2437. /package/{_esm → dist}/erc4337/EntryPoint.js +0 -0
  2438. /package/{_esm → dist}/erc4337/RpcSchema.js +0 -0
  2439. /package/{_types → dist}/erc4337/UserOperationReceipt.d.ts +0 -0
  2440. /package/{_esm → dist}/erc4337/UserOperationReceipt.js +0 -0
  2441. /package/{_types → dist}/tempo/Period.d.ts +0 -0
  2442. /package/{_esm → dist}/tempo/Period.js +0 -0
  2443. /package/{_esm → dist}/tempo/RpcSchemaTempo.js +0 -0
  2444. /package/{_types → dist}/tempo/Tick.d.ts +0 -0
  2445. /package/{_types → dist}/tempo/TokenRole.d.ts +0 -0
  2446. /package/{_esm → dist}/tempo/TokenRole.js +0 -0
  2447. /package/{_types → dist}/tempo/ZoneId.d.ts +0 -0
  2448. /package/{_esm → dist}/tempo/ZoneId.js +0 -0
  2449. /package/{_types → dist}/tempo/internal/mine.wasm.d.ts +0 -0
  2450. /package/{_esm → dist}/tempo/internal/mine.wasm.js +0 -0
  2451. /package/{_types → dist}/tempo/internal/virtualMasterPool.d.ts +0 -0
  2452. /package/{_esm → dist}/tempo/internal/virtualMasterPool.js +0 -0
  2453. /package/{_types → dist}/trusted-setups/Paths.d.ts +0 -0
  2454. /package/{_esm → dist}/trusted-setups/Paths.js +0 -0
  2455. /package/{_types → dist}/trusted-setups/index.d.ts +0 -0
  2456. /package/{_esm → dist}/trusted-setups/index.js +0 -0
  2457. /package/{_types → dist}/trusted-setups/internal/paths.d.ts +0 -0
  2458. /package/{_esm → dist}/trusted-setups/internal/paths.js +0 -0
  2459. /package/{_types → dist}/webauthn/Types.d.ts +0 -0
  2460. /package/{_esm → dist}/webauthn/Types.js +0 -0
  2461. /package/{_types → dist}/window/index.d.ts +0 -0
  2462. /package/{_esm → dist}/window/index.js +0 -0
  2463. /package/{core → src/core}/internal/abi.ts +0 -0
  2464. /package/{core → src/core}/internal/entropy.ts +0 -0
  2465. /package/{core → src/core}/internal/errors.ts +0 -0
  2466. /package/{core → src/core}/internal/hdKey.ts +0 -0
  2467. /package/{core → src/core}/internal/register.ts +0 -0
  2468. /package/{core → src/core}/internal/rpcSchema.ts +0 -0
  2469. /package/{core → src/core}/internal/uid.ts +0 -0
  2470. /package/{core → src/core}/version.ts +0 -0
  2471. /package/{erc4337 → src/erc4337}/EntryPoint.ts +0 -0
  2472. /package/{erc4337 → src/erc4337}/UserOperationReceipt.ts +0 -0
  2473. /package/{tempo → src/tempo}/Period.ts +0 -0
  2474. /package/{tempo → src/tempo}/Tick.ts +0 -0
  2475. /package/{tempo → src/tempo}/TokenRole.ts +0 -0
  2476. /package/{tempo → src/tempo}/ZoneId.ts +0 -0
  2477. /package/{tempo → src/tempo}/internal/mine.c +0 -0
  2478. /package/{tempo → src/tempo}/internal/mine.wasm.ts +0 -0
  2479. /package/{tempo → src/tempo}/internal/virtualMasterPool.ts +0 -0
  2480. /package/{trusted-setups → src/trusted-setups}/Paths.ts +0 -0
  2481. /package/{trusted-setups → src/trusted-setups}/index.ts +0 -0
  2482. /package/{trusted-setups → src/trusted-setups}/internal/paths.ts +0 -0
  2483. /package/{trusted-setups → src/trusted-setups}/internal/setups/mainnet.json +0 -0
  2484. /package/{trusted-setups → src/trusted-setups}/internal/setups/mainnet.txt +0 -0
  2485. /package/{tsdoc.json → src/tsdoc.json} +0 -0
  2486. /package/{webauthn → src/webauthn}/Types.ts +0 -0
  2487. /package/{window → src/window}/index.ts +0 -0
@@ -0,0 +1,3031 @@
1
+ import {
2
+ Address,
3
+ Hex,
4
+ P256,
5
+ PublicKey,
6
+ Secp256k1,
7
+ Signature,
8
+ WebAuthnP256,
9
+ WebCryptoP256,
10
+ } from 'ox'
11
+ import { describe, expect, test } from 'vp/test'
12
+ import * as MultisigConfig from './MultisigConfig.js'
13
+ import * as SignatureEnvelope from './SignatureEnvelope.js'
14
+
15
+ const publicKey = PublicKey.from({
16
+ prefix: 4,
17
+ x: '0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5',
18
+ y: '0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0',
19
+ })
20
+
21
+ const p256Signature = Signature.from({
22
+ r: '0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e',
23
+ s: '0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35',
24
+ yParity: 0,
25
+ })
26
+
27
+ const signature_secp256k1 = Secp256k1.sign({
28
+ payload: '0xdeadbeef',
29
+ privateKey: Secp256k1.randomPrivateKey(),
30
+ })
31
+
32
+ const signature_p256 = SignatureEnvelope.from({
33
+ signature: p256Signature,
34
+ publicKey,
35
+ prehash: true,
36
+ })
37
+
38
+ const signature_webauthn = SignatureEnvelope.from({
39
+ signature: p256Signature,
40
+ publicKey,
41
+ metadata: {
42
+ authenticatorData: WebAuthnP256.getAuthenticatorData({ rpId: 'localhost' }),
43
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
44
+ challenge: '0xdeadbeef',
45
+ origin: 'http://localhost',
46
+ }),
47
+ },
48
+ })
49
+
50
+ // Keychain signatures with different inner types
51
+ const signature_keychain_secp256k1 = SignatureEnvelope.from({
52
+ userAddress: '0x1234567890123456789012345678901234567890',
53
+ inner: SignatureEnvelope.from(signature_secp256k1),
54
+ version: 'v2',
55
+ })
56
+
57
+ const signature_keychain_p256 = SignatureEnvelope.from({
58
+ userAddress: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
59
+ inner: signature_p256,
60
+ version: 'v2',
61
+ })
62
+
63
+ const signature_keychain_webauthn = SignatureEnvelope.from({
64
+ userAddress: '0xfedcbafedcbafedcbafedcbafedcbafedcbafedc',
65
+ inner: signature_webauthn,
66
+ version: 'v2',
67
+ })
68
+
69
+ describe('assert', () => {
70
+ describe('secp256k1', () => {
71
+ test('behavior: validates valid signature', () => {
72
+ expect(() =>
73
+ SignatureEnvelope.assert({
74
+ signature: signature_secp256k1,
75
+ type: 'secp256k1',
76
+ }),
77
+ ).not.toThrow()
78
+ })
79
+
80
+ test('behavior: validates signature without explicit type', () => {
81
+ expect(() =>
82
+ SignatureEnvelope.assert({ signature: signature_secp256k1 }),
83
+ ).not.toThrow()
84
+ })
85
+
86
+ test('error: throws on invalid signature values', () => {
87
+ expect(() =>
88
+ SignatureEnvelope.assert({
89
+ signature: {
90
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
91
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
92
+ yParity: 2,
93
+ },
94
+ type: 'secp256k1',
95
+ }),
96
+ ).toThrowErrorMatchingInlineSnapshot(
97
+ `[Signature.InvalidYParityError: Value \`2\` is an invalid y-parity value. Y-parity must be 0 or 1.]`,
98
+ )
99
+ })
100
+ })
101
+
102
+ describe('p256', () => {
103
+ test('behavior: validates valid P256 signature', () => {
104
+ expect(() => SignatureEnvelope.assert(signature_p256)).not.toThrow()
105
+ })
106
+
107
+ test('behavior: validates P256 signature without explicit type', () => {
108
+ const { type: _, ...signatureWithoutType } = signature_p256
109
+ expect(() => SignatureEnvelope.assert(signatureWithoutType)).not.toThrow()
110
+ })
111
+
112
+ test('error: throws on invalid prehash type', () => {
113
+ expect(() =>
114
+ SignatureEnvelope.assert({
115
+ ...signature_p256,
116
+ prehash: 'true' as any,
117
+ }),
118
+ ).toThrowErrorMatchingInlineSnapshot(
119
+ `
120
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`prehash\`.
121
+
122
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"prehash":"true","type":"p256"}]
123
+ `,
124
+ )
125
+ })
126
+
127
+ test('error: throws on missing publicKey', () => {
128
+ const { publicKey: _, ...withoutPublicKey } = signature_p256
129
+ expect(() =>
130
+ SignatureEnvelope.assert(withoutPublicKey as any),
131
+ ).toThrowErrorMatchingInlineSnapshot(
132
+ `
133
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`publicKey\`.
134
+
135
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"prehash":true,"type":"p256"}]
136
+ `,
137
+ )
138
+ })
139
+
140
+ test('error: throws on missing signature.r', () => {
141
+ const invalid = {
142
+ signature: {
143
+ s: '0x0000000000000000000000000000000000000000000000000000000000000001',
144
+ } as any,
145
+ publicKey,
146
+ prehash: true,
147
+ type: 'p256' as const,
148
+ }
149
+ expect(() =>
150
+ SignatureEnvelope.assert(invalid),
151
+ ).toThrowErrorMatchingInlineSnapshot(
152
+ `
153
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`signature.r\`.
154
+
155
+ Provided: {"signature":{"s":"0x0000000000000000000000000000000000000000000000000000000000000001"},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"prehash":true,"type":"p256"}]
156
+ `,
157
+ )
158
+ })
159
+
160
+ test('error: throws on missing signature.s', () => {
161
+ const invalid = {
162
+ signature: {
163
+ r: '0x0000000000000000000000000000000000000000000000000000000000000001',
164
+ } as any,
165
+ publicKey,
166
+ prehash: true,
167
+ type: 'p256' as const,
168
+ }
169
+ expect(() =>
170
+ SignatureEnvelope.assert(invalid),
171
+ ).toThrowErrorMatchingInlineSnapshot(
172
+ `
173
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`signature.s\`.
174
+
175
+ Provided: {"signature":{"r":"0x0000000000000000000000000000000000000000000000000000000000000001"},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"prehash":true,"type":"p256"}]
176
+ `,
177
+ )
178
+ })
179
+
180
+ test('error: throws on missing publicKey.x', () => {
181
+ const invalid = {
182
+ signature: p256Signature,
183
+ publicKey: {
184
+ y: '0x0000000000000000000000000000000000000000000000000000000000000001',
185
+ } as any,
186
+ prehash: true,
187
+ type: 'p256' as const,
188
+ }
189
+ expect(() =>
190
+ SignatureEnvelope.assert(invalid),
191
+ ).toThrowErrorMatchingInlineSnapshot(
192
+ `
193
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`publicKey.x\`.
194
+
195
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"y":"0x0000000000000000000000000000000000000000000000000000000000000001"},"prehash":true,"type":"p256"}]
196
+ `,
197
+ )
198
+ })
199
+
200
+ test('error: throws on missing publicKey.y', () => {
201
+ const invalid = {
202
+ signature: p256Signature,
203
+ publicKey: {
204
+ x: '0x0000000000000000000000000000000000000000000000000000000000000001',
205
+ } as any,
206
+ prehash: true,
207
+ type: 'p256' as const,
208
+ }
209
+ expect(() =>
210
+ SignatureEnvelope.assert(invalid),
211
+ ).toThrowErrorMatchingInlineSnapshot(
212
+ `
213
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`publicKey.y\`.
214
+
215
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"x":"0x0000000000000000000000000000000000000000000000000000000000000001"},"prehash":true,"type":"p256"}]
216
+ `,
217
+ )
218
+ })
219
+
220
+ test('error: throws with all missing properties listed', () => {
221
+ const invalid = {
222
+ signature: {} as any,
223
+ type: 'p256' as const,
224
+ }
225
+ expect(() =>
226
+ SignatureEnvelope.assert(invalid),
227
+ ).toThrowErrorMatchingInlineSnapshot(
228
+ `
229
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "p256" is missing required properties: \`signature.r\`, \`signature.s\`, \`prehash\`, \`publicKey\`.
230
+
231
+ Provided: {"signature":{},"type":"p256"}]
232
+ `,
233
+ )
234
+ })
235
+ })
236
+
237
+ describe('webAuthn', () => {
238
+ test('behavior: validates valid WebAuthn signature', () => {
239
+ expect(() => SignatureEnvelope.assert(signature_webauthn)).not.toThrow()
240
+ })
241
+
242
+ test('behavior: validates WebAuthn signature without explicit type', () => {
243
+ const { type: _, ...signatureWithoutType } = signature_webauthn
244
+ expect(() => SignatureEnvelope.assert(signatureWithoutType)).not.toThrow()
245
+ })
246
+
247
+ test('error: throws on missing metadata', () => {
248
+ const { metadata: _, ...withoutMetadata } = signature_webauthn
249
+ expect(() =>
250
+ SignatureEnvelope.assert(withoutMetadata as any),
251
+ ).toThrowErrorMatchingInlineSnapshot(
252
+ `
253
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`metadata\`.
254
+
255
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"type":"webAuthn"}]
256
+ `,
257
+ )
258
+ })
259
+
260
+ test('error: throws on missing publicKey', () => {
261
+ const { publicKey: _, ...withoutPublicKey } = signature_webauthn
262
+ expect(() =>
263
+ SignatureEnvelope.assert(withoutPublicKey as any),
264
+ ).toThrowErrorMatchingInlineSnapshot(
265
+ `
266
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`publicKey\`.
267
+
268
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000","clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
269
+ `,
270
+ )
271
+ })
272
+
273
+ test('error: throws on missing signature.r', () => {
274
+ const invalid = {
275
+ signature: {
276
+ s: '0x0000000000000000000000000000000000000000000000000000000000000001',
277
+ } as any,
278
+ publicKey,
279
+ metadata: {
280
+ authenticatorData: WebAuthnP256.getAuthenticatorData({
281
+ rpId: 'localhost',
282
+ }),
283
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
284
+ challenge: '0xdeadbeef',
285
+ origin: 'http://localhost',
286
+ }),
287
+ },
288
+ type: 'webAuthn' as const,
289
+ }
290
+ expect(() =>
291
+ SignatureEnvelope.assert(invalid),
292
+ ).toThrowErrorMatchingInlineSnapshot(
293
+ `
294
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`signature.r\`.
295
+
296
+ Provided: {"signature":{"s":"0x0000000000000000000000000000000000000000000000000000000000000001"},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000","clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
297
+ `,
298
+ )
299
+ })
300
+
301
+ test('error: throws on missing signature.s', () => {
302
+ const invalid = {
303
+ signature: {
304
+ r: '0x0000000000000000000000000000000000000000000000000000000000000001',
305
+ } as any,
306
+ publicKey,
307
+ metadata: {
308
+ authenticatorData: WebAuthnP256.getAuthenticatorData({
309
+ rpId: 'localhost',
310
+ }),
311
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
312
+ challenge: '0xdeadbeef',
313
+ origin: 'http://localhost',
314
+ }),
315
+ },
316
+ type: 'webAuthn' as const,
317
+ }
318
+ expect(() =>
319
+ SignatureEnvelope.assert(invalid),
320
+ ).toThrowErrorMatchingInlineSnapshot(
321
+ `
322
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`signature.s\`.
323
+
324
+ Provided: {"signature":{"r":"0x0000000000000000000000000000000000000000000000000000000000000001"},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000","clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
325
+ `,
326
+ )
327
+ })
328
+
329
+ test('error: throws on missing metadata.authenticatorData', () => {
330
+ const invalid = {
331
+ signature: p256Signature,
332
+ publicKey,
333
+ metadata: {
334
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
335
+ challenge: '0xdeadbeef',
336
+ origin: 'http://localhost',
337
+ }),
338
+ } as any,
339
+ type: 'webAuthn' as const,
340
+ }
341
+ expect(() =>
342
+ SignatureEnvelope.assert(invalid),
343
+ ).toThrowErrorMatchingInlineSnapshot(
344
+ `
345
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`metadata.authenticatorData\`.
346
+
347
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"metadata":{"clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
348
+ `,
349
+ )
350
+ })
351
+
352
+ test('error: throws on missing metadata.clientDataJSON', () => {
353
+ const invalid = {
354
+ signature: p256Signature,
355
+ publicKey,
356
+ metadata: {
357
+ authenticatorData: WebAuthnP256.getAuthenticatorData({
358
+ rpId: 'localhost',
359
+ }),
360
+ } as any,
361
+ type: 'webAuthn' as const,
362
+ }
363
+ expect(() =>
364
+ SignatureEnvelope.assert(invalid),
365
+ ).toThrowErrorMatchingInlineSnapshot(
366
+ `
367
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`metadata.clientDataJSON\`.
368
+
369
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"prefix":4,"x":"0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5","y":"0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0"},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000"},"type":"webAuthn"}]
370
+ `,
371
+ )
372
+ })
373
+
374
+ test('error: throws on missing publicKey.x', () => {
375
+ const invalid = {
376
+ signature: p256Signature,
377
+ publicKey: {
378
+ y: '0x0000000000000000000000000000000000000000000000000000000000000001',
379
+ } as any,
380
+ metadata: {
381
+ authenticatorData: WebAuthnP256.getAuthenticatorData({
382
+ rpId: 'localhost',
383
+ }),
384
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
385
+ challenge: '0xdeadbeef',
386
+ origin: 'http://localhost',
387
+ }),
388
+ },
389
+ type: 'webAuthn' as const,
390
+ }
391
+ expect(() =>
392
+ SignatureEnvelope.assert(invalid),
393
+ ).toThrowErrorMatchingInlineSnapshot(
394
+ `
395
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`publicKey.x\`.
396
+
397
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"y":"0x0000000000000000000000000000000000000000000000000000000000000001"},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000","clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
398
+ `,
399
+ )
400
+ })
401
+
402
+ test('error: throws on missing publicKey.y', () => {
403
+ const invalid = {
404
+ signature: p256Signature,
405
+ publicKey: {
406
+ x: '0x0000000000000000000000000000000000000000000000000000000000000001',
407
+ } as any,
408
+ metadata: {
409
+ authenticatorData: WebAuthnP256.getAuthenticatorData({
410
+ rpId: 'localhost',
411
+ }),
412
+ clientDataJSON: WebAuthnP256.getClientDataJSON({
413
+ challenge: '0xdeadbeef',
414
+ origin: 'http://localhost',
415
+ }),
416
+ },
417
+ type: 'webAuthn' as const,
418
+ }
419
+ expect(() =>
420
+ SignatureEnvelope.assert(invalid),
421
+ ).toThrowErrorMatchingInlineSnapshot(
422
+ `
423
+ [SignatureEnvelope.MissingPropertiesError: Signature envelope of type "webAuthn" is missing required properties: \`publicKey.y\`.
424
+
425
+ Provided: {"signature":{"r":"0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e","s":"0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35","yParity":0},"publicKey":{"x":"0x0000000000000000000000000000000000000000000000000000000000000001"},"metadata":{"authenticatorData":"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000","clientDataJSON":"{\\"type\\":\\"webauthn.get\\",\\"challenge\\":\\"3q2-7w\\",\\"origin\\":\\"http://localhost\\",\\"crossOrigin\\":false}"},"type":"webAuthn"}]
426
+ `,
427
+ )
428
+ })
429
+ })
430
+
431
+ describe('keychain', () => {
432
+ test('behavior: validates valid keychain with secp256k1 inner', () => {
433
+ expect(() =>
434
+ SignatureEnvelope.assert(signature_keychain_secp256k1),
435
+ ).not.toThrow()
436
+ })
437
+
438
+ test('behavior: validates valid keychain with p256 inner', () => {
439
+ expect(() =>
440
+ SignatureEnvelope.assert(signature_keychain_p256),
441
+ ).not.toThrow()
442
+ })
443
+
444
+ test('behavior: validates valid keychain with webAuthn inner', () => {
445
+ expect(() =>
446
+ SignatureEnvelope.assert(signature_keychain_webauthn),
447
+ ).not.toThrow()
448
+ })
449
+
450
+ test('behavior: validates keychain without explicit type', () => {
451
+ const { type: _, ...signatureWithoutType } = signature_keychain_secp256k1
452
+ expect(() => SignatureEnvelope.assert(signatureWithoutType)).not.toThrow()
453
+ })
454
+
455
+ test('error: throws on invalid inner signature', () => {
456
+ expect(() =>
457
+ SignatureEnvelope.assert({
458
+ userAddress: '0x1234567890123456789012345678901234567890',
459
+ inner: SignatureEnvelope.from({
460
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
461
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
462
+ yParity: 2,
463
+ }),
464
+ type: 'keychain',
465
+ } as any),
466
+ ).toThrowErrorMatchingInlineSnapshot(
467
+ `[Signature.InvalidYParityError: Value \`2\` is an invalid y-parity value. Y-parity must be 0 or 1.]`,
468
+ )
469
+ })
470
+ })
471
+
472
+ test('error: throws on invalid envelope', () => {
473
+ expect(() =>
474
+ SignatureEnvelope.assert({} as any),
475
+ ).toThrowErrorMatchingInlineSnapshot(
476
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`{}\`) to a valid signature envelope.]`,
477
+ )
478
+ })
479
+
480
+ test('error: throws on incomplete signature', () => {
481
+ expect(() =>
482
+ SignatureEnvelope.assert({
483
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
484
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
485
+ } as any),
486
+ ).toThrowErrorMatchingInlineSnapshot(
487
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`{"r":"0x0000000000000000000000000000000000000000000000000000000000000000","s":"0x0000000000000000000000000000000000000000000000000000000000000000"}\`) to a valid signature envelope.]`,
488
+ )
489
+ })
490
+ })
491
+
492
+ describe('deserialize', () => {
493
+ describe('secp256k1', () => {
494
+ test('behavior: deserializes valid signature', () => {
495
+ const serialized = Signature.toHex(signature_secp256k1)
496
+
497
+ const envelope = SignatureEnvelope.deserialize(serialized)
498
+
499
+ expect(envelope).toMatchObject({
500
+ signature: {
501
+ r: signature_secp256k1.r,
502
+ s: signature_secp256k1.s,
503
+ yParity: signature_secp256k1.yParity,
504
+ },
505
+ type: 'secp256k1',
506
+ })
507
+ })
508
+
509
+ test('behavior: deserializes signature with magic identifier', () => {
510
+ const serialized = SignatureEnvelope.serialize(
511
+ { signature: signature_secp256k1, type: 'secp256k1' },
512
+ { magic: true },
513
+ )
514
+
515
+ const envelope = SignatureEnvelope.deserialize(serialized)
516
+
517
+ expect(envelope).toMatchObject({
518
+ signature: {
519
+ r: signature_secp256k1.r,
520
+ s: signature_secp256k1.s,
521
+ yParity: signature_secp256k1.yParity,
522
+ },
523
+ type: 'secp256k1',
524
+ })
525
+ })
526
+
527
+ test('error: throws on invalid size', () => {
528
+ expect(() =>
529
+ SignatureEnvelope.deserialize('0xdeadbeef'),
530
+ ).toThrowErrorMatchingInlineSnapshot(
531
+ `
532
+ [SignatureEnvelope.InvalidSerializedError: Unable to deserialize signature envelope: Unknown signature type identifier: 0xde. Expected 0x01 (P256), 0x02 (WebAuthn), 0x03 (Keychain V1), 0x04 (Keychain V2), or 0x05 (Multisig)
533
+
534
+ Serialized: 0xdeadbeef]
535
+ `,
536
+ )
537
+ })
538
+
539
+ test('error: throws on invalid yParity', () => {
540
+ // Signature with invalid yParity (must be 0 or 1)
541
+ const invalidSig =
542
+ '0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000102'
543
+ expect(() =>
544
+ SignatureEnvelope.deserialize(invalidSig),
545
+ ).toThrowErrorMatchingInlineSnapshot(
546
+ `[Signature.InvalidYParityError: Value \`2\` is an invalid y-parity value. Y-parity must be 0 or 1.]`,
547
+ )
548
+ })
549
+ })
550
+
551
+ describe('p256', () => {
552
+ test('behavior: deserializes P256 signature', () => {
553
+ const serialized = SignatureEnvelope.serialize(signature_p256)
554
+ const deserialized = SignatureEnvelope.deserialize(serialized)
555
+
556
+ expect(deserialized).toMatchObject({
557
+ signature: {
558
+ r: signature_p256.signature.r,
559
+ s: signature_p256.signature.s,
560
+ },
561
+ publicKey: {
562
+ x: signature_p256.publicKey.x,
563
+ y: signature_p256.publicKey.y,
564
+ },
565
+ prehash: signature_p256.prehash,
566
+ type: 'p256',
567
+ })
568
+ })
569
+
570
+ test('behavior: deserializes P256 signature with magic identifier', () => {
571
+ const serialized = SignatureEnvelope.serialize(signature_p256, {
572
+ magic: true,
573
+ })
574
+ const deserialized = SignatureEnvelope.deserialize(serialized)
575
+
576
+ expect(deserialized).toMatchObject({
577
+ signature: {
578
+ r: signature_p256.signature.r,
579
+ s: signature_p256.signature.s,
580
+ },
581
+ publicKey: {
582
+ x: signature_p256.publicKey.x,
583
+ y: signature_p256.publicKey.y,
584
+ },
585
+ prehash: signature_p256.prehash,
586
+ type: 'p256',
587
+ })
588
+ })
589
+
590
+ test('error: throws on invalid P256 signature length', () => {
591
+ // P256 signature with wrong length (should be 130 bytes total, but only 100)
592
+ const invalidSig = `0x01${'00'.repeat(100)}` as `0x${string}`
593
+ expect(() =>
594
+ SignatureEnvelope.deserialize(invalidSig),
595
+ ).toThrowErrorMatchingInlineSnapshot(
596
+ `
597
+ [SignatureEnvelope.InvalidSerializedError: Unable to deserialize signature envelope: Invalid P256 signature envelope size: expected 129 bytes, got 100 bytes
598
+
599
+ Serialized: 0x0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]
600
+ `,
601
+ )
602
+ })
603
+ })
604
+
605
+ describe('webAuthn', () => {
606
+ test('behavior: deserializes WebAuthn signature', () => {
607
+ const serialized = SignatureEnvelope.serialize(signature_webauthn)
608
+ const deserialized = SignatureEnvelope.deserialize(serialized)
609
+
610
+ expect(deserialized).toMatchObject({
611
+ signature: {
612
+ r: signature_webauthn.signature.r,
613
+ s: signature_webauthn.signature.s,
614
+ },
615
+ publicKey: {
616
+ x: signature_webauthn.publicKey.x,
617
+ y: signature_webauthn.publicKey.y,
618
+ },
619
+ metadata: {
620
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
621
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
622
+ },
623
+ type: 'webAuthn',
624
+ })
625
+ })
626
+
627
+ test('behavior: deserializes WebAuthn signature with magic identifier', () => {
628
+ const serialized = SignatureEnvelope.serialize(signature_webauthn, {
629
+ magic: true,
630
+ })
631
+ const deserialized = SignatureEnvelope.deserialize(serialized)
632
+
633
+ expect(deserialized).toMatchObject({
634
+ signature: {
635
+ r: signature_webauthn.signature.r,
636
+ s: signature_webauthn.signature.s,
637
+ },
638
+ publicKey: {
639
+ x: signature_webauthn.publicKey.x,
640
+ y: signature_webauthn.publicKey.y,
641
+ },
642
+ metadata: {
643
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
644
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
645
+ },
646
+ type: 'webAuthn',
647
+ })
648
+ })
649
+
650
+ test('error: throws on invalid WebAuthn signature length', () => {
651
+ // WebAuthn signature too short (must be at least 129 bytes: 1 type + 128 signature data)
652
+ const invalidSig = `0x02${'00'.repeat(100)}` as const
653
+ expect(() =>
654
+ SignatureEnvelope.deserialize(invalidSig),
655
+ ).toThrowErrorMatchingInlineSnapshot(
656
+ `
657
+ [SignatureEnvelope.InvalidSerializedError: Unable to deserialize signature envelope: Invalid WebAuthn signature envelope size: expected at least 128 bytes, got 100 bytes
658
+
659
+ Serialized: 0x0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]
660
+ `,
661
+ )
662
+ })
663
+
664
+ test('error: throws on invalid clientDataJSON', () => {
665
+ // Create a signature with invalid JSON (not properly formatted)
666
+ const invalidMetadata = {
667
+ authenticatorData: `0x${'00'.repeat(37)}` as const,
668
+ clientDataJSON: 'not-valid-json',
669
+ }
670
+ const serialized = SignatureEnvelope.serialize({
671
+ ...signature_webauthn,
672
+ metadata: invalidMetadata,
673
+ })
674
+
675
+ expect(() =>
676
+ SignatureEnvelope.deserialize(serialized),
677
+ ).toThrowErrorMatchingInlineSnapshot(
678
+ `
679
+ [SignatureEnvelope.InvalidSerializedError: Unable to deserialize signature envelope: Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON
680
+
681
+ Serialized: 0x02000000000000000000000000000000000000000000000000000000000000000000000000006e6f742d76616c69642d6a736f6eccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35ad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f511edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0]
682
+ `,
683
+ )
684
+ })
685
+
686
+ test('error: throws on unknown type identifier', () => {
687
+ const unknownType = `0xff${'00'.repeat(129)}` as const
688
+ expect(() =>
689
+ SignatureEnvelope.deserialize(unknownType),
690
+ ).toThrowErrorMatchingInlineSnapshot(
691
+ `
692
+ [SignatureEnvelope.InvalidSerializedError: Unable to deserialize signature envelope: Unknown signature type identifier: 0xff. Expected 0x01 (P256), 0x02 (WebAuthn), 0x03 (Keychain V1), 0x04 (Keychain V2), or 0x05 (Multisig)
693
+
694
+ Serialized: 0xff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]
695
+ `,
696
+ )
697
+ })
698
+ })
699
+
700
+ describe('keychain', () => {
701
+ test('behavior: deserializes keychain signature with secp256k1 inner', () => {
702
+ const serialized = SignatureEnvelope.serialize(
703
+ signature_keychain_secp256k1,
704
+ )
705
+ const deserialized = SignatureEnvelope.deserialize(serialized)
706
+
707
+ expect(deserialized).toMatchObject({
708
+ userAddress: signature_keychain_secp256k1.userAddress,
709
+ inner: SignatureEnvelope.from(signature_secp256k1),
710
+ type: 'keychain',
711
+ })
712
+ })
713
+
714
+ test('behavior: deserializes keychain signature with p256 inner', () => {
715
+ const serialized = SignatureEnvelope.serialize(signature_keychain_p256)
716
+ const deserialized = SignatureEnvelope.deserialize(serialized)
717
+
718
+ expect(deserialized).toMatchInlineSnapshot(`
719
+ {
720
+ "inner": {
721
+ "prehash": true,
722
+ "publicKey": {
723
+ "prefix": 4,
724
+ "x": "0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5",
725
+ "y": "0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0",
726
+ },
727
+ "signature": {
728
+ "r": "0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e",
729
+ "s": "0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35",
730
+ },
731
+ "type": "p256",
732
+ },
733
+ "type": "keychain",
734
+ "userAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
735
+ "version": "v2",
736
+ }
737
+ `)
738
+ })
739
+
740
+ test('behavior: deserializes keychain signature with webAuthn inner', () => {
741
+ const serialized = SignatureEnvelope.serialize(
742
+ signature_keychain_webauthn,
743
+ )
744
+ const deserialized = SignatureEnvelope.deserialize(serialized)
745
+
746
+ expect(deserialized).toMatchInlineSnapshot(`
747
+ {
748
+ "inner": {
749
+ "metadata": {
750
+ "authenticatorData": "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000",
751
+ "clientDataJSON": "{"type":"webauthn.get","challenge":"3q2-7w","origin":"http://localhost","crossOrigin":false}",
752
+ },
753
+ "publicKey": {
754
+ "prefix": 4,
755
+ "x": "0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5",
756
+ "y": "0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0",
757
+ },
758
+ "signature": {
759
+ "r": "0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e",
760
+ "s": "0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35",
761
+ },
762
+ "type": "webAuthn",
763
+ },
764
+ "type": "keychain",
765
+ "userAddress": "0xfedcbafedcbafedcbafedcbafedcbafedcbafedc",
766
+ "version": "v2",
767
+ }
768
+ `)
769
+ })
770
+
771
+ test('behavior: deserializes keychain signature with magic identifier', () => {
772
+ const serialized = SignatureEnvelope.serialize(
773
+ signature_keychain_secp256k1,
774
+ { magic: true },
775
+ )
776
+ const deserialized = SignatureEnvelope.deserialize(serialized)
777
+
778
+ expect(deserialized).toMatchObject({
779
+ userAddress: signature_keychain_secp256k1.userAddress,
780
+ inner: SignatureEnvelope.from(signature_secp256k1),
781
+ type: 'keychain',
782
+ })
783
+ })
784
+
785
+ test('error: throws on invalid keychain signature length', () => {
786
+ // Keychain signature too short (must be at least 21 bytes: 1 type + 20 address)
787
+ const invalidSig = `0x03${'00'.repeat(10)}` as const
788
+ expect(() =>
789
+ SignatureEnvelope.deserialize(invalidSig),
790
+ ).toThrowErrorMatchingInlineSnapshot(
791
+ `[Hex.SliceOffsetOutOfBoundsError: Slice starting at offset \`20\` is out-of-bounds (size: \`10\`).]`,
792
+ )
793
+ })
794
+ })
795
+ })
796
+
797
+ describe('extractAddress', () => {
798
+ describe('secp256k1', () => {
799
+ test('default', () => {
800
+ const privateKey = Secp256k1.randomPrivateKey()
801
+ const address = Address.fromPublicKey(
802
+ Secp256k1.getPublicKey({ privateKey }),
803
+ )
804
+ const payload = '0xdeadbeef' as const
805
+
806
+ const signature = Secp256k1.sign({ payload, privateKey })
807
+ const envelope = SignatureEnvelope.from(signature)
808
+
809
+ expect(
810
+ SignatureEnvelope.extractAddress({ payload, signature: envelope }),
811
+ ).toBe(address)
812
+ })
813
+ })
814
+
815
+ describe('p256', () => {
816
+ test('default', () => {
817
+ const privateKey = P256.randomPrivateKey()
818
+ const pk = P256.getPublicKey({ privateKey })
819
+ const address = Address.fromPublicKey(pk)
820
+ const payload = '0xdeadbeef' as const
821
+
822
+ const signature = P256.sign({ payload, privateKey })
823
+ const envelope = SignatureEnvelope.from({
824
+ prehash: false,
825
+ publicKey: pk,
826
+ signature,
827
+ })
828
+
829
+ expect(
830
+ SignatureEnvelope.extractAddress({ payload, signature: envelope }),
831
+ ).toBe(address)
832
+ })
833
+ })
834
+
835
+ describe('webAuthn', () => {
836
+ test('default', () => {
837
+ const address = Address.fromPublicKey(publicKey)
838
+
839
+ expect(
840
+ SignatureEnvelope.extractAddress({
841
+ payload: '0xdeadbeef',
842
+ signature: signature_webauthn,
843
+ }),
844
+ ).toBe(address)
845
+ })
846
+ })
847
+
848
+ describe('keychain', () => {
849
+ test('default', () => {
850
+ const privateKey = Secp256k1.randomPrivateKey()
851
+ const address = Address.fromPublicKey(
852
+ Secp256k1.getPublicKey({ privateKey }),
853
+ )
854
+ const payload = '0xdeadbeef' as const
855
+
856
+ const signature = Secp256k1.sign({ payload, privateKey })
857
+ const envelope = SignatureEnvelope.from({
858
+ userAddress: '0x1234567890123456789012345678901234567890',
859
+ inner: SignatureEnvelope.from(signature),
860
+ })
861
+
862
+ expect(
863
+ SignatureEnvelope.extractAddress({ payload, signature: envelope }),
864
+ ).toBe(address)
865
+ })
866
+
867
+ test('behavior: root = true returns userAddress', () => {
868
+ expect(
869
+ SignatureEnvelope.extractAddress({
870
+ payload: '0xdeadbeef',
871
+ signature: signature_keychain_secp256k1,
872
+ root: true,
873
+ }),
874
+ ).toBe('0x1234567890123456789012345678901234567890')
875
+ })
876
+ })
877
+ })
878
+
879
+ describe('extractPublicKey', () => {
880
+ describe('secp256k1', () => {
881
+ test('default', () => {
882
+ const privateKey = Secp256k1.randomPrivateKey()
883
+ const pk = Secp256k1.getPublicKey({ privateKey })
884
+ const payload = '0xdeadbeef' as const
885
+
886
+ const signature = Secp256k1.sign({ payload, privateKey })
887
+ const envelope = SignatureEnvelope.from(signature)
888
+
889
+ expect(
890
+ SignatureEnvelope.extractPublicKey({ payload, signature: envelope }),
891
+ ).toEqual(pk)
892
+ })
893
+ })
894
+
895
+ describe('p256', () => {
896
+ test('default', () => {
897
+ const privateKey = P256.randomPrivateKey()
898
+ const pk = P256.getPublicKey({ privateKey })
899
+ const payload = '0xdeadbeef' as const
900
+
901
+ const signature = P256.sign({ payload, privateKey })
902
+ const envelope = SignatureEnvelope.from({
903
+ prehash: false,
904
+ publicKey: pk,
905
+ signature,
906
+ })
907
+
908
+ expect(
909
+ SignatureEnvelope.extractPublicKey({ payload, signature: envelope }),
910
+ ).toEqual(pk)
911
+ })
912
+ })
913
+
914
+ describe('webAuthn', () => {
915
+ test('default', () => {
916
+ expect(
917
+ SignatureEnvelope.extractPublicKey({
918
+ payload: '0xdeadbeef',
919
+ signature: signature_webauthn,
920
+ }),
921
+ ).toEqual(publicKey)
922
+ })
923
+ })
924
+
925
+ describe('keychain', () => {
926
+ test('default', () => {
927
+ const privateKey = Secp256k1.randomPrivateKey()
928
+ const pk = Secp256k1.getPublicKey({ privateKey })
929
+ const payload = '0xdeadbeef' as const
930
+
931
+ const signature = Secp256k1.sign({ payload, privateKey })
932
+ const envelope = SignatureEnvelope.from({
933
+ userAddress: '0x1234567890123456789012345678901234567890',
934
+ inner: SignatureEnvelope.from(signature),
935
+ })
936
+
937
+ expect(
938
+ SignatureEnvelope.extractPublicKey({ payload, signature: envelope }),
939
+ ).toEqual(pk)
940
+ })
941
+ })
942
+ })
943
+
944
+ describe('from', () => {
945
+ describe('secp256k1', () => {
946
+ test('behavior: coerces from hex string', () => {
947
+ const serialized = Signature.toHex(signature_secp256k1)
948
+
949
+ const envelope = SignatureEnvelope.from(serialized)
950
+
951
+ expect(envelope).toMatchObject({
952
+ signature: {
953
+ r: signature_secp256k1.r,
954
+ s: signature_secp256k1.s,
955
+ yParity: signature_secp256k1.yParity,
956
+ },
957
+ type: 'secp256k1',
958
+ })
959
+ })
960
+
961
+ test('behavior: returns object as-is', () => {
962
+ const envelope: SignatureEnvelope.SignatureEnvelope = {
963
+ signature: signature_secp256k1,
964
+ type: 'secp256k1',
965
+ }
966
+
967
+ const result = SignatureEnvelope.from(envelope)
968
+
969
+ expect(result).toEqual(envelope)
970
+ })
971
+
972
+ test('behavior: coerces from flat signature', () => {
973
+ const result = SignatureEnvelope.from(signature_secp256k1)
974
+
975
+ expect(result).toMatchObject({
976
+ signature: {
977
+ r: signature_secp256k1.r,
978
+ s: signature_secp256k1.s,
979
+ yParity: signature_secp256k1.yParity,
980
+ },
981
+ type: 'secp256k1',
982
+ })
983
+ })
984
+ })
985
+
986
+ describe('p256', () => {
987
+ test('behavior: coerces from hex string', () => {
988
+ const serialized = SignatureEnvelope.serialize(signature_p256)
989
+ const envelope = SignatureEnvelope.from(serialized)
990
+
991
+ expect(envelope).toMatchObject({
992
+ signature: {
993
+ r: signature_p256.signature.r,
994
+ s: signature_p256.signature.s,
995
+ },
996
+ type: 'p256',
997
+ })
998
+ })
999
+
1000
+ test('behavior: adds type to object', () => {
1001
+ const { type: _, ...withoutType } = signature_p256
1002
+ const envelope = SignatureEnvelope.from(withoutType)
1003
+
1004
+ expect(envelope.type).toBe('p256')
1005
+ })
1006
+ })
1007
+
1008
+ describe('webAuthn', () => {
1009
+ test('behavior: coerces from hex string', () => {
1010
+ const serialized = SignatureEnvelope.serialize(signature_webauthn)
1011
+ const envelope = SignatureEnvelope.from(serialized)
1012
+
1013
+ expect(envelope).toMatchObject({
1014
+ signature: {
1015
+ r: signature_webauthn.signature.r,
1016
+ s: signature_webauthn.signature.s,
1017
+ },
1018
+ type: 'webAuthn',
1019
+ })
1020
+ })
1021
+
1022
+ test('behavior: adds type to object', () => {
1023
+ const { type: _, ...withoutType } = signature_webauthn
1024
+ const envelope = SignatureEnvelope.from(withoutType)
1025
+
1026
+ expect(envelope.type).toBe('webAuthn')
1027
+ })
1028
+ })
1029
+
1030
+ describe('keychain', () => {
1031
+ test('behavior: coerces from hex string with secp256k1 inner', () => {
1032
+ const serialized = SignatureEnvelope.serialize(
1033
+ signature_keychain_secp256k1,
1034
+ )
1035
+ const envelope = SignatureEnvelope.from(serialized)
1036
+
1037
+ expect(envelope).toMatchObject({
1038
+ userAddress: signature_keychain_secp256k1.userAddress,
1039
+ inner: SignatureEnvelope.from(signature_secp256k1),
1040
+ type: 'keychain',
1041
+ })
1042
+ })
1043
+
1044
+ test('behavior: coerces from hex string with p256 inner', () => {
1045
+ const serialized = SignatureEnvelope.serialize(signature_keychain_p256)
1046
+ const envelope = SignatureEnvelope.from(serialized)
1047
+
1048
+ expect(envelope).toMatchObject({
1049
+ userAddress: signature_keychain_p256.userAddress,
1050
+ type: 'keychain',
1051
+ })
1052
+ })
1053
+
1054
+ test('behavior: adds type to object', () => {
1055
+ const { type: _, ...withoutType } = signature_keychain_secp256k1
1056
+ const envelope = SignatureEnvelope.from(withoutType)
1057
+
1058
+ expect(envelope.type).toBe('keychain')
1059
+ })
1060
+
1061
+ test('behavior: computes keyId from p256 inner publicKey', () => {
1062
+ const envelope = SignatureEnvelope.from({
1063
+ userAddress: '0x1234567890123456789012345678901234567890',
1064
+ inner: signature_p256,
1065
+ })
1066
+
1067
+ expect(envelope.keyId).toBe(Address.fromPublicKey(publicKey))
1068
+ })
1069
+
1070
+ test('behavior: computes keyId from webAuthn inner publicKey', () => {
1071
+ const envelope = SignatureEnvelope.from({
1072
+ userAddress: '0x1234567890123456789012345678901234567890',
1073
+ inner: signature_webauthn,
1074
+ })
1075
+
1076
+ expect(envelope.keyId).toBe(Address.fromPublicKey(publicKey))
1077
+ })
1078
+
1079
+ test('behavior: computes keyId from secp256k1 inner with payload', () => {
1080
+ const privateKey = Secp256k1.randomPrivateKey()
1081
+ const accessKeyPublicKey = Secp256k1.getPublicKey({ privateKey })
1082
+ const payload = '0xdeadbeef'
1083
+ const sig = Secp256k1.sign({ payload, privateKey })
1084
+
1085
+ const envelope = SignatureEnvelope.from(
1086
+ {
1087
+ userAddress: '0x1234567890123456789012345678901234567890',
1088
+ inner: SignatureEnvelope.from(sig),
1089
+ },
1090
+ { payload },
1091
+ )
1092
+
1093
+ expect(envelope.keyId).toBe(Address.fromPublicKey(accessKeyPublicKey))
1094
+ })
1095
+
1096
+ test('behavior: does not compute keyId for secp256k1 without payload', () => {
1097
+ const envelope = SignatureEnvelope.from({
1098
+ userAddress: '0x1234567890123456789012345678901234567890',
1099
+ inner: SignatureEnvelope.from(signature_secp256k1),
1100
+ })
1101
+
1102
+ expect(envelope.keyId).toBeUndefined()
1103
+ })
1104
+
1105
+ test('behavior: preserves explicit keyId', () => {
1106
+ const explicitKeyId = '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1107
+ const envelope = SignatureEnvelope.from({
1108
+ userAddress: '0x1234567890123456789012345678901234567890',
1109
+ inner: signature_p256,
1110
+ keyId: explicitKeyId,
1111
+ })
1112
+
1113
+ expect(envelope.keyId).toBe(explicitKeyId)
1114
+ })
1115
+ })
1116
+
1117
+ describe('multisig', () => {
1118
+ const genesisConfig = MultisigConfig.from({
1119
+ threshold: 1,
1120
+ owners: [
1121
+ {
1122
+ owner: '0x1111111111111111111111111111111111111111',
1123
+ weight: 1,
1124
+ },
1125
+ ],
1126
+ })
1127
+
1128
+ test('behavior: derives `account`/`genesisConfigId` from `genesisConfig`', () => {
1129
+ const envelope = SignatureEnvelope.from({
1130
+ genesisConfig,
1131
+ signatures: [SignatureEnvelope.from(signature_secp256k1)],
1132
+ })
1133
+
1134
+ expect(envelope).toMatchObject({
1135
+ type: 'multisig',
1136
+ account: MultisigConfig.getAddress(genesisConfig),
1137
+ genesisConfigId: MultisigConfig.toId(genesisConfig),
1138
+ })
1139
+ expect('genesisConfig' in envelope).toBe(false)
1140
+ expect((envelope as SignatureEnvelope.Multisig).init).toBeUndefined()
1141
+ })
1142
+
1143
+ test('behavior: `init: true` opts into bootstrap (uses `genesisConfig` as `init`)', () => {
1144
+ const envelope = SignatureEnvelope.from({
1145
+ genesisConfig,
1146
+ signatures: [SignatureEnvelope.from(signature_secp256k1)],
1147
+ init: true,
1148
+ })
1149
+
1150
+ expect((envelope as SignatureEnvelope.Multisig).init).toEqual(
1151
+ genesisConfig,
1152
+ )
1153
+ })
1154
+
1155
+ test('behavior: `init` accepts an explicit config', () => {
1156
+ const otherConfig = MultisigConfig.from({
1157
+ threshold: 1,
1158
+ owners: [
1159
+ {
1160
+ owner: '0x2222222222222222222222222222222222222222',
1161
+ weight: 1,
1162
+ },
1163
+ ],
1164
+ })
1165
+ const envelope = SignatureEnvelope.from({
1166
+ genesisConfig,
1167
+ signatures: [SignatureEnvelope.from(signature_secp256k1)],
1168
+ init: otherConfig,
1169
+ })
1170
+
1171
+ expect((envelope as SignatureEnvelope.Multisig).init).toEqual(otherConfig)
1172
+ })
1173
+
1174
+ test('behavior: `{account, genesisConfigId}` form still works', () => {
1175
+ const account = MultisigConfig.getAddress(genesisConfig)
1176
+ const genesisConfigId = MultisigConfig.toId(genesisConfig)
1177
+ const envelope = SignatureEnvelope.from({
1178
+ account,
1179
+ genesisConfigId,
1180
+ signatures: [SignatureEnvelope.from(signature_secp256k1)],
1181
+ })
1182
+
1183
+ expect(envelope).toMatchObject({
1184
+ type: 'multisig',
1185
+ account,
1186
+ genesisConfigId,
1187
+ })
1188
+ })
1189
+ })
1190
+ })
1191
+
1192
+ describe('getType', () => {
1193
+ describe('secp256k1', () => {
1194
+ test('behavior: returns explicit type', () => {
1195
+ const envelope: SignatureEnvelope.SignatureEnvelope = {
1196
+ signature: {
1197
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1198
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1199
+ yParity: 0,
1200
+ },
1201
+ type: 'secp256k1',
1202
+ }
1203
+
1204
+ expect(SignatureEnvelope.getType(envelope)).toBe('secp256k1')
1205
+ })
1206
+
1207
+ test('behavior: infers type from properties', () => {
1208
+ expect(
1209
+ SignatureEnvelope.getType({ signature: signature_secp256k1 }),
1210
+ ).toBe('secp256k1')
1211
+ })
1212
+
1213
+ test('behavior: infers type from flat signature', () => {
1214
+ const signature = {
1215
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1216
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1217
+ yParity: 0,
1218
+ }
1219
+ expect(SignatureEnvelope.getType(signature)).toBe('secp256k1')
1220
+ })
1221
+ })
1222
+
1223
+ describe('p256', () => {
1224
+ test('behavior: returns explicit type', () => {
1225
+ expect(SignatureEnvelope.getType(signature_p256)).toBe('p256')
1226
+ })
1227
+
1228
+ test('behavior: infers type from properties', () => {
1229
+ const { type: _, ...signatureWithoutType } = signature_p256
1230
+ expect(SignatureEnvelope.getType(signatureWithoutType)).toBe('p256')
1231
+ })
1232
+ })
1233
+
1234
+ describe('webAuthn', () => {
1235
+ test('behavior: returns explicit type', () => {
1236
+ expect(SignatureEnvelope.getType(signature_webauthn)).toBe('webAuthn')
1237
+ })
1238
+
1239
+ test('behavior: infers type from properties', () => {
1240
+ const { type: _, ...signatureWithoutType } = signature_webauthn
1241
+ expect(SignatureEnvelope.getType(signatureWithoutType)).toBe('webAuthn')
1242
+ })
1243
+ })
1244
+
1245
+ describe('keychain', () => {
1246
+ test('behavior: returns explicit type', () => {
1247
+ expect(SignatureEnvelope.getType(signature_keychain_secp256k1)).toBe(
1248
+ 'keychain',
1249
+ )
1250
+ })
1251
+
1252
+ test('behavior: infers type from properties', () => {
1253
+ const { type: _, ...signatureWithoutType } = signature_keychain_secp256k1
1254
+ expect(SignatureEnvelope.getType(signatureWithoutType)).toBe('keychain')
1255
+ })
1256
+
1257
+ test('behavior: infers type for keychain with p256 inner', () => {
1258
+ const { type: _, ...signatureWithoutType } = signature_keychain_p256
1259
+ expect(SignatureEnvelope.getType(signatureWithoutType)).toBe('keychain')
1260
+ })
1261
+
1262
+ test('behavior: infers type for keychain with webAuthn inner', () => {
1263
+ const { type: _, ...signatureWithoutType } = signature_keychain_webauthn
1264
+ expect(SignatureEnvelope.getType(signatureWithoutType)).toBe('keychain')
1265
+ })
1266
+ })
1267
+
1268
+ test('error: throws on invalid envelope', () => {
1269
+ expect(() =>
1270
+ SignatureEnvelope.getType({} as any),
1271
+ ).toThrowErrorMatchingInlineSnapshot(
1272
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`{}\`) to a valid signature envelope.]`,
1273
+ )
1274
+ })
1275
+
1276
+ test('error: throws on incomplete signature', () => {
1277
+ expect(() =>
1278
+ SignatureEnvelope.getType({
1279
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1280
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1281
+ } as any),
1282
+ ).toThrowErrorMatchingInlineSnapshot(
1283
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`{"r":"0x0000000000000000000000000000000000000000000000000000000000000000","s":"0x0000000000000000000000000000000000000000000000000000000000000000"}\`) to a valid signature envelope.]`,
1284
+ )
1285
+ })
1286
+ })
1287
+
1288
+ describe('serialize', () => {
1289
+ describe('secp256k1', () => {
1290
+ test('behavior: serializes with explicit type', () => {
1291
+ const envelope: SignatureEnvelope.SignatureEnvelope = {
1292
+ signature: signature_secp256k1,
1293
+ type: 'secp256k1',
1294
+ }
1295
+
1296
+ const serialized = SignatureEnvelope.serialize(envelope)
1297
+
1298
+ expect(serialized).toBe(Signature.toHex(signature_secp256k1))
1299
+ })
1300
+
1301
+ test('behavior: serializes without explicit type', () => {
1302
+ const serialized = SignatureEnvelope.serialize({
1303
+ signature: signature_secp256k1,
1304
+ type: 'secp256k1',
1305
+ })
1306
+
1307
+ expect(serialized).toBe(Signature.toHex(signature_secp256k1))
1308
+ })
1309
+
1310
+ test('behavior: serializes with magic identifier', () => {
1311
+ const envelope: SignatureEnvelope.SignatureEnvelope = {
1312
+ signature: signature_secp256k1,
1313
+ type: 'secp256k1',
1314
+ }
1315
+
1316
+ const serialized = SignatureEnvelope.serialize(envelope, { magic: true })
1317
+
1318
+ expect(serialized.endsWith(SignatureEnvelope.magicBytes.slice(2))).toBe(
1319
+ true,
1320
+ )
1321
+ expect(Hex.size(serialized)).toBe(65 + 32) // signature + magic identifier
1322
+ })
1323
+ })
1324
+
1325
+ describe('p256', () => {
1326
+ test('behavior: serializes P256 signature with type identifier', () => {
1327
+ const serialized = SignatureEnvelope.serialize(signature_p256)
1328
+
1329
+ // Should be 130 bytes: 1 (type) + 32 (r) + 32 (s) + 32 (pubKeyX) + 32 (pubKeyY) + 1 (prehash)
1330
+ expect(serialized.length).toBe(2 + 130 * 2) // 2 for '0x' prefix + 130 bytes * 2 hex chars
1331
+
1332
+ // First byte should be P256 type identifier (0x01)
1333
+ expect(serialized.slice(0, 4)).toBe('0x01')
1334
+ })
1335
+
1336
+ test('behavior: serializes prehash flag correctly', () => {
1337
+ const withPreHashFalse = { ...signature_p256, prehash: false }
1338
+ const serialized = SignatureEnvelope.serialize(withPreHashFalse)
1339
+
1340
+ // Last byte should be 0x00 for false
1341
+ expect(serialized.slice(-2)).toBe('00')
1342
+ })
1343
+
1344
+ test('behavior: serializes with magic identifier', () => {
1345
+ const serialized = SignatureEnvelope.serialize(signature_p256, {
1346
+ magic: true,
1347
+ })
1348
+
1349
+ expect(serialized.endsWith(SignatureEnvelope.magicBytes.slice(2))).toBe(
1350
+ true,
1351
+ )
1352
+ expect(Hex.size(serialized)).toBe(130 + 32) // signature + magic identifier
1353
+ })
1354
+ })
1355
+
1356
+ describe('webAuthn', () => {
1357
+ test('behavior: serializes WebAuthn signature with type identifier', () => {
1358
+ const serialized = SignatureEnvelope.serialize(signature_webauthn)
1359
+
1360
+ // Should be: 1 (type) + authenticatorData.length + clientDataJSON.length + 128 (signature components)
1361
+ const authDataLength =
1362
+ (signature_webauthn.metadata.authenticatorData.length - 2) / 2
1363
+ const clientDataLength = signature_webauthn.metadata.clientDataJSON.length
1364
+ const expectedLength =
1365
+ 2 + (1 + authDataLength + clientDataLength + 128) * 2
1366
+
1367
+ expect(serialized.length).toBe(expectedLength)
1368
+
1369
+ // First byte should be WebAuthn type identifier (0x02)
1370
+ expect(serialized.slice(0, 4)).toBe('0x02')
1371
+ })
1372
+
1373
+ test('behavior: preserves metadata', () => {
1374
+ const serialized = SignatureEnvelope.serialize(signature_webauthn)
1375
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1376
+
1377
+ expect(deserialized.metadata?.authenticatorData).toBe(
1378
+ signature_webauthn.metadata.authenticatorData,
1379
+ )
1380
+ expect(deserialized.metadata?.clientDataJSON).toBe(
1381
+ signature_webauthn.metadata.clientDataJSON,
1382
+ )
1383
+ })
1384
+
1385
+ test('behavior: serializes with magic identifier', () => {
1386
+ const serialized = SignatureEnvelope.serialize(signature_webauthn, {
1387
+ magic: true,
1388
+ })
1389
+
1390
+ expect(serialized.endsWith(SignatureEnvelope.magicBytes.slice(2))).toBe(
1391
+ true,
1392
+ )
1393
+
1394
+ const authDataLength =
1395
+ (signature_webauthn.metadata.authenticatorData.length - 2) / 2
1396
+ const clientDataLength = signature_webauthn.metadata.clientDataJSON.length
1397
+ const expectedSize = 1 + authDataLength + clientDataLength + 128 + 32 // type + data + signature components + magic
1398
+
1399
+ expect(Hex.size(serialized)).toBe(expectedSize)
1400
+ })
1401
+ })
1402
+
1403
+ describe('keychain', () => {
1404
+ test('behavior: serializes keychain signature with secp256k1 inner and type identifier', () => {
1405
+ const serialized = SignatureEnvelope.serialize(
1406
+ signature_keychain_secp256k1,
1407
+ )
1408
+
1409
+ // Should be: 1 (type) + 20 (address) + 65 (secp256k1 signature)
1410
+ expect(Hex.size(serialized)).toBe(1 + 20 + 65)
1411
+
1412
+ // First byte should be Keychain V2 type identifier (0x04)
1413
+ expect(Hex.slice(serialized, 0, 1)).toBe('0x04')
1414
+
1415
+ // Next 20 bytes should be the user address (without '0x')
1416
+ expect(Hex.slice(serialized, 1, 21)).toBe(
1417
+ signature_keychain_secp256k1.userAddress,
1418
+ )
1419
+ })
1420
+
1421
+ test('behavior: serializes keychain signature with p256 inner', () => {
1422
+ const serialized = SignatureEnvelope.serialize(signature_keychain_p256)
1423
+
1424
+ // Should be: 1 (type) + 20 (address) + 130 (p256 signature with type)
1425
+ expect(Hex.size(serialized)).toBe(1 + 20 + 130)
1426
+
1427
+ // First byte should be Keychain V2 type identifier (0x04)
1428
+ expect(Hex.slice(serialized, 0, 1)).toBe('0x04')
1429
+
1430
+ // Next 20 bytes should be the user address (without '0x')
1431
+ expect(Hex.slice(serialized, 1, 21)).toBe(
1432
+ signature_keychain_p256.userAddress,
1433
+ )
1434
+
1435
+ // Next 130 bytes should be the p256 signature
1436
+ expect(Hex.slice(serialized, 21, 151)).toBe(
1437
+ SignatureEnvelope.serialize(signature_p256),
1438
+ )
1439
+ })
1440
+
1441
+ test('behavior: serializes keychain signature with webAuthn inner', () => {
1442
+ const serialized = SignatureEnvelope.serialize(
1443
+ signature_keychain_webauthn,
1444
+ )
1445
+
1446
+ // First byte should be Keychain V2 type identifier (0x04)
1447
+ expect(Hex.slice(serialized, 0, 1)).toBe('0x04')
1448
+
1449
+ // Should contain the user address
1450
+ expect(Hex.slice(serialized, 1, 21)).toBe(
1451
+ signature_keychain_webauthn.userAddress,
1452
+ )
1453
+
1454
+ // Next N bytes should be the webAuthn signature
1455
+ expect(Hex.slice(serialized, 21)).toBe(
1456
+ SignatureEnvelope.serialize(signature_webauthn),
1457
+ )
1458
+ })
1459
+
1460
+ test('behavior: preserves userAddress and inner signature', () => {
1461
+ const serialized = SignatureEnvelope.serialize(
1462
+ signature_keychain_secp256k1,
1463
+ )
1464
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1465
+
1466
+ expect(deserialized.userAddress).toBe(
1467
+ signature_keychain_secp256k1.userAddress,
1468
+ )
1469
+ expect(deserialized.inner).toMatchObject({
1470
+ type: 'secp256k1',
1471
+ signature: {
1472
+ r: signature_secp256k1.r,
1473
+ s: signature_secp256k1.s,
1474
+ yParity: signature_secp256k1.yParity,
1475
+ },
1476
+ })
1477
+ })
1478
+
1479
+ test('behavior: serializes with magic identifier', () => {
1480
+ const serialized = SignatureEnvelope.serialize(
1481
+ signature_keychain_secp256k1,
1482
+ { magic: true },
1483
+ )
1484
+
1485
+ expect(serialized.endsWith(SignatureEnvelope.magicBytes.slice(2))).toBe(
1486
+ true,
1487
+ )
1488
+ expect(Hex.size(serialized)).toBe(1 + 20 + 65 + 32) // type + address + secp256k1 + magic
1489
+ })
1490
+ })
1491
+
1492
+ describe('roundtrip', () => {
1493
+ describe('secp256k1', () => {
1494
+ test('behavior: roundtrips serialize -> deserialize', () => {
1495
+ const envelope: SignatureEnvelope.Secp256k1 = {
1496
+ signature: signature_secp256k1,
1497
+ type: 'secp256k1',
1498
+ }
1499
+
1500
+ const serialized = SignatureEnvelope.serialize(envelope)
1501
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1502
+
1503
+ expect(deserialized).toMatchObject({
1504
+ signature: {
1505
+ r: signature_secp256k1.r,
1506
+ s: signature_secp256k1.s,
1507
+ yParity: signature_secp256k1.yParity,
1508
+ },
1509
+ type: 'secp256k1',
1510
+ })
1511
+ })
1512
+
1513
+ test('behavior: roundtrips serialize with magic -> deserialize', () => {
1514
+ const envelope: SignatureEnvelope.Secp256k1 = {
1515
+ signature: signature_secp256k1,
1516
+ type: 'secp256k1',
1517
+ }
1518
+
1519
+ const serialized = SignatureEnvelope.serialize(envelope, {
1520
+ magic: true,
1521
+ })
1522
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1523
+
1524
+ expect(deserialized).toMatchObject({
1525
+ signature: {
1526
+ r: signature_secp256k1.r,
1527
+ s: signature_secp256k1.s,
1528
+ yParity: signature_secp256k1.yParity,
1529
+ },
1530
+ type: 'secp256k1',
1531
+ })
1532
+ })
1533
+ })
1534
+
1535
+ describe('p256', () => {
1536
+ test('behavior: roundtrips serialize -> deserialize', () => {
1537
+ const serialized = SignatureEnvelope.serialize(signature_p256)
1538
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1539
+
1540
+ expect(deserialized).toMatchObject({
1541
+ signature: {
1542
+ r: signature_p256.signature.r,
1543
+ s: signature_p256.signature.s,
1544
+ },
1545
+ publicKey: {
1546
+ x: signature_p256.publicKey.x,
1547
+ y: signature_p256.publicKey.y,
1548
+ },
1549
+ prehash: signature_p256.prehash,
1550
+ type: 'p256',
1551
+ })
1552
+ })
1553
+
1554
+ test('behavior: handles prehash=false', () => {
1555
+ const signature = { ...signature_p256, prehash: false }
1556
+ const serialized = SignatureEnvelope.serialize(signature)
1557
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1558
+
1559
+ expect(deserialized.prehash).toBe(false)
1560
+ })
1561
+
1562
+ test('behavior: roundtrips serialize with magic -> deserialize', () => {
1563
+ const serialized = SignatureEnvelope.serialize(signature_p256, {
1564
+ magic: true,
1565
+ })
1566
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1567
+
1568
+ expect(deserialized).toMatchObject({
1569
+ signature: {
1570
+ r: signature_p256.signature.r,
1571
+ s: signature_p256.signature.s,
1572
+ },
1573
+ publicKey: {
1574
+ x: signature_p256.publicKey.x,
1575
+ y: signature_p256.publicKey.y,
1576
+ },
1577
+ prehash: signature_p256.prehash,
1578
+ type: 'p256',
1579
+ })
1580
+ })
1581
+ })
1582
+
1583
+ describe('webAuthn', () => {
1584
+ test('behavior: roundtrips serialize -> deserialize', () => {
1585
+ const serialized = SignatureEnvelope.serialize(signature_webauthn)
1586
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1587
+
1588
+ expect(deserialized).toMatchObject({
1589
+ signature: {
1590
+ r: signature_webauthn.signature.r,
1591
+ s: signature_webauthn.signature.s,
1592
+ },
1593
+ publicKey: {
1594
+ x: signature_webauthn.publicKey.x,
1595
+ y: signature_webauthn.publicKey.y,
1596
+ },
1597
+ metadata: {
1598
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
1599
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
1600
+ },
1601
+ type: 'webAuthn',
1602
+ })
1603
+ })
1604
+
1605
+ test('behavior: handles variable-length clientDataJSON', () => {
1606
+ const longClientData = JSON.stringify({
1607
+ type: 'webAuthn.get',
1608
+ challenge: 'a'.repeat(100),
1609
+ origin: 'https://example.com',
1610
+ })
1611
+
1612
+ const signatureWithLongData = {
1613
+ ...signature_webauthn,
1614
+ metadata: {
1615
+ ...signature_webauthn.metadata,
1616
+ clientDataJSON: longClientData,
1617
+ },
1618
+ }
1619
+
1620
+ const serialized = SignatureEnvelope.serialize(signatureWithLongData)
1621
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1622
+
1623
+ expect(deserialized.metadata?.clientDataJSON).toBe(longClientData)
1624
+ })
1625
+
1626
+ test('behavior: roundtrips serialize with magic -> deserialize', () => {
1627
+ const serialized = SignatureEnvelope.serialize(signature_webauthn, {
1628
+ magic: true,
1629
+ })
1630
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1631
+
1632
+ expect(deserialized).toMatchObject({
1633
+ signature: {
1634
+ r: signature_webauthn.signature.r,
1635
+ s: signature_webauthn.signature.s,
1636
+ },
1637
+ publicKey: {
1638
+ x: signature_webauthn.publicKey.x,
1639
+ y: signature_webauthn.publicKey.y,
1640
+ },
1641
+ metadata: {
1642
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
1643
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
1644
+ },
1645
+ type: 'webAuthn',
1646
+ })
1647
+ })
1648
+ })
1649
+
1650
+ describe('keychain', () => {
1651
+ test('behavior: roundtrips serialize -> deserialize with secp256k1 inner', () => {
1652
+ const serialized = SignatureEnvelope.serialize(
1653
+ signature_keychain_secp256k1,
1654
+ )
1655
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1656
+
1657
+ expect(deserialized).toMatchObject(signature_keychain_secp256k1)
1658
+ })
1659
+
1660
+ test('behavior: roundtrips serialize -> deserialize with p256 inner', () => {
1661
+ const serialized = SignatureEnvelope.serialize(signature_keychain_p256)
1662
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1663
+
1664
+ expect(deserialized).toMatchInlineSnapshot(`
1665
+ {
1666
+ "inner": {
1667
+ "prehash": true,
1668
+ "publicKey": {
1669
+ "prefix": 4,
1670
+ "x": "0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5",
1671
+ "y": "0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0",
1672
+ },
1673
+ "signature": {
1674
+ "r": "0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e",
1675
+ "s": "0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35",
1676
+ },
1677
+ "type": "p256",
1678
+ },
1679
+ "type": "keychain",
1680
+ "userAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
1681
+ "version": "v2",
1682
+ }
1683
+ `)
1684
+ })
1685
+
1686
+ test('behavior: roundtrips serialize -> deserialize with webAuthn inner', () => {
1687
+ const serialized = SignatureEnvelope.serialize(
1688
+ signature_keychain_webauthn,
1689
+ )
1690
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1691
+
1692
+ expect(deserialized).toMatchInlineSnapshot(`
1693
+ {
1694
+ "inner": {
1695
+ "metadata": {
1696
+ "authenticatorData": "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000",
1697
+ "clientDataJSON": "{"type":"webauthn.get","challenge":"3q2-7w","origin":"http://localhost","crossOrigin":false}",
1698
+ },
1699
+ "publicKey": {
1700
+ "prefix": 4,
1701
+ "x": "0xad8ac16e167d6992c3e120d7f17d2376bc1cbcf30c46ba6dd00ce07303e742f5",
1702
+ "y": "0x11edf6ce1c32de66846f56afa7be1cbd729bc35750b6d0cdcf3ec9d75461aba0",
1703
+ },
1704
+ "signature": {
1705
+ "r": "0xccbb3485d4726235f13cb15ef394fb7158179fb7b1925eccec0147671090c52e",
1706
+ "s": "0x77c3c53373cc1e3b05e7c23f609deb17cea8fe097300c45411237e9fe4166b35",
1707
+ },
1708
+ "type": "webAuthn",
1709
+ },
1710
+ "type": "keychain",
1711
+ "userAddress": "0xfedcbafedcbafedcbafedcbafedcbafedcbafedc",
1712
+ "version": "v2",
1713
+ }
1714
+ `)
1715
+ })
1716
+
1717
+ test('behavior: roundtrips serialize with magic -> deserialize with secp256k1 inner', () => {
1718
+ const serialized = SignatureEnvelope.serialize(
1719
+ signature_keychain_secp256k1,
1720
+ { magic: true },
1721
+ )
1722
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1723
+
1724
+ expect(deserialized).toMatchObject(signature_keychain_secp256k1)
1725
+ })
1726
+
1727
+ test('behavior: roundtrips serialize with magic -> deserialize with p256 inner', () => {
1728
+ const serialized = SignatureEnvelope.serialize(
1729
+ signature_keychain_p256,
1730
+ { magic: true },
1731
+ )
1732
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1733
+
1734
+ expect(deserialized).toMatchObject({
1735
+ type: 'keychain',
1736
+ userAddress: signature_keychain_p256.userAddress,
1737
+ inner: {
1738
+ type: 'p256',
1739
+ prehash: signature_p256.prehash,
1740
+ publicKey: {
1741
+ x: signature_p256.publicKey.x,
1742
+ y: signature_p256.publicKey.y,
1743
+ },
1744
+ signature: {
1745
+ r: signature_p256.signature.r,
1746
+ s: signature_p256.signature.s,
1747
+ },
1748
+ },
1749
+ })
1750
+ })
1751
+
1752
+ test('behavior: roundtrips serialize with magic -> deserialize with webAuthn inner', () => {
1753
+ const serialized = SignatureEnvelope.serialize(
1754
+ signature_keychain_webauthn,
1755
+ { magic: true },
1756
+ )
1757
+ const deserialized = SignatureEnvelope.deserialize(serialized)
1758
+
1759
+ expect(deserialized).toMatchObject({
1760
+ type: 'keychain',
1761
+ userAddress: signature_keychain_webauthn.userAddress,
1762
+ inner: {
1763
+ type: 'webAuthn',
1764
+ metadata: {
1765
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
1766
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
1767
+ },
1768
+ publicKey: {
1769
+ x: signature_webauthn.publicKey.x,
1770
+ y: signature_webauthn.publicKey.y,
1771
+ },
1772
+ signature: {
1773
+ r: signature_webauthn.signature.r,
1774
+ s: signature_webauthn.signature.s,
1775
+ },
1776
+ },
1777
+ })
1778
+ })
1779
+ })
1780
+ })
1781
+
1782
+ test('error: throws on invalid envelope', () => {
1783
+ const error = (() => {
1784
+ try {
1785
+ SignatureEnvelope.serialize({} as any)
1786
+ return
1787
+ } catch (e) {
1788
+ return e
1789
+ }
1790
+ })() as SignatureEnvelope.CoercionError
1791
+ expect(error).toBeInstanceOf(SignatureEnvelope.CoercionError)
1792
+ expect(error.message).toMatchInlineSnapshot(
1793
+ `"Unable to coerce value (\`{}\`) to a valid signature envelope."`,
1794
+ )
1795
+ })
1796
+ })
1797
+
1798
+ describe('sortMultisigApprovals', () => {
1799
+ // Build owner key pairs first so we can construct a real genesis config
1800
+ // whose owner set matches the keys that produce the approvals below.
1801
+ const ownerKeys = Array.from({ length: 3 }, () => {
1802
+ const privateKey = Secp256k1.randomPrivateKey()
1803
+ const address = Address.fromPublicKey(
1804
+ Secp256k1.getPublicKey({ privateKey }),
1805
+ )
1806
+ return { address, privateKey } as const
1807
+ })
1808
+ const ascendingOwners = [...ownerKeys].sort((a, b) =>
1809
+ Hex.toBigInt(a.address) < Hex.toBigInt(b.address) ? -1 : 1,
1810
+ )
1811
+
1812
+ const genesisConfig = MultisigConfig.from({
1813
+ threshold: 2,
1814
+ owners: ascendingOwners.map((o) => ({ owner: o.address, weight: 1 })),
1815
+ })
1816
+ const payload = `0x${'42'.repeat(32)}` as const
1817
+ const digest = MultisigConfig.getSignPayload({ payload, genesisConfig })
1818
+
1819
+ const owners = ownerKeys.map((owner) => ({
1820
+ address: owner.address,
1821
+ signature: SignatureEnvelope.from(
1822
+ Secp256k1.sign({ payload: digest, privateKey: owner.privateKey }),
1823
+ ),
1824
+ }))
1825
+ const ascending = ascendingOwners.map((o) => ({
1826
+ address: o.address,
1827
+ signature: owners.find((x) => x.address === o.address)!.signature,
1828
+ }))
1829
+
1830
+ test('behavior: orders approvals ascending by recovered owner address', () => {
1831
+ const ordered = SignatureEnvelope.sortMultisigApprovals({
1832
+ genesisConfig,
1833
+ payload,
1834
+ // Provide approvals in reverse of the canonical order.
1835
+ signatures: [...ascending].reverse().map((owner) => owner.signature),
1836
+ })
1837
+ expect(ordered).toEqual(ascending.map((owner) => owner.signature))
1838
+ })
1839
+
1840
+ test('behavior: already-sorted input is unchanged', () => {
1841
+ const signatures = ascending.map((owner) => owner.signature)
1842
+ expect(
1843
+ SignatureEnvelope.sortMultisigApprovals({
1844
+ genesisConfig,
1845
+ payload,
1846
+ signatures,
1847
+ }),
1848
+ ).toEqual(signatures)
1849
+ })
1850
+
1851
+ test('behavior: recovered order matches the config owner order', () => {
1852
+ const ordered = SignatureEnvelope.sortMultisigApprovals({
1853
+ genesisConfig,
1854
+ payload,
1855
+ signatures: owners.map((owner) => owner.signature),
1856
+ })
1857
+ const recovered = ordered.map((signature) =>
1858
+ SignatureEnvelope.extractAddress({ payload: digest, signature }),
1859
+ )
1860
+ expect(recovered).toEqual(ascending.map((owner) => owner.address))
1861
+ })
1862
+
1863
+ test('behavior: `genesisConfig` and `{account, genesisConfigId}` produce identical ordering', () => {
1864
+ const account = MultisigConfig.getAddress(genesisConfig)
1865
+ const genesisConfigId = MultisigConfig.toId(genesisConfig)
1866
+ const signatures = owners.map((owner) => owner.signature)
1867
+
1868
+ const fromConfig = SignatureEnvelope.sortMultisigApprovals({
1869
+ genesisConfig,
1870
+ payload,
1871
+ signatures,
1872
+ })
1873
+ const fromIds = SignatureEnvelope.sortMultisigApprovals({
1874
+ account,
1875
+ genesisConfigId,
1876
+ payload,
1877
+ signatures,
1878
+ })
1879
+ expect(fromConfig).toEqual(fromIds)
1880
+ })
1881
+ })
1882
+
1883
+ describe('validate', () => {
1884
+ describe('secp256k1', () => {
1885
+ test('behavior: returns true for valid signature', () => {
1886
+ expect(
1887
+ SignatureEnvelope.validate({
1888
+ signature: signature_secp256k1,
1889
+ type: 'secp256k1',
1890
+ }),
1891
+ ).toBe(true)
1892
+ })
1893
+
1894
+ test('behavior: returns true for signature without explicit type', () => {
1895
+ expect(
1896
+ SignatureEnvelope.validate({ signature: signature_secp256k1 }),
1897
+ ).toBe(true)
1898
+ })
1899
+
1900
+ test('behavior: returns false for invalid signature values', () => {
1901
+ expect(
1902
+ SignatureEnvelope.validate({
1903
+ signature: {
1904
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1905
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1906
+ yParity: 2,
1907
+ },
1908
+ type: 'secp256k1',
1909
+ }),
1910
+ ).toBe(false)
1911
+ })
1912
+ })
1913
+
1914
+ describe('p256', () => {
1915
+ test('behavior: returns true for valid P256 signature', () => {
1916
+ expect(SignatureEnvelope.validate(signature_p256)).toBe(true)
1917
+ })
1918
+
1919
+ test('behavior: returns false for invalid P256 signature', () => {
1920
+ expect(
1921
+ SignatureEnvelope.validate({
1922
+ ...signature_p256,
1923
+ prehash: 'invalid' as any,
1924
+ }),
1925
+ ).toBe(false)
1926
+ })
1927
+ })
1928
+
1929
+ describe('webAuthn', () => {
1930
+ test('behavior: returns true for valid WebAuthn signature', () => {
1931
+ expect(SignatureEnvelope.validate(signature_webauthn)).toBe(true)
1932
+ })
1933
+
1934
+ test('behavior: returns false for invalid WebAuthn signature', () => {
1935
+ const { metadata: _, ...withoutMetadata } = signature_webauthn
1936
+ expect(SignatureEnvelope.validate(withoutMetadata as any)).toBe(false)
1937
+ })
1938
+ })
1939
+
1940
+ describe('keychain', () => {
1941
+ test('behavior: returns true for valid keychain with secp256k1 inner', () => {
1942
+ expect(SignatureEnvelope.validate(signature_keychain_secp256k1)).toBe(
1943
+ true,
1944
+ )
1945
+ })
1946
+
1947
+ test('behavior: returns true for valid keychain with p256 inner', () => {
1948
+ expect(SignatureEnvelope.validate(signature_keychain_p256)).toBe(true)
1949
+ })
1950
+
1951
+ test('behavior: returns true for valid keychain with webAuthn inner', () => {
1952
+ expect(SignatureEnvelope.validate(signature_keychain_webauthn)).toBe(true)
1953
+ })
1954
+
1955
+ test('behavior: returns false for invalid keychain signature', () => {
1956
+ expect(
1957
+ SignatureEnvelope.validate({
1958
+ userAddress: '0x1234567890123456789012345678901234567890',
1959
+ inner: {
1960
+ signature: {
1961
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1962
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1963
+ yParity: 2,
1964
+ },
1965
+ type: 'secp256k1',
1966
+ },
1967
+ type: 'keychain',
1968
+ } as any),
1969
+ ).toBe(false)
1970
+ })
1971
+ })
1972
+
1973
+ test('behavior: returns false for invalid envelope', () => {
1974
+ expect(SignatureEnvelope.validate({} as any)).toBe(false)
1975
+ })
1976
+
1977
+ test('behavior: returns false for incomplete signature', () => {
1978
+ expect(
1979
+ SignatureEnvelope.validate({
1980
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
1981
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
1982
+ } as any),
1983
+ ).toBe(false)
1984
+ })
1985
+ })
1986
+
1987
+ describe('verify', () => {
1988
+ describe('secp256k1', () => {
1989
+ test('behavior: verifies valid signature with publicKey', () => {
1990
+ const privateKey = Secp256k1.randomPrivateKey()
1991
+ const publicKey = Secp256k1.getPublicKey({ privateKey })
1992
+ const payload = '0xdeadbeef' as const
1993
+
1994
+ const signature = Secp256k1.sign({ payload, privateKey })
1995
+ const envelope = SignatureEnvelope.from(signature)
1996
+
1997
+ expect(
1998
+ SignatureEnvelope.verify(envelope, {
1999
+ payload,
2000
+ publicKey,
2001
+ }),
2002
+ ).toBe(true)
2003
+ })
2004
+
2005
+ test('behavior: verifies valid signature with address', () => {
2006
+ const privateKey = Secp256k1.randomPrivateKey()
2007
+ const publicKey = Secp256k1.getPublicKey({ privateKey })
2008
+ const address = Address.fromPublicKey(publicKey)
2009
+ const payload = '0xdeadbeef' as const
2010
+
2011
+ const signature = Secp256k1.sign({ payload, privateKey })
2012
+ const envelope = SignatureEnvelope.from(signature)
2013
+
2014
+ expect(
2015
+ SignatureEnvelope.verify(envelope, {
2016
+ payload,
2017
+ address,
2018
+ }),
2019
+ ).toBe(true)
2020
+ })
2021
+
2022
+ test('behavior: returns false for wrong publicKey', () => {
2023
+ const privateKey = Secp256k1.randomPrivateKey()
2024
+ const wrongPrivateKey = Secp256k1.randomPrivateKey()
2025
+ const wrongPublicKey = Secp256k1.getPublicKey({
2026
+ privateKey: wrongPrivateKey,
2027
+ })
2028
+ const payload = '0xdeadbeef' as const
2029
+
2030
+ const signature = Secp256k1.sign({ payload, privateKey })
2031
+ const envelope = SignatureEnvelope.from(signature)
2032
+
2033
+ expect(
2034
+ SignatureEnvelope.verify(envelope, {
2035
+ payload,
2036
+ publicKey: wrongPublicKey,
2037
+ }),
2038
+ ).toBe(false)
2039
+ })
2040
+
2041
+ test('behavior: returns false for wrong payload', () => {
2042
+ const privateKey = Secp256k1.randomPrivateKey()
2043
+ const publicKey = Secp256k1.getPublicKey({ privateKey })
2044
+ const payload = '0xdeadbeef' as const
2045
+
2046
+ const signature = Secp256k1.sign({ payload, privateKey })
2047
+ const envelope = SignatureEnvelope.from(signature)
2048
+
2049
+ expect(
2050
+ SignatureEnvelope.verify(envelope, {
2051
+ payload: '0xcafebabe',
2052
+ publicKey,
2053
+ }),
2054
+ ).toBe(false)
2055
+ })
2056
+ })
2057
+
2058
+ describe('p256', () => {
2059
+ test('behavior: verifies valid signature with publicKey', () => {
2060
+ const privateKey = P256.randomPrivateKey()
2061
+ const publicKey = P256.getPublicKey({ privateKey })
2062
+ const payload = '0xdeadbeef' as const
2063
+
2064
+ const signature = P256.sign({ payload, privateKey })
2065
+ const envelope = SignatureEnvelope.from({
2066
+ prehash: false,
2067
+ publicKey,
2068
+ signature,
2069
+ })
2070
+
2071
+ expect(
2072
+ SignatureEnvelope.verify(envelope, {
2073
+ payload,
2074
+ publicKey,
2075
+ }),
2076
+ ).toBe(true)
2077
+ })
2078
+
2079
+ test('behavior: verifies valid signature with address', () => {
2080
+ const privateKey = P256.randomPrivateKey()
2081
+ const publicKey = P256.getPublicKey({ privateKey })
2082
+ const address = Address.fromPublicKey(publicKey)
2083
+ const payload = '0xdeadbeef' as const
2084
+
2085
+ const signature = P256.sign({ payload, privateKey })
2086
+ const envelope = SignatureEnvelope.from({
2087
+ prehash: false,
2088
+ publicKey,
2089
+ signature,
2090
+ })
2091
+
2092
+ expect(
2093
+ SignatureEnvelope.verify(envelope, {
2094
+ payload,
2095
+ address,
2096
+ }),
2097
+ ).toBe(true)
2098
+ })
2099
+
2100
+ test('behavior: returns false for mismatched publicKey', () => {
2101
+ const privateKey = P256.randomPrivateKey()
2102
+ const publicKey = P256.getPublicKey({ privateKey })
2103
+ const wrongPrivateKey = P256.randomPrivateKey()
2104
+ const wrongPublicKey = P256.getPublicKey({ privateKey: wrongPrivateKey })
2105
+ const payload = '0xdeadbeef' as const
2106
+
2107
+ const signature = P256.sign({ payload, privateKey })
2108
+ const envelope = SignatureEnvelope.from({
2109
+ prehash: false,
2110
+ publicKey,
2111
+ signature,
2112
+ })
2113
+
2114
+ expect(
2115
+ SignatureEnvelope.verify(envelope, {
2116
+ payload,
2117
+ publicKey: wrongPublicKey,
2118
+ }),
2119
+ ).toBe(false)
2120
+ })
2121
+
2122
+ test('behavior: returns false for wrong payload', () => {
2123
+ const privateKey = P256.randomPrivateKey()
2124
+ const publicKey = P256.getPublicKey({ privateKey })
2125
+ const payload = '0xdeadbeef' as const
2126
+
2127
+ const signature = P256.sign({ payload, privateKey })
2128
+ const envelope = SignatureEnvelope.from({
2129
+ prehash: false,
2130
+ publicKey,
2131
+ signature,
2132
+ })
2133
+
2134
+ expect(
2135
+ SignatureEnvelope.verify(envelope, {
2136
+ payload: '0xcafebabe',
2137
+ publicKey,
2138
+ }),
2139
+ ).toBe(false)
2140
+ })
2141
+ })
2142
+
2143
+ describe('webCryptoP256', () => {
2144
+ test('behavior: verifies valid signature with publicKey', async () => {
2145
+ const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
2146
+ const payload = '0xdeadbeef' as const
2147
+
2148
+ const signature = await WebCryptoP256.sign({ payload, privateKey })
2149
+ const envelope = SignatureEnvelope.from({
2150
+ prehash: true,
2151
+ publicKey,
2152
+ signature,
2153
+ })
2154
+
2155
+ expect(
2156
+ SignatureEnvelope.verify(envelope, {
2157
+ payload,
2158
+ publicKey,
2159
+ }),
2160
+ ).toBe(true)
2161
+ })
2162
+
2163
+ test('behavior: verifies valid signature with address', async () => {
2164
+ const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
2165
+ const address = Address.fromPublicKey(publicKey)
2166
+ const payload = '0xdeadbeef' as const
2167
+
2168
+ const signature = await WebCryptoP256.sign({ payload, privateKey })
2169
+ const envelope = SignatureEnvelope.from({
2170
+ prehash: true,
2171
+ publicKey,
2172
+ signature,
2173
+ })
2174
+
2175
+ expect(
2176
+ SignatureEnvelope.verify(envelope, {
2177
+ payload,
2178
+ address,
2179
+ }),
2180
+ ).toBe(true)
2181
+ })
2182
+
2183
+ test('behavior: returns false for mismatched publicKey', async () => {
2184
+ const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
2185
+ const { publicKey: wrongPublicKey } = await WebCryptoP256.createKeyPair()
2186
+ const payload = '0xdeadbeef' as const
2187
+
2188
+ const signature = await WebCryptoP256.sign({ payload, privateKey })
2189
+ const envelope = SignatureEnvelope.from({
2190
+ prehash: true,
2191
+ publicKey,
2192
+ signature,
2193
+ })
2194
+
2195
+ expect(
2196
+ SignatureEnvelope.verify(envelope, {
2197
+ payload,
2198
+ publicKey: wrongPublicKey,
2199
+ }),
2200
+ ).toBe(false)
2201
+ })
2202
+
2203
+ test('behavior: returns false for wrong payload', async () => {
2204
+ const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
2205
+ const payload = '0xdeadbeef' as const
2206
+
2207
+ const signature = await WebCryptoP256.sign({ payload, privateKey })
2208
+ const envelope = SignatureEnvelope.from({
2209
+ prehash: true,
2210
+ publicKey,
2211
+ signature,
2212
+ })
2213
+
2214
+ expect(
2215
+ SignatureEnvelope.verify(envelope, {
2216
+ payload: '0xcafebabe',
2217
+ publicKey,
2218
+ }),
2219
+ ).toBe(false)
2220
+ })
2221
+ })
2222
+
2223
+ describe('webAuthn', () => {
2224
+ test('behavior: returns false for mismatched publicKey', () => {
2225
+ const wrongPrivateKey = P256.randomPrivateKey()
2226
+ const wrongPublicKey = P256.getPublicKey({ privateKey: wrongPrivateKey })
2227
+ const payload = '0xdeadbeef' as const
2228
+
2229
+ expect(
2230
+ SignatureEnvelope.verify(signature_webauthn, {
2231
+ payload,
2232
+ publicKey: wrongPublicKey,
2233
+ }),
2234
+ ).toBe(false)
2235
+ })
2236
+
2237
+ test('behavior: returns false for mismatched address', () => {
2238
+ const wrongPrivateKey = P256.randomPrivateKey()
2239
+ const wrongPublicKey = P256.getPublicKey({ privateKey: wrongPrivateKey })
2240
+ const wrongAddress = Address.fromPublicKey(wrongPublicKey)
2241
+ const payload = '0xdeadbeef' as const
2242
+
2243
+ expect(
2244
+ SignatureEnvelope.verify(signature_webauthn, {
2245
+ payload,
2246
+ address: wrongAddress,
2247
+ }),
2248
+ ).toBe(false)
2249
+ })
2250
+ })
2251
+
2252
+ describe('keychain', () => {
2253
+ test('error: throws for keychain signatures', () => {
2254
+ const privateKey = Secp256k1.randomPrivateKey()
2255
+ const secp256k1PublicKey = Secp256k1.getPublicKey({ privateKey })
2256
+ const payload = '0xdeadbeef' as const
2257
+
2258
+ const signature = Secp256k1.sign({ payload, privateKey })
2259
+ const innerEnvelope = SignatureEnvelope.from(signature)
2260
+ const envelope = SignatureEnvelope.from({
2261
+ userAddress: '0x1234567890123456789012345678901234567890',
2262
+ inner: innerEnvelope,
2263
+ })
2264
+
2265
+ expect(() =>
2266
+ SignatureEnvelope.verify(envelope, {
2267
+ payload,
2268
+ publicKey: secp256k1PublicKey,
2269
+ }),
2270
+ ).toThrowErrorMatchingInlineSnapshot(
2271
+ `[SignatureEnvelope.VerificationError: Unable to verify signature envelope of type "keychain".]`,
2272
+ )
2273
+ })
2274
+ })
2275
+ })
2276
+
2277
+ describe('fromRpc', () => {
2278
+ describe('secp256k1', () => {
2279
+ test('behavior: converts RPC secp256k1 signature', () => {
2280
+ const rpc: SignatureEnvelope.Secp256k1Rpc = {
2281
+ r: Signature.toRpc(signature_secp256k1).r,
2282
+ s: Signature.toRpc(signature_secp256k1).s,
2283
+ yParity: Signature.toRpc(signature_secp256k1).yParity,
2284
+ type: 'secp256k1',
2285
+ }
2286
+
2287
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2288
+
2289
+ expect(envelope).toMatchObject({
2290
+ signature: {
2291
+ r: signature_secp256k1.r,
2292
+ s: signature_secp256k1.s,
2293
+ yParity: signature_secp256k1.yParity,
2294
+ },
2295
+ type: 'secp256k1',
2296
+ })
2297
+ })
2298
+ })
2299
+
2300
+ describe('p256', () => {
2301
+ test('behavior: converts RPC P256 signature', () => {
2302
+ const rpc: SignatureEnvelope.P256Rpc = {
2303
+ preHash: true,
2304
+ pubKeyX: publicKey.x,
2305
+ pubKeyY: publicKey.y,
2306
+ r: p256Signature.r,
2307
+ s: p256Signature.s,
2308
+ type: 'p256',
2309
+ }
2310
+
2311
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2312
+
2313
+ expect(envelope).toMatchObject({
2314
+ prehash: true,
2315
+ publicKey: {
2316
+ x: publicKey.x,
2317
+ y: publicKey.y,
2318
+ },
2319
+ signature: {
2320
+ r: p256Signature.r,
2321
+ s: p256Signature.s,
2322
+ },
2323
+ type: 'p256',
2324
+ })
2325
+ })
2326
+ })
2327
+
2328
+ describe('webAuthn', () => {
2329
+ test('behavior: converts RPC WebAuthn signature', () => {
2330
+ const webauthnData = WebAuthnP256.getAuthenticatorData({
2331
+ rpId: 'localhost',
2332
+ })
2333
+ const clientDataJSON = WebAuthnP256.getClientDataJSON({
2334
+ challenge: '0xdeadbeef',
2335
+ origin: 'http://localhost',
2336
+ })
2337
+
2338
+ const rpc: SignatureEnvelope.WebAuthnRpc = {
2339
+ pubKeyX: publicKey.x,
2340
+ pubKeyY: publicKey.y,
2341
+ r: p256Signature.r,
2342
+ s: p256Signature.s,
2343
+ type: 'webAuthn',
2344
+ webauthnData: Hex.concat(webauthnData, Hex.fromString(clientDataJSON)),
2345
+ }
2346
+
2347
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2348
+
2349
+ expect(envelope).toMatchObject({
2350
+ metadata: {
2351
+ authenticatorData: webauthnData,
2352
+ clientDataJSON,
2353
+ },
2354
+ publicKey: {
2355
+ x: publicKey.x,
2356
+ y: publicKey.y,
2357
+ },
2358
+ signature: {
2359
+ r: p256Signature.r,
2360
+ s: p256Signature.s,
2361
+ },
2362
+ type: 'webAuthn',
2363
+ })
2364
+ })
2365
+ })
2366
+
2367
+ describe('keychain', () => {
2368
+ test('behavior: converts RPC keychain signature with secp256k1 inner', () => {
2369
+ const rpc: SignatureEnvelope.KeychainRpc = {
2370
+ type: 'keychain',
2371
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2372
+ signature: {
2373
+ type: 'secp256k1',
2374
+ r: '0xa2bb71146c20ce932456c043ebb2973ed205e07cd32c35a60bdefca1285fd132',
2375
+ s: '0x7cba10692bccdbfba9a215418443c2903dbee6fe5cb55c91172e47efc607840e',
2376
+ yParity: '0x1',
2377
+ },
2378
+ }
2379
+
2380
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2381
+
2382
+ expect(envelope).toMatchObject({
2383
+ type: 'keychain',
2384
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2385
+ inner: {
2386
+ type: 'secp256k1',
2387
+ signature: {
2388
+ r: '0xa2bb71146c20ce932456c043ebb2973ed205e07cd32c35a60bdefca1285fd132',
2389
+ s: '0x7cba10692bccdbfba9a215418443c2903dbee6fe5cb55c91172e47efc607840e',
2390
+ yParity: 1,
2391
+ },
2392
+ },
2393
+ })
2394
+ })
2395
+
2396
+ test('behavior: converts RPC keychain signature with p256 inner', () => {
2397
+ const rpc: SignatureEnvelope.KeychainRpc = {
2398
+ type: 'keychain',
2399
+ userAddress: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
2400
+ signature: {
2401
+ preHash: true,
2402
+ pubKeyX: publicKey.x,
2403
+ pubKeyY: publicKey.y,
2404
+ r: p256Signature.r,
2405
+ s: p256Signature.s,
2406
+ type: 'p256',
2407
+ },
2408
+ }
2409
+
2410
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2411
+
2412
+ expect(envelope).toMatchObject({
2413
+ type: 'keychain',
2414
+ userAddress: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
2415
+ inner: {
2416
+ type: 'p256',
2417
+ prehash: true,
2418
+ publicKey: {
2419
+ x: publicKey.x,
2420
+ y: publicKey.y,
2421
+ },
2422
+ signature: {
2423
+ r: p256Signature.r,
2424
+ s: p256Signature.s,
2425
+ },
2426
+ },
2427
+ })
2428
+ })
2429
+
2430
+ test('behavior: converts RPC keychain signature with webAuthn inner', () => {
2431
+ const webauthnData = WebAuthnP256.getAuthenticatorData({
2432
+ rpId: 'localhost',
2433
+ })
2434
+ const clientDataJSON = WebAuthnP256.getClientDataJSON({
2435
+ challenge: '0xdeadbeef',
2436
+ origin: 'http://localhost',
2437
+ })
2438
+
2439
+ const rpc: SignatureEnvelope.KeychainRpc = {
2440
+ type: 'keychain',
2441
+ userAddress: '0xfedcbafedcbafedcbafedcbafedcbafedcbafedc',
2442
+ signature: {
2443
+ pubKeyX: publicKey.x,
2444
+ pubKeyY: publicKey.y,
2445
+ r: p256Signature.r,
2446
+ s: p256Signature.s,
2447
+ type: 'webAuthn',
2448
+ webauthnData: Hex.concat(
2449
+ webauthnData,
2450
+ Hex.fromString(clientDataJSON),
2451
+ ),
2452
+ },
2453
+ }
2454
+
2455
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2456
+
2457
+ expect(envelope).toMatchObject({
2458
+ type: 'keychain',
2459
+ userAddress: '0xfedcbafedcbafedcbafedcbafedcbafedcbafedc',
2460
+ inner: {
2461
+ type: 'webAuthn',
2462
+ metadata: {
2463
+ authenticatorData: webauthnData,
2464
+ clientDataJSON,
2465
+ },
2466
+ publicKey: {
2467
+ x: publicKey.x,
2468
+ y: publicKey.y,
2469
+ },
2470
+ signature: {
2471
+ r: p256Signature.r,
2472
+ s: p256Signature.s,
2473
+ },
2474
+ },
2475
+ })
2476
+ })
2477
+
2478
+ test('behavior: preserves keyId from RPC', () => {
2479
+ const rpc: SignatureEnvelope.KeychainRpc = {
2480
+ type: 'keychain',
2481
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2482
+ keyId: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
2483
+ signature: {
2484
+ type: 'secp256k1',
2485
+ r: '0xa2bb71146c20ce932456c043ebb2973ed205e07cd32c35a60bdefca1285fd132',
2486
+ s: '0x7cba10692bccdbfba9a215418443c2903dbee6fe5cb55c91172e47efc607840e',
2487
+ yParity: '0x1',
2488
+ },
2489
+ }
2490
+
2491
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2492
+
2493
+ expect(envelope.keyId).toBe('0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c')
2494
+ })
2495
+ })
2496
+ })
2497
+
2498
+ describe('toRpc', () => {
2499
+ describe('secp256k1', () => {
2500
+ test('behavior: converts secp256k1 signature to RPC', () => {
2501
+ const envelope: SignatureEnvelope.Secp256k1 = {
2502
+ signature: signature_secp256k1,
2503
+ type: 'secp256k1',
2504
+ }
2505
+
2506
+ const rpc = SignatureEnvelope.toRpc(envelope)
2507
+
2508
+ expect(rpc).toMatchObject({
2509
+ r: Signature.toRpc(signature_secp256k1).r,
2510
+ s: Signature.toRpc(signature_secp256k1).s,
2511
+ yParity: Signature.toRpc(signature_secp256k1).yParity,
2512
+ type: 'secp256k1',
2513
+ })
2514
+ })
2515
+ })
2516
+
2517
+ describe('p256', () => {
2518
+ test('behavior: converts P256 signature to RPC', () => {
2519
+ const rpc = SignatureEnvelope.toRpc(signature_p256)
2520
+
2521
+ expect(rpc.type).toBe('p256')
2522
+ expect(rpc.preHash).toBe(true)
2523
+ expect(typeof rpc.pubKeyX).toBe('string')
2524
+ expect(typeof rpc.pubKeyY).toBe('string')
2525
+ expect(typeof rpc.r).toBe('string')
2526
+ expect(typeof rpc.s).toBe('string')
2527
+ })
2528
+
2529
+ test('behavior: converts prehash=false correctly', () => {
2530
+ const withPrehashFalse = { ...signature_p256, prehash: false }
2531
+ const rpc = SignatureEnvelope.toRpc(withPrehashFalse)
2532
+
2533
+ expect(rpc.preHash).toBe(false)
2534
+ })
2535
+ })
2536
+
2537
+ describe('webAuthn', () => {
2538
+ test('behavior: converts WebAuthn signature to RPC', () => {
2539
+ const rpc = SignatureEnvelope.toRpc(
2540
+ signature_webauthn,
2541
+ ) as SignatureEnvelope.WebAuthnRpc
2542
+
2543
+ expect(rpc.type).toBe('webAuthn')
2544
+ expect(typeof rpc.pubKeyX).toBe('string')
2545
+ expect(typeof rpc.pubKeyY).toBe('string')
2546
+ expect(typeof rpc.r).toBe('string')
2547
+ expect(typeof rpc.s).toBe('string')
2548
+ expect(typeof rpc.webauthnData).toBe('string')
2549
+ expect(rpc.webauthnData.startsWith('0x')).toBe(true)
2550
+ })
2551
+
2552
+ test('behavior: webauthnData contains authenticatorData and clientDataJSON', () => {
2553
+ const rpc = SignatureEnvelope.toRpc(
2554
+ signature_webauthn,
2555
+ ) as SignatureEnvelope.WebAuthnRpc
2556
+
2557
+ // webauthnData should contain the concatenation of authenticatorData and clientDataJSON (as hex)
2558
+ expect(rpc.webauthnData).toContain(
2559
+ signature_webauthn.metadata.authenticatorData.slice(2),
2560
+ )
2561
+ })
2562
+ })
2563
+
2564
+ describe('keychain', () => {
2565
+ test('behavior: converts keychain signature with secp256k1 inner to RPC', () => {
2566
+ const envelope: SignatureEnvelope.Keychain = {
2567
+ type: 'keychain',
2568
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2569
+ inner: {
2570
+ signature: signature_secp256k1,
2571
+ type: 'secp256k1',
2572
+ },
2573
+ }
2574
+
2575
+ const rpc = SignatureEnvelope.toRpc(
2576
+ envelope,
2577
+ ) as SignatureEnvelope.KeychainRpc
2578
+
2579
+ expect(rpc.type).toBe('keychain')
2580
+ expect(rpc.userAddress).toBe('0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266')
2581
+ expect(rpc.signature).toMatchObject({
2582
+ r: Signature.toRpc(signature_secp256k1).r,
2583
+ s: Signature.toRpc(signature_secp256k1).s,
2584
+ yParity: Signature.toRpc(signature_secp256k1).yParity,
2585
+ type: 'secp256k1',
2586
+ })
2587
+ })
2588
+
2589
+ test('behavior: converts keychain signature with p256 inner to RPC', () => {
2590
+ const rpc = SignatureEnvelope.toRpc(
2591
+ signature_keychain_p256,
2592
+ ) as SignatureEnvelope.KeychainRpc
2593
+
2594
+ expect(rpc.type).toBe('keychain')
2595
+ expect(rpc.userAddress).toBe(signature_keychain_p256.userAddress)
2596
+ expect(rpc.signature.type).toBe('p256')
2597
+ expect(typeof rpc.signature.pubKeyX).toBe('string')
2598
+ expect(typeof rpc.signature.pubKeyY).toBe('string')
2599
+ })
2600
+
2601
+ test('behavior: converts keychain signature with webAuthn inner to RPC', () => {
2602
+ const rpc = SignatureEnvelope.toRpc(
2603
+ signature_keychain_webauthn,
2604
+ ) as SignatureEnvelope.KeychainRpc
2605
+
2606
+ expect(rpc.type).toBe('keychain')
2607
+ expect(rpc.userAddress).toBe(signature_keychain_webauthn.userAddress)
2608
+ expect(rpc.signature.type).toBe('webAuthn')
2609
+ expect(typeof rpc.signature.pubKeyX).toBe('string')
2610
+ expect(typeof rpc.signature.webauthnData).toBe('string')
2611
+ })
2612
+
2613
+ test('behavior: preserves keyId in toRpc', () => {
2614
+ const envelope: SignatureEnvelope.Keychain = {
2615
+ type: 'keychain',
2616
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2617
+ keyId: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
2618
+ inner: {
2619
+ signature: signature_secp256k1,
2620
+ type: 'secp256k1',
2621
+ },
2622
+ }
2623
+
2624
+ const rpc = SignatureEnvelope.toRpc(
2625
+ envelope,
2626
+ ) as SignatureEnvelope.KeychainRpc
2627
+
2628
+ expect(rpc.keyId).toBe('0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c')
2629
+ })
2630
+
2631
+ test('behavior: omits keyId in toRpc when not set', () => {
2632
+ const envelope: SignatureEnvelope.Keychain = {
2633
+ type: 'keychain',
2634
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2635
+ inner: {
2636
+ signature: signature_secp256k1,
2637
+ type: 'secp256k1',
2638
+ },
2639
+ }
2640
+
2641
+ const rpc = SignatureEnvelope.toRpc(
2642
+ envelope,
2643
+ ) as SignatureEnvelope.KeychainRpc
2644
+
2645
+ expect(rpc.keyId).toBeUndefined()
2646
+ })
2647
+ })
2648
+ })
2649
+
2650
+ describe('roundtrip: toRpc <-> fromRpc', () => {
2651
+ describe('secp256k1', () => {
2652
+ test('behavior: roundtrips toRpc -> fromRpc', () => {
2653
+ const envelope: SignatureEnvelope.Secp256k1 = {
2654
+ signature: signature_secp256k1,
2655
+ type: 'secp256k1',
2656
+ }
2657
+
2658
+ const rpc = SignatureEnvelope.toRpc(envelope)
2659
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2660
+
2661
+ expect(roundtripped).toMatchObject({
2662
+ signature: {
2663
+ r: signature_secp256k1.r,
2664
+ s: signature_secp256k1.s,
2665
+ yParity: signature_secp256k1.yParity,
2666
+ },
2667
+ type: 'secp256k1',
2668
+ })
2669
+ })
2670
+
2671
+ test('behavior: roundtrips fromRpc -> toRpc', () => {
2672
+ const rpc: SignatureEnvelope.Secp256k1Rpc = {
2673
+ r: Signature.toRpc(signature_secp256k1).r,
2674
+ s: Signature.toRpc(signature_secp256k1).s,
2675
+ yParity: Signature.toRpc(signature_secp256k1).yParity,
2676
+ type: 'secp256k1',
2677
+ }
2678
+
2679
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2680
+ const roundtripped = SignatureEnvelope.toRpc(envelope)
2681
+
2682
+ expect(roundtripped).toMatchObject(rpc)
2683
+ })
2684
+ })
2685
+
2686
+ describe('p256', () => {
2687
+ test('behavior: roundtrips toRpc -> fromRpc', () => {
2688
+ const rpc = SignatureEnvelope.toRpc(signature_p256)
2689
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2690
+
2691
+ expect(roundtripped).toMatchObject({
2692
+ prehash: signature_p256.prehash,
2693
+ publicKey: {
2694
+ x: signature_p256.publicKey.x,
2695
+ y: signature_p256.publicKey.y,
2696
+ },
2697
+ signature: {
2698
+ r: signature_p256.signature.r,
2699
+ s: signature_p256.signature.s,
2700
+ },
2701
+ type: 'p256',
2702
+ })
2703
+ })
2704
+
2705
+ test('behavior: handles prehash=false in roundtrip', () => {
2706
+ const withPrehashFalse = { ...signature_p256, prehash: false }
2707
+ const rpc = SignatureEnvelope.toRpc(withPrehashFalse)
2708
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2709
+
2710
+ expect(roundtripped.prehash).toBe(false)
2711
+ })
2712
+ })
2713
+
2714
+ describe('webAuthn', () => {
2715
+ test('behavior: roundtrips toRpc -> fromRpc', () => {
2716
+ const rpc = SignatureEnvelope.toRpc(signature_webauthn)
2717
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2718
+
2719
+ expect(roundtripped).toMatchObject({
2720
+ metadata: {
2721
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
2722
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
2723
+ },
2724
+ publicKey: {
2725
+ x: signature_webauthn.publicKey.x,
2726
+ y: signature_webauthn.publicKey.y,
2727
+ },
2728
+ signature: {
2729
+ r: signature_webauthn.signature.r,
2730
+ s: signature_webauthn.signature.s,
2731
+ },
2732
+ type: 'webAuthn',
2733
+ })
2734
+ })
2735
+
2736
+ test('behavior: handles variable-length clientDataJSON in roundtrip', () => {
2737
+ const longClientData = JSON.stringify({
2738
+ type: 'webAuthn.get',
2739
+ challenge: 'a'.repeat(100),
2740
+ origin: 'https://example.com',
2741
+ crossOrigin: false,
2742
+ })
2743
+
2744
+ const signatureWithLongData = {
2745
+ ...signature_webauthn,
2746
+ metadata: {
2747
+ ...signature_webauthn.metadata,
2748
+ clientDataJSON: longClientData,
2749
+ },
2750
+ }
2751
+
2752
+ const rpc = SignatureEnvelope.toRpc(signatureWithLongData)
2753
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2754
+
2755
+ expect(roundtripped.metadata?.clientDataJSON).toBe(longClientData)
2756
+ })
2757
+ })
2758
+
2759
+ describe('keychain', () => {
2760
+ test('behavior: roundtrips toRpc -> fromRpc with secp256k1 inner', () => {
2761
+ const envelope: SignatureEnvelope.Keychain = {
2762
+ type: 'keychain',
2763
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2764
+ inner: {
2765
+ signature: signature_secp256k1,
2766
+ type: 'secp256k1',
2767
+ },
2768
+ }
2769
+
2770
+ const rpc = SignatureEnvelope.toRpc(envelope)
2771
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2772
+
2773
+ expect(roundtripped).toMatchObject({
2774
+ type: 'keychain',
2775
+ userAddress: envelope.userAddress,
2776
+ inner: {
2777
+ type: 'secp256k1',
2778
+ signature: {
2779
+ r: signature_secp256k1.r,
2780
+ s: signature_secp256k1.s,
2781
+ yParity: signature_secp256k1.yParity,
2782
+ },
2783
+ },
2784
+ })
2785
+ })
2786
+
2787
+ test('behavior: roundtrips toRpc -> fromRpc with p256 inner', () => {
2788
+ const rpc = SignatureEnvelope.toRpc(signature_keychain_p256)
2789
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2790
+
2791
+ expect(roundtripped).toMatchObject({
2792
+ type: 'keychain',
2793
+ userAddress: signature_keychain_p256.userAddress,
2794
+ inner: {
2795
+ type: 'p256',
2796
+ prehash: signature_p256.prehash,
2797
+ publicKey: {
2798
+ x: signature_p256.publicKey.x,
2799
+ y: signature_p256.publicKey.y,
2800
+ },
2801
+ signature: {
2802
+ r: signature_p256.signature.r,
2803
+ s: signature_p256.signature.s,
2804
+ },
2805
+ },
2806
+ })
2807
+ })
2808
+
2809
+ test('behavior: roundtrips toRpc -> fromRpc with webAuthn inner', () => {
2810
+ const rpc = SignatureEnvelope.toRpc(signature_keychain_webauthn)
2811
+ const roundtripped = SignatureEnvelope.fromRpc(rpc)
2812
+
2813
+ expect(roundtripped).toMatchObject({
2814
+ type: 'keychain',
2815
+ userAddress: signature_keychain_webauthn.userAddress,
2816
+ inner: {
2817
+ type: 'webAuthn',
2818
+ metadata: {
2819
+ authenticatorData: signature_webauthn.metadata.authenticatorData,
2820
+ clientDataJSON: signature_webauthn.metadata.clientDataJSON,
2821
+ },
2822
+ publicKey: {
2823
+ x: signature_webauthn.publicKey.x,
2824
+ y: signature_webauthn.publicKey.y,
2825
+ },
2826
+ signature: {
2827
+ r: signature_webauthn.signature.r,
2828
+ s: signature_webauthn.signature.s,
2829
+ },
2830
+ },
2831
+ })
2832
+ })
2833
+
2834
+ test('behavior: roundtrips fromRpc -> toRpc with secp256k1 inner', () => {
2835
+ const rpc: SignatureEnvelope.KeychainRpc = {
2836
+ type: 'keychain',
2837
+ userAddress: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
2838
+ signature: {
2839
+ type: 'secp256k1',
2840
+ r: '0xa2bb71146c20ce932456c043ebb2973ed205e07cd32c35a60bdefca1285fd132',
2841
+ s: '0x7cba10692bccdbfba9a215418443c2903dbee6fe5cb55c91172e47efc607840e',
2842
+ yParity: '0x1',
2843
+ },
2844
+ }
2845
+
2846
+ const envelope = SignatureEnvelope.fromRpc(rpc)
2847
+ const roundtripped = SignatureEnvelope.toRpc(envelope)
2848
+
2849
+ expect(roundtripped).toMatchObject(rpc)
2850
+ })
2851
+ })
2852
+ })
2853
+
2854
+ describe('types', () => {
2855
+ test('behavior: contains all signature types', () => {
2856
+ expect(SignatureEnvelope.types).toEqual(['secp256k1', 'p256', 'webAuthn'])
2857
+ })
2858
+ })
2859
+
2860
+ describe('CoercionError', () => {
2861
+ test('behavior: formats error message with hex string', () => {
2862
+ const error = new SignatureEnvelope.CoercionError({
2863
+ envelope: '0xdeadbeef',
2864
+ })
2865
+ expect(error).toMatchInlineSnapshot(
2866
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`"0xdeadbeef"\`) to a valid signature envelope.]`,
2867
+ )
2868
+ })
2869
+
2870
+ test('behavior: formats error message with object', () => {
2871
+ const error = new SignatureEnvelope.CoercionError({
2872
+ envelope: {
2873
+ r: '0x0000000000000000000000000000000000000000000000000000000000000000',
2874
+ s: '0x0000000000000000000000000000000000000000000000000000000000000000',
2875
+ yParity: 0,
2876
+ },
2877
+ })
2878
+ expect(error).toMatchInlineSnapshot(
2879
+ `[SignatureEnvelope.CoercionError: Unable to coerce value (\`{"r":"0x0000000000000000000000000000000000000000000000000000000000000000","s":"0x0000000000000000000000000000000000000000000000000000000000000000","yParity":0}\`) to a valid signature envelope.]`,
2880
+ )
2881
+ })
2882
+ })
2883
+
2884
+ describe('multisig', () => {
2885
+ const account = '0x8ba6d26ff5c4e82ba0c8caf8c8ca794e1489a7ae'
2886
+ const genesisConfigId =
2887
+ '0x01781fe551182476f2422c759e82d81c92e3263737afbbad57def6e8b69d21f5'
2888
+
2889
+ // P256 signatures do not carry `yParity` in the wire format, so use a clean
2890
+ // inner signature for round-trip equality checks.
2891
+ const innerP256 = SignatureEnvelope.from({
2892
+ signature: { r: p256Signature.r, s: p256Signature.s },
2893
+ publicKey,
2894
+ prehash: true,
2895
+ })
2896
+
2897
+ const envelope = SignatureEnvelope.from({
2898
+ type: 'multisig',
2899
+ account,
2900
+ genesisConfigId,
2901
+ signatures: [SignatureEnvelope.from(signature_secp256k1), innerP256],
2902
+ })
2903
+
2904
+ test('serialize: type byte 0x05 prefix', () => {
2905
+ const serialized = SignatureEnvelope.serialize(envelope)
2906
+ expect(serialized.startsWith('0x05')).toBe(true)
2907
+ })
2908
+
2909
+ test('serialize/deserialize round-trip', () => {
2910
+ const serialized = SignatureEnvelope.serialize(envelope)
2911
+ expect(SignatureEnvelope.deserialize(serialized)).toEqual(envelope)
2912
+ })
2913
+
2914
+ test('getType', () => {
2915
+ expect(SignatureEnvelope.getType(envelope)).toBe('multisig')
2916
+ })
2917
+
2918
+ test('extractAddress returns the multisig account', () => {
2919
+ expect(
2920
+ SignatureEnvelope.extractAddress({
2921
+ payload: '0xdeadbeef',
2922
+ signature: envelope,
2923
+ }),
2924
+ ).toBe(account)
2925
+ })
2926
+
2927
+ test('toRpc/fromRpc round-trip', () => {
2928
+ const rpc = SignatureEnvelope.toRpc(envelope)
2929
+ expect(rpc.type).toBe('multisig')
2930
+ expect(SignatureEnvelope.fromRpc(rpc)).toEqual(envelope)
2931
+ })
2932
+
2933
+ test('assert: missing properties', () => {
2934
+ expect(() =>
2935
+ SignatureEnvelope.assert({ type: 'multisig', account } as never),
2936
+ ).toThrowError()
2937
+ })
2938
+
2939
+ describe('init (bootstrap)', () => {
2940
+ const init = {
2941
+ salt: `0x${'00'.repeat(32)}` as const,
2942
+ threshold: 1,
2943
+ owners: [
2944
+ {
2945
+ owner: '0x1111111111111111111111111111111111111111' as const,
2946
+ weight: 1,
2947
+ },
2948
+ ],
2949
+ }
2950
+
2951
+ const bootstrapEnvelope = SignatureEnvelope.from({
2952
+ type: 'multisig',
2953
+ account,
2954
+ genesisConfigId,
2955
+ signatures: [SignatureEnvelope.from(signature_secp256k1), innerP256],
2956
+ init,
2957
+ })
2958
+
2959
+ test('serialize/deserialize round-trip with init', () => {
2960
+ const serialized = SignatureEnvelope.serialize(bootstrapEnvelope)
2961
+ expect(SignatureEnvelope.deserialize(serialized)).toEqual(
2962
+ bootstrapEnvelope,
2963
+ )
2964
+ })
2965
+
2966
+ test('serialize/deserialize round-trip preserves non-zero salt', () => {
2967
+ const salted = SignatureEnvelope.from({
2968
+ type: 'multisig',
2969
+ account,
2970
+ genesisConfigId,
2971
+ signatures: [SignatureEnvelope.from(signature_secp256k1), innerP256],
2972
+ init: { ...init, salt: `0x${'42'.repeat(32)}` },
2973
+ })
2974
+ const serialized = SignatureEnvelope.serialize(salted)
2975
+ const deserialized = SignatureEnvelope.deserialize(
2976
+ serialized,
2977
+ ) as SignatureEnvelope.Multisig
2978
+ expect(deserialized.init?.salt).toBe(`0x${'42'.repeat(32)}`)
2979
+ expect(deserialized).toEqual(salted)
2980
+ })
2981
+
2982
+ test('absent init has no `init` key after deserialize', () => {
2983
+ const serialized = SignatureEnvelope.serialize(envelope)
2984
+ const deserialized = SignatureEnvelope.deserialize(serialized)
2985
+ expect('init' in deserialized).toBe(false)
2986
+ })
2987
+
2988
+ test('init absent vs present produce different serializations', () => {
2989
+ expect(SignatureEnvelope.serialize(envelope)).not.toBe(
2990
+ SignatureEnvelope.serialize(bootstrapEnvelope),
2991
+ )
2992
+ })
2993
+
2994
+ test('toRpc/fromRpc round-trip with init', () => {
2995
+ const rpc = SignatureEnvelope.toRpc(bootstrapEnvelope)
2996
+ expect(rpc.init).toEqual(init)
2997
+ expect(SignatureEnvelope.fromRpc(rpc)).toEqual(bootstrapEnvelope)
2998
+ })
2999
+
3000
+ test('toRpc encodes owner approvals as serialized hex (node `Vec<Bytes>`)', () => {
3001
+ const multisig = bootstrapEnvelope as SignatureEnvelope.Multisig
3002
+ const rpc = SignatureEnvelope.toRpc(
3003
+ multisig,
3004
+ ) as SignatureEnvelope.MultisigRpc
3005
+ expect(rpc.signatures).toEqual(
3006
+ multisig.signatures.map((s) => SignatureEnvelope.serialize(s)),
3007
+ )
3008
+ })
3009
+
3010
+ test('fromRpc detects multisig by shape (no `type` field)', () => {
3011
+ const rpc = SignatureEnvelope.toRpc(bootstrapEnvelope)
3012
+ // The node omits the `type` discriminant; detection is shape-based.
3013
+ const { type: _type, ...untyped } = rpc
3014
+ expect(SignatureEnvelope.fromRpc(untyped as never)).toEqual(
3015
+ bootstrapEnvelope,
3016
+ )
3017
+ })
3018
+
3019
+ test('assert: invalid init config throws', () => {
3020
+ expect(() =>
3021
+ SignatureEnvelope.assert({
3022
+ type: 'multisig',
3023
+ account,
3024
+ genesisConfigId,
3025
+ signatures: [],
3026
+ init: { threshold: 1, owners: [] },
3027
+ } as never),
3028
+ ).toThrowError()
3029
+ })
3030
+ })
3031
+ })