@coinbase/cdp-hooks 0.0.96 → 0.0.97

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 (282) hide show
  1. package/dist/esm/index100.js +35 -25
  2. package/dist/esm/index101.js +9 -46
  3. package/dist/esm/index102.js +31 -69
  4. package/dist/esm/index103.js +36 -40
  5. package/dist/esm/index104.js +9 -75
  6. package/dist/esm/index105.js +25 -27
  7. package/dist/esm/index106.js +46 -6
  8. package/dist/esm/index107.js +69 -16
  9. package/dist/esm/index108.js +40 -8
  10. package/dist/esm/index109.js +75 -13
  11. package/dist/esm/index110.js +31 -7
  12. package/dist/esm/index111.js +6 -9
  13. package/dist/esm/index112.js +16 -16
  14. package/dist/esm/index113.js +8 -12
  15. package/dist/esm/index114.js +13 -46
  16. package/dist/esm/index115.js +7 -13
  17. package/dist/esm/index116.js +9 -16
  18. package/dist/esm/index117.js +16 -13
  19. package/dist/esm/index118.js +11 -5
  20. package/dist/esm/index119.js +46 -35
  21. package/dist/esm/index120.js +13 -9
  22. package/dist/esm/index121.js +15 -7
  23. package/dist/esm/index122.js +13 -28
  24. package/dist/esm/index123.js +6 -10
  25. package/dist/esm/index124.js +32 -11
  26. package/dist/esm/index125.js +9 -11
  27. package/dist/esm/index126.js +8 -120
  28. package/dist/esm/index127.js +27 -32
  29. package/dist/esm/index128.js +10 -80
  30. package/dist/esm/index129.js +13 -176
  31. package/dist/esm/index130.js +11 -44
  32. package/dist/esm/index131.js +120 -6
  33. package/dist/esm/index132.js +30 -151
  34. package/dist/esm/index133.js +80 -14
  35. package/dist/esm/index134.js +177 -14
  36. package/dist/esm/index135.js +42 -97
  37. package/dist/esm/index136.js +6 -72
  38. package/dist/esm/index137.js +153 -86
  39. package/dist/esm/index138.js +14 -148
  40. package/dist/esm/index139.js +14 -136
  41. package/dist/esm/index140.js +94 -63
  42. package/dist/esm/index141.js +72 -23
  43. package/dist/esm/index142.js +83 -154
  44. package/dist/esm/index143.js +148 -6
  45. package/dist/esm/index144.js +136 -11
  46. package/dist/esm/index145.js +68 -19
  47. package/dist/esm/index146.js +23 -135
  48. package/dist/esm/index147.js +155 -75
  49. package/dist/esm/index148.js +6 -9
  50. package/dist/esm/index149.js +11 -28
  51. package/dist/esm/index150.js +17 -87
  52. package/dist/esm/index151.js +135 -350
  53. package/dist/esm/index152.js +79 -3
  54. package/dist/esm/index153.js +10 -5
  55. package/dist/esm/index154.js +29 -2
  56. package/dist/esm/index155.js +90 -3
  57. package/dist/esm/index156.js +351 -9
  58. package/dist/esm/index157.js +3 -327
  59. package/dist/esm/index158.js +5 -14
  60. package/dist/esm/index159.js +2 -5
  61. package/dist/esm/index160.js +3 -56
  62. package/dist/esm/index161.js +9 -13
  63. package/dist/esm/index162.js +327 -2
  64. package/dist/esm/index163.js +13 -7
  65. package/dist/esm/index164.js +4 -30
  66. package/dist/esm/index165.js +29 -188
  67. package/dist/esm/index166.js +13 -32
  68. package/dist/esm/index167.js +2 -22
  69. package/dist/esm/index168.js +7 -5
  70. package/dist/esm/index169.js +25 -68
  71. package/dist/esm/index170.js +214 -5
  72. package/dist/esm/index171.js +32 -6
  73. package/dist/esm/index172.js +20 -34
  74. package/dist/esm/index173.js +5 -119
  75. package/dist/esm/index174.js +74 -3
  76. package/dist/esm/index175.js +5 -18
  77. package/dist/esm/index176.js +5 -26
  78. package/dist/esm/index177.js +28 -26
  79. package/dist/esm/index178.js +105 -20
  80. package/dist/esm/index179.js +3 -24
  81. package/dist/esm/index180.js +17 -7
  82. package/dist/esm/index181.js +18 -185
  83. package/dist/esm/index182.js +34 -2
  84. package/dist/esm/index183.js +28 -461
  85. package/dist/esm/index184.js +16 -20
  86. package/dist/esm/index185.js +6 -158
  87. package/dist/esm/index186.js +193 -21
  88. package/dist/esm/index187.js +2 -128
  89. package/dist/esm/index188.js +467 -38
  90. package/dist/esm/index189.js +27 -6
  91. package/dist/esm/index190.js +160 -27
  92. package/dist/esm/index191.js +20 -54
  93. package/dist/esm/index192.js +126 -44
  94. package/dist/esm/index193.js +31 -184
  95. package/dist/esm/index194.js +7 -4
  96. package/dist/esm/index195.js +26 -72
  97. package/dist/esm/index196.js +52 -17
  98. package/dist/esm/index197.js +46 -3
  99. package/dist/esm/index198.js +188 -13
  100. package/dist/esm/index199.js +4 -24
  101. package/dist/esm/index200.js +73 -11
  102. package/dist/esm/index201.js +18 -16
  103. package/dist/esm/index202.js +3 -35
  104. package/dist/esm/index203.js +17 -3
  105. package/dist/esm/index204.js +23 -18
  106. package/dist/esm/index205.js +11 -27
  107. package/dist/esm/index206.js +17 -34
  108. package/dist/esm/index207.js +34 -8
  109. package/dist/esm/index208.js +3 -8
  110. package/dist/esm/index209.js +18 -25
  111. package/dist/esm/index210.js +26 -27
  112. package/dist/esm/index211.js +35 -3
  113. package/dist/esm/index212.js +8 -79
  114. package/dist/esm/index213.js +7 -9
  115. package/dist/esm/index214.js +23 -10
  116. package/dist/esm/index215.js +27 -20
  117. package/dist/esm/index216.js +3 -8
  118. package/dist/esm/index217.js +78 -9
  119. package/dist/esm/index218.js +9 -11
  120. package/dist/esm/index219.js +12 -6
  121. package/dist/esm/index220.js +21 -6
  122. package/dist/esm/index221.js +8 -13
  123. package/dist/esm/index222.js +9 -31
  124. package/dist/esm/index223.js +12 -5
  125. package/dist/esm/index224.js +6 -37
  126. package/dist/esm/index225.js +6 -110
  127. package/dist/esm/index226.js +12 -47
  128. package/dist/esm/index227.js +31 -31
  129. package/dist/esm/index228.js +5 -18
  130. package/dist/esm/index229.js +35 -17
  131. package/dist/esm/index230.js +108 -40
  132. package/dist/esm/index231.js +46 -40
  133. package/dist/esm/index232.js +32 -8
  134. package/dist/esm/index233.js +17 -7
  135. package/dist/esm/index234.js +19 -16
  136. package/dist/esm/index235.js +42 -22
  137. package/dist/esm/index236.js +40 -22
  138. package/dist/esm/index237.js +8 -16
  139. package/dist/esm/index238.js +7 -54
  140. package/dist/esm/index239.js +16 -27
  141. package/dist/esm/index240.js +22 -24
  142. package/dist/esm/index241.js +24 -104
  143. package/dist/esm/index242.js +17 -3
  144. package/dist/esm/index243.js +54 -5
  145. package/dist/esm/index244.js +26 -30
  146. package/dist/esm/index245.js +24 -20
  147. package/dist/esm/index246.js +104 -3
  148. package/dist/esm/index247.js +3 -18
  149. package/dist/esm/index248.js +5 -5
  150. package/dist/esm/index249.js +31 -8
  151. package/dist/esm/index250.js +19 -102
  152. package/dist/esm/index251.js +3 -64
  153. package/dist/esm/index252.js +17 -5
  154. package/dist/esm/index253.js +5 -6
  155. package/dist/esm/index254.js +8 -27
  156. package/dist/esm/index255.js +103 -33
  157. package/dist/esm/index256.js +64 -13
  158. package/dist/esm/index257.js +5 -16
  159. package/dist/esm/index258.js +6 -78
  160. package/dist/esm/index259.js +28 -2
  161. package/dist/esm/index260.js +33 -14
  162. package/dist/esm/index261.js +13 -18
  163. package/dist/esm/index262.js +16 -171
  164. package/dist/esm/index263.js +77 -16
  165. package/dist/esm/index264.js +2 -11
  166. package/dist/esm/index265.js +15 -10
  167. package/dist/esm/index266.js +18 -38
  168. package/dist/esm/index267.js +172 -2
  169. package/dist/esm/index268.js +17 -69
  170. package/dist/esm/index269.js +10 -34
  171. package/dist/esm/index270.js +10 -15
  172. package/dist/esm/index271.js +2 -41
  173. package/dist/esm/index272.js +41 -2
  174. package/dist/esm/index273.js +2 -5
  175. package/dist/esm/index274.js +4 -10
  176. package/dist/esm/index275.js +9 -18
  177. package/dist/esm/index276.js +19 -7
  178. package/dist/esm/index277.js +7 -11
  179. package/dist/esm/index278.js +11 -72
  180. package/dist/esm/index279.js +71 -64
  181. package/dist/esm/index280.js +60 -182
  182. package/dist/esm/index281.js +185 -20
  183. package/dist/esm/index282.js +21 -41
  184. package/dist/esm/index283.js +41 -24
  185. package/dist/esm/index284.js +24 -89
  186. package/dist/esm/index285.js +68 -18
  187. package/dist/esm/index286.js +34 -10
  188. package/dist/esm/index287.js +10 -7
  189. package/dist/esm/index288.js +13 -7
  190. package/dist/esm/index289.js +7 -6
  191. package/dist/esm/index290.js +6 -36
  192. package/dist/esm/index291.js +35 -14
  193. package/dist/esm/index292.js +15 -8
  194. package/dist/esm/index293.js +8 -8
  195. package/dist/esm/index294.js +8 -16
  196. package/dist/esm/index295.js +15 -21
  197. package/dist/esm/index296.js +22 -30
  198. package/dist/esm/index297.js +31 -2
  199. package/dist/esm/index298.js +2 -14
  200. package/dist/esm/index299.js +13 -12
  201. package/dist/esm/index3.js +1 -1
  202. package/dist/esm/index300.js +10 -45
  203. package/dist/esm/index301.js +47 -9
  204. package/dist/esm/index302.js +8 -12
  205. package/dist/esm/index303.js +10 -10
  206. package/dist/esm/index304.js +13 -14
  207. package/dist/esm/index305.js +14 -8
  208. package/dist/esm/index306.js +6 -13
  209. package/dist/esm/index307.js +15 -24
  210. package/dist/esm/index308.js +24 -24
  211. package/dist/esm/index309.js +20 -27
  212. package/dist/esm/index310.js +31 -9
  213. package/dist/esm/index311.js +9 -51
  214. package/dist/esm/index312.js +38 -24
  215. package/dist/esm/index313.js +37 -17
  216. package/dist/esm/index314.js +17 -14
  217. package/dist/esm/index315.js +14 -11
  218. package/dist/esm/index316.js +11 -12
  219. package/dist/esm/index317.js +12 -19
  220. package/dist/esm/index318.js +18 -106
  221. package/dist/esm/index319.js +105 -101
  222. package/dist/esm/index320.js +103 -6
  223. package/dist/esm/index321.js +7 -7
  224. package/dist/esm/index322.js +7 -27
  225. package/dist/esm/index323.js +26 -15
  226. package/dist/esm/index324.js +13 -211
  227. package/dist/esm/index325.js +213 -12
  228. package/dist/esm/index326.js +12 -35
  229. package/dist/esm/index327.js +35 -41
  230. package/dist/esm/index328.js +42 -2
  231. package/dist/esm/index329.js +3 -68
  232. package/dist/esm/index330.js +68 -3
  233. package/dist/esm/index331.js +3 -136
  234. package/dist/esm/index332.js +125 -163
  235. package/dist/esm/index333.js +174 -9
  236. package/dist/esm/index334.js +9 -16
  237. package/dist/esm/index335.js +16 -133
  238. package/dist/esm/index336.js +112 -172
  239. package/dist/esm/index337.js +194 -2
  240. package/dist/esm/index338.js +2 -79
  241. package/dist/esm/index339.js +77 -13
  242. package/dist/esm/index340.js +13 -89
  243. package/dist/esm/index341.js +70 -143
  244. package/dist/esm/index342.js +157 -36
  245. package/dist/esm/index343.js +41 -654
  246. package/dist/esm/index344.js +646 -196
  247. package/dist/esm/index345.js +201 -172
  248. package/dist/esm/index346.js +176 -3
  249. package/dist/esm/index347.js +1 -1
  250. package/dist/esm/index349.js +2 -2
  251. package/dist/esm/index350.js +1 -1
  252. package/dist/esm/index351.js +1 -1
  253. package/dist/esm/index352.js +2 -2
  254. package/dist/esm/index353.js +3 -3
  255. package/dist/esm/index354.js +1 -1
  256. package/dist/esm/index73.js +2 -2
  257. package/dist/esm/index74.js +1 -1
  258. package/dist/esm/index75.js +2 -2
  259. package/dist/esm/index76.js +1 -1
  260. package/dist/esm/index77.js +1 -1
  261. package/dist/esm/index78.js +1 -1
  262. package/dist/esm/index79.js +1 -1
  263. package/dist/esm/index80.js +2 -2
  264. package/dist/esm/index81.js +2 -2
  265. package/dist/esm/index82.js +5 -5
  266. package/dist/esm/index83.js +2 -2
  267. package/dist/esm/index85.js +37 -33
  268. package/dist/esm/index86.js +2 -4
  269. package/dist/esm/index87.js +69 -9
  270. package/dist/esm/index88.js +33 -117
  271. package/dist/esm/index89.js +13 -60
  272. package/dist/esm/index90.js +33 -23
  273. package/dist/esm/index91.js +3 -36
  274. package/dist/esm/index92.js +9 -41
  275. package/dist/esm/index93.js +118 -58
  276. package/dist/esm/index94.js +58 -165
  277. package/dist/esm/index95.js +21 -36
  278. package/dist/esm/index96.js +36 -9
  279. package/dist/esm/index97.js +38 -28
  280. package/dist/esm/index98.js +58 -36
  281. package/dist/esm/index99.js +167 -8
  282. package/package.json +3 -3
@@ -1,61 +1,121 @@
1
- import { textResolverAbi as l, universalResolverResolveAbi as h } from "./index151.js";
2
- import { decodeFunctionResult as p } from "./index199.js";
3
- import { encodeFunctionData as A } from "./index208.js";
4
- import { getChainContractAddress as R } from "./index229.js";
5
- import { toHex as b } from "./index192.js";
6
- import { isNullUniversalResolverError as g } from "./index293.js";
7
- import { localBatchGatewayUrl as w } from "./index227.js";
8
- import { namehash as x } from "./index234.js";
9
- import { packetToBytes as y } from "./index294.js";
10
- import { getAction as C } from "./index288.js";
11
- import { readContract as N } from "./index127.js";
12
- async function j(n, t) {
13
- const { blockNumber: s, blockTag: m, key: d, name: e, gatewayUrls: u, strict: f } = t, { chain: o } = n, v = (() => {
14
- if (t.universalResolverAddress)
15
- return t.universalResolverAddress;
16
- if (!o)
17
- throw new Error("client chain not configured. universalResolverAddress is required.");
18
- return R({
19
- blockNumber: s,
20
- chain: o,
21
- contract: "ensUniversalResolver"
22
- });
23
- })(), a = o?.ensTlds;
24
- if (a && !a.some((r) => e.endsWith(r)))
25
- return null;
26
- try {
27
- const r = {
28
- address: v,
29
- abi: h,
30
- args: [
31
- b(y(e)),
32
- A({
33
- abi: l,
34
- functionName: "text",
35
- args: [x(e), d]
36
- }),
37
- u ?? [w]
38
- ],
39
- functionName: "resolveWithGateways",
40
- blockNumber: s,
41
- blockTag: m
42
- }, i = await C(n, N, "readContract")(r);
43
- if (i[0] === "0x")
44
- return null;
45
- const c = p({
46
- abi: l,
47
- functionName: "text",
48
- data: i[0]
49
- });
50
- return c === "" ? null : c;
51
- } catch (r) {
52
- if (f)
53
- throw r;
54
- if (g(r))
55
- return null;
56
- throw r;
57
- }
1
+ import { getEnsAddress as a } from "./index94.js";
2
+ import { getEnsAvatar as m } from "./index95.js";
3
+ import { getEnsName as s } from "./index96.js";
4
+ import { getEnsResolver as i } from "./index97.js";
5
+ import { getEnsText as f } from "./index98.js";
6
+ import { call as g } from "./index99.js";
7
+ import { createAccessList as p } from "./index100.js";
8
+ import { createBlockFilter as n } from "./index101.js";
9
+ import { createContractEventFilter as c } from "./index102.js";
10
+ import { createEventFilter as T } from "./index103.js";
11
+ import { createPendingTransactionFilter as C } from "./index104.js";
12
+ import { estimateContractGas as u } from "./index105.js";
13
+ import { estimateFeesPerGas as F } from "./index106.js";
14
+ import { estimateGas as v } from "./index107.js";
15
+ import { estimateMaxPriorityFeePerGas as E } from "./index108.js";
16
+ import { fillTransaction as d } from "./index109.js";
17
+ import { getBalance as B } from "./index110.js";
18
+ import { getBlobBaseFee as w } from "./index111.js";
19
+ import { getBlock as y } from "./index112.js";
20
+ import { getBlockNumber as h } from "./index113.js";
21
+ import { getBlockTransactionCount as k } from "./index114.js";
22
+ import { getChainId as P } from "./index115.js";
23
+ import { getCode as o } from "./index116.js";
24
+ import { getContractEvents as R } from "./index117.js";
25
+ import { getDelegation as G } from "./index118.js";
26
+ import { getEip712Domain as l } from "./index119.js";
27
+ import { getFeeHistory as A } from "./index120.js";
28
+ import { getFilterChanges as b } from "./index121.js";
29
+ import { getFilterLogs as D } from "./index122.js";
30
+ import { getGasPrice as L } from "./index123.js";
31
+ import { getLogs as M } from "./index124.js";
32
+ import { getProof as N } from "./index125.js";
33
+ import { getStorageAt as S } from "./index126.js";
34
+ import { getTransaction as x } from "./index127.js";
35
+ import { getTransactionConfirmations as H } from "./index128.js";
36
+ import { getTransactionCount as q } from "./index129.js";
37
+ import { getTransactionReceipt as I } from "./index130.js";
38
+ import { multicall as j } from "./index131.js";
39
+ import { readContract as z } from "./index132.js";
40
+ import { simulateBlocks as e } from "./index133.js";
41
+ import { simulateCalls as J } from "./index134.js";
42
+ import { simulateContract as K } from "./index135.js";
43
+ import { uninstallFilter as O } from "./index136.js";
44
+ import { verifyHash as Q } from "./index137.js";
45
+ import { verifyMessage as U } from "./index138.js";
46
+ import { verifyTypedData as V } from "./index139.js";
47
+ import { waitForTransactionReceipt as W } from "./index140.js";
48
+ import { watchBlockNumber as X } from "./index141.js";
49
+ import { watchBlocks as Y } from "./index142.js";
50
+ import { watchContractEvent as Z } from "./index143.js";
51
+ import { watchEvent as _ } from "./index144.js";
52
+ import { watchPendingTransactions as $ } from "./index145.js";
53
+ import { verifySiweMessage as rr } from "./index146.js";
54
+ import { prepareTransactionRequest as tr } from "./index147.js";
55
+ import { sendRawTransaction as or } from "./index148.js";
56
+ import { sendRawTransactionSync as er } from "./index149.js";
57
+ function st(t) {
58
+ return {
59
+ call: (r) => g(t, r),
60
+ createAccessList: (r) => p(t, r),
61
+ createBlockFilter: () => n(t),
62
+ createContractEventFilter: (r) => c(t, r),
63
+ createEventFilter: (r) => T(t, r),
64
+ createPendingTransactionFilter: () => C(t),
65
+ estimateContractGas: (r) => u(t, r),
66
+ estimateGas: (r) => v(t, r),
67
+ getBalance: (r) => B(t, r),
68
+ getBlobBaseFee: () => w(t),
69
+ getBlock: (r) => y(t, r),
70
+ getBlockNumber: (r) => h(t, r),
71
+ getBlockTransactionCount: (r) => k(t, r),
72
+ getBytecode: (r) => o(t, r),
73
+ getChainId: () => P(t),
74
+ getCode: (r) => o(t, r),
75
+ getContractEvents: (r) => R(t, r),
76
+ getDelegation: (r) => G(t, r),
77
+ getEip712Domain: (r) => l(t, r),
78
+ getEnsAddress: (r) => a(t, r),
79
+ getEnsAvatar: (r) => m(t, r),
80
+ getEnsName: (r) => s(t, r),
81
+ getEnsResolver: (r) => i(t, r),
82
+ getEnsText: (r) => f(t, r),
83
+ getFeeHistory: (r) => A(t, r),
84
+ estimateFeesPerGas: (r) => F(t, r),
85
+ getFilterChanges: (r) => b(t, r),
86
+ getFilterLogs: (r) => D(t, r),
87
+ getGasPrice: () => L(t),
88
+ getLogs: (r) => M(t, r),
89
+ getProof: (r) => N(t, r),
90
+ estimateMaxPriorityFeePerGas: (r) => E(t, r),
91
+ fillTransaction: (r) => d(t, r),
92
+ getStorageAt: (r) => S(t, r),
93
+ getTransaction: (r) => x(t, r),
94
+ getTransactionConfirmations: (r) => H(t, r),
95
+ getTransactionCount: (r) => q(t, r),
96
+ getTransactionReceipt: (r) => I(t, r),
97
+ multicall: (r) => j(t, r),
98
+ prepareTransactionRequest: (r) => tr(t, r),
99
+ readContract: (r) => z(t, r),
100
+ sendRawTransaction: (r) => or(t, r),
101
+ sendRawTransactionSync: (r) => er(t, r),
102
+ simulate: (r) => e(t, r),
103
+ simulateBlocks: (r) => e(t, r),
104
+ simulateCalls: (r) => J(t, r),
105
+ simulateContract: (r) => K(t, r),
106
+ verifyHash: (r) => Q(t, r),
107
+ verifyMessage: (r) => U(t, r),
108
+ verifySiweMessage: (r) => rr(t, r),
109
+ verifyTypedData: (r) => V(t, r),
110
+ uninstallFilter: (r) => O(t, r),
111
+ waitForTransactionReceipt: (r) => W(t, r),
112
+ watchBlocks: (r) => Y(t, r),
113
+ watchBlockNumber: (r) => X(t, r),
114
+ watchContractEvent: (r) => Z(t, r),
115
+ watchEvent: (r) => _(t, r),
116
+ watchPendingTransactions: (r) => $(t, r)
117
+ };
58
118
  }
59
119
  export {
60
- j as getEnsText
120
+ st as publicActions
61
121
  };
@@ -1,171 +1,64 @@
1
- import { toRpc as W } from "./index296.js";
2
- import { parseAccount as I } from "./index86.js";
3
- import { multicall3Abi as O } from "./index151.js";
4
- import { aggregate3Signature as J } from "./index297.js";
5
- import { deploylessCallViaBytecodeBytecode as K, deploylessCallViaFactoryBytecode as Q, multicall3Bytecode as U } from "./index153.js";
6
- import { BaseError as N } from "./index160.js";
7
- import { ClientChainNotConfiguredError as P, ChainDoesNotSupportContract as X } from "./index164.js";
8
- import { CounterfactualDeploymentFailedError as Y, RawContractError as Z } from "./index165.js";
9
- import { decodeFunctionResult as tt } from "./index199.js";
10
- import { encodeDeployData as T } from "./index204.js";
11
- import { encodeFunctionData as at } from "./index208.js";
12
- import { getChainContractAddress as et } from "./index229.js";
13
- import { numberToHex as V } from "./index192.js";
14
- import { getCallError as rt } from "./index298.js";
15
- import { extract as ot } from "./index299.js";
16
- import { formatTransactionRequest as ct } from "./index240.js";
17
- import { createBatchScheduler as nt } from "./index149.js";
18
- import { serializeStateOverride as st } from "./index300.js";
19
- import { assertRequest as it } from "./index257.js";
20
- import { parseAbi as z } from "./index277.js";
21
- async function Ot(t, a) {
22
- const { account: e = t.account, authorizationList: c, batch: n = !!t.batch?.multicall, blockNumber: s, blockTag: C = t.experimental_blockTag ?? "latest", accessList: x, blobs: D, blockOverrides: p, code: b, data: r, factory: d, factoryData: i, gas: B, gasPrice: h, maxFeePerBlobGas: y, maxFeePerGas: f, maxPriorityFeePerGas: g, nonce: k, to: m, value: L, stateOverride: j, ...G } = a, R = e ? I(e) : void 0;
23
- if (b && (d || i))
24
- throw new N("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
25
- if (b && m)
26
- throw new N("Cannot provide both `code` & `to` as parameters.");
27
- const S = b && r, A = d && i && m && r, _ = S || A, M = S ? H({
28
- code: b,
29
- data: r
30
- }) : A ? dt({
31
- data: r,
32
- factory: d,
33
- factoryData: i,
34
- to: m
35
- }) : r;
36
- try {
37
- it(a);
38
- const w = (typeof s == "bigint" ? V(s) : void 0) || C, l = p ? W(p) : void 0, u = st(j), q = t.chain?.formatters?.transactionRequest?.format, v = (q || ct)({
39
- // Pick out extra data that might exist on the chain's transaction request type.
40
- ...ot(G, { format: q }),
41
- accessList: x,
42
- account: R,
43
- authorizationList: c,
44
- blobs: D,
45
- data: M,
46
- gas: B,
47
- gasPrice: h,
48
- maxFeePerBlobGas: y,
49
- maxFeePerGas: f,
50
- maxPriorityFeePerGas: g,
51
- nonce: k,
52
- to: _ ? void 0 : m,
53
- value: L
54
- }, "call");
55
- if (n && lt({ request: v }) && !u && !l)
56
- try {
57
- return await ut(t, {
58
- ...v,
59
- blockNumber: s,
60
- blockTag: C
61
- });
62
- } catch (o) {
63
- if (!(o instanceof P) && !(o instanceof X))
64
- throw o;
65
- }
66
- const $ = (() => {
67
- const o = [
68
- v,
69
- w
70
- ];
71
- return u && l ? [...o, u, l] : u ? [...o, u] : l ? [...o, {}, l] : o;
72
- })(), E = await t.request({
73
- method: "eth_call",
74
- params: $
1
+ import { addressResolverAbi as u, universalResolverResolveAbi as R } from "./index156.js";
2
+ import { decodeFunctionResult as g } from "./index204.js";
3
+ import { encodeFunctionData as b } from "./index213.js";
4
+ import { getChainContractAddress as w } from "./index234.js";
5
+ import { trim as y } from "./index194.js";
6
+ import { toHex as C } from "./index197.js";
7
+ import { isNullUniversalResolverError as x } from "./index294.js";
8
+ import { localBatchGatewayUrl as N } from "./index232.js";
9
+ import { namehash as m } from "./index239.js";
10
+ import { packetToBytes as T } from "./index295.js";
11
+ import { getAction as U } from "./index289.js";
12
+ import { readContract as k } from "./index132.js";
13
+ async function K(s, e) {
14
+ const { blockNumber: i, blockTag: f, coinType: a, name: t, gatewayUrls: v, strict: p } = e, { chain: o } = s, h = (() => {
15
+ if (e.universalResolverAddress)
16
+ return e.universalResolverAddress;
17
+ if (!o)
18
+ throw new Error("client chain not configured. universalResolverAddress is required.");
19
+ return w({
20
+ blockNumber: i,
21
+ chain: o,
22
+ contract: "ensUniversalResolver"
75
23
  });
76
- return E === "0x" ? { data: void 0 } : { data: E };
77
- } catch (F) {
78
- const w = ft(F), { offchainLookup: l, offchainLookupSignature: u } = await import("./index225.js");
79
- if (t.ccipRead !== !1 && w?.slice(0, 10) === u && m)
80
- return { data: await l(t, { data: w, to: m }) };
81
- throw _ && w?.slice(0, 10) === "0x101bb98d" ? new Y({ factory: d }) : rt(F, {
82
- ...a,
83
- account: R,
84
- chain: t.chain
24
+ })(), c = o?.ensTlds;
25
+ if (c && !c.some((r) => t.endsWith(r)))
26
+ return null;
27
+ const l = a != null ? [m(t), BigInt(a)] : [m(t)];
28
+ try {
29
+ const r = b({
30
+ abi: u,
31
+ functionName: "addr",
32
+ args: l
33
+ }), A = {
34
+ address: h,
35
+ abi: R,
36
+ functionName: "resolveWithGateways",
37
+ args: [
38
+ C(T(t)),
39
+ r,
40
+ v ?? [N]
41
+ ],
42
+ blockNumber: i,
43
+ blockTag: f
44
+ }, d = await U(s, k, "readContract")(A);
45
+ if (d[0] === "0x")
46
+ return null;
47
+ const n = g({
48
+ abi: u,
49
+ args: l,
50
+ functionName: "addr",
51
+ data: d[0]
85
52
  });
86
- }
87
- }
88
- function lt({ request: t }) {
89
- const { data: a, to: e, ...c } = t;
90
- return !(!a || a.startsWith(J) || !e || Object.values(c).filter((n) => typeof n < "u").length > 0);
91
- }
92
- async function ut(t, a) {
93
- const { batchSize: e = 1024, deployless: c = !1, wait: n = 0 } = typeof t.batch?.multicall == "object" ? t.batch.multicall : {}, { blockNumber: s, blockTag: C = t.experimental_blockTag ?? "latest", data: x, to: D } = a, p = (() => {
94
- if (c)
53
+ return n === "0x" || y(n) === "0x00" ? null : n;
54
+ } catch (r) {
55
+ if (p)
56
+ throw r;
57
+ if (x(r))
95
58
  return null;
96
- if (a.multicallAddress)
97
- return a.multicallAddress;
98
- if (t.chain)
99
- return et({
100
- blockNumber: s,
101
- chain: t.chain,
102
- contract: "multicall3"
103
- });
104
- throw new P();
105
- })(), r = (typeof s == "bigint" ? V(s) : void 0) || C, { schedule: d } = nt({
106
- id: `${t.uid}.${r}`,
107
- wait: n,
108
- shouldSplitBatch(h) {
109
- return h.reduce((f, { data: g }) => f + (g.length - 2), 0) > e * 2;
110
- },
111
- fn: async (h) => {
112
- const y = h.map((k) => ({
113
- allowFailure: !0,
114
- callData: k.data,
115
- target: k.to
116
- })), f = at({
117
- abi: O,
118
- args: [y],
119
- functionName: "aggregate3"
120
- }), g = await t.request({
121
- method: "eth_call",
122
- params: [
123
- {
124
- ...p === null ? {
125
- data: H({
126
- code: U,
127
- data: f
128
- })
129
- } : { to: p, data: f }
130
- },
131
- r
132
- ]
133
- });
134
- return tt({
135
- abi: O,
136
- args: [y],
137
- functionName: "aggregate3",
138
- data: g || "0x"
139
- });
140
- }
141
- }), [{ returnData: i, success: B }] = await d({ data: x, to: D });
142
- if (!B)
143
- throw new Z({ data: i });
144
- return i === "0x" ? { data: void 0 } : { data: i };
145
- }
146
- function H(t) {
147
- const { code: a, data: e } = t;
148
- return T({
149
- abi: z(["constructor(bytes, bytes)"]),
150
- bytecode: K,
151
- args: [a, e]
152
- });
153
- }
154
- function dt(t) {
155
- const { data: a, factory: e, factoryData: c, to: n } = t;
156
- return T({
157
- abi: z(["constructor(address, bytes, address, bytes)"]),
158
- bytecode: Q,
159
- args: [n, a, e, c]
160
- });
161
- }
162
- function ft(t) {
163
- if (!(t instanceof N))
164
- return;
165
- const a = t.walk();
166
- return typeof a?.data == "object" ? a.data?.data : a.data;
59
+ throw r;
60
+ }
167
61
  }
168
62
  export {
169
- Ot as call,
170
- ft as getRevertErrorData
63
+ K as getEnsAddress
171
64
  };
@@ -1,42 +1,27 @@
1
- import { parseAccount as L } from "./index86.js";
2
- import { numberToHex as P } from "./index192.js";
3
- import { getCallError as y } from "./index298.js";
4
- import { extract as A } from "./index299.js";
5
- import { formatTransactionRequest as F } from "./index240.js";
6
- import { assertRequest as G } from "./index257.js";
7
- async function _(t, e) {
8
- const { account: o = t.account, blockNumber: r, blockTag: m = "latest", blobs: i, data: u, gas: f, gasPrice: b, maxFeePerBlobGas: p, maxFeePerGas: d, maxPriorityFeePerGas: h, to: l, value: x, ...g } = e, s = o ? L(o) : void 0;
1
+ import { parseAvatarRecord as m } from "./index296.js";
2
+ import { getAction as u } from "./index289.js";
3
+ import { getEnsText as f } from "./index98.js";
4
+ async function y(t, { blockNumber: a, blockTag: e, assetGatewayUrls: n, name: o, gatewayUrls: c, strict: i, universalResolverAddress: s }) {
5
+ const r = await u(t, f, "getEnsText")({
6
+ blockNumber: a,
7
+ blockTag: e,
8
+ key: "avatar",
9
+ name: o,
10
+ universalResolverAddress: s,
11
+ gatewayUrls: c,
12
+ strict: i
13
+ });
14
+ if (!r)
15
+ return null;
9
16
  try {
10
- G(e);
11
- const k = (typeof r == "bigint" ? P(r) : void 0) || m, c = t.chain?.formatters?.transactionRequest?.format, q = (c || F)({
12
- // Pick out extra data that might exist on the chain's transaction request type.
13
- ...A(g, { format: c }),
14
- account: s,
15
- blobs: i,
16
- data: u,
17
- gas: f,
18
- gasPrice: b,
19
- maxFeePerBlobGas: p,
20
- maxFeePerGas: d,
21
- maxPriorityFeePerGas: h,
22
- to: l,
23
- value: x
24
- }, "createAccessList"), n = await t.request({
25
- method: "eth_createAccessList",
26
- params: [q, k]
27
- });
28
- return {
29
- accessList: n.accessList,
30
- gasUsed: BigInt(n.gasUsed)
31
- };
32
- } catch (a) {
33
- throw y(a, {
34
- ...e,
35
- account: s,
36
- chain: t.chain
17
+ return await m(t, {
18
+ record: r,
19
+ gatewayUrls: n
37
20
  });
21
+ } catch {
22
+ return null;
38
23
  }
39
24
  }
40
25
  export {
41
- _ as createAccessList
26
+ y as getEnsAvatar
42
27
  };
@@ -1,12 +1,39 @@
1
- import { createFilterRequestScope as r } from "./index289.js";
2
- async function i(e) {
3
- const o = r(e, {
4
- method: "eth_newBlockFilter"
5
- }), t = await e.request({
6
- method: "eth_newBlockFilter"
7
- });
8
- return { id: t, request: o(t), type: "block" };
1
+ import { universalResolverReverseAbi as m } from "./index156.js";
2
+ import { getChainContractAddress as f } from "./index234.js";
3
+ import { isNullUniversalResolverError as h } from "./index294.js";
4
+ import { localBatchGatewayUrl as w } from "./index232.js";
5
+ import { getAction as A } from "./index289.js";
6
+ import { readContract as R } from "./index132.js";
7
+ async function U(t, e) {
8
+ const { address: n, blockNumber: o, blockTag: a, coinType: i = 60n, gatewayUrls: c, strict: l } = e, { chain: s } = t, d = (() => {
9
+ if (e.universalResolverAddress)
10
+ return e.universalResolverAddress;
11
+ if (!s)
12
+ throw new Error("client chain not configured. universalResolverAddress is required.");
13
+ return f({
14
+ blockNumber: o,
15
+ chain: s,
16
+ contract: "ensUniversalResolver"
17
+ });
18
+ })();
19
+ try {
20
+ const r = {
21
+ address: d,
22
+ abi: m,
23
+ args: [n, i, c ?? [w]],
24
+ functionName: "reverseWithGateways",
25
+ blockNumber: o,
26
+ blockTag: a
27
+ }, u = A(t, R, "readContract"), [v] = await u(r);
28
+ return v || null;
29
+ } catch (r) {
30
+ if (l)
31
+ throw r;
32
+ if (h(r))
33
+ return null;
34
+ throw r;
35
+ }
9
36
  }
10
37
  export {
11
- i as createBlockFilter
38
+ U as getEnsName
12
39
  };
@@ -1,34 +1,44 @@
1
- import { encodeEventTopics as l } from "./index206.js";
2
- import { numberToHex as s } from "./index192.js";
3
- import { createFilterRequestScope as u } from "./index289.js";
4
- async function h(r, a) {
5
- const { address: m, abi: n, args: i, eventName: e, fromBlock: t, strict: p, toBlock: o } = a, f = u(r, {
6
- method: "eth_newFilter"
7
- }), d = e ? l({
8
- abi: n,
9
- args: i,
10
- eventName: e
11
- }) : void 0, c = await r.request({
12
- method: "eth_newFilter",
13
- params: [
1
+ import { getChainContractAddress as l } from "./index234.js";
2
+ import { toHex as u } from "./index197.js";
3
+ import { packetToBytes as v } from "./index295.js";
4
+ import { getAction as f } from "./index289.js";
5
+ import { readContract as m } from "./index132.js";
6
+ async function A(o, r) {
7
+ const { blockNumber: n, blockTag: i, name: t } = r, { chain: e } = o, a = (() => {
8
+ if (r.universalResolverAddress)
9
+ return r.universalResolverAddress;
10
+ if (!e)
11
+ throw new Error("client chain not configured. universalResolverAddress is required.");
12
+ return l({
13
+ blockNumber: n,
14
+ chain: e,
15
+ contract: "ensUniversalResolver"
16
+ });
17
+ })(), s = e?.ensTlds;
18
+ if (s && !s.some((c) => t.endsWith(c)))
19
+ throw new Error(`${t} is not a valid ENS TLD (${s?.join(", ")}) for chain "${e.name}" (id: ${e.id}).`);
20
+ const [d] = await f(o, m, "readContract")({
21
+ address: a,
22
+ abi: [
14
23
  {
15
- address: m,
16
- fromBlock: typeof t == "bigint" ? s(t) : t,
17
- toBlock: typeof o == "bigint" ? s(o) : o,
18
- topics: d
24
+ inputs: [{ type: "bytes" }],
25
+ name: "findResolver",
26
+ outputs: [
27
+ { type: "address" },
28
+ { type: "bytes32" },
29
+ { type: "uint256" }
30
+ ],
31
+ stateMutability: "view",
32
+ type: "function"
19
33
  }
20
- ]
34
+ ],
35
+ functionName: "findResolver",
36
+ args: [u(v(t))],
37
+ blockNumber: n,
38
+ blockTag: i
21
39
  });
22
- return {
23
- abi: n,
24
- args: i,
25
- eventName: e,
26
- id: c,
27
- request: f(c),
28
- strict: !!p,
29
- type: "event"
30
- };
40
+ return d;
31
41
  }
32
42
  export {
33
- h as createContractEventFilter
43
+ A as getEnsResolver
34
44
  };