superstack-wallet-sdk 0.4.2

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 (623) hide show
  1. package/README.md +114 -0
  2. package/dist/esm/_virtual/_commonjsHelpers.js +2 -0
  3. package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/esm/_virtual/_polyfill-node.buffer.js +2 -0
  5. package/dist/esm/_virtual/_polyfill-node.buffer.js.map +1 -0
  6. package/dist/esm/_virtual/index.js +2 -0
  7. package/dist/esm/_virtual/index.js.map +1 -0
  8. package/dist/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +2 -0
  9. package/dist/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -0
  10. package/dist/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +2 -0
  11. package/dist/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
  12. package/dist/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +2 -0
  13. package/dist/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
  14. package/dist/esm/node_modules/@noble/hashes/esm/_md.js +2 -0
  15. package/dist/esm/node_modules/@noble/hashes/esm/_md.js.map +1 -0
  16. package/dist/esm/node_modules/@noble/hashes/esm/_u64.js +2 -0
  17. package/dist/esm/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
  18. package/dist/esm/node_modules/@noble/hashes/esm/crypto.js +2 -0
  19. package/dist/esm/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
  20. package/dist/esm/node_modules/@noble/hashes/esm/hmac.js +2 -0
  21. package/dist/esm/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
  22. package/dist/esm/node_modules/@noble/hashes/esm/sha2.js +2 -0
  23. package/dist/esm/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
  24. package/dist/esm/node_modules/@noble/hashes/esm/sha256.js +2 -0
  25. package/dist/esm/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
  26. package/dist/esm/node_modules/@noble/hashes/esm/sha3.js +2 -0
  27. package/dist/esm/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
  28. package/dist/esm/node_modules/@noble/hashes/esm/utils.js +4 -0
  29. package/dist/esm/node_modules/@noble/hashes/esm/utils.js.map +1 -0
  30. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js +2 -0
  31. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js.map +1 -0
  32. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/errors.js +2 -0
  33. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/errors.js.map +1 -0
  34. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/signer.js +2 -0
  35. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/signer.js.map +1 -0
  36. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js +2 -0
  37. package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js.map +1 -0
  38. package/dist/esm/node_modules/abitype/dist/esm/errors.js +2 -0
  39. package/dist/esm/node_modules/abitype/dist/esm/errors.js.map +1 -0
  40. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js +2 -0
  41. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js.map +1 -0
  42. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js +2 -0
  43. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js.map +1 -0
  44. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/signature.js +2 -0
  45. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/signature.js.map +1 -0
  46. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js +2 -0
  47. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js.map +1 -0
  48. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/struct.js +2 -0
  49. package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/struct.js.map +1 -0
  50. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js +2 -0
  51. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js.map +1 -0
  52. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js +2 -0
  53. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js.map +1 -0
  54. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js +2 -0
  55. package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js.map +1 -0
  56. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbi.js +2 -0
  57. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbi.js.map +1 -0
  58. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js +2 -0
  59. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js.map +1 -0
  60. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js +2 -0
  61. package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js.map +1 -0
  62. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/cache.js +2 -0
  63. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/cache.js.map +1 -0
  64. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js +2 -0
  65. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js.map +1 -0
  66. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/structs.js +2 -0
  67. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/structs.js.map +1 -0
  68. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/utils.js +2 -0
  69. package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/utils.js.map +1 -0
  70. package/dist/esm/node_modules/abitype/dist/esm/regex.js +2 -0
  71. package/dist/esm/node_modules/abitype/dist/esm/regex.js.map +1 -0
  72. package/dist/esm/node_modules/abitype/dist/esm/version.js +2 -0
  73. package/dist/esm/node_modules/abitype/dist/esm/version.js.map +1 -0
  74. package/dist/esm/node_modules/ethers/lib.esm/_version.js +2 -0
  75. package/dist/esm/node_modules/ethers/lib.esm/_version.js.map +1 -0
  76. package/dist/esm/node_modules/ethers/lib.esm/utils/data.js +2 -0
  77. package/dist/esm/node_modules/ethers/lib.esm/utils/data.js.map +1 -0
  78. package/dist/esm/node_modules/ethers/lib.esm/utils/errors.js +2 -0
  79. package/dist/esm/node_modules/ethers/lib.esm/utils/errors.js.map +1 -0
  80. package/dist/esm/node_modules/ethers/lib.esm/utils/fixednumber.js +2 -0
  81. package/dist/esm/node_modules/ethers/lib.esm/utils/fixednumber.js.map +1 -0
  82. package/dist/esm/node_modules/ethers/lib.esm/utils/maths.js +2 -0
  83. package/dist/esm/node_modules/ethers/lib.esm/utils/maths.js.map +1 -0
  84. package/dist/esm/node_modules/ethers/lib.esm/utils/properties.js +2 -0
  85. package/dist/esm/node_modules/ethers/lib.esm/utils/properties.js.map +1 -0
  86. package/dist/esm/node_modules/ethers/lib.esm/utils/units.js +2 -0
  87. package/dist/esm/node_modules/ethers/lib.esm/utils/units.js.map +1 -0
  88. package/dist/esm/node_modules/eventemitter3/index.js +2 -0
  89. package/dist/esm/node_modules/eventemitter3/index.js.map +1 -0
  90. package/dist/esm/node_modules/eventemitter3/index2.js +2 -0
  91. package/dist/esm/node_modules/eventemitter3/index2.js.map +1 -0
  92. package/dist/esm/node_modules/ox/_esm/core/AbiConstructor.js +2 -0
  93. package/dist/esm/node_modules/ox/_esm/core/AbiConstructor.js.map +1 -0
  94. package/dist/esm/node_modules/ox/_esm/core/AbiFunction.js +2 -0
  95. package/dist/esm/node_modules/ox/_esm/core/AbiFunction.js.map +1 -0
  96. package/dist/esm/node_modules/ox/_esm/core/AbiItem.js +2 -0
  97. package/dist/esm/node_modules/ox/_esm/core/AbiItem.js.map +1 -0
  98. package/dist/esm/node_modules/ox/_esm/core/AbiParameters.js +2 -0
  99. package/dist/esm/node_modules/ox/_esm/core/AbiParameters.js.map +1 -0
  100. package/dist/esm/node_modules/ox/_esm/core/Address.js +2 -0
  101. package/dist/esm/node_modules/ox/_esm/core/Address.js.map +1 -0
  102. package/dist/esm/node_modules/ox/_esm/core/Authorization.js +2 -0
  103. package/dist/esm/node_modules/ox/_esm/core/Authorization.js.map +1 -0
  104. package/dist/esm/node_modules/ox/_esm/core/BlockOverrides.js +2 -0
  105. package/dist/esm/node_modules/ox/_esm/core/BlockOverrides.js.map +1 -0
  106. package/dist/esm/node_modules/ox/_esm/core/Bytes.js +2 -0
  107. package/dist/esm/node_modules/ox/_esm/core/Bytes.js.map +1 -0
  108. package/dist/esm/node_modules/ox/_esm/core/Caches.js +2 -0
  109. package/dist/esm/node_modules/ox/_esm/core/Caches.js.map +1 -0
  110. package/dist/esm/node_modules/ox/_esm/core/Errors.js +2 -0
  111. package/dist/esm/node_modules/ox/_esm/core/Errors.js.map +1 -0
  112. package/dist/esm/node_modules/ox/_esm/core/Hash.js +2 -0
  113. package/dist/esm/node_modules/ox/_esm/core/Hash.js.map +1 -0
  114. package/dist/esm/node_modules/ox/_esm/core/Hex.js +2 -0
  115. package/dist/esm/node_modules/ox/_esm/core/Hex.js.map +1 -0
  116. package/dist/esm/node_modules/ox/_esm/core/Json.js +2 -0
  117. package/dist/esm/node_modules/ox/_esm/core/Json.js.map +1 -0
  118. package/dist/esm/node_modules/ox/_esm/core/Signature.js +2 -0
  119. package/dist/esm/node_modules/ox/_esm/core/Signature.js.map +1 -0
  120. package/dist/esm/node_modules/ox/_esm/core/Solidity.js +2 -0
  121. package/dist/esm/node_modules/ox/_esm/core/Solidity.js.map +1 -0
  122. package/dist/esm/node_modules/ox/_esm/core/Withdrawal.js +2 -0
  123. package/dist/esm/node_modules/ox/_esm/core/Withdrawal.js.map +1 -0
  124. package/dist/esm/node_modules/ox/_esm/core/internal/abiItem.js +2 -0
  125. package/dist/esm/node_modules/ox/_esm/core/internal/abiItem.js.map +1 -0
  126. package/dist/esm/node_modules/ox/_esm/core/internal/abiParameters.js +2 -0
  127. package/dist/esm/node_modules/ox/_esm/core/internal/abiParameters.js.map +1 -0
  128. package/dist/esm/node_modules/ox/_esm/core/internal/bytes.js +2 -0
  129. package/dist/esm/node_modules/ox/_esm/core/internal/bytes.js.map +1 -0
  130. package/dist/esm/node_modules/ox/_esm/core/internal/cursor.js +2 -0
  131. package/dist/esm/node_modules/ox/_esm/core/internal/cursor.js.map +1 -0
  132. package/dist/esm/node_modules/ox/_esm/core/internal/errors.js +2 -0
  133. package/dist/esm/node_modules/ox/_esm/core/internal/errors.js.map +1 -0
  134. package/dist/esm/node_modules/ox/_esm/core/internal/hex.js +2 -0
  135. package/dist/esm/node_modules/ox/_esm/core/internal/hex.js.map +1 -0
  136. package/dist/esm/node_modules/ox/_esm/core/internal/lru.js +2 -0
  137. package/dist/esm/node_modules/ox/_esm/core/internal/lru.js.map +1 -0
  138. package/dist/esm/node_modules/ox/_esm/core/version.js +2 -0
  139. package/dist/esm/node_modules/ox/_esm/core/version.js.map +1 -0
  140. package/dist/esm/node_modules/ox/_esm/erc6492/SignatureErc6492.js +2 -0
  141. package/dist/esm/node_modules/ox/_esm/erc6492/SignatureErc6492.js.map +1 -0
  142. package/dist/esm/node_modules/ox/_esm/erc8010/SignatureErc8010.js +2 -0
  143. package/dist/esm/node_modules/ox/_esm/erc8010/SignatureErc8010.js.map +1 -0
  144. package/dist/esm/node_modules/styled-components/dist/styled-components.browser.esm.js +2 -0
  145. package/dist/esm/node_modules/styled-components/dist/styled-components.browser.esm.js.map +1 -0
  146. package/dist/esm/node_modules/stylis/src/Enum.js +2 -0
  147. package/dist/esm/node_modules/stylis/src/Enum.js.map +1 -0
  148. package/dist/esm/node_modules/stylis/src/Middleware.js +2 -0
  149. package/dist/esm/node_modules/stylis/src/Middleware.js.map +1 -0
  150. package/dist/esm/node_modules/stylis/src/Parser.js +2 -0
  151. package/dist/esm/node_modules/stylis/src/Parser.js.map +1 -0
  152. package/dist/esm/node_modules/stylis/src/Prefixer.js +2 -0
  153. package/dist/esm/node_modules/stylis/src/Prefixer.js.map +1 -0
  154. package/dist/esm/node_modules/stylis/src/Serializer.js +2 -0
  155. package/dist/esm/node_modules/stylis/src/Serializer.js.map +1 -0
  156. package/dist/esm/node_modules/stylis/src/Tokenizer.js +2 -0
  157. package/dist/esm/node_modules/stylis/src/Tokenizer.js.map +1 -0
  158. package/dist/esm/node_modules/stylis/src/Utility.js +2 -0
  159. package/dist/esm/node_modules/stylis/src/Utility.js.map +1 -0
  160. package/dist/esm/node_modules/tslib/tslib.es6.js +2 -0
  161. package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
  162. package/dist/esm/node_modules/viem/_esm/accounts/utils/parseAccount.js +2 -0
  163. package/dist/esm/node_modules/viem/_esm/accounts/utils/parseAccount.js.map +1 -0
  164. package/dist/esm/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js +2 -0
  165. package/dist/esm/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js.map +1 -0
  166. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAddress.js +2 -0
  167. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAddress.js.map +1 -0
  168. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAvatar.js +2 -0
  169. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAvatar.js.map +1 -0
  170. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsName.js +2 -0
  171. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsName.js.map +1 -0
  172. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsResolver.js +2 -0
  173. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsResolver.js.map +1 -0
  174. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsText.js +2 -0
  175. package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsText.js.map +1 -0
  176. package/dist/esm/node_modules/viem/_esm/actions/public/call.js +2 -0
  177. package/dist/esm/node_modules/viem/_esm/actions/public/call.js.map +1 -0
  178. package/dist/esm/node_modules/viem/_esm/actions/public/createAccessList.js +2 -0
  179. package/dist/esm/node_modules/viem/_esm/actions/public/createAccessList.js.map +1 -0
  180. package/dist/esm/node_modules/viem/_esm/actions/public/createBlockFilter.js +2 -0
  181. package/dist/esm/node_modules/viem/_esm/actions/public/createBlockFilter.js.map +1 -0
  182. package/dist/esm/node_modules/viem/_esm/actions/public/createContractEventFilter.js +2 -0
  183. package/dist/esm/node_modules/viem/_esm/actions/public/createContractEventFilter.js.map +1 -0
  184. package/dist/esm/node_modules/viem/_esm/actions/public/createEventFilter.js +2 -0
  185. package/dist/esm/node_modules/viem/_esm/actions/public/createEventFilter.js.map +1 -0
  186. package/dist/esm/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js +2 -0
  187. package/dist/esm/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js.map +1 -0
  188. package/dist/esm/node_modules/viem/_esm/actions/public/estimateContractGas.js +2 -0
  189. package/dist/esm/node_modules/viem/_esm/actions/public/estimateContractGas.js.map +1 -0
  190. package/dist/esm/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js +2 -0
  191. package/dist/esm/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js.map +1 -0
  192. package/dist/esm/node_modules/viem/_esm/actions/public/estimateGas.js +2 -0
  193. package/dist/esm/node_modules/viem/_esm/actions/public/estimateGas.js.map +1 -0
  194. package/dist/esm/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js +2 -0
  195. package/dist/esm/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  196. package/dist/esm/node_modules/viem/_esm/actions/public/getBalance.js +2 -0
  197. package/dist/esm/node_modules/viem/_esm/actions/public/getBalance.js.map +1 -0
  198. package/dist/esm/node_modules/viem/_esm/actions/public/getBlobBaseFee.js +2 -0
  199. package/dist/esm/node_modules/viem/_esm/actions/public/getBlobBaseFee.js.map +1 -0
  200. package/dist/esm/node_modules/viem/_esm/actions/public/getBlock.js +2 -0
  201. package/dist/esm/node_modules/viem/_esm/actions/public/getBlock.js.map +1 -0
  202. package/dist/esm/node_modules/viem/_esm/actions/public/getBlockNumber.js +2 -0
  203. package/dist/esm/node_modules/viem/_esm/actions/public/getBlockNumber.js.map +1 -0
  204. package/dist/esm/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js +2 -0
  205. package/dist/esm/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js.map +1 -0
  206. package/dist/esm/node_modules/viem/_esm/actions/public/getChainId.js +2 -0
  207. package/dist/esm/node_modules/viem/_esm/actions/public/getChainId.js.map +1 -0
  208. package/dist/esm/node_modules/viem/_esm/actions/public/getCode.js +2 -0
  209. package/dist/esm/node_modules/viem/_esm/actions/public/getCode.js.map +1 -0
  210. package/dist/esm/node_modules/viem/_esm/actions/public/getContractEvents.js +2 -0
  211. package/dist/esm/node_modules/viem/_esm/actions/public/getContractEvents.js.map +1 -0
  212. package/dist/esm/node_modules/viem/_esm/actions/public/getEip712Domain.js +2 -0
  213. package/dist/esm/node_modules/viem/_esm/actions/public/getEip712Domain.js.map +1 -0
  214. package/dist/esm/node_modules/viem/_esm/actions/public/getFeeHistory.js +2 -0
  215. package/dist/esm/node_modules/viem/_esm/actions/public/getFeeHistory.js.map +1 -0
  216. package/dist/esm/node_modules/viem/_esm/actions/public/getFilterChanges.js +2 -0
  217. package/dist/esm/node_modules/viem/_esm/actions/public/getFilterChanges.js.map +1 -0
  218. package/dist/esm/node_modules/viem/_esm/actions/public/getFilterLogs.js +2 -0
  219. package/dist/esm/node_modules/viem/_esm/actions/public/getFilterLogs.js.map +1 -0
  220. package/dist/esm/node_modules/viem/_esm/actions/public/getGasPrice.js +2 -0
  221. package/dist/esm/node_modules/viem/_esm/actions/public/getGasPrice.js.map +1 -0
  222. package/dist/esm/node_modules/viem/_esm/actions/public/getLogs.js +2 -0
  223. package/dist/esm/node_modules/viem/_esm/actions/public/getLogs.js.map +1 -0
  224. package/dist/esm/node_modules/viem/_esm/actions/public/getProof.js +2 -0
  225. package/dist/esm/node_modules/viem/_esm/actions/public/getProof.js.map +1 -0
  226. package/dist/esm/node_modules/viem/_esm/actions/public/getStorageAt.js +2 -0
  227. package/dist/esm/node_modules/viem/_esm/actions/public/getStorageAt.js.map +1 -0
  228. package/dist/esm/node_modules/viem/_esm/actions/public/getTransaction.js +2 -0
  229. package/dist/esm/node_modules/viem/_esm/actions/public/getTransaction.js.map +1 -0
  230. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js +2 -0
  231. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js.map +1 -0
  232. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionCount.js +2 -0
  233. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionCount.js.map +1 -0
  234. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionReceipt.js +2 -0
  235. package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionReceipt.js.map +1 -0
  236. package/dist/esm/node_modules/viem/_esm/actions/public/multicall.js +2 -0
  237. package/dist/esm/node_modules/viem/_esm/actions/public/multicall.js.map +1 -0
  238. package/dist/esm/node_modules/viem/_esm/actions/public/readContract.js +2 -0
  239. package/dist/esm/node_modules/viem/_esm/actions/public/readContract.js.map +1 -0
  240. package/dist/esm/node_modules/viem/_esm/actions/public/simulateBlocks.js +2 -0
  241. package/dist/esm/node_modules/viem/_esm/actions/public/simulateBlocks.js.map +1 -0
  242. package/dist/esm/node_modules/viem/_esm/actions/public/simulateCalls.js +2 -0
  243. package/dist/esm/node_modules/viem/_esm/actions/public/simulateCalls.js.map +1 -0
  244. package/dist/esm/node_modules/viem/_esm/actions/public/simulateContract.js +2 -0
  245. package/dist/esm/node_modules/viem/_esm/actions/public/simulateContract.js.map +1 -0
  246. package/dist/esm/node_modules/viem/_esm/actions/public/uninstallFilter.js +2 -0
  247. package/dist/esm/node_modules/viem/_esm/actions/public/uninstallFilter.js.map +1 -0
  248. package/dist/esm/node_modules/viem/_esm/actions/public/verifyHash.js +2 -0
  249. package/dist/esm/node_modules/viem/_esm/actions/public/verifyHash.js.map +1 -0
  250. package/dist/esm/node_modules/viem/_esm/actions/public/verifyMessage.js +2 -0
  251. package/dist/esm/node_modules/viem/_esm/actions/public/verifyMessage.js.map +1 -0
  252. package/dist/esm/node_modules/viem/_esm/actions/public/verifyTypedData.js +2 -0
  253. package/dist/esm/node_modules/viem/_esm/actions/public/verifyTypedData.js.map +1 -0
  254. package/dist/esm/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js +2 -0
  255. package/dist/esm/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js.map +1 -0
  256. package/dist/esm/node_modules/viem/_esm/actions/public/watchBlockNumber.js +2 -0
  257. package/dist/esm/node_modules/viem/_esm/actions/public/watchBlockNumber.js.map +1 -0
  258. package/dist/esm/node_modules/viem/_esm/actions/public/watchBlocks.js +2 -0
  259. package/dist/esm/node_modules/viem/_esm/actions/public/watchBlocks.js.map +1 -0
  260. package/dist/esm/node_modules/viem/_esm/actions/public/watchContractEvent.js +2 -0
  261. package/dist/esm/node_modules/viem/_esm/actions/public/watchContractEvent.js.map +1 -0
  262. package/dist/esm/node_modules/viem/_esm/actions/public/watchEvent.js +2 -0
  263. package/dist/esm/node_modules/viem/_esm/actions/public/watchEvent.js.map +1 -0
  264. package/dist/esm/node_modules/viem/_esm/actions/public/watchPendingTransactions.js +2 -0
  265. package/dist/esm/node_modules/viem/_esm/actions/public/watchPendingTransactions.js.map +1 -0
  266. package/dist/esm/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js +2 -0
  267. package/dist/esm/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js.map +1 -0
  268. package/dist/esm/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js +2 -0
  269. package/dist/esm/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -0
  270. package/dist/esm/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js +2 -0
  271. package/dist/esm/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js.map +1 -0
  272. package/dist/esm/node_modules/viem/_esm/clients/createClient.js +2 -0
  273. package/dist/esm/node_modules/viem/_esm/clients/createClient.js.map +1 -0
  274. package/dist/esm/node_modules/viem/_esm/clients/createPublicClient.js +2 -0
  275. package/dist/esm/node_modules/viem/_esm/clients/createPublicClient.js.map +1 -0
  276. package/dist/esm/node_modules/viem/_esm/clients/decorators/public.js +2 -0
  277. package/dist/esm/node_modules/viem/_esm/clients/decorators/public.js.map +1 -0
  278. package/dist/esm/node_modules/viem/_esm/clients/transports/createTransport.js +2 -0
  279. package/dist/esm/node_modules/viem/_esm/clients/transports/createTransport.js.map +1 -0
  280. package/dist/esm/node_modules/viem/_esm/clients/transports/http.js +2 -0
  281. package/dist/esm/node_modules/viem/_esm/clients/transports/http.js.map +1 -0
  282. package/dist/esm/node_modules/viem/_esm/constants/abis.js +2 -0
  283. package/dist/esm/node_modules/viem/_esm/constants/abis.js.map +1 -0
  284. package/dist/esm/node_modules/viem/_esm/constants/address.js +2 -0
  285. package/dist/esm/node_modules/viem/_esm/constants/address.js.map +1 -0
  286. package/dist/esm/node_modules/viem/_esm/constants/blob.js +2 -0
  287. package/dist/esm/node_modules/viem/_esm/constants/blob.js.map +1 -0
  288. package/dist/esm/node_modules/viem/_esm/constants/contract.js +2 -0
  289. package/dist/esm/node_modules/viem/_esm/constants/contract.js.map +1 -0
  290. package/dist/esm/node_modules/viem/_esm/constants/contracts.js +2 -0
  291. package/dist/esm/node_modules/viem/_esm/constants/contracts.js.map +1 -0
  292. package/dist/esm/node_modules/viem/_esm/constants/number.js +2 -0
  293. package/dist/esm/node_modules/viem/_esm/constants/number.js.map +1 -0
  294. package/dist/esm/node_modules/viem/_esm/constants/solidity.js +2 -0
  295. package/dist/esm/node_modules/viem/_esm/constants/solidity.js.map +1 -0
  296. package/dist/esm/node_modules/viem/_esm/constants/strings.js +2 -0
  297. package/dist/esm/node_modules/viem/_esm/constants/strings.js.map +1 -0
  298. package/dist/esm/node_modules/viem/_esm/constants/unit.js +2 -0
  299. package/dist/esm/node_modules/viem/_esm/constants/unit.js.map +1 -0
  300. package/dist/esm/node_modules/viem/_esm/errors/abi.js +2 -0
  301. package/dist/esm/node_modules/viem/_esm/errors/abi.js.map +1 -0
  302. package/dist/esm/node_modules/viem/_esm/errors/address.js +2 -0
  303. package/dist/esm/node_modules/viem/_esm/errors/address.js.map +1 -0
  304. package/dist/esm/node_modules/viem/_esm/errors/base.js +2 -0
  305. package/dist/esm/node_modules/viem/_esm/errors/base.js.map +1 -0
  306. package/dist/esm/node_modules/viem/_esm/errors/blob.js +2 -0
  307. package/dist/esm/node_modules/viem/_esm/errors/blob.js.map +1 -0
  308. package/dist/esm/node_modules/viem/_esm/errors/block.js +2 -0
  309. package/dist/esm/node_modules/viem/_esm/errors/block.js.map +1 -0
  310. package/dist/esm/node_modules/viem/_esm/errors/ccip.js +2 -0
  311. package/dist/esm/node_modules/viem/_esm/errors/ccip.js.map +1 -0
  312. package/dist/esm/node_modules/viem/_esm/errors/chain.js +2 -0
  313. package/dist/esm/node_modules/viem/_esm/errors/chain.js.map +1 -0
  314. package/dist/esm/node_modules/viem/_esm/errors/contract.js +2 -0
  315. package/dist/esm/node_modules/viem/_esm/errors/contract.js.map +1 -0
  316. package/dist/esm/node_modules/viem/_esm/errors/cursor.js +2 -0
  317. package/dist/esm/node_modules/viem/_esm/errors/cursor.js.map +1 -0
  318. package/dist/esm/node_modules/viem/_esm/errors/data.js +2 -0
  319. package/dist/esm/node_modules/viem/_esm/errors/data.js.map +1 -0
  320. package/dist/esm/node_modules/viem/_esm/errors/eip712.js +2 -0
  321. package/dist/esm/node_modules/viem/_esm/errors/eip712.js.map +1 -0
  322. package/dist/esm/node_modules/viem/_esm/errors/encoding.js +2 -0
  323. package/dist/esm/node_modules/viem/_esm/errors/encoding.js.map +1 -0
  324. package/dist/esm/node_modules/viem/_esm/errors/ens.js +2 -0
  325. package/dist/esm/node_modules/viem/_esm/errors/ens.js.map +1 -0
  326. package/dist/esm/node_modules/viem/_esm/errors/estimateGas.js +2 -0
  327. package/dist/esm/node_modules/viem/_esm/errors/estimateGas.js.map +1 -0
  328. package/dist/esm/node_modules/viem/_esm/errors/fee.js +2 -0
  329. package/dist/esm/node_modules/viem/_esm/errors/fee.js.map +1 -0
  330. package/dist/esm/node_modules/viem/_esm/errors/log.js +2 -0
  331. package/dist/esm/node_modules/viem/_esm/errors/log.js.map +1 -0
  332. package/dist/esm/node_modules/viem/_esm/errors/node.js +2 -0
  333. package/dist/esm/node_modules/viem/_esm/errors/node.js.map +1 -0
  334. package/dist/esm/node_modules/viem/_esm/errors/request.js +2 -0
  335. package/dist/esm/node_modules/viem/_esm/errors/request.js.map +1 -0
  336. package/dist/esm/node_modules/viem/_esm/errors/rpc.js +2 -0
  337. package/dist/esm/node_modules/viem/_esm/errors/rpc.js.map +1 -0
  338. package/dist/esm/node_modules/viem/_esm/errors/stateOverride.js +2 -0
  339. package/dist/esm/node_modules/viem/_esm/errors/stateOverride.js.map +1 -0
  340. package/dist/esm/node_modules/viem/_esm/errors/transaction.js +2 -0
  341. package/dist/esm/node_modules/viem/_esm/errors/transaction.js.map +1 -0
  342. package/dist/esm/node_modules/viem/_esm/errors/transport.js +2 -0
  343. package/dist/esm/node_modules/viem/_esm/errors/transport.js.map +1 -0
  344. package/dist/esm/node_modules/viem/_esm/errors/typedData.js +2 -0
  345. package/dist/esm/node_modules/viem/_esm/errors/typedData.js.map +1 -0
  346. package/dist/esm/node_modules/viem/_esm/errors/utils.js +2 -0
  347. package/dist/esm/node_modules/viem/_esm/errors/utils.js.map +1 -0
  348. package/dist/esm/node_modules/viem/_esm/errors/version.js +2 -0
  349. package/dist/esm/node_modules/viem/_esm/errors/version.js.map +1 -0
  350. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js +2 -0
  351. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js.map +1 -0
  352. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeErrorResult.js +2 -0
  353. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeErrorResult.js.map +1 -0
  354. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeEventLog.js +2 -0
  355. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeEventLog.js.map +1 -0
  356. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionData.js +2 -0
  357. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionData.js.map +1 -0
  358. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js +2 -0
  359. package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js.map +1 -0
  360. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js +2 -0
  361. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js.map +1 -0
  362. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeDeployData.js +2 -0
  363. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeDeployData.js.map +1 -0
  364. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeErrorResult.js +2 -0
  365. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeErrorResult.js.map +1 -0
  366. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeEventTopics.js +2 -0
  367. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeEventTopics.js.map +1 -0
  368. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionData.js +2 -0
  369. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionData.js.map +1 -0
  370. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js +2 -0
  371. package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js.map +1 -0
  372. package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItem.js +2 -0
  373. package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItem.js.map +1 -0
  374. package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js +2 -0
  375. package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js.map +1 -0
  376. package/dist/esm/node_modules/viem/_esm/utils/abi/getAbiItem.js +2 -0
  377. package/dist/esm/node_modules/viem/_esm/utils/abi/getAbiItem.js.map +1 -0
  378. package/dist/esm/node_modules/viem/_esm/utils/abi/parseEventLogs.js +2 -0
  379. package/dist/esm/node_modules/viem/_esm/utils/abi/parseEventLogs.js.map +1 -0
  380. package/dist/esm/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js +2 -0
  381. package/dist/esm/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js.map +1 -0
  382. package/dist/esm/node_modules/viem/_esm/utils/address/getAddress.js +2 -0
  383. package/dist/esm/node_modules/viem/_esm/utils/address/getAddress.js.map +1 -0
  384. package/dist/esm/node_modules/viem/_esm/utils/address/isAddress.js +2 -0
  385. package/dist/esm/node_modules/viem/_esm/utils/address/isAddress.js.map +1 -0
  386. package/dist/esm/node_modules/viem/_esm/utils/address/isAddressEqual.js +2 -0
  387. package/dist/esm/node_modules/viem/_esm/utils/address/isAddressEqual.js.map +1 -0
  388. package/dist/esm/node_modules/viem/_esm/utils/authorization/hashAuthorization.js +2 -0
  389. package/dist/esm/node_modules/viem/_esm/utils/authorization/hashAuthorization.js.map +1 -0
  390. package/dist/esm/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js +2 -0
  391. package/dist/esm/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js.map +1 -0
  392. package/dist/esm/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js +2 -0
  393. package/dist/esm/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js.map +1 -0
  394. package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToCommitments.js +2 -0
  395. package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToCommitments.js.map +1 -0
  396. package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToProofs.js +2 -0
  397. package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToProofs.js.map +1 -0
  398. package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js +2 -0
  399. package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js.map +1 -0
  400. package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js +2 -0
  401. package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js.map +1 -0
  402. package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobSidecars.js +2 -0
  403. package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobSidecars.js.map +1 -0
  404. package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobs.js +2 -0
  405. package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobs.js.map +1 -0
  406. package/dist/esm/node_modules/viem/_esm/utils/buildRequest.js +2 -0
  407. package/dist/esm/node_modules/viem/_esm/utils/buildRequest.js.map +1 -0
  408. package/dist/esm/node_modules/viem/_esm/utils/ccip.js +2 -0
  409. package/dist/esm/node_modules/viem/_esm/utils/ccip.js.map +1 -0
  410. package/dist/esm/node_modules/viem/_esm/utils/chain/getChainContractAddress.js +2 -0
  411. package/dist/esm/node_modules/viem/_esm/utils/chain/getChainContractAddress.js.map +1 -0
  412. package/dist/esm/node_modules/viem/_esm/utils/cursor.js +2 -0
  413. package/dist/esm/node_modules/viem/_esm/utils/cursor.js.map +1 -0
  414. package/dist/esm/node_modules/viem/_esm/utils/data/concat.js +2 -0
  415. package/dist/esm/node_modules/viem/_esm/utils/data/concat.js.map +1 -0
  416. package/dist/esm/node_modules/viem/_esm/utils/data/isHex.js +2 -0
  417. package/dist/esm/node_modules/viem/_esm/utils/data/isHex.js.map +1 -0
  418. package/dist/esm/node_modules/viem/_esm/utils/data/pad.js +2 -0
  419. package/dist/esm/node_modules/viem/_esm/utils/data/pad.js.map +1 -0
  420. package/dist/esm/node_modules/viem/_esm/utils/data/size.js +2 -0
  421. package/dist/esm/node_modules/viem/_esm/utils/data/size.js.map +1 -0
  422. package/dist/esm/node_modules/viem/_esm/utils/data/slice.js +2 -0
  423. package/dist/esm/node_modules/viem/_esm/utils/data/slice.js.map +1 -0
  424. package/dist/esm/node_modules/viem/_esm/utils/data/trim.js +2 -0
  425. package/dist/esm/node_modules/viem/_esm/utils/data/trim.js.map +1 -0
  426. package/dist/esm/node_modules/viem/_esm/utils/encoding/fromBytes.js +2 -0
  427. package/dist/esm/node_modules/viem/_esm/utils/encoding/fromBytes.js.map +1 -0
  428. package/dist/esm/node_modules/viem/_esm/utils/encoding/fromHex.js +2 -0
  429. package/dist/esm/node_modules/viem/_esm/utils/encoding/fromHex.js.map +1 -0
  430. package/dist/esm/node_modules/viem/_esm/utils/encoding/toBytes.js +2 -0
  431. package/dist/esm/node_modules/viem/_esm/utils/encoding/toBytes.js.map +1 -0
  432. package/dist/esm/node_modules/viem/_esm/utils/encoding/toHex.js +2 -0
  433. package/dist/esm/node_modules/viem/_esm/utils/encoding/toHex.js.map +1 -0
  434. package/dist/esm/node_modules/viem/_esm/utils/encoding/toRlp.js +2 -0
  435. package/dist/esm/node_modules/viem/_esm/utils/encoding/toRlp.js.map +1 -0
  436. package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js +2 -0
  437. package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
  438. package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/utils.js +2 -0
  439. package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/utils.js.map +1 -0
  440. package/dist/esm/node_modules/viem/_esm/utils/ens/encodeLabelhash.js +2 -0
  441. package/dist/esm/node_modules/viem/_esm/utils/ens/encodeLabelhash.js.map +1 -0
  442. package/dist/esm/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js +2 -0
  443. package/dist/esm/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js.map +1 -0
  444. package/dist/esm/node_modules/viem/_esm/utils/ens/errors.js +2 -0
  445. package/dist/esm/node_modules/viem/_esm/utils/ens/errors.js.map +1 -0
  446. package/dist/esm/node_modules/viem/_esm/utils/ens/labelhash.js +2 -0
  447. package/dist/esm/node_modules/viem/_esm/utils/ens/labelhash.js.map +1 -0
  448. package/dist/esm/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js +2 -0
  449. package/dist/esm/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js.map +1 -0
  450. package/dist/esm/node_modules/viem/_esm/utils/ens/namehash.js +2 -0
  451. package/dist/esm/node_modules/viem/_esm/utils/ens/namehash.js.map +1 -0
  452. package/dist/esm/node_modules/viem/_esm/utils/ens/packetToBytes.js +2 -0
  453. package/dist/esm/node_modules/viem/_esm/utils/ens/packetToBytes.js.map +1 -0
  454. package/dist/esm/node_modules/viem/_esm/utils/errors/getCallError.js +2 -0
  455. package/dist/esm/node_modules/viem/_esm/utils/errors/getCallError.js.map +1 -0
  456. package/dist/esm/node_modules/viem/_esm/utils/errors/getContractError.js +2 -0
  457. package/dist/esm/node_modules/viem/_esm/utils/errors/getContractError.js.map +1 -0
  458. package/dist/esm/node_modules/viem/_esm/utils/errors/getEstimateGasError.js +2 -0
  459. package/dist/esm/node_modules/viem/_esm/utils/errors/getEstimateGasError.js.map +1 -0
  460. package/dist/esm/node_modules/viem/_esm/utils/errors/getNodeError.js +2 -0
  461. package/dist/esm/node_modules/viem/_esm/utils/errors/getNodeError.js.map +1 -0
  462. package/dist/esm/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js +2 -0
  463. package/dist/esm/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js.map +1 -0
  464. package/dist/esm/node_modules/viem/_esm/utils/formatters/block.js +2 -0
  465. package/dist/esm/node_modules/viem/_esm/utils/formatters/block.js.map +1 -0
  466. package/dist/esm/node_modules/viem/_esm/utils/formatters/extract.js +2 -0
  467. package/dist/esm/node_modules/viem/_esm/utils/formatters/extract.js.map +1 -0
  468. package/dist/esm/node_modules/viem/_esm/utils/formatters/feeHistory.js +2 -0
  469. package/dist/esm/node_modules/viem/_esm/utils/formatters/feeHistory.js.map +1 -0
  470. package/dist/esm/node_modules/viem/_esm/utils/formatters/log.js +2 -0
  471. package/dist/esm/node_modules/viem/_esm/utils/formatters/log.js.map +1 -0
  472. package/dist/esm/node_modules/viem/_esm/utils/formatters/proof.js +2 -0
  473. package/dist/esm/node_modules/viem/_esm/utils/formatters/proof.js.map +1 -0
  474. package/dist/esm/node_modules/viem/_esm/utils/formatters/transaction.js +2 -0
  475. package/dist/esm/node_modules/viem/_esm/utils/formatters/transaction.js.map +1 -0
  476. package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionReceipt.js +2 -0
  477. package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionReceipt.js.map +1 -0
  478. package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionRequest.js +2 -0
  479. package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionRequest.js.map +1 -0
  480. package/dist/esm/node_modules/viem/_esm/utils/getAction.js +2 -0
  481. package/dist/esm/node_modules/viem/_esm/utils/getAction.js.map +1 -0
  482. package/dist/esm/node_modules/viem/_esm/utils/hash/hashSignature.js +2 -0
  483. package/dist/esm/node_modules/viem/_esm/utils/hash/hashSignature.js.map +1 -0
  484. package/dist/esm/node_modules/viem/_esm/utils/hash/keccak256.js +2 -0
  485. package/dist/esm/node_modules/viem/_esm/utils/hash/keccak256.js.map +1 -0
  486. package/dist/esm/node_modules/viem/_esm/utils/hash/normalizeSignature.js +2 -0
  487. package/dist/esm/node_modules/viem/_esm/utils/hash/normalizeSignature.js.map +1 -0
  488. package/dist/esm/node_modules/viem/_esm/utils/hash/sha256.js +2 -0
  489. package/dist/esm/node_modules/viem/_esm/utils/hash/sha256.js.map +1 -0
  490. package/dist/esm/node_modules/viem/_esm/utils/hash/toEventSelector.js +2 -0
  491. package/dist/esm/node_modules/viem/_esm/utils/hash/toEventSelector.js.map +1 -0
  492. package/dist/esm/node_modules/viem/_esm/utils/hash/toFunctionSelector.js +2 -0
  493. package/dist/esm/node_modules/viem/_esm/utils/hash/toFunctionSelector.js.map +1 -0
  494. package/dist/esm/node_modules/viem/_esm/utils/hash/toSignature.js +2 -0
  495. package/dist/esm/node_modules/viem/_esm/utils/hash/toSignature.js.map +1 -0
  496. package/dist/esm/node_modules/viem/_esm/utils/hash/toSignatureHash.js +2 -0
  497. package/dist/esm/node_modules/viem/_esm/utils/hash/toSignatureHash.js.map +1 -0
  498. package/dist/esm/node_modules/viem/_esm/utils/lru.js +2 -0
  499. package/dist/esm/node_modules/viem/_esm/utils/lru.js.map +1 -0
  500. package/dist/esm/node_modules/viem/_esm/utils/observe.js +2 -0
  501. package/dist/esm/node_modules/viem/_esm/utils/observe.js.map +1 -0
  502. package/dist/esm/node_modules/viem/_esm/utils/poll.js +2 -0
  503. package/dist/esm/node_modules/viem/_esm/utils/poll.js.map +1 -0
  504. package/dist/esm/node_modules/viem/_esm/utils/promise/createBatchScheduler.js +2 -0
  505. package/dist/esm/node_modules/viem/_esm/utils/promise/createBatchScheduler.js.map +1 -0
  506. package/dist/esm/node_modules/viem/_esm/utils/promise/withCache.js +2 -0
  507. package/dist/esm/node_modules/viem/_esm/utils/promise/withCache.js.map +1 -0
  508. package/dist/esm/node_modules/viem/_esm/utils/promise/withDedupe.js +2 -0
  509. package/dist/esm/node_modules/viem/_esm/utils/promise/withDedupe.js.map +1 -0
  510. package/dist/esm/node_modules/viem/_esm/utils/promise/withResolvers.js +2 -0
  511. package/dist/esm/node_modules/viem/_esm/utils/promise/withResolvers.js.map +1 -0
  512. package/dist/esm/node_modules/viem/_esm/utils/promise/withRetry.js +2 -0
  513. package/dist/esm/node_modules/viem/_esm/utils/promise/withRetry.js.map +1 -0
  514. package/dist/esm/node_modules/viem/_esm/utils/promise/withTimeout.js +2 -0
  515. package/dist/esm/node_modules/viem/_esm/utils/promise/withTimeout.js.map +1 -0
  516. package/dist/esm/node_modules/viem/_esm/utils/regex.js +2 -0
  517. package/dist/esm/node_modules/viem/_esm/utils/regex.js.map +1 -0
  518. package/dist/esm/node_modules/viem/_esm/utils/rpc/http.js +2 -0
  519. package/dist/esm/node_modules/viem/_esm/utils/rpc/http.js.map +1 -0
  520. package/dist/esm/node_modules/viem/_esm/utils/rpc/id.js +2 -0
  521. package/dist/esm/node_modules/viem/_esm/utils/rpc/id.js.map +1 -0
  522. package/dist/esm/node_modules/viem/_esm/utils/signature/hashMessage.js +2 -0
  523. package/dist/esm/node_modules/viem/_esm/utils/signature/hashMessage.js.map +1 -0
  524. package/dist/esm/node_modules/viem/_esm/utils/signature/hashTypedData.js +2 -0
  525. package/dist/esm/node_modules/viem/_esm/utils/signature/hashTypedData.js.map +1 -0
  526. package/dist/esm/node_modules/viem/_esm/utils/signature/recoverAddress.js +2 -0
  527. package/dist/esm/node_modules/viem/_esm/utils/signature/recoverAddress.js.map +1 -0
  528. package/dist/esm/node_modules/viem/_esm/utils/signature/recoverPublicKey.js +2 -0
  529. package/dist/esm/node_modules/viem/_esm/utils/signature/recoverPublicKey.js.map +1 -0
  530. package/dist/esm/node_modules/viem/_esm/utils/signature/serializeSignature.js +2 -0
  531. package/dist/esm/node_modules/viem/_esm/utils/signature/serializeSignature.js.map +1 -0
  532. package/dist/esm/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js +2 -0
  533. package/dist/esm/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js.map +1 -0
  534. package/dist/esm/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js +2 -0
  535. package/dist/esm/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js.map +1 -0
  536. package/dist/esm/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js +2 -0
  537. package/dist/esm/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js.map +1 -0
  538. package/dist/esm/node_modules/viem/_esm/utils/stateOverride.js +2 -0
  539. package/dist/esm/node_modules/viem/_esm/utils/stateOverride.js.map +1 -0
  540. package/dist/esm/node_modules/viem/_esm/utils/stringify.js +2 -0
  541. package/dist/esm/node_modules/viem/_esm/utils/stringify.js.map +1 -0
  542. package/dist/esm/node_modules/viem/_esm/utils/transaction/assertRequest.js +2 -0
  543. package/dist/esm/node_modules/viem/_esm/utils/transaction/assertRequest.js.map +1 -0
  544. package/dist/esm/node_modules/viem/_esm/utils/transaction/getTransactionType.js +2 -0
  545. package/dist/esm/node_modules/viem/_esm/utils/transaction/getTransactionType.js.map +1 -0
  546. package/dist/esm/node_modules/viem/_esm/utils/typedData.js +2 -0
  547. package/dist/esm/node_modules/viem/_esm/utils/typedData.js.map +1 -0
  548. package/dist/esm/node_modules/viem/_esm/utils/uid.js +2 -0
  549. package/dist/esm/node_modules/viem/_esm/utils/uid.js.map +1 -0
  550. package/dist/esm/node_modules/viem/_esm/utils/unit/formatEther.js +2 -0
  551. package/dist/esm/node_modules/viem/_esm/utils/unit/formatEther.js.map +1 -0
  552. package/dist/esm/node_modules/viem/_esm/utils/unit/formatGwei.js +2 -0
  553. package/dist/esm/node_modules/viem/_esm/utils/unit/formatGwei.js.map +1 -0
  554. package/dist/esm/node_modules/viem/_esm/utils/unit/formatUnits.js +2 -0
  555. package/dist/esm/node_modules/viem/_esm/utils/unit/formatUnits.js.map +1 -0
  556. package/dist/esm/node_modules/viem/_esm/utils/wait.js +2 -0
  557. package/dist/esm/node_modules/viem/_esm/utils/wait.js.map +1 -0
  558. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/_shortw_utils.js +3 -0
  559. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/_shortw_utils.js.map +1 -0
  560. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/curve.js +3 -0
  561. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
  562. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/modular.js +4 -0
  563. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
  564. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/utils.js +3 -0
  565. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
  566. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/weierstrass.js +4 -0
  567. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
  568. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/secp256k1.js +3 -0
  569. package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
  570. package/dist/esm/src/LoginModal.js +2 -0
  571. package/dist/esm/src/LoginModal.js.map +1 -0
  572. package/dist/esm/src/LoginModal.styles.js +286 -0
  573. package/dist/esm/src/LoginModal.styles.js.map +1 -0
  574. package/dist/esm/src/adapters/phantom.js +2 -0
  575. package/dist/esm/src/adapters/phantom.js.map +1 -0
  576. package/dist/esm/src/client.js +2 -0
  577. package/dist/esm/src/client.js.map +1 -0
  578. package/dist/esm/src/coinbase.js +2 -0
  579. package/dist/esm/src/coinbase.js.map +1 -0
  580. package/dist/esm/src/context.js +2 -0
  581. package/dist/esm/src/context.js.map +1 -0
  582. package/dist/esm/src/hooks.js +2 -0
  583. package/dist/esm/src/hooks.js.map +1 -0
  584. package/dist/esm/src/index.js +2 -0
  585. package/dist/esm/src/index.js.map +1 -0
  586. package/dist/esm/src/modal.js +2 -0
  587. package/dist/esm/src/modal.js.map +1 -0
  588. package/dist/esm/src/polyfills.js +2 -0
  589. package/dist/esm/src/polyfills.js.map +1 -0
  590. package/dist/esm/src/storage.js +2 -0
  591. package/dist/esm/src/storage.js.map +1 -0
  592. package/dist/esm/src/styles/index.js +2 -0
  593. package/dist/esm/src/styles/index.js.map +1 -0
  594. package/dist/esm/src/styles/theme.js +2 -0
  595. package/dist/esm/src/styles/theme.js.map +1 -0
  596. package/dist/esm/src/types.js +2 -0
  597. package/dist/esm/src/types.js.map +1 -0
  598. package/dist/esm/src/utils/coinbaseUtils.js +2 -0
  599. package/dist/esm/src/utils/coinbaseUtils.js.map +1 -0
  600. package/dist/esm/src/utils/oauth.js +2 -0
  601. package/dist/esm/src/utils/oauth.js.map +1 -0
  602. package/dist/esm/types/LoginModal.d.ts +3 -0
  603. package/dist/esm/types/LoginModal.styles.d.ts +29 -0
  604. package/dist/esm/types/adapters/phantom.d.ts +30 -0
  605. package/dist/esm/types/client.d.ts +170 -0
  606. package/dist/esm/types/coinbase.d.ts +3 -0
  607. package/dist/esm/types/context.d.ts +28 -0
  608. package/dist/esm/types/hooks.d.ts +56 -0
  609. package/dist/esm/types/index.d.ts +8 -0
  610. package/dist/esm/types/modal.d.ts +20 -0
  611. package/dist/esm/types/polyfills.d.ts +1 -0
  612. package/dist/esm/types/storage.d.ts +9 -0
  613. package/dist/esm/types/styles/globalStyles.d.ts +2 -0
  614. package/dist/esm/types/styles/index.d.ts +2 -0
  615. package/dist/esm/types/styles/theme.d.ts +103 -0
  616. package/dist/esm/types/types.d.ts +132 -0
  617. package/dist/esm/types/utils/coinbaseUtils.d.ts +9 -0
  618. package/dist/esm/types/utils/oauth.d.ts +21 -0
  619. package/dist/esm/types/utils/twitter.d.ts +35 -0
  620. package/dist/index.cjs +296 -0
  621. package/dist/index.cjs.map +1 -0
  622. package/dist/index.d.ts +530 -0
  623. package/package.json +97 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sources":["../../../../../../node_modules/abitype/dist/esm/errors.js"],"sourcesContent":["import { version } from './version.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: abitype@${version}`,\n ].join('\\n');\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiTypeError'\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n}\n//# sourceMappingURL=errors.js.map"],"names":["BaseError","Error","constructor","shortMessage","args","details","cause","message","docsPath","super","metaMessages","version","join","Object","defineProperty","this","enumerable","configurable","writable","value"],"mappings":"uCACO,MAAMA,UAAkBC,MAC3B,WAAAC,CAAYC,EAAcC,EAAO,IAC7B,MAAMC,EAAUD,EAAKE,iBAAiBN,EAChCI,EAAKE,MAAMD,QACXD,EAAKE,OAAOC,QACRH,EAAKE,MAAMC,QACXH,EAAKC,QACTG,EAAWJ,EAAKE,iBAAiBN,GACjCI,EAAKE,MAAME,UACXJ,EAAKI,SASXC,MARgB,CACZN,GAAgB,qBAChB,MACIC,EAAKM,aAAe,IAAIN,EAAKM,aAAc,IAAM,MACjDF,EAAW,CAAC,4BAA4BA,KAAc,MACtDH,EAAU,CAAC,YAAYA,KAAa,GACxC,oBAAoBM,KACtBC,KAAK,OAEPC,OAAOC,eAAeC,KAAM,UAAW,CACnCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,WAAO,IAEXN,OAAOC,eAAeC,KAAM,WAAY,CACpCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,WAAO,IAEXN,OAAOC,eAAeC,KAAM,eAAgB,CACxCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,WAAO,IAEXN,OAAOC,eAAeC,KAAM,eAAgB,CACxCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,WAAO,IAEXN,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,iBAEPf,EAAKE,QACLS,KAAKT,MAAQF,EAAKE,OACtBS,KAAKV,QAAUA,EACfU,KAAKP,SAAWA,EAChBO,KAAKL,aAAeN,EAAKM,aACzBK,KAAKZ,aAAeA,CACxB","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{BaseError as e}from"../../errors.js";class r extends e{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class t extends e{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class a extends e{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}export{r as InvalidAbiItemError,a as UnknownSolidityTypeError,t as UnknownTypeError};
2
+ //# sourceMappingURL=abiItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abiItem.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/errors/abiItem.js"],"sourcesContent":["import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n constructor({ signature }) {\n super('Failed to parse ABI item.', {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: '/api/human#parseabiitem-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiItemError'\n });\n }\n}\nexport class UnknownTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownTypeError'\n });\n }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSolidityTypeError'\n });\n }\n}\n//# sourceMappingURL=abiItem.js.map"],"names":["InvalidAbiItemError","BaseError","constructor","signature","super","details","JSON","stringify","docsPath","Object","defineProperty","this","enumerable","configurable","writable","value","UnknownTypeError","type","metaMessages","UnknownSolidityTypeError"],"mappings":"4CACO,MAAMA,UAA4BC,EACrC,WAAAC,EAAYC,UAAEA,IACVC,MAAM,4BAA6B,CAC/BC,QAAS,gBAAgBC,KAAKC,UAAUJ,EAAW,KAAM,MACzDK,SAAU,8BAEdC,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,uBAEf,EAEG,MAAMC,UAAyBf,EAClC,WAAAC,EAAYe,KAAEA,IACVb,MAAM,gBAAiB,CACnBc,aAAc,CACV,SAASD,mFAGjBR,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,oBAEf,EAEG,MAAMI,UAAiClB,EAC1C,WAAAC,EAAYe,KAAEA,IACVb,MAAM,gBAAiB,CACnBc,aAAc,CAAC,SAASD,iCAE5BR,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,4BAEf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{BaseError as e}from"../../errors.js";class r extends e{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class a extends e{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class t extends e{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class i extends e{constructor({param:e,type:r,modifier:a}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${a}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class s extends e{constructor({param:e,type:r,modifier:a}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${a}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${a}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class n extends e{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}export{r as InvalidAbiParametersError,n as InvalidAbiTypeParameterError,s as InvalidFunctionModifierError,i as InvalidModifierError,a as InvalidParameterError,t as SolidityProtectedKeywordError};
2
+ //# sourceMappingURL=abiParameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abiParameter.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js"],"sourcesContent":["import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n constructor({ param }) {\n super('Failed to parse ABI parameter.', {\n details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n docsPath: '/api/human#parseabiparameter-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParameterError'\n });\n }\n}\nexport class InvalidAbiParametersError extends BaseError {\n constructor({ params }) {\n super('Failed to parse ABI parameters.', {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: '/api/human#parseabiparameters-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParametersError'\n });\n }\n}\nexport class InvalidParameterError extends BaseError {\n constructor({ param }) {\n super('Invalid ABI parameter.', {\n details: param,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParameterError'\n });\n }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n constructor({ param, name }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SolidityProtectedKeywordError'\n });\n }\n}\nexport class InvalidModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidModifierError'\n });\n }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidFunctionModifierError'\n });\n }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n constructor({ abiParameter, }) {\n super('Invalid ABI parameter.', {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: ['ABI parameter type is invalid.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiTypeParameterError'\n });\n }\n}\n//# sourceMappingURL=abiParameter.js.map"],"names":["InvalidAbiParametersError","BaseError","constructor","params","super","details","JSON","stringify","docsPath","Object","defineProperty","this","enumerable","configurable","writable","value","InvalidParameterError","param","SolidityProtectedKeywordError","name","metaMessages","InvalidModifierError","type","modifier","InvalidFunctionModifierError","InvalidAbiTypeParameterError","abiParameter"],"mappings":"4CAeO,MAAMA,UAAkCC,EAC3C,WAAAC,EAAYC,OAAEA,IACVC,MAAM,kCAAmC,CACrCC,QAAS,sBAAsBC,KAAKC,UAAUJ,EAAQ,KAAM,MAC5DK,SAAU,oCAEdC,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,6BAEf,EAEG,MAAMC,UAA8Bf,EACvC,WAAAC,EAAYe,MAAEA,IACVb,MAAM,yBAA0B,CAC5BC,QAASY,IAEbR,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,yBAEf,EAEG,MAAMG,UAAsCjB,EAC/C,WAAAC,EAAYe,MAAEA,EAAKE,KAAEA,IACjBf,MAAM,yBAA0B,CAC5BC,QAASY,EACTG,aAAc,CACV,IAAID,4GAGZV,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,iCAEf,EAEG,MAAMM,UAA6BpB,EACtC,WAAAC,EAAYe,MAAEA,EAAKK,KAAEA,EAAIC,SAAEA,IACvBnB,MAAM,yBAA0B,CAC5BC,QAASY,EACTG,aAAc,CACV,aAAaG,iBAAwBD,EAAO,QAAQA,UAAe,SAG3Eb,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,wBAEf,EAEG,MAAMS,UAAqCvB,EAC9C,WAAAC,EAAYe,MAAEA,EAAKK,KAAEA,EAAIC,SAAEA,IACvBnB,MAAM,yBAA0B,CAC5BC,QAASY,EACTG,aAAc,CACV,aAAaG,iBAAwBD,EAAO,QAAQA,UAAe,MACnE,iFAAiFC,mBAGzFd,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,gCAEf,EAEG,MAAMU,UAAqCxB,EAC9C,WAAAC,EAAYwB,aAAEA,IACVtB,MAAM,yBAA0B,CAC5BC,QAASC,KAAKC,UAAUmB,EAAc,KAAM,GAC5CN,aAAc,CAAC,oCAEnBX,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,gCAEf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{BaseError as e}from"../../errors.js";class r extends e{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class t extends e{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class n extends e{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}export{r as InvalidSignatureError,n as InvalidStructSignatureError,t as UnknownSignatureError};
2
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/errors/signature.js"],"sourcesContent":["import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n constructor({ signature, type, }) {\n super(`Invalid ${type} signature.`, {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSignatureError'\n });\n }\n}\nexport class UnknownSignatureError extends BaseError {\n constructor({ signature }) {\n super('Unknown signature.', {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSignatureError'\n });\n }\n}\nexport class InvalidStructSignatureError extends BaseError {\n constructor({ signature }) {\n super('Invalid struct signature.', {\n details: signature,\n metaMessages: ['No properties exist.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStructSignatureError'\n });\n }\n}\n//# sourceMappingURL=signature.js.map"],"names":["InvalidSignatureError","BaseError","constructor","signature","type","super","details","Object","defineProperty","this","enumerable","configurable","writable","value","UnknownSignatureError","InvalidStructSignatureError","metaMessages"],"mappings":"4CACO,MAAMA,UAA8BC,EACvC,WAAAC,EAAYC,UAAEA,EAASC,KAAEA,IACrBC,MAAM,WAAWD,eAAmB,CAChCE,QAASH,IAEbI,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,yBAEf,EAEG,MAAMC,UAA8Bb,EACvC,WAAAC,EAAYC,UAAEA,IACVE,MAAM,qBAAsB,CACxBC,QAASH,IAEbI,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,yBAEf,EAEG,MAAME,UAAoCd,EAC7C,WAAAC,EAAYC,UAAEA,IACVE,MAAM,4BAA6B,CAC/BC,QAASH,EACTa,aAAc,CAAC,0BAEnBT,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,+BAEf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{BaseError as e}from"../../errors.js";class r extends e{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}export{r as InvalidParenthesisError};
2
+ //# sourceMappingURL=splitParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitParameters.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js"],"sourcesContent":["import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n constructor({ current, depth }) {\n super('Unbalanced parentheses.', {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n ],\n details: `Depth \"${depth}\"`,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParenthesisError'\n });\n }\n}\n//# sourceMappingURL=splitParameters.js.map"],"names":["InvalidParenthesisError","BaseError","constructor","current","depth","super","metaMessages","trim","details","Object","defineProperty","this","enumerable","configurable","writable","value"],"mappings":"4CACO,MAAMA,UAAgCC,EACzC,WAAAC,EAAYC,QAAEA,EAAOC,MAAEA,IACnBC,MAAM,0BAA2B,CAC7BC,aAAc,CACV,IAAIH,EAAQI,wBAAwBH,EAAQ,EAAI,UAAY,0BAEhEI,QAAS,UAAUJ,OAEvBK,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,2BAEf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{BaseError as e}from"../../errors.js";class r extends e{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}export{r as CircularReferenceError};
2
+ //# sourceMappingURL=struct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"struct.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/errors/struct.js"],"sourcesContent":["import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n constructor({ type }) {\n super('Circular reference detected.', {\n metaMessages: [`Struct \"${type}\" is a circular reference.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CircularReferenceError'\n });\n }\n}\n//# sourceMappingURL=struct.js.map"],"names":["CircularReferenceError","BaseError","constructor","type","super","metaMessages","Object","defineProperty","this","enumerable","configurable","writable","value"],"mappings":"4CACO,MAAMA,UAA+BC,EACxC,WAAAC,EAAYC,KAAEA,IACVC,MAAM,+BAAgC,CAClCC,aAAc,CAAC,WAAWF,iCAE9BG,OAAOC,eAAeC,KAAM,OAAQ,CAChCC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,MAAO,0BAEf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{formatAbiParameters as t}from"./formatAbiParameters.js";function e(e){return"function"===e.type?`function ${e.name}(${t(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${t(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${t(e.inputs)})`:"error"===e.type?`error ${e.name}(${t(e.inputs)})`:"constructor"===e.type?`constructor(${t(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback() external"+("payable"===e.stateMutability?" payable":""):"receive() external payable"}export{e as formatAbiItem};
2
+ //# sourceMappingURL=formatAbiItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatAbiItem.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"],"sourcesContent":["import { formatAbiParameters, } from './formatAbiParameters.js';\n/**\n * Formats ABI item (e.g. error, event, function) into human-readable ABI item\n *\n * @param abiItem - ABI item\n * @returns Human-readable ABI item\n */\nexport function formatAbiItem(abiItem) {\n if (abiItem.type === 'function')\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== 'nonpayable'\n ? ` ${abiItem.stateMutability}`\n : ''}${abiItem.outputs?.length\n ? ` returns (${formatAbiParameters(abiItem.outputs)})`\n : ''}`;\n if (abiItem.type === 'event')\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'error')\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'constructor')\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n if (abiItem.type === 'fallback')\n return `fallback() external${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n return 'receive() external payable';\n}\n//# sourceMappingURL=formatAbiItem.js.map"],"names":["formatAbiItem","abiItem","type","name","formatAbiParameters","inputs","stateMutability","outputs","length"],"mappings":"+DAOO,SAASA,EAAcC,GAC1B,MAAqB,aAAjBA,EAAQC,KACD,YAAYD,EAAQE,QAAQC,EAAoBH,EAAQI,WAAWJ,EAAQK,iBAA+C,eAA5BL,EAAQK,gBACvG,IAAIL,EAAQK,kBACZ,KAAKL,EAAQM,SAASC,OACtB,aAAaJ,EAAoBH,EAAQM,YACzC,KACW,UAAjBN,EAAQC,KACD,SAASD,EAAQE,QAAQC,EAAoBH,EAAQI,WAC3C,UAAjBJ,EAAQC,KACD,SAASD,EAAQE,QAAQC,EAAoBH,EAAQI,WAC3C,gBAAjBJ,EAAQC,KACD,eAAeE,EAAoBH,EAAQI,WAAuC,YAA5BJ,EAAQK,gBAAgC,WAAa,KACjG,aAAjBL,EAAQC,KACD,uBAAkD,YAA5BD,EAAQK,gBAAgC,WAAa,IAC/E,4BACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{execTyped as e}from"../regex.js";const n=/^tuple(?<array>(\[(\d*)\])*)$/;function t(o){let r=o.type;if(n.test(o.type)&&"components"in o){r="(";const p=o.components.length;for(let e=0;e<p;e++){r+=t(o.components[e]),e<p-1&&(r+=", ")}const i=e(n,o.type);return r+=`)${i?.array??""}`,t({...o,type:r})}return"indexed"in o&&o.indexed&&(r=`${r} indexed`),o.name?`${r} ${o.name}`:r}export{t as formatAbiParameter};
2
+ //# sourceMappingURL=formatAbiParameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatAbiParameter.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"],"sourcesContent":["import { execTyped } from '../regex.js';\n// https://regexr.com/7f7rv\nconst tupleRegex = /^tuple(?<array>(\\[(\\d*)\\])*)$/;\n/**\n * Formats {@link AbiParameter} to human-readable ABI parameter.\n *\n * @param abiParameter - ABI parameter\n * @returns Human-readable ABI parameter\n *\n * @example\n * const result = formatAbiParameter({ type: 'address', name: 'from' })\n * // ^? const result: 'address from'\n */\nexport function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && 'components' in abiParameter) {\n type = '(';\n const length = abiParameter.components.length;\n for (let i = 0; i < length; i++) {\n const component = abiParameter.components[i];\n type += formatAbiParameter(component);\n if (i < length - 1)\n type += ', ';\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? ''}`;\n return formatAbiParameter({\n ...abiParameter,\n type,\n });\n }\n // Add `indexed` to type if in `abiParameter`\n if ('indexed' in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n // Return human-readable ABI parameter\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n}\n//# sourceMappingURL=formatAbiParameter.js.map"],"names":["tupleRegex","formatAbiParameter","abiParameter","type","test","length","components","i","result","execTyped","array","indexed","name"],"mappings":"wCAEA,MAAMA,EAAa,gCAWZ,SAASC,EAAmBC,GAC/B,IAAIC,EAAOD,EAAaC,KACxB,GAAIH,EAAWI,KAAKF,EAAaC,OAAS,eAAgBD,EAAc,CACpEC,EAAO,IACP,MAAME,EAASH,EAAaI,WAAWD,OACvC,IAAK,IAAIE,EAAI,EAAGA,EAAIF,EAAQE,IAAK,CAE7BJ,GAAQF,EADUC,EAAaI,WAAWC,IAEtCA,EAAIF,EAAS,IACbF,GAAQ,KAChB,CACA,MAAMK,EAASC,EAAUT,EAAYE,EAAaC,MAElD,OADAA,GAAQ,IAAIK,GAAQE,OAAS,KACtBT,EAAmB,IACnBC,EACHC,QAER,CAKA,MAHI,YAAaD,GAAgBA,EAAaS,UAC1CR,EAAO,GAAGA,aAEVD,EAAaU,KACN,GAAGT,KAAQD,EAAaU,OAC5BT,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{formatAbiParameter as t}from"./formatAbiParameter.js";function r(r){let o="";const e=r.length;for(let n=0;n<e;n++){const f=r[n];o+=t(f),n!==e-1&&(o+=", ")}return o}export{r as formatAbiParameters};
2
+ //# sourceMappingURL=formatAbiParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatAbiParameters.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"],"sourcesContent":["import { formatAbiParameter, } from './formatAbiParameter.js';\n/**\n * Formats {@link AbiParameter}s to human-readable ABI parameters.\n *\n * @param abiParameters - ABI parameters\n * @returns Human-readable ABI parameters\n *\n * @example\n * const result = formatAbiParameters([\n * // ^? const result: 'address from, uint256 tokenId'\n * { type: 'address', name: 'from' },\n * { type: 'uint256', name: 'tokenId' },\n * ])\n */\nexport function formatAbiParameters(abiParameters) {\n let params = '';\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n params += formatAbiParameter(abiParameter);\n if (i !== length - 1)\n params += ', ';\n }\n return params;\n}\n//# sourceMappingURL=formatAbiParameters.js.map"],"names":["formatAbiParameters","abiParameters","params","length","i","abiParameter","formatAbiParameter"],"mappings":"6DAcO,SAASA,EAAoBC,GAChC,IAAIC,EAAS,GACb,MAAMC,EAASF,EAAcE,OAC7B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQC,IAAK,CAC7B,MAAMC,EAAeJ,EAAcG,GACnCF,GAAUI,EAAmBD,GACzBD,IAAMD,EAAS,IACfD,GAAU,KAClB,CACA,OAAOA,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{isStructSignature as t}from"./runtime/signatures.js";import{parseStructs as r}from"./runtime/structs.js";import{parseSignature as o}from"./runtime/utils.js";function s(s){const n=r(s),i=[],m=s.length;for(let r=0;r<m;r++){const m=s[r];t(m)||i.push(o(m,n))}return i}export{s as parseAbi};
2
+ //# sourceMappingURL=parseAbi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAbi.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/parseAbi.js"],"sourcesContent":["import { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI into JSON {@link Abi}\n *\n * @param signatures - Human-Readable ABI\n * @returns Parsed {@link Abi}\n *\n * @example\n * const abi = parseAbi([\n * // ^? const abi: readonly [{ name: \"balanceOf\"; type: \"function\"; stateMutability:...\n * 'function balanceOf(address owner) view returns (uint256)',\n * 'event Transfer(address indexed from, address indexed to, uint256 amount)',\n * ])\n */\nexport function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi = [];\n const length = signatures.length;\n for (let i = 0; i < length; i++) {\n const signature = signatures[i];\n if (isStructSignature(signature))\n continue;\n abi.push(parseSignature(signature, structs));\n }\n return abi;\n}\n//# sourceMappingURL=parseAbi.js.map"],"names":["parseAbi","signatures","structs","parseStructs","abi","length","i","signature","isStructSignature","push","parseSignature"],"mappings":"oKAgBO,SAASA,EAASC,GACrB,MAAMC,EAAUC,EAAaF,GACvBG,EAAM,GACNC,EAASJ,EAAWI,OAC1B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQC,IAAK,CAC7B,MAAMC,EAAYN,EAAWK,GACzBE,EAAkBD,IAEtBH,EAAIK,KAAKC,EAAeH,EAAWL,GACvC,CACA,OAAOE,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{InvalidAbiItemError as r}from"./errors/abiItem.js";import{isStructSignature as t}from"./runtime/signatures.js";import{parseStructs as e}from"./runtime/structs.js";import{parseSignature as i}from"./runtime/utils.js";function o(o){let s;if("string"==typeof o)s=i(o);else{const r=e(o),n=o.length;for(let e=0;e<n;e++){const n=o[e];if(!t(n)){s=i(n,r);break}}}if(!s)throw new r({signature:o});return s}export{o as parseAbiItem};
2
+ //# sourceMappingURL=parseAbiItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAbiItem.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/parseAbiItem.js"],"sourcesContent":["import { InvalidAbiItemError } from './errors/abiItem.js';\nimport { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI item (e.g. error, event, function) into {@link Abi} item\n *\n * @param signature - Human-readable ABI item\n * @returns Parsed {@link Abi} item\n *\n * @example\n * const abiItem = parseAbiItem('function balanceOf(address owner) view returns (uint256)')\n * // ^? const abiItem: { name: \"balanceOf\"; type: \"function\"; stateMutability: \"view\";...\n *\n * @example\n * const abiItem = parseAbiItem([\n * // ^? const abiItem: { name: \"foo\"; type: \"function\"; stateMutability: \"view\"; inputs:...\n * 'function foo(Baz bar) view returns (string)',\n * 'struct Baz { string name; }',\n * ])\n */\nexport function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === 'string')\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length = signature.length;\n for (let i = 0; i < length; i++) {\n const signature_ = signature[i];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n}\n//# sourceMappingURL=parseAbiItem.js.map"],"names":["parseAbiItem","signature","abiItem","parseSignature","structs","parseStructs","length","i","signature_","isStructSignature","InvalidAbiItemError"],"mappings":"8NAqBO,SAASA,EAAaC,GACzB,IAAIC,EACJ,GAAyB,iBAAdD,EACPC,EAAUC,EAAeF,OACxB,CACD,MAAMG,EAAUC,EAAaJ,GACvBK,EAASL,EAAUK,OACzB,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQC,IAAK,CAC7B,MAAMC,EAAaP,EAAUM,GAC7B,IAAIE,EAAkBD,GAAtB,CAEAN,EAAUC,EAAeK,EAAYJ,GACrC,KAFI,CAGR,CACJ,CACA,IAAKF,EACD,MAAM,IAAIQ,EAAoB,CAAET,cACpC,OAAOC,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{InvalidAbiParametersError as t}from"./errors/abiParameter.js";import{isStructSignature as r,modifiers as o}from"./runtime/signatures.js";import{parseStructs as s}from"./runtime/structs.js";import{splitParameters as e,parseAbiParameter as i}from"./runtime/utils.js";function n(n){const m=[];if("string"==typeof n){const t=e(n),r=t.length;for(let s=0;s<r;s++)m.push(i(t[s],{modifiers:o}))}else{const t=s(n),f=n.length;for(let s=0;s<f;s++){const f=n[s];if(r(f))continue;const u=e(f),c=u.length;for(let r=0;r<c;r++)m.push(i(u[r],{modifiers:o,structs:t}))}}if(0===m.length)throw new t({params:n});return m}export{n as parseAbiParameters};
2
+ //# sourceMappingURL=parseAbiParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAbiParameters.js","sources":["../../../../../../../node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js"],"sourcesContent":["import { InvalidAbiParametersError } from './errors/abiParameter.js';\nimport { isStructSignature, modifiers } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { splitParameters } from './runtime/utils.js';\nimport { parseAbiParameter as parseAbiParameter_ } from './runtime/utils.js';\n/**\n * Parses human-readable ABI parameters into {@link AbiParameter}s\n *\n * @param params - Human-readable ABI parameters\n * @returns Parsed {@link AbiParameter}s\n *\n * @example\n * const abiParameters = parseAbiParameters('address from, address to, uint256 amount')\n * // ^? const abiParameters: [{ type: \"address\"; name: \"from\"; }, { type: \"address\";...\n *\n * @example\n * const abiParameters = parseAbiParameters([\n * // ^? const abiParameters: [{ type: \"tuple\"; components: [{ type: \"string\"; name:...\n * 'Baz bar',\n * 'struct Baz { string name; }',\n * ])\n */\nexport function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === 'string') {\n const parameters = splitParameters(params);\n const length = parameters.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter_(parameters[i], { modifiers }));\n }\n }\n else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i = 0; i < length; i++) {\n const signature = params[i];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length = parameters.length;\n for (let k = 0; k < length; k++) {\n abiParameters.push(parseAbiParameter_(parameters[k], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n}\n//# sourceMappingURL=parseAbiParameters.js.map"],"names":["parseAbiParameters","params","abiParameters","parameters","splitParameters","length","i","push","parseAbiParameter_","modifiers","structs","parseStructs","signature","isStructSignature","k","InvalidAbiParametersError"],"mappings":"gRAsBO,SAASA,EAAmBC,GAC/B,MAAMC,EAAgB,GACtB,GAAsB,iBAAXD,EAAqB,CAC5B,MAAME,EAAaC,EAAgBH,GAC7BI,EAASF,EAAWE,OAC1B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQC,IACxBJ,EAAcK,KAAKC,EAAmBL,EAAWG,GAAI,CAAEG,cAE/D,KACK,CACD,MAAMC,EAAUC,EAAaV,GACvBI,EAASJ,EAAOI,OACtB,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQC,IAAK,CAC7B,MAAMM,EAAYX,EAAOK,GACzB,GAAIO,EAAkBD,GAClB,SACJ,MAAMT,EAAaC,EAAgBQ,GAC7BP,EAASF,EAAWE,OAC1B,IAAK,IAAIS,EAAI,EAAGA,EAAIT,EAAQS,IACxBZ,EAAcK,KAAKC,EAAmBL,EAAWW,GAAI,CAAEL,YAAWC,YAE1E,CACJ,CACA,GAA6B,IAAzBR,EAAcG,OACd,MAAM,IAAIU,EAA0B,CAAEd,WAC1C,OAAOC,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ function e(e,t,n){let i="";if(n)for(const e of Object.entries(n)){if(!e)continue;let t="";for(const n of e[1])t+=`[${n.type}${n.name?`:${n.name}`:""}]`;i+=`(${e[0]}{${t}})`}return t?`${t}:${e}${i}`:e}const t=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);export{e as getParameterCacheKey,t as parameterCache};
2
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/runtime/cache.js"],"sourcesContent":["/**\n * Gets {@link parameterCache} cache key namespaced by {@link type}. This prevents parameters from being accessible to types that don't allow them (e.g. `string indexed foo` not allowed outside of `type: 'event'`).\n * @param param ABI parameter string\n * @param type ABI parameter type\n * @returns Cache key for {@link parameterCache}\n */\nexport function getParameterCacheKey(param, type, structs) {\n let structKey = '';\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = '';\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : ''}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n}\n/**\n * Basic cache seeded with common ABI parameter strings.\n *\n * **Note: When seeding more parameters, make sure you benchmark performance. The current number is the ideal balance between performance and having an already existing cache.**\n */\nexport const parameterCache = new Map([\n // Unnamed\n ['address', { type: 'address' }],\n ['bool', { type: 'bool' }],\n ['bytes', { type: 'bytes' }],\n ['bytes32', { type: 'bytes32' }],\n ['int', { type: 'int256' }],\n ['int256', { type: 'int256' }],\n ['string', { type: 'string' }],\n ['uint', { type: 'uint256' }],\n ['uint8', { type: 'uint8' }],\n ['uint16', { type: 'uint16' }],\n ['uint24', { type: 'uint24' }],\n ['uint32', { type: 'uint32' }],\n ['uint64', { type: 'uint64' }],\n ['uint96', { type: 'uint96' }],\n ['uint112', { type: 'uint112' }],\n ['uint160', { type: 'uint160' }],\n ['uint192', { type: 'uint192' }],\n ['uint256', { type: 'uint256' }],\n // Named\n ['address owner', { type: 'address', name: 'owner' }],\n ['address to', { type: 'address', name: 'to' }],\n ['bool approved', { type: 'bool', name: 'approved' }],\n ['bytes _data', { type: 'bytes', name: '_data' }],\n ['bytes data', { type: 'bytes', name: 'data' }],\n ['bytes signature', { type: 'bytes', name: 'signature' }],\n ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n ['bytes32 r', { type: 'bytes32', name: 'r' }],\n ['bytes32 root', { type: 'bytes32', name: 'root' }],\n ['bytes32 s', { type: 'bytes32', name: 's' }],\n ['string name', { type: 'string', name: 'name' }],\n ['string symbol', { type: 'string', name: 'symbol' }],\n ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint8 v', { type: 'uint8', name: 'v' }],\n ['uint256 balance', { type: 'uint256', name: 'balance' }],\n ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint256 value', { type: 'uint256', name: 'value' }],\n // Indexed\n [\n 'event:address indexed from',\n { type: 'address', name: 'from', indexed: true },\n ],\n ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n [\n 'event:uint indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n [\n 'event:uint256 indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n]);\n//# sourceMappingURL=cache.js.map"],"names":["getParameterCacheKey","param","type","structs","structKey","struct","Object","entries","propertyKey","property","name","parameterCache","Map","indexed"],"mappings":"AAMO,SAASA,EAAqBC,EAAOC,EAAMC,GAC9C,IAAIC,EAAY,GAChB,GAAID,EACA,IAAK,MAA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CAAC,eAAgB,CAAER,KAAM,UAAWQ,KAAM,SAC1C,CAAC,YAAa,CAAER,KAAM,UAAWQ,KAAM,MACvC,CAAC,cAAe,CAAER,KAAM,SAAUQ,KAAM,SACxC,CAAC,gBAAiB,CAAER,KAAM,SAAUQ,KAAM,WAC1C,CAAC,kBAAmB,CAAER,KAAM,SAAUQ,KAAM,aAC5C,CAAC,eAAgB,CAAER,KAAM,UAAWQ,KAAM,YAC1C,CAAC,UAAW,CAAER,KAAM,QAASQ,KAAM,MACnC,CAAC,kBAAmB,CAAER,KAAM,UAAWQ,KAAM,YAC7C,CAAC,kBAAmB,CAAER,KAAM,UAAWQ,KAAM,YAC7C,CAAC,gBAAiB,CAAER,KAAM,UAAWQ,KAAM,UAE3C,CACI,6BACA,CAAER,KAAM,UAAWQ,KAAM,OAAQG,SAAS,IAE9C,CAAC,2BAA4B,CAAEX,KAAM,UAAWQ,KAAM,KAAMG,SAAS,IACrE,CACI,6BACA,CAAEX,KAAM,UAAWQ,KAAM,UAAWG,SAAS,IAEjD,CACI,gCACA,CAAEX,KAAM,UAAWQ,KAAM,UAAWG,SAAS","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{execTyped as t}from"../../regex.js";const e=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(t){return e.test(t)}function r(n){return t(e,n)}const a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function u(t){return a.test(t)}function o(e){return t(a,e)}const s=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(t){return s.test(t)}function i(e){return t(s,e)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(t){return l.test(t)}function p(e){return t(l,e)}const $=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function m(t){return $.test(t)}function b(e){return t($,e)}const y=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function z(t){return y.test(t)}function A(e){return t(y,e)}const Z=/^receive\(\) external payable$/;function _(t){return Z.test(t)}const x=new Set(["memory","indexed","storage","calldata"]),d=new Set(["indexed"]),w=new Set(["calldata","memory","storage"]);export{d as eventModifiers,b as execConstructorSignature,r as execErrorSignature,o as execEventSignature,A as execFallbackSignature,i as execFunctionSignature,p as execStructSignature,w as functionModifiers,m as isConstructorSignature,n as isErrorSignature,u as isEventSignature,z as isFallbackSignature,c as isFunctionSignature,_ as isReceiveSignature,f as isStructSignature,x as modifiers};
2
+ //# sourceMappingURL=signatures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signatures.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/runtime/signatures.js"],"sourcesContent":["import { execTyped } from '../../regex.js';\n// https://regexr.com/7gmok\nconst errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n}\n// https://regexr.com/7gmoq\nconst eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n}\n// https://regexr.com/7gmot\nconst functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?<returns>.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n}\n// https://regexr.com/7gmp3\nconst structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?<properties>.*?)\\}$/;\nexport function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n}\n// https://regexr.com/78u01\nconst constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n}\n// https://regexr.com/7srtn\nconst fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n}\nexport function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n}\n// https://regexr.com/78u1k\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n 'memory',\n 'indexed',\n 'storage',\n 'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n 'calldata',\n 'memory',\n 'storage',\n]);\n//# sourceMappingURL=signatures.js.map"],"names":["errorSignatureRegex","isErrorSignature","signature","test","execErrorSignature","execTyped","eventSignatureRegex","isEventSignature","execEventSignature","functionSignatureRegex","isFunctionSignature","execFunctionSignature","structSignatureRegex","isStructSignature","execStructSignature","constructorSignatureRegex","isConstructorSignature","execConstructorSignature","fallbackSignatureRegex","isFallbackSignature","execFallbackSignature","receiveSignatureRegex","isReceiveSignature","modifiers","Set","eventModifiers","functionModifiers"],"mappings":"2CAEA,MAAMA,EAAsB,kEACrB,SAASC,EAAiBC,GAC7B,OAAOF,EAAoBG,KAAKD,EACpC,CACO,SAASE,EAAmBF,GAC/B,OAAOG,EAAUL,EAAqBE,EAC1C,CAEA,MAAMI,EAAsB,kEACrB,SAASC,EAAiBL,GAC7B,OAAOI,EAAoBH,KAAKD,EACpC,CACO,SAASM,EAAmBN,GAC/B,OAAOG,EAAUC,EAAqBJ,EAC1C,CAEA,MAAMO,EAAyB,mMACxB,SAASC,EAAoBR,GAChC,OAAOO,EAAuBN,KAAKD,EACvC,CACO,SAASS,EAAsBT,GAClC,OAAOG,EAAUI,EAAwBP,EAC7C,CAEA,MAAMU,EAAuB,oEACtB,SAASC,EAAkBX,GAC9B,OAAOU,EAAqBT,KAAKD,EACrC,CACO,SAASY,EAAoBZ,GAChC,OAAOG,EAAUO,EAAsBV,EAC3C,CAEA,MAAMa,EAA4B,2EAC3B,SAASC,EAAuBd,GACnC,OAAOa,EAA0BZ,KAAKD,EAC1C,CACO,SAASe,EAAyBf,GACrC,OAAOG,EAAUU,EAA2Bb,EAChD,CAEA,MAAMgB,EAAyB,+DACxB,SAASC,EAAoBjB,GAChC,OAAOgB,EAAuBf,KAAKD,EACvC,CACO,SAASkB,EAAsBlB,GAClC,OAAOG,EAAUa,EAAwBhB,EAC7C,CAEA,MAAMmB,EAAwB,iCACvB,SAASC,EAAmBpB,GAC/B,OAAOmB,EAAsBlB,KAAKD,EACtC,CACY,MAACqB,EAAY,IAAIC,IAAI,CAC7B,SACA,UACA,UACA,aAESC,EAAiB,IAAID,IAAI,CAAC,YAC1BE,EAAoB,IAAIF,IAAI,CACrC,WACA,SACA","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{isTupleRegex as t,execTyped as e}from"../../regex.js";import{UnknownTypeError as r}from"../errors/abiItem.js";import{InvalidAbiTypeParameterError as o}from"../errors/abiParameter.js";import{InvalidSignatureError as s,InvalidStructSignatureError as n}from"../errors/signature.js";import{CircularReferenceError as i}from"../errors/struct.js";import{isStructSignature as p,execStructSignature as c}from"./signatures.js";import{parseAbiParameter as f,isSolidityType as m}from"./utils.js";function a(t){const e={},r=t.length;for(let o=0;o<r;o++){const r=t[o];if(!p(r))continue;const i=c(r);if(!i)throw new s({signature:r,type:"struct"});const m=i.properties.split(";"),a=[],u=m.length;for(let t=0;t<u;t++){const e=m[t].trim();if(!e)continue;const r=f(e,{type:"struct"});a.push(r)}if(!a.length)throw new n({signature:r});e[i.name]=a}const o={},i=Object.entries(e),m=i.length;for(let t=0;t<m;t++){const[r,s]=i[t];o[r]=h(s,e)}return o}const u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function h(s,n,p=new Set){const c=[],f=s.length;for(let a=0;a<f;a++){const f=s[a];if(t.test(f.type))c.push(f);else{const t=e(u,f.type);if(!t?.type)throw new o({abiParameter:f});const{array:s,type:a}=t;if(a in n){if(p.has(a))throw new i({type:a});c.push({...f,type:`tuple${s??""}`,components:h(n[a]??[],n,new Set([...p,a]))})}else{if(!m(a))throw new r({type:a});c.push(f)}}}return c}export{a as parseStructs};
2
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/runtime/structs.js"],"sourcesContent":["import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n // Create \"shallow\" version of each struct (and filter out non-structs or invalid structs)\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i = 0; i < signaturesLength; i++) {\n const signature = signatures[i];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'struct' });\n const properties = match.properties.split(';');\n const components = [];\n const propertiesLength = properties.length;\n for (let k = 0; k < propertiesLength; k++) {\n const property = properties[k];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: 'struct',\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n // Resolve nested structs inside each parameter\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i = 0; i < entriesLength; i++) {\n const [name, parameters] = entries[i];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters, structs, ancestors = new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? ''}`,\n components: resolveStructs(structs[type] ?? [], structs, new Set([...ancestors, type])),\n });\n }\n else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n}\n//# sourceMappingURL=structs.js.map"],"names":["parseStructs","signatures","shallowStructs","signaturesLength","length","i","signature","isStructSignature","match","execStructSignature","InvalidSignatureError","type","properties","split","components","propertiesLength","k","trimmed","trim","abiParameter","parseAbiParameter","push","InvalidStructSignatureError","name","resolvedStructs","entries","Object","entriesLength","parameters","resolveStructs","typeWithoutTupleRegex","abiParameters","structs","ancestors","Set","isTupleRegex","test","execTyped","InvalidA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AOG,KACR,MAAM,IAAI2B,EAA6B,CAAEnB,iBAC7C,MAAMoB,MAAEA,EAAK5B,KAAEA,GAASH,EACxB,GAAIG,KAAQqB,EAAS,CACjB,GAAIC,EAAUO,IAAI7B,GACd,MAAM,IAAI8B,EAAuB,CAAE9B,SACvCG,EAAWO,KAAK,IACTF,EACHR,KAAM,QAAQ4B,GAAS,KACvBzB,WAAYe,EAAeG,EAAQrB,IAAS,GAAIqB,EAAS,IAAIE,IAAI,IAAID,EAAWtB,MAExF,KACK,CACD,IAAI+B,EAAe/B,GAGf,MAAM,IAAIgC,EAAiB,CAAEhC,SAF7BG,EAAWO,KAAKF,EAGxB,CACJ,CACJ,CACA,OAAOL,CACX","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{execTyped as t,bytesRegex as e,integerRegex as r,isTupleRegex as n}from"../../regex.js";import{UnknownSolidityTypeError as s}from"../errors/abiItem.js";import{InvalidParameterError as i,SolidityProtectedKeywordError as a,InvalidModifierError as o,InvalidFunctionModifierError as u}from"../errors/abiParameter.js";import{UnknownSignatureError as p,InvalidSignatureError as f}from"../errors/signature.js";import{InvalidParenthesisError as c}from"../errors/splitParameters.js";import{getParameterCacheKey as m,parameterCache as l}from"./cache.js";import{isFunctionSignature as y,isEventSignature as d,isErrorSignature as h,isConstructorSignature as w,isFallbackSignature as b,isReceiveSignature as g,functionModifiers as $,execFunctionSignature as v,execEventSignature as x,eventModifiers as j,execErrorSignature as z,execConstructorSignature as M,execFallbackSignature as A}from"./signatures.js";function Z(t,e={}){if(y(t))return _(t,e);if(d(t))return k(t,e);if(h(t))return P(t,e);if(w(t))return I(t,e);if(b(t))return q(t);if(g(t))return{type:"receive",stateMutability:"payable"};throw new p({signature:t})}function _(t,e={}){const r=v(t);if(!r)throw new f({signature:t,type:"function"});const n=F(r.parameters),s=[],i=n.length;for(let t=0;t<i;t++)s.push(E(n[t],{modifiers:$,structs:e,type:"function"}));const a=[];if(r.returns){const t=F(r.returns),n=t.length;for(let r=0;r<n;r++)a.push(E(t[r],{modifiers:$,structs:e,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:a}}function k(t,e={}){const r=x(t);if(!r)throw new f({signature:t,type:"event"});const n=F(r.parameters),s=[],i=n.length;for(let t=0;t<i;t++)s.push(E(n[t],{modifiers:j,structs:e,type:"event"}));return{name:r.name,type:"event",inputs:s}}function P(t,e={}){const r=z(t);if(!r)throw new f({signature:t,type:"error"});const n=F(r.parameters),s=[],i=n.length;for(let t=0;t<i;t++)s.push(E(n[t],{structs:e,type:"error"}));return{name:r.name,type:"error",inputs:s}}function I(t,e={}){const r=M(t);if(!r)throw new f({signature:t,type:"constructor"});const n=F(r.parameters),s=[],i=n.length;for(let t=0;t<i;t++)s.push(E(n[t],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}function q(t){const e=A(t);if(!e)throw new f({signature:t,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}const B=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,C=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,D=/^u?int$/;function E(e,r){const p=m(e,r?.type,r?.structs);if(l.has(p))return l.get(p);const f=n.test(e),c=t(f?C:B,e);if(!c)throw new i({param:e});if(c.name&&J(c.name))throw new a({param:e,name:c.name});const y=c.name?{name:c.name}:{},d="indexed"===c.modifier?{indexed:!0}:{},h=r?.structs??{};let w,b={};if(f){w="tuple";const t=F(c.type),e=[],r=t.length;for(let n=0;n<r;n++)e.push(E(t[n],{structs:h}));b={components:e}}else if(c.type in h)w="tuple",b={components:h[c.type]};else if(D.test(c.type))w=`${c.type}256`;else if("address payable"===c.type)w="address";else if(w=c.type,"struct"!==r?.type&&!G(w))throw new s({type:w});if(c.modifier){if(!r?.modifiers?.has?.(c.modifier))throw new o({param:e,type:r?.type,modifier:c.modifier});if($.has(c.modifier)&&!K(w,!!c.array))throw new u({param:e,type:r?.type,modifier:c.modifier})}const g={type:`${w}${c.array??""}`,...y,...d,...b};return l.set(p,g),g}function F(t,e=[],r="",n=0){const s=t.trim().length;for(let i=0;i<s;i++){const s=t[i],a=t.slice(i+1);switch(s){case",":return 0===n?F(a,[...e,r.trim()]):F(a,e,`${r}${s}`,n);case"(":return F(a,e,`${r}${s}`,n+1);case")":return F(a,e,`${r}${s}`,n-1);default:return F(a,e,`${r}${s}`,n)}}if(""===r)return e;if(0!==n)throw new c({current:r,depth:n});return e.push(r.trim()),e}function G(t){return"address"===t||"bool"===t||"function"===t||"string"===t||e.test(t)||r.test(t)}const H=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function J(t){return"address"===t||"bool"===t||"function"===t||"string"===t||"tuple"===t||e.test(t)||r.test(t)||H.test(t)}function K(t,e){return e||"bytes"===t||"string"===t||"tuple"===t}export{J as isSolidityKeyword,G as isSolidityType,K as isValidDataLocation,E as parseAbiParameter,I as parseConstructorSignature,P as parseErrorSignature,k as parseEventSignature,q as parseFallbackSignature,_ as parseFunctionSignature,Z as parseSignature,F as splitParameters};
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../../../node_modules/abitype/dist/esm/human-readable/runtime/utils.js"],"sourcesContent":["import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFallbackSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: 'receive',\n stateMutability: 'payable',\n };\n throw new UnknownSignatureError({ signature });\n}\nexport function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'function' });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i = 0; i < inputLength; i++) {\n inputs.push(parseAbiParameter(inputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i = 0; i < outputLength; i++) {\n outputs.push(parseAbiParameter(outputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n }\n return {\n name: match.name,\n type: 'function',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs,\n outputs,\n };\n}\nexport function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'event' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], {\n modifiers: eventModifiers,\n structs,\n type: 'event',\n }));\n return { name: match.name, type: 'event', inputs: abiParameters };\n}\nexport function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'error' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n return { name: match.name, type: 'error', inputs: abiParameters };\n}\nexport function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'constructor' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n return {\n type: 'constructor',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs: abiParameters,\n };\n}\nexport function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'fallback' });\n return {\n type: 'fallback',\n stateMutability: match.stateMutability ?? 'nonpayable',\n };\n}\nconst abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n // optional namespace cache by `type`\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = 'tuple';\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n // remove `modifiers` from `options` to prevent from being added to tuple components\n components_.push(parseAbiParameter(params[i], { structs }));\n }\n components = { components: components_ };\n }\n else if (match.type in structs) {\n type = 'tuple';\n components = { components: structs[match.type] };\n }\n else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n }\n else if (match.type === 'address payable') {\n type = 'address';\n }\n else {\n type = match.type;\n if (!(options?.type === 'struct') && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n // Check if modifier exists, but is not allowed (e.g. `indexed` in `functionModifiers`)\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n // Check if resolved `type` is valid if there is a function modifier\n if (functionModifiers.has(match.modifier) &&\n !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? ''}`,\n ...name,\n ...indexed,\n ...components,\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n}\n// s/o latika for this\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n const length = params.trim().length;\n // biome-ignore lint/correctness/noUnreachable: recursive\n for (let i = 0; i < length; i++) {\n const char = params[i];\n const tail = params.slice(i + 1);\n switch (char) {\n case ',':\n return depth === 0\n ? splitParameters(tail, [...result, current.trim()])\n : splitParameters(tail, result, `${current}${char}`, depth);\n case '(':\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case ')':\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === '')\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n}\nexport function isSolidityType(type) {\n return (type === 'address' ||\n type === 'bool' ||\n type === 'function' ||\n type === 'string' ||\n bytesRegex.test(type) ||\n integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n/** @internal */\nexport function isSolidityKeyword(name) {\n return (name === 'address' ||\n name === 'bool' ||\n name === 'function' ||\n name === 'string' ||\n name === 'tuple' ||\n bytesRegex.test(name) ||\n integerRegex.test(name) ||\n protectedKeywordsRegex.test(name));\n}\n/** @internal */\nexport function isValidDataLocation(type, isArray) {\n return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map"],"names":["parseSignature","signature","structs","isFunctionSignature","parseFunctionSignature","isEventSignature","parseEventSignature","isErrorSignature","parseErrorSignature","isConstructorSignature","parseConstructorSignature","isFallbackSignature","parseFallbackSignature","isReceiveSignature","type","stateMutability","UnknownSignatureError","match","execFunctionSignature","InvalidSignatureError","inputParams","splitParameters","parameters","inputs","inputLength","length","i","push","parseAbiParameter","modifiers","functionModifiers","outputs","returns","outputParams","outputLength","name","execEventSignature","params","abiParameters","eventModifiers","execErrorSignature","execConstructorSignature","execFallbackSignature","abiParameterWithoutTupleRegex","abiParameterWithTupleRegex","dynamicIntegerRegex","param","options","parameterCacheKey","getParameterCacheKey","parameterCache","has","get","isTuple","isTupleRegex","test","execTyped","InvalidParameterError","isSolidityKeyword","SolidityProtectedKeywordError","indexed","modifier","components","components_","isSolidityType","UnknownSolidityTypeError","InvalidModifierError","isValidDataLocation","array","InvalidFunctionModifierError","abiParameter","set","result","current","depth","trim","char","tail","slice","InvalidParenthesisError","bytesRegex","integerRegex","protectedKeywordsRegex","isArray"],"mappings":"q4BAOO,SAASA,EAAeC,EAAWC,EAAU,IAChD,GAAIC,EAAoBF,GACpB,OAAOG,EAAuBH,EAAWC,GAC7C,GAAIG,EAAiBJ,GACjB,OAAOK,EAAoBL,EAAWC,GAC1C,GAAIK,EAAiBN,GACjB,OAAOO,EAAoBP,EAAWC,GAC1C,GAAIO,EAAuBR,GACvB,OAAOS,EAA0BT,EAAWC,GAChD,GAAIS,EAAoBV,GACpB,OAAOW,EAAuBX,GAClC,GAAIY,EAAmBZ,GACnB,MAAO,CACHa,KAAM,UACNC,gBAAiB,WAEzB,MAAM,IAAIC,EAAsB,CAAEf,aACtC,CACO,SAASG,EAAuBH,EAAWC,EAAU,IACxD,MAAMe,EAAQC,EAAsBjB,GACpC,IAAKgB,EACD,MAAM,IAAIE,EAAsB,CAAElB,YAAWa,KAAM,aACvD,MAAMM,EAAcC,EAAgBJ,EAAMK,YACpCC,EAAS,GACTC,EAAcJ,EAAYK,OAChC,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAaE,IAC7BH,EAAOI,KAAKC,EAAkBR,EAAYM,GAAI,CAC1CG,UAAWC,EACX5B,UACAY,KAAM,cAGd,MAAMiB,EAAU,GAChB,GAAId,EAAMe,QAAS,CACf,MAAMC,EAAeZ,EAAgBJ,EAAMe,SACrCE,EAAeD,EAAaR,OAClC,IAAK,IAAIC,EAAI,EAAGA,EAAIQ,EAAcR,IAC9BK,EAAQJ,KAAKC,EAAkBK,EAAaP,GAAI,CAC5CG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ML,EAAQ,GAAGC,IAAUG,IAAQF,GAEtE,CACA,GAAgB,KAAZD,EACA,OAAOD,EACX,GAAc,IAAVE,EACA,MAAM,IAAIK,EAAwB,CAAEN,UAASC,UAEjD,OADAF,EAAO7C,KAAK8C,EAAQE,QACbH,CACX,CACO,SAASR,EAAelD,GAC3B,MAAiB,YAATA,GACK,SAATA,GACS,aAATA,GACS,WAATA,GACAkE,EAAWzB,KAAKzC,IAChBmE,EAAa1B,KAAKzC,EAC1B,CACA,MAAMoE,EAAyB,wZAExB,SAASxB,EAAkBvB,GAC9B,MAAiB,YAATA,GACK,SAATA,GACS,aAATA,GACS,WAATA,GACS,UAATA,GACA6C,EAAWzB,KAAKpB,IAChB8C,EAAa1B,KAAKpB,IAClB+C,EAAuB3B,KAAKpB,EACpC,CAEO,SAASgC,EAAoBrD,EAAMqE,GACtC,OAAOA,GAAoB,UAATrE,GAA6B,WAATA,GAA8B,UAATA,CAC/D","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ function t(t,n){const e=t.exec(n);return e?.groups}const n=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,e=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,o=/^\(.+?\).*?$/;export{n as bytesRegex,t as execTyped,e as integerRegex,o as isTupleRegex};
2
+ //# sourceMappingURL=regex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regex.js","sources":["../../../../../../node_modules/abitype/dist/esm/regex.js"],"sourcesContent":["// TODO: This looks cool. Need to check the performance of `new RegExp` versus defined inline though.\n// https://twitter.com/GabrielVergnaud/status/1622906834343366657\nexport function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n}\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nexport const isTupleRegex = /^\\(.+?\\).*?$/;\n//# sourceMappingURL=regex.js.map"],"names":["execTyped","regex","string","match","exec","groups","bytesRegex","integerRegex","isTupleRegex"],"mappings":"AAEO,SAASA,EAAUC,EAAOC,GAC7B,MAAMC,EAAQF,EAAMG,KAAKF,GACzB,OAAOC,GAAOE,MAClB,CAGY,MAACC,EAAa,uCAGbC,EAAe,+HACfC,EAAe","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ const o="1.1.0";export{o as version};
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sources":["../../../../../../node_modules/abitype/dist/esm/version.js"],"sourcesContent":["export const version = '1.1.0';\n//# sourceMappingURL=version.js.map"],"names":["version"],"mappings":"AAAY,MAACA,EAAU","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ const o="6.15.0";export{o as version};
2
+ //# sourceMappingURL=_version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_version.js","sources":["../../../../../node_modules/ethers/lib.esm/_version.js"],"sourcesContent":["/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */\n/**\n * The current version of Ethers.\n */\nexport const version = \"6.15.0\";\n//# sourceMappingURL=_version.js.map"],"names":["version"],"mappings":"AAIY,MAACA,EAAU","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{assertArgument as t}from"./errors.js";function r(r,n){return function(r,n){if(r instanceof Uint8Array)return r;if("string"==typeof r&&r.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((r.length-2)/2);let n=2;for(let e=0;e<t.length;e++)t[e]=parseInt(r.substring(n,n+2),16),n+=2;return t}t(!1,"invalid BytesLike value",n,r)}(r,n)}export{r as getBytes};
2
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/data.js"],"sourcesContent":["/**\n * Some data helpers.\n *\n *\n * @_subsection api/utils:Data Helpers [about-data]\n */\nimport { assert, assertArgument } from \"./errors.js\";\nfunction _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof (value) === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i = 0; i < result.length; i++) {\n result[i] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n assertArgument(false, \"invalid BytesLike value\", name || \"value\", value);\n}\n/**\n * Get a typed Uint8Array for %%value%%. If already a Uint8Array\n * the original %%value%% is returned; if a copy is required use\n * [[getBytesCopy]].\n *\n * @see: getBytesCopy\n */\nexport function getBytes(value, name) {\n return _getBytes(value, name, false);\n}\n/**\n * Get a typed Uint8Array for %%value%%, creating a copy if necessary\n * to prevent any modifications of the returned value from being\n * reflected elsewhere.\n *\n * @see: getBytes\n */\nexport function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n}\n/**\n * Returns true if %%value%% is a valid [[HexString]].\n *\n * If %%length%% is ``true`` or a //number//, it also checks that\n * %%value%% is a valid [[DataHexString]] of %%length%% (if a //number//)\n * bytes of data (e.g. ``0x1234`` is 2 bytes).\n */\nexport function isHexString(value, length) {\n if (typeof (value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof (length) === \"number\" && value.length !== 2 + 2 * length) {\n return false;\n }\n if (length === true && (value.length % 2) !== 0) {\n return false;\n }\n return true;\n}\n/**\n * Returns true if %%value%% is a valid representation of arbitrary\n * data (i.e. a valid [[DataHexString]] or a Uint8Array).\n */\nexport function isBytesLike(value) {\n return (isHexString(value, true) || (value instanceof Uint8Array));\n}\nconst HexCharacters = \"0123456789abcdef\";\n/**\n * Returns a [[DataHexString]] representation of %%data%%.\n */\nexport function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i = 0; i < bytes.length; i++) {\n const v = bytes[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n}\n/**\n * Returns a [[DataHexString]] by concatenating all values\n * within %%data%%.\n */\nexport function concat(datas) {\n return \"0x\" + datas.map((d) => hexlify(d).substring(2)).join(\"\");\n}\n/**\n * Returns the length of %%data%%, in bytes.\n */\nexport function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n}\n/**\n * Returns a [[DataHexString]] by slicing %%data%% from the %%start%%\n * offset to the %%end%% offset.\n *\n * By default %%start%% is 0 and %%end%% is the length of %%data%%.\n */\nexport function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n assert(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes, length: bytes.length, offset: end\n });\n }\n return hexlify(bytes.slice((start == null) ? 0 : start, (end == null) ? bytes.length : end));\n}\n/**\n * Return the [[DataHexString]] result by stripping all **leading**\n ** zero bytes from %%data%%.\n */\nexport function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n}\nfunction zeroPad(data, length, left) {\n const bytes = getBytes(data);\n assert(length >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length: length,\n offset: length + 1\n });\n const result = new Uint8Array(length);\n result.fill(0);\n if (left) {\n result.set(bytes, length - bytes.length);\n }\n else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **left**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **values** are in Solidity\n * (e.g. ``uint128``).\n */\nexport function zeroPadValue(data, length) {\n return zeroPad(data, length, true);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **right**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **bytes** are in Solidity\n * (e.g. ``bytes16``).\n */\nexport function zeroPadBytes(data, length) {\n return zeroPad(data, length, false);\n}\n//# sourceMappingURL=data.js.map"],"names":["getBytes","value","name","Uint8Array","match","result","length","offset","i","parseInt","substring","assertArgument","_getBytes"],"mappings":"6CAgCO,SAASA,EAASC,EAAOC,GAC5B,OA1BJ,SAAmBD,EAAOC,GACtB,GAAID,aAAiBE,WAIjB,OAAOF,EAEX,GAAuB,iBAAnB,GAA+BA,EAAMG,MAAM,8BAA+B,CAC1E,MAAMC,EAAS,IAAIF,YAAYF,EAAMK,OAAS,GAAK,GACnD,IAAIC,EAAS,EACb,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAOC,OAAQE,IAC/BH,EAAOG,GAAKC,SAASR,EAAMS,UAAUH,EAAQA,EAAS,GAAI,IAC1DA,GAAU,EAEd,OAAOF,CACX,CACAM,GAAe,EAAO,0BAA2BT,EAAiBD,EACtE,CASWW,CAAUX,EAAOC,EAC5B","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{version as r}from"../_version.js";import{defineProperties as e}from"./properties.js";function t(r,e){if(null==r)return"null";if(null==e&&(e=new Set),"object"==typeof r){if(e.has(r))return"[Circular]";e.add(r)}if(Array.isArray(r))return"[ "+r.map(r=>t(r,e)).join(", ")+" ]";if(r instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let n=0;n<r.length;n++)t+=e[r[n]>>4],t+=e[15&r[n]];return t}if("object"==typeof r&&"function"==typeof r.toJSON)return t(r.toJSON(),e);switch(typeof r){case"boolean":case"number":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"string":return JSON.stringify(r);case"object":{const n=Object.keys(r);return n.sort(),"{ "+n.map(n=>`${t(n,e)}: ${t(r[n],e)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function n(n,o,i){let s,a=n;{const e=[];if(i){if("message"in i||"code"in i||"name"in i)throw new Error(`value will overwrite populated values: ${t(i)}`);for(const r in i){if("shortMessage"===r)continue;const n=i[r];e.push(r+"="+t(n))}}e.push(`code=${o}`),e.push(`version=${r}`),e.length&&(n+=" ("+e.join(", ")+")")}switch(o){case"INVALID_ARGUMENT":s=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(n);break;default:s=new Error(n)}return e(s,{code:o}),i&&Object.assign(s,i),null==s.shortMessage&&e(s,{shortMessage:a}),s}function o(r,e,t,o){if(!r)throw n(e,t,o)}function i(r,e,t,n){o(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function s(r,e,t){if(r!==e){let r=t,e="new";r+=".",e+=" "+t,o(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:e})}}["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test"!=="test".normalize(e))throw new Error("bad");if("NFD"===e){const r=String.fromCharCode(233).normalize("NFD");if(r!==String.fromCharCode(101,769))throw new Error("broken")}r.push(e)}catch(r){}return r},[]);export{o as assert,i as assertArgument,s as assertPrivate,n as makeError};
2
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/errors.js"],"sourcesContent":["/**\n * All errors in ethers include properties to ensure they are both\n * human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``).\n *\n * The [[isError]] function can be used to check the error ``code`` and\n * provide a type guard for the properties present on that error interface.\n *\n * @_section: api/utils/errors:Errors [about-errors]\n */\nimport { version } from \"../_version.js\";\nimport { defineProperties } from \"./properties.js\";\nfunction stringify(value, seen) {\n if (value == null) {\n return \"null\";\n }\n if (seen == null) {\n seen = new Set();\n }\n if (typeof (value) === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n if (Array.isArray(value)) {\n return \"[ \" + (value.map((v) => stringify(v, seen))).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n result += HEX[value[i] >> 4];\n result += HEX[value[i] & 0xf];\n }\n return result;\n }\n if (typeof (value) === \"object\" && typeof (value.toJSON) === \"function\") {\n return stringify(value.toJSON(), seen);\n }\n switch (typeof (value)) {\n case \"boolean\":\n case \"number\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k) => `${stringify(k, seen)}: ${stringify(value[k], seen)}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n}\n/**\n * Returns true if the %%error%% matches an error thrown by ethers\n * that matches the error %%code%%.\n *\n * In TypeScript environments, this can be used to check that %%error%%\n * matches an EthersError type, which means the expected properties will\n * be set.\n *\n * @See [ErrorCodes](api:ErrorCode)\n * @example\n * try {\n * // code....\n * } catch (e) {\n * if (isError(e, \"CALL_EXCEPTION\")) {\n * // The Type Guard has validated this object\n * console.log(e.data);\n * }\n * }\n */\nexport function isError(error, code) {\n return (error && error.code === code);\n}\n/**\n * Returns true if %%error%% is a [[CallExceptionError].\n */\nexport function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n}\n/**\n * Returns a new Error configured to the format ethers emits errors, with\n * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties\n * for the corresponding EthersError.\n *\n * Each error in ethers includes the version of ethers, a\n * machine-readable [[ErrorCode]], and depending on %%code%%, additional\n * required properties. The error message will also include the %%message%%,\n * ethers version, %%code%% and all additional properties, serialized.\n */\nexport function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = (info[key]);\n // try {\n details.push(key + \"=\" + stringify(value));\n // } catch (error: any) {\n // console.log(\"MMM\", error.message);\n // details.push(key + \"=[could not serialize object]\");\n // }\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n defineProperties(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n defineProperties(error, { shortMessage });\n }\n return error;\n}\n/**\n * Throws an EthersError with %%message%%, %%code%% and additional error\n * %%info%% when %%check%% is falsish..\n *\n * @see [[api:makeError]]\n */\nexport function assert(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n}\n/**\n * A simple helper to simply ensuring provided arguments match expected\n * constraints, throwing if not.\n *\n * In TypeScript environments, the %%check%% has been asserted true, so\n * any further code does not need additional compile-time checks.\n */\nexport function assertArgument(check, message, name, value) {\n assert(check, message, \"INVALID_ARGUMENT\", { argument: name, value: value });\n}\nexport function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert(count >= expectedCount, \"missing argument\" + message, \"MISSING_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n assert(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n}\nconst _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n // General test for normalize\n /* c8 ignore start */\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n /* c8 ignore stop */\n if (form === \"NFD\") {\n const check = String.fromCharCode(0xe9).normalize(\"NFD\");\n const expected = String.fromCharCode(0x65, 0x0301);\n /* c8 ignore start */\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n /* c8 ignore stop */\n }\n accum.push(form);\n }\n catch (error) { }\n return accum;\n}, []);\n/**\n * Throws if the normalization %%form%% is not supported.\n */\nexport function assertNormalize(form) {\n assert(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\", info: { form }\n });\n}\n/**\n * Many classes use file-scoped values to guard the constructor,\n * making it effectively private. This facilitates that pattern\n * by ensuring the %%givenGaurd%% matches the file-scoped %%guard%%,\n * throwing if not, indicating the %%className%% if provided.\n */\nexport function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n}\n//# sourceMappingURL=errors.js.map"],"names":["stringify","value","seen","Set","has","add","Array","isArray","map","v","join","Uint8Array","HEX","result","i","length","toJSON","toString","BigInt","JSON","keys","Object","sort","k","makeError","message","code","info","error","shortMessage","details","Error","key","push","version","TypeError","RangeError","defineProperties","assign","assert","check","assertArgument","name","argument","assertPrivate","givenGuard","guard","className","method","operation","reduce","accum","form","normalize","String","fromCharCode"],"mappings":"4FAWA,SAASA,EAAUC,EAAOC,GACtB,GAAa,MAATD,EACA,MAAO,OAKX,GAHY,MAARC,IACAA,EAAO,IAAIC,KAEQ,iBAAnB,EAA6B,CAC7B,GAAID,EAAKE,IAAIH,GACT,MAAO,aAEXC,EAAKG,IAAIJ,EACb,CACA,GAAIK,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,mBACDE,EAAQ,IAAIO,UAAUV,GACtB,MACJ,IAAK,gBACL,IAAK,iBACDG,EAAQ,IAAIQ,WAAWX,GACvB,MACJ,QACIG,EAAQ,IAAIG,MAAMN,GAS1B,OAPAY,EAAiBT,EAAO,CAAEF,SACtBC,GACAN,OAAOiB,OAAOV,EAAOD,GAEC,MAAtBC,EAAMC,cACNQ,EAAiBT,EAAO,CAAEC,iBAEvBD,CACX,CAOO,SAASW,EAAOC,EAAOf,EAASC,EAAMC,GACzC,IAAKa,EACD,MAAMhB,EAAUC,EAASC,EAAMC,EAEvC,CAQO,SAASc,EAAeD,EAAOf,EAASiB,EAAMzC,GACjDsC,EAAOC,EAAOf,EAAS,mBAAoB,CAAEkB,SAAUD,EAAMzC,MAAOA,GACxE,CAsDO,SAAS2C,EAAcC,EAAYC,EAAOC,GAI7C,GAAIF,IAAeC,EAAO,CACtB,IAAIE,EAASD,EAAWE,EAAY,MAEhCD,GAAU,IACVC,GAAa,IAAMF,EAEvBR,GAAO,EAAO,4BAA4BS,iBAAuB,wBAAyB,CACtFC,aAER,CACJ,CAnDwB,CAAC,MAAO,MAAO,OAAQ,QAAQC,OAAO,CAACC,EAAOC,KAClE,IAGI,GAA+B,SAA3B,OAAOC,UAAUD,GACjB,MAAM,IAAIrB,MAAM,OAIpB,GAAa,QAATqB,EAAgB,CAChB,MAAMZ,EAAQc,OAAOC,aAAa,KAAMF,UAAU,OAGlD,GAAIb,IAFac,OAAOC,aAAa,IAAM,KAGvC,MAAM,IAAIxB,MAAM,SAGxB,CACAoB,EAAMlB,KAAKmB,EACf,CACA,MAAOxB,GAAS,CAChB,OAAOuB,GACR","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{getBytes as t}from"./data.js";import{assertPrivate as e,assertArgument as i,assert as r}from"./errors.js";import{getNumber as s,getBigInt as n,toBigInt as a,fromTwos as l,mask as o}from"./maths.js";import{defineProperties as u}from"./properties.js";const h=BigInt(-1),m=BigInt(0),c=BigInt(1),f=BigInt(5),d={};let v="0000";for(;v.length<80;)v+=v;function g(t){let e=v;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function p(t,e,i){const s=BigInt(e.width);if(e.signed){const e=c<<s-c;r(null==i||t>=-e&&t<e,"overflow","NUMERIC_FAULT",{operation:i,fault:"overflow",value:t}),t=t>m?l(o(t,s),s):-l(o(-t,s),s)}else{const e=c<<s;r(null==i||t>=0&&t<e,"overflow","NUMERIC_FAULT",{operation:i,fault:"overflow",value:t}),t=(t%e+e)%e&e-c}return t}function b(t){"number"==typeof t&&(t=`fixed128x${t}`);let e=!0,r=128,s=18;if("string"==typeof t)if("fixed"===t);else if("ufixed"===t)e=!1;else{const n=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i(n,"invalid fixed format","format",t),e="u"!==n[1],r=parseInt(n[2]),s=parseInt(n[3])}else if(t){const n=t,a=(t,e,r)=>null==n[t]?r:(i(typeof n[t]===e,"invalid fixed format ("+t+" not "+e+")","format."+t,n[t]),n[t]);e=a("signed","boolean",e),r=a("width","number",r),s=a("decimals","number",s)}i(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),i(s<=80,"invalid FixedNumber decimals (too large)","format.decimals",s);return{signed:e,width:r,decimals:s,name:(e?"":"u")+"fixed"+String(r)+"x"+String(s)}}class F{format;#t;#e;#i;_value;constructor(t,i,r){e(t,d,"FixedNumber"),this.#e=i,this.#t=r;const s=function(t,e){let i="";t<m&&(i="-",t*=h);let r=t.toString();if(0===e)return i+r;for(;r.length<=e;)r=v+r;const s=r.length-e;for(r=r.substring(0,s)+"."+r.substring(s);"0"===r[0]&&"."!==r[1];)r=r.substring(1);for(;"0"===r[r.length-1]&&"."!==r[r.length-2];)r=r.substring(0,r.length-1);return i+r}(i,r.decimals);u(this,{format:r.name,_value:s}),this.#i=g(r.decimals)}get signed(){return this.#t.signed}get width(){return this.#t.width}get decimals(){return this.#t.decimals}get value(){return this.#e}#r(t){i(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)}#s(t,e){return t=p(t,this.#t,e),new F(d,t,this.#t)}#n(t,e){return this.#r(t),this.#s(this.#e+t.#e,e)}addUnsafe(t){return this.#n(t)}add(t){return this.#n(t,"add")}#a(t,e){return this.#r(t),this.#s(this.#e-t.#e,e)}subUnsafe(t){return this.#a(t)}sub(t){return this.#a(t,"sub")}#l(t,e){return this.#r(t),this.#s(this.#e*t.#e/this.#i,e)}mulUnsafe(t){return this.#l(t)}mul(t){return this.#l(t,"mul")}mulSignal(t){this.#r(t);const e=this.#e*t.#e;return r(e%this.#i===m,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#s(e/this.#i,"mulSignal")}#o(t,e){return r(t.#e!==m,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#r(t),this.#s(this.#e*this.#i/t.#e,e)}divUnsafe(t){return this.#o(t)}div(t){return this.#o(t,"div")}divSignal(t){r(t.#e!==m,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#r(t);const e=this.#e*this.#i;return r(e%t.#e===m,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#s(e/t.#e,"divSignal")}cmp(t){let e=this.value,i=t.value;const r=this.decimals-t.decimals;return r>0?i*=g(r):r<0&&(e*=g(-r)),e<i?-1:e>i?1:0}eq(t){return 0===this.cmp(t)}lt(t){return this.cmp(t)<0}lte(t){return this.cmp(t)<=0}gt(t){return this.cmp(t)>0}gte(t){return this.cmp(t)>=0}floor(){let t=this.#e;return this.#e<m&&(t-=this.#i-c),t=this.#e/this.#i*this.#i,this.#s(t,"floor")}ceiling(){let t=this.#e;return this.#e>m&&(t+=this.#i-c),t=this.#e/this.#i*this.#i,this.#s(t,"ceiling")}round(t){if(null==t&&(t=0),t>=this.decimals)return this;const e=this.decimals-t,i=f*g(e-1);let r=this.value+i;const s=g(e);return r=r/s*s,p(r,this.#t,"round"),new F(d,r,this.#t)}isZero(){return this.#e===m}isNegative(){return this.#e<m}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return F.fromString(this.toString(),t)}static fromValue(t,e,i){const a=null==e?0:s(e),l=b(i);let o=n(t,"value");const u=a-l.decimals;if(u>0){const e=g(u);r(o%e===m,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:t}),o/=e}else u<0&&(o*=g(-u));return p(o,l,"fromValue"),new F(d,o,l)}static fromString(t,e){const s=t.match(/^(-?)([0-9]*)\.?([0-9]*)$/);i(s&&s[2].length+s[3].length>0,"invalid FixedNumber string value","value",t);const n=b(e);let a=s[2]||"0",l=s[3]||"";for(;l.length<n.decimals;)l+=v;r(l.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:t}),l=l.substring(0,n.decimals);const o=BigInt(s[1]+a+l);return p(o,n,"fromString"),new F(d,o,n)}static fromBytes(e,i){let r=a(t(e,"value"));const s=b(i);return s.signed&&(r=l(r,s.width)),p(r,s,"fromBytes"),new F(d,r,s)}}export{F as FixedNumber};
2
+ //# sourceMappingURL=fixednumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixednumber.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/fixednumber.js"],"sourcesContent":["/**\n * The **FixedNumber** class permits using values with decimal places,\n * using fixed-pont math.\n *\n * Fixed-point math is still based on integers under-the-hood, but uses an\n * internal offset to store fractional components below, and each operation\n * corrects for this after each operation.\n *\n * @_section: api/utils/fixed-point-math:Fixed-Point Maths [about-fixed-point-math]\n */\nimport { getBytes } from \"./data.js\";\nimport { assert, assertArgument, assertPrivate } from \"./errors.js\";\nimport { getBigInt, getNumber, fromTwos, mask, toBigInt } from \"./maths.js\";\nimport { defineProperties } from \"./properties.js\";\nconst BN_N1 = BigInt(-1);\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_5 = BigInt(5);\nconst _guard = {};\n// Constant to pull zeros from for multipliers\nlet Zeros = \"0000\";\nwhile (Zeros.length < 80) {\n Zeros += Zeros;\n}\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n}\nfunction checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n }\n else {\n val = -fromTwos(mask(-val, width), width);\n }\n }\n else {\n const limit = (BN_1 << width);\n assert(safeOp == null || (val >= 0 && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n val = (((val % limit) + limit) % limit) & (limit - BN_1);\n }\n return val;\n}\nfunction getFormat(value) {\n if (typeof (value) === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof (value) === \"string\") {\n // Parse the format string\n if (value === \"fixed\") {\n // defaults...\n }\n else if (value === \"ufixed\") {\n signed = false;\n }\n else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n assertArgument(match, \"invalid fixed format\", \"format\", value);\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n }\n else if (value) {\n // Extract the values from the object\n const v = value;\n const check = (key, type, defaultValue) => {\n if (v[key] == null) {\n return defaultValue;\n }\n assertArgument(typeof (v[key]) === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v[key]);\n return v[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n assertArgument((width % 8) === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n assertArgument(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n}\nfunction toString(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n // No decimal point for whole values\n if (decimals === 0) {\n return (negative + str);\n }\n // Pad out to the whole component (including a whole digit)\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n // Insert the decimal point\n const index = str.length - decimals;\n str = str.substring(0, index) + \".\" + str.substring(index);\n // Trim the whole component (leaving at least one 0)\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n // Trim the decimal component (leaving at least one 0)\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return (negative + str);\n}\n/**\n * A FixedNumber represents a value over its [[FixedFormat]]\n * arithmetic field.\n *\n * A FixedNumber can be used to perform math, losslessly, on\n * values which have decmial places.\n *\n * A FixedNumber has a fixed bit-width to store values in, and stores all\n * values internally by multiplying the value by 10 raised to the power of\n * %%decimals%%.\n *\n * If operations are performed that cause a value to grow too high (close to\n * positive infinity) or too low (close to negative infinity), the value\n * is said to //overflow//.\n *\n * For example, an 8-bit signed value, with 0 decimals may only be within\n * the range ``-128`` to ``127``; so ``-128 - 1`` will overflow and become\n * ``127``. Likewise, ``127 + 1`` will overflow and become ``-127``.\n *\n * Many operation have a normal and //unsafe// variant. The normal variant\n * will throw a [[NumericFaultError]] on any overflow, while the //unsafe//\n * variant will silently allow overflow, corrupting its value value.\n *\n * If operations are performed that cause a value to become too small\n * (close to zero), the value loses precison and is said to //underflow//.\n *\n * For example, a value with 1 decimal place may store a number as small\n * as ``0.1``, but the value of ``0.1 / 2`` is ``0.05``, which cannot fit\n * into 1 decimal place, so underflow occurs which means precision is lost\n * and the value becomes ``0``.\n *\n * Some operations have a normal and //signalling// variant. The normal\n * variant will silently ignore underflow, while the //signalling// variant\n * will thow a [[NumericFaultError]] on underflow.\n */\nexport class FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n assertPrivate(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString(value, format.decimals);\n defineProperties(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() { return this.#format.signed; }\n /**\n * The number of bits available to store the value.\n */\n get width() { return this.#format.width; }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() { return this.#format.decimals; }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() { return this.#val; }\n #checkFormat(other) {\n assertArgument(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n /*\n const width = BigInt(this.width);\n if (this.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: <string>safeOp, fault: \"overflow\", value: val\n });\n \n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n } else {\n val = -fromTwos(mask(-val, width), width);\n }\n \n } else {\n const masked = mask(val, width);\n assert(safeOp == null || (val >= 0 && val === masked), \"overflow\", \"NUMERIC_FAULT\", {\n operation: <string>safeOp, fault: \"overflow\", value: val\n });\n val = masked;\n }\n */\n val = checkValue(val, this.#format, safeOp);\n return new FixedNumber(_guard, val, this.#format);\n }\n #add(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val + o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) { return this.#add(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) { return this.#add(other, \"add\"); }\n #sub(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val - o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) { return this.#sub(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) { return this.#sub(other, \"sub\"); }\n #mul(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue((this.#val * o.#val) / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) { return this.#mul(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) { return this.#mul(other, \"mul\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n assert((value % this.#tens) === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o, safeOp) {\n assert(o.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(o);\n return this.#checkValue((this.#val * this.#tens) / o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) { return this.#div(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) { return this.#div(other, \"div\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n assert(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(other);\n const value = (this.#val * this.#tens);\n assert((value % other.#val) === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a = this.value, b = other.value;\n // Coerce a and b to the same magnitude\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b *= getTens(delta);\n }\n else if (delta < 0) {\n a *= getTens(-delta);\n }\n // Comnpare\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) { return this.cmp(other) === 0; }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) { return this.cmp(other) < 0; }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) { return this.cmp(other) <= 0; }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) { return this.cmp(other) > 0; }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) { return this.cmp(other) >= 0; }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n // Not enough precision to not already be rounded\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = (value / tens) * tens;\n checkValue(value, this.#format, \"round\");\n return new FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() { return (this.#val === BN_0); }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() { return (this.#val < BN_0); }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() { return this._value; }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() { return parseFloat(this.toString()); }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = (_decimals == null) ? 0 : getNumber(_decimals);\n const format = getFormat(_format);\n let value = getBigInt(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n assert((value % tens) === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\", fault: \"underflow\", value: _value\n });\n value /= tens;\n }\n else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n assertArgument(match && (match[2].length + match[3].length) > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = (match[2] || \"0\"), decimal = (match[3] || \"\");\n // Pad out the decimals\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n // Check precision is safe\n assert(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\", fault: \"underflow\", value: _value\n });\n // Remove extra padding\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = toBigInt(getBytes(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = fromTwos(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new FixedNumber(_guard, value, format);\n }\n}\n//const f1 = FixedNumber.fromString(\"12.56\", \"fixed16x2\");\n//const f2 = FixedNumber.fromString(\"0.3\", \"fixed16x2\");\n//console.log(f1.divSignal(f2));\n//const BUMP = FixedNumber.from(\"0.5\");\n//# sourceMappingURL=fixednumber.js.map"],"names":["BN_N1","BigInt","BN_0","BN_1","BN_5","_guard","Zeros","length","getTens","decimals","result","substring","checkValue","val","format","safeOp","width","signed","limit","assert","operation","fault","value","fromTwos","mask","getFormat","match","assertArgument","parseInt","v","check","key","type","defaultValue","name","String","FixedNumber","tens","_value","constructor","guard","assertPrivate","this","negative","str","toString","index","defineProperties","checkFormat","other","add","o","addUnsafe","sub","subUnsafe","mul","mulUnsafe","mulSignal","div","divUnsafe","divSignal","cmp","a","b","delta","eq","lt","lte","gt","gte","floor","ceiling","round","bump","isZero","isNegative","toUnsafeFloat","parseFloat","toFormat","fromString","fromValue","_decimals","_format","getNumber","getBigInt","whole","decimal","fromBytes","toBigInt","getBytes"],"mappings":"gQAcA,MAAMA,EAAQC,WACRC,EAAOD,OAAO,GACdE,EAAOF,OAAO,GACdG,EAAOH,OAAO,GACdI,EAAS,CAAA,EAEf,IAAIC,EAAQ,OACZ,KAAOA,EAAMC,OAAS,IAClBD,GAASA,EAGb,SAASE,EAAQC,GACb,IAAIC,EAASJ,EACb,KAAOI,EAAOH,OAASE,GACnBC,GAAUA,EAEd,OAAOT,OAAO,IAAMS,EAAOC,UAAU,EAAGF,GAC5C,CACA,SAASG,EAAWC,EAAKC,EAAQC,GAC7B,MAAMC,EAAQf,OAAOa,EAAOE,OAC5B,GAAIF,EAAOG,OAAQ,CACf,MAAMC,EAASf,GAASa,EAAQb,EAChCgB,EAAiB,MAAVJ,GAAmBF,IAAQK,GAASL,EAAMK,EAAQ,WAAY,gBAAiB,CAClFE,UAAWL,EAAQM,MAAO,WAAYC,MAAOT,IAG7CA,EADAA,EAAMX,EACAqB,EAASC,EAAKX,EA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GAASwD,IAGtB,OADApD,EAAWU,EAAOR,EAAQ,aACnB,IAAIsB,EAAY/B,EAAQiB,EAAOR,EAC1C,CAOA,iBAAOiE,CAAWzC,EAAQ4C,GACtB,MAAMxD,EAAQY,EAAOZ,MAAM,6BAC3BC,EAAeD,GAAUA,EAAM,GAAGnB,OAASmB,EAAM,GAAGnB,OAAU,EAAG,mCAAoC,QAAS+B,GAC9G,MAAMxB,EAASW,EAAUyD,GACzB,IAAIG,EAAS3D,EAAM,IAAM,IAAM4D,EAAW5D,EAAM,IAAM,GAEtD,KAAO4D,EAAQ/E,OAASO,EAAOL,UAC3B6E,GAAWhF,EAGfa,EAAOmE,EAAQ3E,UAAUG,EAAOL,UAAUiB,MAAM,QAAS,+BAAgC,gBAAiB,CACtGN,UAAW,aAAcC,MAAO,YAAaC,MAAOgB,IAGxDgD,EAAUA,EAAQ3E,UAAU,EAAGG,EAAOL,UACtC,MAAMa,EAAQrB,OAAOyB,EAAM,GAAK2D,EAAQC,GAExC,OADA1E,EAAWU,EAAOR,EAAQ,cACnB,IAAIsB,EAAY/B,EAAQiB,EAAOR,EAC1C,CAQA,gBAAOyE,CAAUjD,EAAQ4C,GACrB,IAAI5D,EAAQkE,EAASC,EAASnD,EAAQ,UACtC,MAAMxB,EAASW,EAAUyD,GAKzB,OAJIpE,EAAOG,SACPK,EAAQC,EAASD,EAAOR,EAAOE,QAEnCJ,EAAWU,EAAOR,EAAQ,aACnB,IAAIsB,EAAY/B,EAAQiB,EAAOR,EAC1C","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{assertArgument as e,assert as n}from"./errors.js";const r=BigInt(0),t=BigInt(1),i=9007199254740991;function u(e,i){const u=s(e,"value"),o=BigInt(f(i,"width"));if(n(u>>o===r,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),u>>o-t){return-((~u&(t<<o)-t)+t)}return u}function o(e,n){const r=s(e,"value"),i=BigInt(f(n,"bits"));return r&(t<<i)-t}function a(n,r){switch(typeof n){case"bigint":return n;case"number":return e(Number.isInteger(n),"underflow",r||"value",n),e(n>=-i&&n<=i,"overflow",r||"value",n),BigInt(n);case"string":try{if(""===n)throw new Error("empty string");return"-"===n[0]&&"-"!==n[1]?-BigInt(n.substring(1)):BigInt(n)}catch(t){e(!1,`invalid BigNumberish string: ${t.message}`,r||"value",n)}}e(!1,"invalid BigNumberish value",r||"value",n)}function s(e,t){const i=a(e,t);return n(i>=r,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),i}const l="0123456789abcdef";function c(e){if(e instanceof Uint8Array){let n="0x0";for(const r of e)n+=l[r>>4],n+=l[15&r];return BigInt(n)}return a(e)}function f(n,r){switch(typeof n){case"bigint":return e(n>=-i&&n<=i,"overflow",r||"value",n),Number(n);case"number":return e(Number.isInteger(n),"underflow",r||"value",n),e(n>=-i&&n<=i,"overflow",r||"value",n),n;case"string":try{if(""===n)throw new Error("empty string");return f(BigInt(n),r)}catch(t){e(!1,`invalid numeric string: ${t.message}`,r||"value",n)}}e(!1,"invalid numeric value",r||"value",n)}export{u as fromTwos,a as getBigInt,f as getNumber,s as getUint,o as mask,c as toBigInt};
2
+ //# sourceMappingURL=maths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maths.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/maths.js"],"sourcesContent":["/**\n * Some mathematic operations.\n *\n * @_subsection: api/utils:Math Helpers [about-maths]\n */\nimport { hexlify, isBytesLike } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\n//const BN_Max256 = (BN_1 << BigInt(256)) - BN_1;\n// IEEE 754 support 53-bits of mantissa\nconst maxValue = 0x1fffffffffffff;\n/**\n * Convert %%value%% from a twos-compliment representation of %%width%%\n * bits to its value.\n *\n * If the highest bit is ``1``, the result will be negative.\n */\nexport function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n assert((value >> width) === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\", fault: \"overflow\", value: _value\n });\n // Top bit set; treat as a negative value\n if (value >> (width - BN_1)) {\n const mask = (BN_1 << width) - BN_1;\n return -(((~value) & mask) + BN_1);\n }\n return value;\n}\n/**\n * Convert %%value%% to a twos-compliment representation of\n * %%width%% bits.\n *\n * The result will always be positive.\n */\nexport function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = (BN_1 << (width - BN_1));\n if (value < BN_0) {\n value = -value;\n assert(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n const mask = (BN_1 << width) - BN_1;\n return ((~value) & mask) + BN_1;\n }\n else {\n assert(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n }\n return value;\n}\n/**\n * Mask %%value%% with a bitmask of %%bits%% ones.\n */\nexport function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & ((BN_1 << bits) - BN_1);\n}\n/**\n * Gets a BigInt from %%value%%. If it is an invalid value for\n * a BigInt, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getBigInt(value, name) {\n switch (typeof (value)) {\n case \"bigint\": return value;\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n }\n catch (e) {\n assertArgument(false, `invalid BigNumberish string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid BigNumberish value\", name || \"value\", value);\n}\n/**\n * Returns %%value%% as a bigint, validating it is valid as a bigint\n * value and that it is positive.\n */\nexport function getUint(value, name) {\n const result = getBigInt(value, name);\n assert(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\", operation: \"getUint\", value\n });\n return result;\n}\nconst Nibbles = \"0123456789abcdef\";\n/*\n * Converts %%value%% to a BigInt. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data.\n */\nexport function toBigInt(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v of value) {\n result += Nibbles[v >> 4];\n result += Nibbles[v & 0x0f];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n}\n/**\n * Gets a //number// from %%value%%. If it is an invalid value for\n * a //number//, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getNumber(value, name) {\n switch (typeof (value)) {\n case \"bigint\":\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n }\n catch (e) {\n assertArgument(false, `invalid numeric string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid numeric value\", name || \"value\", value);\n}\n/**\n * Converts %%value%% to a number. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data. Throws if the value is not safe.\n */\nexport function toNumber(value) {\n return getNumber(toBigInt(value));\n}\n/**\n * Converts %%value%% to a Big Endian hexstring, optionally padded to\n * %%width%% bytes.\n */\nexport function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n // Ensure the value is of even length\n if (result.length % 2) {\n result = \"0\" + result;\n }\n }\n else {\n const width = getNumber(_width, \"width\");\n assert(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n // Pad the value to the required width\n while (result.length < (width * 2)) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n}\n/**\n * Converts %%value%% to a Big Endian Uint8Array.\n */\nexport function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i = 0; i < result.length; i++) {\n const offset = i * 2;\n result[i] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n}\n/**\n * Returns a [[HexString]] for %%value%% safe to use as a //Quantity//.\n *\n * A //Quantity// does not have and leading 0 values unless the value is\n * the literal value `0x0`. This is most commonly used for JSSON-RPC\n * numeric values.\n */\nexport function toQuantity(value) {\n let result = hexlify(isBytesLike(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n}\n//# sourceMappingURL=maths.js.map"],"names":["BN_0","BigInt","BN_1","maxValue","fromTwos","_value","_width","value","getUint","width","getNumber","assert","operation","fault","mask","_bits","bits","getBigInt","name","assertArgument","Number","isInteger","Error","substring","e","message","result","Nibbles","toBigInt","Uint8Array","v"],"mappings":"yDAOA,MAAMA,EAAOC,OAAO,GACdC,EAAOD,OAAO,GAGdE,EAAW,iBAOV,SAASC,EAASC,EAAQC,GAC7B,MAAMC,EAAQC,EAAQH,EAAQ,SACxBI,EAAQR,OAAOS,EAAUJ,EAAQ,UAKvC,GAJAK,EAAQJ,GAASE,IAAWT,EAAM,WAAY,gBAAiB,CAC3DY,UAAW,WAAYC,MAAO,WAAYN,MAAOF,IAGjDE,GAAUE,EAAQP,EAAO,CAEzB,UAAYK,GADEL,GAAQO,GAASP,GACFA,EACjC,CACA,OAAOK,CACX,CA6BO,SAASO,EAAKT,EAAQU,G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AAUJ,GAAYI,GAASJ,EAAU,WAAYe,GAAQ,QAASX,GAC9EA,EACX,IAAK,SACD,IACI,GAAc,KAAVA,EACA,MAAM,IAAIe,MAAM,gBAEpB,OAAOZ,EAAUT,OAAOM,GAAQW,EACpC,CACA,MAAOM,GACHL,GAAe,EAAO,2BAA2BK,EAAEC,UAAWP,GAAQ,QAASX,EACnF,EAERY,GAAe,EAAO,wBAAyBD,GAAQ,QAASX,EACpE","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ function e(e,t,r){for(let r in t){let l=t[r];Object.defineProperty(e,r,{enumerable:!0,value:l,writable:!1})}}export{e as defineProperties};
2
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/properties.js"],"sourcesContent":["/**\n * Property helper functions.\n *\n * @_subsection api/utils:Properties [about-properties]\n */\nfunction checkType(value, type, name) {\n const types = type.split(\"|\").map(t => t.trim());\n for (let i = 0; i < types.length; i++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof (value) === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n}\n/**\n * Resolves to a new object that is a copy of %%value%%, but with all\n * values resolved.\n */\nexport async function resolveProperties(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k) => Promise.resolve(value[k])));\n return results.reduce((accum, v, index) => {\n accum[keys[index]] = v;\n return accum;\n }, {});\n}\n/**\n * Assigns the %%values%% to %%target%% as read-only values.\n *\n * It %%types%% is specified, the values are checked.\n */\nexport function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = (types ? types[key] : null);\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n}\n//# sourceMappingURL=properties.js.map"],"names":["defineProperties","target","values","types","key","value","Object","defineProperty","enumerable","writable"],"mappings":"AA2CO,SAASA,EAAiBC,EAAQC,EAAQC,GAC7C,IAAK,IAAIC,KAAOF,EAAQ,CACpB,IAAIG,EAAQH,EAAOE,GAKnBE,OAAOC,eAAeN,EAAQG,EAAK,CAAEI,YAAY,EAAMH,QAAOI,UAAU,GAC5E,CACJ","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{FixedNumber as t}from"./fixednumber.js";import{getNumber as r}from"./maths.js";function i(i,n){let o=18;return o=r(n,"unit"),t.fromValue(i,o,{decimals:o,width:512}).toString()}function n(t){return i(t,18)}export{n as formatEther,i as formatUnits};
2
+ //# sourceMappingURL=units.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"units.js","sources":["../../../../../../node_modules/ethers/lib.esm/utils/units.js"],"sourcesContent":["/**\n * Most interactions with Ethereum requires integer values, which use\n * the smallest magnitude unit.\n *\n * For example, imagine dealing with dollars and cents. Since dollars\n * are divisible, non-integer values are possible, such as ``$10.77``.\n * By using the smallest indivisible unit (i.e. cents), the value can\n * be kept as the integer ``1077``.\n *\n * When receiving decimal input from the user (as a decimal string),\n * the value should be converted to an integer and when showing a user\n * a value, the integer value should be converted to a decimal string.\n *\n * This creates a clear distinction, between values to be used by code\n * (integers) and values used for display logic to users (decimals).\n *\n * The native unit in Ethereum, //ether// is divisible to 18 decimal places,\n * where each individual unit is called a //wei//.\n *\n * @_subsection api/utils:Unit Conversion [about-units]\n */\nimport { assertArgument } from \"./errors.js\";\nimport { FixedNumber } from \"./fixednumber.js\";\nimport { getNumber } from \"./maths.js\";\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n/**\n * Converts %%value%% into a //decimal string//, assuming %%unit%% decimal\n * places. The %%unit%% may be the number of decimal places or the name of\n * a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n *\n */\nexport function formatUnits(value, unit) {\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n}\n/**\n * Converts the //decimal string// %%value%% to a BigInt, assuming\n * %%unit%% decimal places. The %%unit%% may the number of decimal places\n * or the name of a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n */\nexport function parseUnits(value, unit) {\n assertArgument(typeof (value) === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromString(value, { decimals, width: 512 }).value;\n}\n/**\n * Converts %%value%% into a //decimal string// using 18 decimal places.\n */\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\n/**\n * Converts the //decimal string// %%ether%% to a BigInt, using 18\n * decimal places.\n */\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=units.js.map"],"names":["formatUnits","value","unit","decimals","getNumber","FixedNumber","fromValue","width","toString","formatEther","wei"],"mappings":"sFAuCO,SAASA,EAAYC,EAAOC,GAC/B,IAAIC,EAAW,GASf,OAFIA,EAAWC,EAAUF,EAAM,QAExBG,EAAYC,UAAUL,EAAOE,EAAU,CAAEA,WAAUI,MAAO,MAAOC,UAC5E,CAsBO,SAASC,EAAYC,GACxB,OAAOV,EAAYU,EAAK,GAC5B","x_google_ignoreList":[0]}