@coinbase/cdp-hooks 0.0.95 → 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 (293) hide show
  1. package/dist/esm/index100.js +35 -42
  2. package/dist/esm/index101.js +9 -88
  3. package/dist/esm/index102.js +31 -40
  4. package/dist/esm/index103.js +35 -7
  5. package/dist/esm/index104.js +7 -4
  6. package/dist/esm/index105.js +29 -16
  7. package/dist/esm/index106.js +46 -8
  8. package/dist/esm/index107.js +69 -13
  9. package/dist/esm/index108.js +40 -7
  10. package/dist/esm/index109.js +75 -9
  11. package/dist/esm/index110.js +30 -15
  12. package/dist/esm/index111.js +6 -46
  13. package/dist/esm/index112.js +16 -13
  14. package/dist/esm/index113.js +8 -16
  15. package/dist/esm/index114.js +13 -13
  16. package/dist/esm/index115.js +6 -5
  17. package/dist/esm/index116.js +9 -35
  18. package/dist/esm/index117.js +15 -8
  19. package/dist/esm/index118.js +11 -7
  20. package/dist/esm/index119.js +45 -24
  21. package/dist/esm/index120.js +13 -10
  22. package/dist/esm/index121.js +15 -13
  23. package/dist/esm/index122.js +13 -11
  24. package/dist/esm/index123.js +6 -116
  25. package/dist/esm/index124.js +34 -32
  26. package/dist/esm/index125.js +9 -79
  27. package/dist/esm/index126.js +8 -177
  28. package/dist/esm/index127.js +27 -43
  29. package/dist/esm/index128.js +10 -6
  30. package/dist/esm/index129.js +13 -12
  31. package/dist/esm/index130.js +11 -13
  32. package/dist/esm/index131.js +118 -97
  33. package/dist/esm/index132.js +32 -71
  34. package/dist/esm/index133.js +77 -84
  35. package/dist/esm/index134.js +174 -145
  36. package/dist/esm/index135.js +43 -135
  37. package/dist/esm/index136.js +6 -68
  38. package/dist/esm/index137.js +152 -21
  39. package/dist/esm/index138.js +14 -105
  40. package/dist/esm/index139.js +14 -6
  41. package/dist/esm/index140.js +98 -130
  42. package/dist/esm/index141.js +72 -275
  43. package/dist/esm/index142.js +88 -3
  44. package/dist/esm/index143.js +149 -4
  45. package/dist/esm/index144.js +137 -9
  46. package/dist/esm/index145.js +69 -2
  47. package/dist/esm/index146.js +24 -2
  48. package/dist/esm/index147.js +159 -3
  49. package/dist/esm/index148.js +6 -326
  50. package/dist/esm/index149.js +11 -13
  51. package/dist/esm/index150.js +19 -4
  52. package/dist/esm/index151.js +134 -54
  53. package/dist/esm/index152.js +79 -2
  54. package/dist/esm/index153.js +8 -6
  55. package/dist/esm/index154.js +26 -212
  56. package/dist/esm/index155.js +89 -31
  57. package/dist/esm/index156.js +351 -22
  58. package/dist/esm/index157.js +3 -6
  59. package/dist/esm/index158.js +5 -74
  60. package/dist/esm/index159.js +2 -6
  61. package/dist/esm/index160.js +3 -6
  62. package/dist/esm/index161.js +9 -36
  63. package/dist/esm/index162.js +303 -52
  64. package/dist/esm/index163.js +14 -3
  65. package/dist/esm/index164.js +4 -23
  66. package/dist/esm/index165.js +40 -436
  67. package/dist/esm/index166.js +8 -26
  68. package/dist/esm/index167.js +2 -27
  69. package/dist/esm/index168.js +6 -32
  70. package/dist/esm/index169.js +28 -32
  71. package/dist/esm/index170.js +196 -175
  72. package/dist/esm/index171.js +32 -9
  73. package/dist/esm/index172.js +22 -2
  74. package/dist/esm/index173.js +5 -12
  75. package/dist/esm/index174.js +68 -13
  76. package/dist/esm/index175.js +5 -27
  77. package/dist/esm/index176.js +5 -8
  78. package/dist/esm/index177.js +31 -51
  79. package/dist/esm/index178.js +116 -42
  80. package/dist/esm/index179.js +3 -9
  81. package/dist/esm/index180.js +18 -7
  82. package/dist/esm/index181.js +25 -15
  83. package/dist/esm/index182.js +31 -16
  84. package/dist/esm/index183.js +34 -24
  85. package/dist/esm/index184.js +23 -16
  86. package/dist/esm/index185.js +8 -54
  87. package/dist/esm/index186.js +193 -11
  88. package/dist/esm/index187.js +2 -161
  89. package/dist/esm/index188.js +467 -21
  90. package/dist/esm/index189.js +26 -126
  91. package/dist/esm/index190.js +153 -31
  92. package/dist/esm/index191.js +21 -6
  93. package/dist/esm/index192.js +127 -27
  94. package/dist/esm/index193.js +31 -184
  95. package/dist/esm/index194.js +7 -4
  96. package/dist/esm/index195.js +26 -63
  97. package/dist/esm/index196.js +56 -3
  98. package/dist/esm/index197.js +42 -17
  99. package/dist/esm/index198.js +188 -13
  100. package/dist/esm/index199.js +4 -24
  101. package/dist/esm/index2.js +2 -2
  102. package/dist/esm/index200.js +73 -11
  103. package/dist/esm/index201.js +17 -31
  104. package/dist/esm/index202.js +3 -3
  105. package/dist/esm/index203.js +15 -17
  106. package/dist/esm/index204.js +22 -26
  107. package/dist/esm/index205.js +11 -35
  108. package/dist/esm/index206.js +18 -7
  109. package/dist/esm/index207.js +32 -23
  110. package/dist/esm/index208.js +3 -29
  111. package/dist/esm/index209.js +18 -64
  112. package/dist/esm/index210.js +27 -9
  113. package/dist/esm/index211.js +34 -32
  114. package/dist/esm/index212.js +8 -27
  115. package/dist/esm/index213.js +7 -24
  116. package/dist/esm/index214.js +25 -3
  117. package/dist/esm/index215.js +28 -14
  118. package/dist/esm/index216.js +3 -103
  119. package/dist/esm/index217.js +75 -60
  120. package/dist/esm/index218.js +9 -5
  121. package/dist/esm/index219.js +12 -6
  122. package/dist/esm/index220.js +20 -26
  123. package/dist/esm/index221.js +8 -38
  124. package/dist/esm/index222.js +10 -13
  125. package/dist/esm/index223.js +11 -42
  126. package/dist/esm/index224.js +6 -5
  127. package/dist/esm/index225.js +6 -11
  128. package/dist/esm/index226.js +13 -19
  129. package/dist/esm/index227.js +30 -76
  130. package/dist/esm/index228.js +5 -2
  131. package/dist/esm/index229.js +2 -2
  132. package/dist/esm/index230.js +8 -8
  133. package/dist/esm/index231.js +3 -3
  134. package/dist/esm/index232.js +5 -5
  135. package/dist/esm/index233.js +17 -8
  136. package/dist/esm/index234.js +19 -6
  137. package/dist/esm/index235.js +42 -6
  138. package/dist/esm/index236.js +42 -11
  139. package/dist/esm/index237.js +8 -10
  140. package/dist/esm/index238.js +7 -13
  141. package/dist/esm/index239.js +15 -31
  142. package/dist/esm/index240.js +23 -5
  143. package/dist/esm/index241.js +22 -6
  144. package/dist/esm/index242.js +16 -19
  145. package/dist/esm/index243.js +52 -29
  146. package/dist/esm/index244.js +27 -20
  147. package/dist/esm/index245.js +24 -3
  148. package/dist/esm/index246.js +104 -17
  149. package/dist/esm/index247.js +3 -11
  150. package/dist/esm/index248.js +5 -21
  151. package/dist/esm/index249.js +31 -22
  152. package/dist/esm/index250.js +20 -5
  153. package/dist/esm/index251.js +3 -5
  154. package/dist/esm/index252.js +17 -8
  155. package/dist/esm/index253.js +5 -104
  156. package/dist/esm/index254.js +9 -3
  157. package/dist/esm/index255.js +102 -17
  158. package/dist/esm/index256.js +60 -167
  159. package/dist/esm/index257.js +5 -17
  160. package/dist/esm/index258.js +7 -10
  161. package/dist/esm/index259.js +27 -38
  162. package/dist/esm/index260.js +34 -2
  163. package/dist/esm/index261.js +13 -69
  164. package/dist/esm/index262.js +16 -34
  165. package/dist/esm/index263.js +77 -13
  166. package/dist/esm/index264.js +2 -41
  167. package/dist/esm/index265.js +15 -2
  168. package/dist/esm/index266.js +18 -4
  169. package/dist/esm/index267.js +170 -9
  170. package/dist/esm/index268.js +16 -18
  171. package/dist/esm/index269.js +10 -7
  172. package/dist/esm/index270.js +10 -12
  173. package/dist/esm/index271.js +2 -67
  174. package/dist/esm/index272.js +39 -64
  175. package/dist/esm/index273.js +2 -186
  176. package/dist/esm/index274.js +4 -22
  177. package/dist/esm/index275.js +9 -41
  178. package/dist/esm/index276.js +17 -74
  179. package/dist/esm/index277.js +7 -40
  180. package/dist/esm/index278.js +10 -15
  181. package/dist/esm/index279.js +72 -13
  182. package/dist/esm/index280.js +65 -7
  183. package/dist/esm/index281.js +187 -6
  184. package/dist/esm/index282.js +21 -35
  185. package/dist/esm/index283.js +42 -15
  186. package/dist/esm/index284.js +25 -8
  187. package/dist/esm/index285.js +91 -13
  188. package/dist/esm/index286.js +40 -9
  189. package/dist/esm/index287.js +15 -15
  190. package/dist/esm/index288.js +12 -21
  191. package/dist/esm/index289.js +7 -30
  192. package/dist/esm/index290.js +7 -2
  193. package/dist/esm/index291.js +36 -13
  194. package/dist/esm/index292.js +15 -12
  195. package/dist/esm/index293.js +8 -47
  196. package/dist/esm/index294.js +8 -9
  197. package/dist/esm/index295.js +16 -13
  198. package/dist/esm/index296.js +21 -13
  199. package/dist/esm/index297.js +28 -6
  200. package/dist/esm/index298.js +2 -16
  201. package/dist/esm/index299.js +12 -23
  202. package/dist/esm/index3.js +1 -1
  203. package/dist/esm/index300.js +12 -11
  204. package/dist/esm/index301.js +45 -22
  205. package/dist/esm/index302.js +9 -51
  206. package/dist/esm/index303.js +13 -17
  207. package/dist/esm/index304.js +13 -14
  208. package/dist/esm/index305.js +14 -11
  209. package/dist/esm/index306.js +8 -103
  210. package/dist/esm/index307.js +15 -5
  211. package/dist/esm/index308.js +23 -222
  212. package/dist/esm/index309.js +24 -6
  213. package/dist/esm/index310.js +32 -7
  214. package/dist/esm/index311.js +9 -26
  215. package/dist/esm/index312.js +49 -17
  216. package/dist/esm/index313.js +34 -142
  217. package/dist/esm/index314.js +18 -13
  218. package/dist/esm/index315.js +15 -36
  219. package/dist/esm/index316.js +11 -41
  220. package/dist/esm/index317.js +13 -2
  221. package/dist/esm/index318.js +19 -68
  222. package/dist/esm/index319.js +107 -3
  223. package/dist/esm/index320.js +100 -133
  224. package/dist/esm/index321.js +6 -155
  225. package/dist/esm/index322.js +7 -10
  226. package/dist/esm/index323.js +26 -16
  227. package/dist/esm/index324.js +12 -110
  228. package/dist/esm/index325.js +206 -127
  229. package/dist/esm/index326.js +12 -78
  230. package/dist/esm/index327.js +36 -2
  231. package/dist/esm/index328.js +41 -697
  232. package/dist/esm/index329.js +3 -138
  233. package/dist/esm/index330.js +68 -42
  234. package/dist/esm/index331.js +3 -200
  235. package/dist/esm/index332.js +136 -3
  236. package/dist/esm/index333.js +155 -46
  237. package/dist/esm/index334.js +9 -4
  238. package/dist/esm/index335.js +16 -40
  239. package/dist/esm/index336.js +133 -7
  240. package/dist/esm/index337.js +187 -56
  241. package/dist/esm/index338.js +2 -78
  242. package/dist/esm/index339.js +79 -4
  243. package/dist/esm/index340.js +11 -191
  244. package/dist/esm/index341.js +82 -55
  245. package/dist/esm/index342.js +159 -40
  246. package/dist/esm/index343.js +42 -4
  247. package/dist/esm/index344.js +656 -5
  248. package/dist/esm/index345.js +206 -2
  249. package/dist/esm/index346.js +174 -19
  250. package/dist/esm/index347.js +43 -0
  251. package/dist/esm/index348.js +7 -0
  252. package/dist/esm/index349.js +10 -0
  253. package/dist/esm/index350.js +65 -0
  254. package/dist/esm/index351.js +80 -0
  255. package/dist/esm/index352.js +122 -0
  256. package/dist/esm/index353.js +345 -0
  257. package/dist/esm/index354.js +163 -0
  258. package/dist/esm/index355.js +7 -0
  259. package/dist/esm/index356.js +7 -0
  260. package/dist/esm/index357.js +55 -0
  261. package/dist/esm/index358.js +7 -0
  262. package/dist/esm/index359.js +4 -0
  263. package/dist/esm/index360.js +24 -0
  264. package/dist/esm/index71.js +26 -17
  265. package/dist/esm/index73.js +2 -2
  266. package/dist/esm/index74.js +12 -40
  267. package/dist/esm/index75.js +49 -58
  268. package/dist/esm/index76.js +13 -43
  269. package/dist/esm/index77.js +28 -5
  270. package/dist/esm/index78.js +30 -48
  271. package/dist/esm/index79.js +29 -32
  272. package/dist/esm/index80.js +56 -4
  273. package/dist/esm/index81.js +54 -10
  274. package/dist/esm/index82.js +57 -67
  275. package/dist/esm/index83.js +5 -10
  276. package/dist/esm/index84.js +47 -28
  277. package/dist/esm/index85.js +37 -69
  278. package/dist/esm/index86.js +2 -20
  279. package/dist/esm/index87.js +69 -110
  280. package/dist/esm/index88.js +34 -60
  281. package/dist/esm/index89.js +13 -23
  282. package/dist/esm/index90.js +33 -39
  283. package/dist/esm/index91.js +3 -37
  284. package/dist/esm/index92.js +8 -57
  285. package/dist/esm/index93.js +118 -163
  286. package/dist/esm/index94.js +58 -36
  287. package/dist/esm/index95.js +23 -8
  288. package/dist/esm/index96.js +36 -31
  289. package/dist/esm/index97.js +38 -33
  290. package/dist/esm/index98.js +58 -9
  291. package/dist/esm/index99.js +164 -25
  292. package/dist/types/index.d.ts +1 -3
  293. package/package.json +4 -4
@@ -1,24 +1,470 @@
1
- import { InvalidAddressError as c } from "./index173.js";
2
- import { stringToBytes as m } from "./index177.js";
3
- import { keccak256 as p } from "./index179.js";
4
- import { LruMap as u } from "./index248.js";
5
- import { isAddress as $ } from "./index200.js";
6
- const s = /* @__PURE__ */ new u(8192);
7
- function h(t, o) {
8
- if (s.has(`${t}.${o}`))
9
- return s.get(`${t}.${o}`);
10
- const i = t.substring(2).toLowerCase(), n = p(m(i), "bytes"), e = i.split("");
11
- for (let r = 0; r < 40; r += 2)
12
- n[r >> 1] >> 4 >= 8 && e[r] && (e[r] = e[r].toUpperCase()), (n[r >> 1] & 15) >= 8 && e[r + 1] && (e[r + 1] = e[r + 1].toUpperCase());
13
- const f = `0x${e.join("")}`;
14
- return s.set(`${t}.${o}`, f), f;
15
- }
16
- function w(t, o) {
17
- if (!$(t, { strict: !1 }))
18
- throw new c({ address: t });
19
- return h(t, o);
1
+ import { BaseError as S } from "./index165.js";
2
+ import { RpcRequestError as D } from "./index152.js";
3
+ const W = -1;
4
+ class r extends S {
5
+ constructor(e, { code: o, docsPath: C, metaMessages: N, name: U, shortMessage: k }) {
6
+ super(k, {
7
+ cause: e,
8
+ docsPath: C,
9
+ metaMessages: N || e?.metaMessages,
10
+ name: U || "RpcError"
11
+ }), Object.defineProperty(this, "code", {
12
+ enumerable: !0,
13
+ configurable: !0,
14
+ writable: !0,
15
+ value: void 0
16
+ }), this.name = U || e.name, this.code = e instanceof D ? e.code : o ?? W;
17
+ }
18
+ }
19
+ class t extends r {
20
+ constructor(e, o) {
21
+ super(e, o), Object.defineProperty(this, "data", {
22
+ enumerable: !0,
23
+ configurable: !0,
24
+ writable: !0,
25
+ value: void 0
26
+ }), this.data = o.data;
27
+ }
28
+ }
29
+ class s extends r {
30
+ constructor(e) {
31
+ super(e, {
32
+ code: s.code,
33
+ name: "ParseRpcError",
34
+ shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
35
+ });
36
+ }
37
+ }
38
+ Object.defineProperty(s, "code", {
39
+ enumerable: !0,
40
+ configurable: !0,
41
+ writable: !0,
42
+ value: -32700
43
+ });
44
+ class c extends r {
45
+ constructor(e) {
46
+ super(e, {
47
+ code: c.code,
48
+ name: "InvalidRequestRpcError",
49
+ shortMessage: "JSON is not a valid request object."
50
+ });
51
+ }
52
+ }
53
+ Object.defineProperty(c, "code", {
54
+ enumerable: !0,
55
+ configurable: !0,
56
+ writable: !0,
57
+ value: -32600
58
+ });
59
+ class a extends r {
60
+ constructor(e, { method: o } = {}) {
61
+ super(e, {
62
+ code: a.code,
63
+ name: "MethodNotFoundRpcError",
64
+ shortMessage: `The method${o ? ` "${o}"` : ""} does not exist / is not available.`
65
+ });
66
+ }
67
+ }
68
+ Object.defineProperty(a, "code", {
69
+ enumerable: !0,
70
+ configurable: !0,
71
+ writable: !0,
72
+ value: -32601
73
+ });
74
+ class u extends r {
75
+ constructor(e) {
76
+ super(e, {
77
+ code: u.code,
78
+ name: "InvalidParamsRpcError",
79
+ shortMessage: [
80
+ "Invalid parameters were provided to the RPC method.",
81
+ "Double check you have provided the correct parameters."
82
+ ].join(`
83
+ `)
84
+ });
85
+ }
86
+ }
87
+ Object.defineProperty(u, "code", {
88
+ enumerable: !0,
89
+ configurable: !0,
90
+ writable: !0,
91
+ value: -32602
92
+ });
93
+ class n extends r {
94
+ constructor(e) {
95
+ super(e, {
96
+ code: n.code,
97
+ name: "InternalRpcError",
98
+ shortMessage: "An internal error was received."
99
+ });
100
+ }
101
+ }
102
+ Object.defineProperty(n, "code", {
103
+ enumerable: !0,
104
+ configurable: !0,
105
+ writable: !0,
106
+ value: -32603
107
+ });
108
+ class d extends r {
109
+ constructor(e) {
110
+ super(e, {
111
+ code: d.code,
112
+ name: "InvalidInputRpcError",
113
+ shortMessage: [
114
+ "Missing or invalid parameters.",
115
+ "Double check you have provided the correct parameters."
116
+ ].join(`
117
+ `)
118
+ });
119
+ }
120
+ }
121
+ Object.defineProperty(d, "code", {
122
+ enumerable: !0,
123
+ configurable: !0,
124
+ writable: !0,
125
+ value: -32e3
126
+ });
127
+ class l extends r {
128
+ constructor(e) {
129
+ super(e, {
130
+ code: l.code,
131
+ name: "ResourceNotFoundRpcError",
132
+ shortMessage: "Requested resource not found."
133
+ }), Object.defineProperty(this, "name", {
134
+ enumerable: !0,
135
+ configurable: !0,
136
+ writable: !0,
137
+ value: "ResourceNotFoundRpcError"
138
+ });
139
+ }
140
+ }
141
+ Object.defineProperty(l, "code", {
142
+ enumerable: !0,
143
+ configurable: !0,
144
+ writable: !0,
145
+ value: -32001
146
+ });
147
+ class i extends r {
148
+ constructor(e) {
149
+ super(e, {
150
+ code: i.code,
151
+ name: "ResourceUnavailableRpcError",
152
+ shortMessage: "Requested resource not available."
153
+ });
154
+ }
155
+ }
156
+ Object.defineProperty(i, "code", {
157
+ enumerable: !0,
158
+ configurable: !0,
159
+ writable: !0,
160
+ value: -32002
161
+ });
162
+ class b extends r {
163
+ constructor(e) {
164
+ super(e, {
165
+ code: b.code,
166
+ name: "TransactionRejectedRpcError",
167
+ shortMessage: "Transaction creation failed."
168
+ });
169
+ }
170
+ }
171
+ Object.defineProperty(b, "code", {
172
+ enumerable: !0,
173
+ configurable: !0,
174
+ writable: !0,
175
+ value: -32003
176
+ });
177
+ class p extends r {
178
+ constructor(e, { method: o } = {}) {
179
+ super(e, {
180
+ code: p.code,
181
+ name: "MethodNotSupportedRpcError",
182
+ shortMessage: `Method${o ? ` "${o}"` : ""} is not supported.`
183
+ });
184
+ }
185
+ }
186
+ Object.defineProperty(p, "code", {
187
+ enumerable: !0,
188
+ configurable: !0,
189
+ writable: !0,
190
+ value: -32004
191
+ });
192
+ class h extends r {
193
+ constructor(e) {
194
+ super(e, {
195
+ code: h.code,
196
+ name: "LimitExceededRpcError",
197
+ shortMessage: "Request exceeds defined limit."
198
+ });
199
+ }
200
+ }
201
+ Object.defineProperty(h, "code", {
202
+ enumerable: !0,
203
+ configurable: !0,
204
+ writable: !0,
205
+ value: -32005
206
+ });
207
+ class m extends r {
208
+ constructor(e) {
209
+ super(e, {
210
+ code: m.code,
211
+ name: "JsonRpcVersionUnsupportedError",
212
+ shortMessage: "Version of JSON-RPC protocol is not supported."
213
+ });
214
+ }
215
+ }
216
+ Object.defineProperty(m, "code", {
217
+ enumerable: !0,
218
+ configurable: !0,
219
+ writable: !0,
220
+ value: -32006
221
+ });
222
+ class f extends t {
223
+ constructor(e) {
224
+ super(e, {
225
+ code: f.code,
226
+ name: "UserRejectedRequestError",
227
+ shortMessage: "User rejected the request."
228
+ });
229
+ }
230
+ }
231
+ Object.defineProperty(f, "code", {
232
+ enumerable: !0,
233
+ configurable: !0,
234
+ writable: !0,
235
+ value: 4001
236
+ });
237
+ class g extends t {
238
+ constructor(e) {
239
+ super(e, {
240
+ code: g.code,
241
+ name: "UnauthorizedProviderError",
242
+ shortMessage: "The requested method and/or account has not been authorized by the user."
243
+ });
244
+ }
245
+ }
246
+ Object.defineProperty(g, "code", {
247
+ enumerable: !0,
248
+ configurable: !0,
249
+ writable: !0,
250
+ value: 4100
251
+ });
252
+ class v extends t {
253
+ constructor(e, { method: o } = {}) {
254
+ super(e, {
255
+ code: v.code,
256
+ name: "UnsupportedProviderMethodError",
257
+ shortMessage: `The Provider does not support the requested method${o ? ` " ${o}"` : ""}.`
258
+ });
259
+ }
260
+ }
261
+ Object.defineProperty(v, "code", {
262
+ enumerable: !0,
263
+ configurable: !0,
264
+ writable: !0,
265
+ value: 4200
266
+ });
267
+ class w extends t {
268
+ constructor(e) {
269
+ super(e, {
270
+ code: w.code,
271
+ name: "ProviderDisconnectedError",
272
+ shortMessage: "The Provider is disconnected from all chains."
273
+ });
274
+ }
275
+ }
276
+ Object.defineProperty(w, "code", {
277
+ enumerable: !0,
278
+ configurable: !0,
279
+ writable: !0,
280
+ value: 4900
281
+ });
282
+ class P extends t {
283
+ constructor(e) {
284
+ super(e, {
285
+ code: P.code,
286
+ name: "ChainDisconnectedError",
287
+ shortMessage: "The Provider is not connected to the requested chain."
288
+ });
289
+ }
290
+ }
291
+ Object.defineProperty(P, "code", {
292
+ enumerable: !0,
293
+ configurable: !0,
294
+ writable: !0,
295
+ value: 4901
296
+ });
297
+ class y extends t {
298
+ constructor(e) {
299
+ super(e, {
300
+ code: y.code,
301
+ name: "SwitchChainError",
302
+ shortMessage: "An error occurred when attempting to switch chain."
303
+ });
304
+ }
305
+ }
306
+ Object.defineProperty(y, "code", {
307
+ enumerable: !0,
308
+ configurable: !0,
309
+ writable: !0,
310
+ value: 4902
311
+ });
312
+ class j extends t {
313
+ constructor(e) {
314
+ super(e, {
315
+ code: j.code,
316
+ name: "UnsupportedNonOptionalCapabilityError",
317
+ shortMessage: "This Wallet does not support a capability that was not marked as optional."
318
+ });
319
+ }
320
+ }
321
+ Object.defineProperty(j, "code", {
322
+ enumerable: !0,
323
+ configurable: !0,
324
+ writable: !0,
325
+ value: 5700
326
+ });
327
+ class E extends t {
328
+ constructor(e) {
329
+ super(e, {
330
+ code: E.code,
331
+ name: "UnsupportedChainIdError",
332
+ shortMessage: "This Wallet does not support the requested chain ID."
333
+ });
334
+ }
335
+ }
336
+ Object.defineProperty(E, "code", {
337
+ enumerable: !0,
338
+ configurable: !0,
339
+ writable: !0,
340
+ value: 5710
341
+ });
342
+ class x extends t {
343
+ constructor(e) {
344
+ super(e, {
345
+ code: x.code,
346
+ name: "DuplicateIdError",
347
+ shortMessage: "There is already a bundle submitted with this ID."
348
+ });
349
+ }
350
+ }
351
+ Object.defineProperty(x, "code", {
352
+ enumerable: !0,
353
+ configurable: !0,
354
+ writable: !0,
355
+ value: 5720
356
+ });
357
+ class R extends t {
358
+ constructor(e) {
359
+ super(e, {
360
+ code: R.code,
361
+ name: "UnknownBundleIdError",
362
+ shortMessage: "This bundle id is unknown / has not been submitted"
363
+ });
364
+ }
365
+ }
366
+ Object.defineProperty(R, "code", {
367
+ enumerable: !0,
368
+ configurable: !0,
369
+ writable: !0,
370
+ value: 5730
371
+ });
372
+ class M extends t {
373
+ constructor(e) {
374
+ super(e, {
375
+ code: M.code,
376
+ name: "BundleTooLargeError",
377
+ shortMessage: "The call bundle is too large for the Wallet to process."
378
+ });
379
+ }
380
+ }
381
+ Object.defineProperty(M, "code", {
382
+ enumerable: !0,
383
+ configurable: !0,
384
+ writable: !0,
385
+ value: 5740
386
+ });
387
+ class O extends t {
388
+ constructor(e) {
389
+ super(e, {
390
+ code: O.code,
391
+ name: "AtomicReadyWalletRejectedUpgradeError",
392
+ shortMessage: "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."
393
+ });
394
+ }
395
+ }
396
+ Object.defineProperty(O, "code", {
397
+ enumerable: !0,
398
+ configurable: !0,
399
+ writable: !0,
400
+ value: 5750
401
+ });
402
+ class T extends t {
403
+ constructor(e) {
404
+ super(e, {
405
+ code: T.code,
406
+ name: "AtomicityNotSupportedError",
407
+ shortMessage: "The wallet does not support atomic execution but the request requires it."
408
+ });
409
+ }
410
+ }
411
+ Object.defineProperty(T, "code", {
412
+ enumerable: !0,
413
+ configurable: !0,
414
+ writable: !0,
415
+ value: 5760
416
+ });
417
+ class q extends t {
418
+ constructor(e) {
419
+ super(e, {
420
+ code: q.code,
421
+ name: "WalletConnectSessionSettlementError",
422
+ shortMessage: "WalletConnect session settlement failed."
423
+ });
424
+ }
425
+ }
426
+ Object.defineProperty(q, "code", {
427
+ enumerable: !0,
428
+ configurable: !0,
429
+ writable: !0,
430
+ value: 7e3
431
+ });
432
+ class J extends r {
433
+ constructor(e) {
434
+ super(e, {
435
+ name: "UnknownRpcError",
436
+ shortMessage: "An unknown RPC error occurred."
437
+ });
438
+ }
20
439
  }
21
440
  export {
22
- h as checksumAddress,
23
- w as getAddress
441
+ O as AtomicReadyWalletRejectedUpgradeError,
442
+ T as AtomicityNotSupportedError,
443
+ M as BundleTooLargeError,
444
+ P as ChainDisconnectedError,
445
+ x as DuplicateIdError,
446
+ n as InternalRpcError,
447
+ d as InvalidInputRpcError,
448
+ u as InvalidParamsRpcError,
449
+ c as InvalidRequestRpcError,
450
+ m as JsonRpcVersionUnsupportedError,
451
+ h as LimitExceededRpcError,
452
+ a as MethodNotFoundRpcError,
453
+ p as MethodNotSupportedRpcError,
454
+ s as ParseRpcError,
455
+ w as ProviderDisconnectedError,
456
+ t as ProviderRpcError,
457
+ l as ResourceNotFoundRpcError,
458
+ i as ResourceUnavailableRpcError,
459
+ r as RpcError,
460
+ y as SwitchChainError,
461
+ b as TransactionRejectedRpcError,
462
+ g as UnauthorizedProviderError,
463
+ R as UnknownBundleIdError,
464
+ J as UnknownRpcError,
465
+ E as UnsupportedChainIdError,
466
+ j as UnsupportedNonOptionalCapabilityError,
467
+ v as UnsupportedProviderMethodError,
468
+ f as UserRejectedRequestError,
469
+ q as WalletConnectSessionSettlementError
24
470
  };
@@ -1,130 +1,30 @@
1
- import { NegativeOffsetError as o, PositionOutOfBoundsError as e, RecursiveReadLimitExceededError as n } from "./index197.js";
2
- const h = {
3
- bytes: new Uint8Array(),
4
- dataView: new DataView(new ArrayBuffer(0)),
5
- position: 0,
6
- positionReadCount: /* @__PURE__ */ new Map(),
7
- recursiveReadCount: 0,
8
- recursiveReadLimit: Number.POSITIVE_INFINITY,
9
- assertReadLimit() {
10
- if (this.recursiveReadCount >= this.recursiveReadLimit)
11
- throw new n({
12
- count: this.recursiveReadCount + 1,
13
- limit: this.recursiveReadLimit
14
- });
15
- },
16
- assertPosition(t) {
17
- if (t < 0 || t > this.bytes.length - 1)
18
- throw new e({
19
- length: this.bytes.length,
20
- position: t
21
- });
22
- },
23
- decrementPosition(t) {
24
- if (t < 0)
25
- throw new o({ offset: t });
26
- const i = this.position - t;
27
- this.assertPosition(i), this.position = i;
28
- },
29
- getReadCount(t) {
30
- return this.positionReadCount.get(t || this.position) || 0;
31
- },
32
- incrementPosition(t) {
33
- if (t < 0)
34
- throw new o({ offset: t });
35
- const i = this.position + t;
36
- this.assertPosition(i), this.position = i;
37
- },
38
- inspectByte(t) {
39
- const i = t ?? this.position;
40
- return this.assertPosition(i), this.bytes[i];
41
- },
42
- inspectBytes(t, i) {
43
- const s = i ?? this.position;
44
- return this.assertPosition(s + t - 1), this.bytes.subarray(s, s + t);
45
- },
46
- inspectUint8(t) {
47
- const i = t ?? this.position;
48
- return this.assertPosition(i), this.bytes[i];
49
- },
50
- inspectUint16(t) {
51
- const i = t ?? this.position;
52
- return this.assertPosition(i + 1), this.dataView.getUint16(i);
53
- },
54
- inspectUint24(t) {
55
- const i = t ?? this.position;
56
- return this.assertPosition(i + 2), (this.dataView.getUint16(i) << 8) + this.dataView.getUint8(i + 2);
57
- },
58
- inspectUint32(t) {
59
- const i = t ?? this.position;
60
- return this.assertPosition(i + 3), this.dataView.getUint32(i);
61
- },
62
- pushByte(t) {
63
- this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
64
- },
65
- pushBytes(t) {
66
- this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), this.position += t.length;
67
- },
68
- pushUint8(t) {
69
- this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
70
- },
71
- pushUint16(t) {
72
- this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), this.position += 2;
73
- },
74
- pushUint24(t) {
75
- this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, t >> 8), this.dataView.setUint8(this.position + 2, t & 255), this.position += 3;
76
- },
77
- pushUint32(t) {
78
- this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), this.position += 4;
79
- },
80
- readByte() {
81
- this.assertReadLimit(), this._touch();
82
- const t = this.inspectByte();
83
- return this.position++, t;
84
- },
85
- readBytes(t, i) {
86
- this.assertReadLimit(), this._touch();
87
- const s = this.inspectBytes(t);
88
- return this.position += i ?? t, s;
89
- },
90
- readUint8() {
91
- this.assertReadLimit(), this._touch();
92
- const t = this.inspectUint8();
93
- return this.position += 1, t;
94
- },
95
- readUint16() {
96
- this.assertReadLimit(), this._touch();
97
- const t = this.inspectUint16();
98
- return this.position += 2, t;
99
- },
100
- readUint24() {
101
- this.assertReadLimit(), this._touch();
102
- const t = this.inspectUint24();
103
- return this.position += 3, t;
104
- },
105
- readUint32() {
106
- this.assertReadLimit(), this._touch();
107
- const t = this.inspectUint32();
108
- return this.position += 4, t;
109
- },
110
- get remaining() {
111
- return this.bytes.length - this.position;
112
- },
113
- setPosition(t) {
114
- const i = this.position;
115
- return this.assertPosition(t), this.position = t, () => this.position = i;
116
- },
117
- _touch() {
118
- if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
119
- return;
120
- const t = this.getReadCount();
121
- this.positionReadCount.set(this.position, t + 1), t > 0 && this.recursiveReadCount++;
1
+ import { stringify as a } from "./index187.js";
2
+ import { BaseError as t } from "./index165.js";
3
+ class n extends t {
4
+ constructor({ domain: r }) {
5
+ super(`Invalid domain "${a(r)}".`, {
6
+ metaMessages: ["Must be a valid EIP-712 domain."]
7
+ });
8
+ }
9
+ }
10
+ class p extends t {
11
+ constructor({ primaryType: r, types: s }) {
12
+ super(`Invalid primary type \`${r}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`, {
13
+ docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
14
+ metaMessages: ["Check that the primary type is a key in `types`."]
15
+ });
16
+ }
17
+ }
18
+ class y extends t {
19
+ constructor({ type: r }) {
20
+ super(`Struct type "${r}" is invalid.`, {
21
+ metaMessages: ["Struct type must not be a Solidity type."],
22
+ name: "InvalidStructTypeError"
23
+ });
122
24
  }
123
- };
124
- function a(t, { recursiveReadLimit: i = 8192 } = {}) {
125
- const s = Object.create(h);
126
- return s.bytes = t, s.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength), s.positionReadCount = /* @__PURE__ */ new Map(), s.recursiveReadLimit = i, s;
127
25
  }
128
26
  export {
129
- a as createCursor
27
+ n as InvalidDomainError,
28
+ p as InvalidPrimaryTypeError,
29
+ y as InvalidStructTypeError
130
30
  };