@coinbase/cdp-core 0.0.82 → 0.0.83

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 (276) hide show
  1. package/dist/esm/index.native116.js +1 -1
  2. package/dist/esm/index.native117.js +1 -1
  3. package/dist/esm/index.native125.js +6 -6
  4. package/dist/esm/index.native159.js +1 -1
  5. package/dist/esm/index.native160.js +32 -6
  6. package/dist/esm/index.native161.js +6 -32
  7. package/dist/esm/index.native163.js +77 -19
  8. package/dist/esm/index.native164.js +21 -10
  9. package/dist/esm/index.native165.js +9 -19
  10. package/dist/esm/index.native166.js +15 -89
  11. package/dist/esm/index.native167.js +92 -19
  12. package/dist/esm/index.native168.js +18 -115
  13. package/dist/esm/index.native169.js +112 -73
  14. package/dist/esm/index.native22.js +6 -6
  15. package/dist/esm/index.native69.js +3 -3
  16. package/dist/esm/index.native72.js +1 -1
  17. package/dist/esm/index.native73.js +1 -1
  18. package/dist/esm/index.native78.js +377 -2
  19. package/dist/esm/index.native79.js +29 -2
  20. package/dist/esm/index.native80.js +26 -374
  21. package/dist/esm/index.native81.js +2 -29
  22. package/dist/esm/index.native82.js +2 -29
  23. package/dist/esm/index.native9.js +1 -1
  24. package/dist/esm/index.web100.js +127 -6
  25. package/dist/esm/index.web101.js +21 -40
  26. package/dist/esm/index.web102.js +10 -53
  27. package/dist/esm/index.web103.js +102 -125
  28. package/dist/esm/index.web104.js +6 -23
  29. package/dist/esm/index.web105.js +3 -13
  30. package/dist/esm/index.web106.js +14 -104
  31. package/dist/esm/index.web107.js +34 -6
  32. package/dist/esm/index.web108.js +79 -3
  33. package/dist/esm/index.web109.js +2 -15
  34. package/dist/esm/index.web110.js +2 -35
  35. package/dist/esm/index.web111.js +11 -77
  36. package/dist/esm/index.web112.js +38 -2
  37. package/dist/esm/index.web113.js +7 -2
  38. package/dist/esm/index.web114.js +32 -10
  39. package/dist/esm/index.web115.js +8 -37
  40. package/dist/esm/index.web116.js +9 -5
  41. package/dist/esm/index.web117.js +11 -34
  42. package/dist/esm/index.web118.js +13 -8
  43. package/dist/esm/index.web119.js +17 -9
  44. package/dist/esm/index.web120.js +5 -11
  45. package/dist/esm/index.web121.js +5 -14
  46. package/dist/esm/index.web122.js +10 -18
  47. package/dist/esm/index.web123.js +2 -8
  48. package/dist/esm/index.web124.js +66 -5
  49. package/dist/esm/index.web125.js +364 -10
  50. package/dist/esm/index.web126.js +6 -6
  51. package/dist/esm/index.web131.js +2 -5
  52. package/dist/esm/index.web132.js +4 -18
  53. package/dist/esm/index.web133.js +18 -7
  54. package/dist/esm/index.web134.js +7 -3
  55. package/dist/esm/index.web135.js +3 -19
  56. package/dist/esm/index.web136.js +19 -8
  57. package/dist/esm/index.web137.js +8 -7
  58. package/dist/esm/index.web138.js +7 -71
  59. package/dist/esm/index.web139.js +70 -17
  60. package/dist/esm/index.web140.js +18 -3
  61. package/dist/esm/index.web141.js +3 -4
  62. package/dist/esm/index.web142.js +4 -4
  63. package/dist/esm/index.web143.js +4 -4
  64. package/dist/esm/index.web144.js +4 -19
  65. package/dist/esm/index.web145.js +15 -48
  66. package/dist/esm/index.web146.js +52 -17
  67. package/dist/esm/index.web147.js +17 -23
  68. package/dist/esm/index.web148.js +23 -8
  69. package/dist/esm/index.web149.js +8 -33
  70. package/dist/esm/index.web150.js +33 -7
  71. package/dist/esm/index.web151.js +7 -20
  72. package/dist/esm/index.web152.js +20 -4
  73. package/dist/esm/index.web153.js +21 -5
  74. package/dist/esm/index.web154.js +5 -48
  75. package/dist/esm/index.web155.js +48 -2
  76. package/dist/esm/index.web156.js +17 -18
  77. package/dist/esm/index.web157.js +80 -20
  78. package/dist/esm/index.web158.js +103 -79
  79. package/dist/esm/index.web159.js +6 -103
  80. package/dist/esm/index.web160.js +6 -6
  81. package/dist/esm/index.web161.js +4 -6
  82. package/dist/esm/index.web162.js +19 -77
  83. package/dist/esm/index.web163.js +10 -21
  84. package/dist/esm/index.web164.js +19 -9
  85. package/dist/esm/index.web165.js +89 -15
  86. package/dist/esm/index.web166.js +19 -92
  87. package/dist/esm/index.web167.js +115 -18
  88. package/dist/esm/index.web168.js +73 -112
  89. package/dist/esm/index.web169.js +4 -2
  90. package/dist/esm/index.web170.js +46 -108
  91. package/dist/esm/index.web171.js +39 -2
  92. package/dist/esm/index.web172.js +2 -4
  93. package/dist/esm/index.web173.js +67 -36
  94. package/dist/esm/index.web174.js +35 -2
  95. package/dist/esm/index.web175.js +20 -69
  96. package/dist/esm/index.web176.js +7 -34
  97. package/dist/esm/index.web177.js +2 -21
  98. package/dist/esm/index.web178.js +377 -7
  99. package/dist/esm/index.web179.js +836 -2
  100. package/dist/esm/index.web180.js +5 -378
  101. package/dist/esm/index.web181.js +105 -832
  102. package/dist/esm/index.web182.js +2 -47
  103. package/dist/esm/index.web183.js +2 -5
  104. package/dist/esm/index.web192.js +15 -2
  105. package/dist/esm/index.web193.js +2 -2
  106. package/dist/esm/index.web194.js +2 -2
  107. package/dist/esm/index.web195.js +2 -15
  108. package/dist/esm/index.web2.js +2 -2
  109. package/dist/esm/index.web21.js +6 -6
  110. package/dist/esm/index.web3.js +1 -1
  111. package/dist/esm/index.web60.js +12 -12
  112. package/dist/esm/index.web67.js +2 -2
  113. package/dist/esm/index.web74.js +1 -1
  114. package/dist/esm/index.web75.js +1 -1
  115. package/dist/esm/index.web79.js +3 -3
  116. package/dist/esm/index.web8.js +1 -1
  117. package/dist/esm/index.web80.js +12 -12
  118. package/dist/esm/index.web81.js +12 -12
  119. package/dist/esm/index.web82.js +4 -2
  120. package/dist/esm/index.web83.js +2 -66
  121. package/dist/esm/index.web84.js +17 -364
  122. package/dist/esm/index.web85.js +46 -2
  123. package/dist/esm/index.web86.js +14 -2
  124. package/dist/esm/index.web87.js +54 -16
  125. package/dist/esm/index.web88.js +6 -45
  126. package/dist/esm/index.web89.js +21 -13
  127. package/dist/esm/index.web90.js +11 -55
  128. package/dist/esm/index.web91.js +3 -6
  129. package/dist/esm/index.web92.js +3 -21
  130. package/dist/esm/index.web93.js +34 -11
  131. package/dist/esm/index.web94.js +12 -3
  132. package/dist/esm/index.web95.js +4 -3
  133. package/dist/esm/index.web96.js +25 -31
  134. package/dist/esm/index.web97.js +6 -12
  135. package/dist/esm/index.web98.js +42 -4
  136. package/dist/esm/index.web99.js +54 -27
  137. package/dist/native/index.native116.js +1 -1
  138. package/dist/native/index.native117.js +1 -1
  139. package/dist/native/index.native125.js +6 -6
  140. package/dist/native/index.native159.js +1 -1
  141. package/dist/native/index.native160.js +32 -6
  142. package/dist/native/index.native161.js +6 -32
  143. package/dist/native/index.native163.js +77 -19
  144. package/dist/native/index.native164.js +21 -10
  145. package/dist/native/index.native165.js +9 -19
  146. package/dist/native/index.native166.js +15 -89
  147. package/dist/native/index.native167.js +92 -19
  148. package/dist/native/index.native168.js +18 -115
  149. package/dist/native/index.native169.js +112 -73
  150. package/dist/native/index.native22.js +6 -6
  151. package/dist/native/index.native69.js +3 -3
  152. package/dist/native/index.native72.js +1 -1
  153. package/dist/native/index.native73.js +1 -1
  154. package/dist/native/index.native78.js +377 -2
  155. package/dist/native/index.native79.js +29 -2
  156. package/dist/native/index.native80.js +26 -374
  157. package/dist/native/index.native81.js +2 -29
  158. package/dist/native/index.native82.js +2 -29
  159. package/dist/native/index.native9.js +1 -1
  160. package/dist/native-types/version.d.ts +1 -1
  161. package/dist/types/version.d.ts +1 -1
  162. package/dist/web/index.web100.js +127 -6
  163. package/dist/web/index.web101.js +21 -40
  164. package/dist/web/index.web102.js +10 -53
  165. package/dist/web/index.web103.js +102 -125
  166. package/dist/web/index.web104.js +6 -23
  167. package/dist/web/index.web105.js +3 -13
  168. package/dist/web/index.web106.js +14 -104
  169. package/dist/web/index.web107.js +34 -6
  170. package/dist/web/index.web108.js +79 -3
  171. package/dist/web/index.web109.js +2 -15
  172. package/dist/web/index.web110.js +2 -35
  173. package/dist/web/index.web111.js +11 -77
  174. package/dist/web/index.web112.js +38 -2
  175. package/dist/web/index.web113.js +7 -2
  176. package/dist/web/index.web114.js +32 -10
  177. package/dist/web/index.web115.js +8 -37
  178. package/dist/web/index.web116.js +9 -5
  179. package/dist/web/index.web117.js +11 -34
  180. package/dist/web/index.web118.js +13 -8
  181. package/dist/web/index.web119.js +17 -9
  182. package/dist/web/index.web120.js +5 -11
  183. package/dist/web/index.web121.js +5 -14
  184. package/dist/web/index.web122.js +10 -18
  185. package/dist/web/index.web123.js +2 -8
  186. package/dist/web/index.web124.js +66 -5
  187. package/dist/web/index.web125.js +364 -10
  188. package/dist/web/index.web126.js +6 -6
  189. package/dist/web/index.web131.js +2 -5
  190. package/dist/web/index.web132.js +4 -18
  191. package/dist/web/index.web133.js +18 -7
  192. package/dist/web/index.web134.js +7 -3
  193. package/dist/web/index.web135.js +3 -19
  194. package/dist/web/index.web136.js +19 -8
  195. package/dist/web/index.web137.js +8 -7
  196. package/dist/web/index.web138.js +7 -71
  197. package/dist/web/index.web139.js +70 -17
  198. package/dist/web/index.web140.js +18 -3
  199. package/dist/web/index.web141.js +3 -4
  200. package/dist/web/index.web142.js +4 -4
  201. package/dist/web/index.web143.js +4 -4
  202. package/dist/web/index.web144.js +4 -19
  203. package/dist/web/index.web145.js +15 -48
  204. package/dist/web/index.web146.js +52 -17
  205. package/dist/web/index.web147.js +17 -23
  206. package/dist/web/index.web148.js +23 -8
  207. package/dist/web/index.web149.js +8 -33
  208. package/dist/web/index.web150.js +33 -7
  209. package/dist/web/index.web151.js +7 -20
  210. package/dist/web/index.web152.js +20 -4
  211. package/dist/web/index.web153.js +21 -5
  212. package/dist/web/index.web154.js +5 -48
  213. package/dist/web/index.web155.js +48 -2
  214. package/dist/web/index.web156.js +17 -18
  215. package/dist/web/index.web157.js +80 -20
  216. package/dist/web/index.web158.js +103 -79
  217. package/dist/web/index.web159.js +6 -103
  218. package/dist/web/index.web160.js +6 -6
  219. package/dist/web/index.web161.js +4 -6
  220. package/dist/web/index.web162.js +19 -77
  221. package/dist/web/index.web163.js +10 -21
  222. package/dist/web/index.web164.js +19 -9
  223. package/dist/web/index.web165.js +89 -15
  224. package/dist/web/index.web166.js +19 -92
  225. package/dist/web/index.web167.js +115 -18
  226. package/dist/web/index.web168.js +73 -112
  227. package/dist/web/index.web169.js +4 -2
  228. package/dist/web/index.web170.js +46 -108
  229. package/dist/web/index.web171.js +39 -2
  230. package/dist/web/index.web172.js +2 -4
  231. package/dist/web/index.web173.js +67 -36
  232. package/dist/web/index.web174.js +35 -2
  233. package/dist/web/index.web175.js +20 -69
  234. package/dist/web/index.web176.js +7 -34
  235. package/dist/web/index.web177.js +2 -21
  236. package/dist/web/index.web178.js +377 -7
  237. package/dist/web/index.web179.js +836 -2
  238. package/dist/web/index.web180.js +5 -378
  239. package/dist/web/index.web181.js +105 -832
  240. package/dist/web/index.web182.js +2 -47
  241. package/dist/web/index.web183.js +2 -5
  242. package/dist/web/index.web192.js +15 -2
  243. package/dist/web/index.web193.js +2 -2
  244. package/dist/web/index.web194.js +2 -2
  245. package/dist/web/index.web195.js +2 -15
  246. package/dist/web/index.web2.js +2 -2
  247. package/dist/web/index.web21.js +6 -6
  248. package/dist/web/index.web3.js +1 -1
  249. package/dist/web/index.web60.js +12 -12
  250. package/dist/web/index.web67.js +2 -2
  251. package/dist/web/index.web74.js +1 -1
  252. package/dist/web/index.web75.js +1 -1
  253. package/dist/web/index.web79.js +3 -3
  254. package/dist/web/index.web8.js +1 -1
  255. package/dist/web/index.web80.js +12 -12
  256. package/dist/web/index.web81.js +12 -12
  257. package/dist/web/index.web82.js +4 -2
  258. package/dist/web/index.web83.js +2 -66
  259. package/dist/web/index.web84.js +17 -364
  260. package/dist/web/index.web85.js +46 -2
  261. package/dist/web/index.web86.js +14 -2
  262. package/dist/web/index.web87.js +54 -16
  263. package/dist/web/index.web88.js +6 -45
  264. package/dist/web/index.web89.js +21 -13
  265. package/dist/web/index.web90.js +11 -55
  266. package/dist/web/index.web91.js +3 -6
  267. package/dist/web/index.web92.js +3 -21
  268. package/dist/web/index.web93.js +34 -11
  269. package/dist/web/index.web94.js +12 -3
  270. package/dist/web/index.web95.js +4 -3
  271. package/dist/web/index.web96.js +25 -31
  272. package/dist/web/index.web97.js +6 -12
  273. package/dist/web/index.web98.js +42 -4
  274. package/dist/web/index.web99.js +54 -27
  275. package/dist/web-types/version.d.ts +1 -1
  276. package/package.json +2 -2
@@ -1,379 +1,31 @@
1
- import "./index.native122.js";
2
- import { BaseError as P } from "./index.native123.js";
3
- import { parse as y, parseError as j, InternalError as g } from "./index.native124.js";
4
- class u extends Error {
5
- constructor(e, t) {
6
- super(t), Object.defineProperty(this, "name", {
7
- enumerable: !0,
8
- configurable: !0,
9
- writable: !0,
10
- value: "ProviderRpcError"
11
- }), Object.defineProperty(this, "code", {
12
- enumerable: !0,
13
- configurable: !0,
14
- writable: !0,
15
- value: void 0
16
- }), Object.defineProperty(this, "details", {
17
- enumerable: !0,
18
- configurable: !0,
19
- writable: !0,
20
- value: void 0
21
- }), this.code = e, this.details = t;
22
- }
23
- }
24
- class n extends u {
25
- constructor({ message: e = "The user rejected the request." } = {}) {
26
- super(4001, e), Object.defineProperty(this, "code", {
27
- enumerable: !0,
28
- configurable: !0,
29
- writable: !0,
30
- value: 4001
31
- }), Object.defineProperty(this, "name", {
32
- enumerable: !0,
33
- configurable: !0,
34
- writable: !0,
35
- value: "Provider.UserRejectedRequestError"
36
- });
37
- }
38
- }
39
- Object.defineProperty(n, "code", {
40
- enumerable: !0,
41
- configurable: !0,
42
- writable: !0,
43
- value: 4001
44
- });
45
- class a extends u {
46
- constructor({ message: e = "The requested method and/or account has not been authorized by the user." } = {}) {
47
- super(4100, e), Object.defineProperty(this, "code", {
48
- enumerable: !0,
49
- configurable: !0,
50
- writable: !0,
51
- value: 4100
52
- }), Object.defineProperty(this, "name", {
53
- enumerable: !0,
54
- configurable: !0,
55
- writable: !0,
56
- value: "Provider.UnauthorizedError"
57
- });
58
- }
59
- }
60
- Object.defineProperty(a, "code", {
61
- enumerable: !0,
62
- configurable: !0,
63
- writable: !0,
64
- value: 4100
65
- });
66
- class i extends u {
67
- constructor({ message: e = "The provider does not support the requested method." } = {}) {
68
- super(4200, e), Object.defineProperty(this, "code", {
69
- enumerable: !0,
70
- configurable: !0,
71
- writable: !0,
72
- value: 4200
73
- }), Object.defineProperty(this, "name", {
74
- enumerable: !0,
75
- configurable: !0,
76
- writable: !0,
77
- value: "Provider.UnsupportedMethodError"
78
- });
79
- }
80
- }
81
- Object.defineProperty(i, "code", {
82
- enumerable: !0,
83
- configurable: !0,
84
- writable: !0,
85
- value: 4200
86
- });
87
- class c extends u {
88
- constructor({ message: e = "The provider is disconnected from all chains." } = {}) {
89
- super(4900, e), Object.defineProperty(this, "code", {
90
- enumerable: !0,
91
- configurable: !0,
92
- writable: !0,
93
- value: 4900
94
- }), Object.defineProperty(this, "name", {
95
- enumerable: !0,
96
- configurable: !0,
97
- writable: !0,
98
- value: "Provider.DisconnectedError"
99
- });
100
- }
101
- }
102
- Object.defineProperty(c, "code", {
103
- enumerable: !0,
104
- configurable: !0,
105
- writable: !0,
106
- value: 4900
107
- });
108
- class l extends u {
109
- constructor({ message: e = "The provider is not connected to the requested chain." } = {}) {
110
- super(4901, e), Object.defineProperty(this, "code", {
111
- enumerable: !0,
112
- configurable: !0,
113
- writable: !0,
114
- value: 4901
115
- }), Object.defineProperty(this, "name", {
116
- enumerable: !0,
117
- configurable: !0,
118
- writable: !0,
119
- value: "Provider.ChainDisconnectedError"
120
- });
121
- }
122
- }
123
- Object.defineProperty(l, "code", {
124
- enumerable: !0,
125
- configurable: !0,
126
- writable: !0,
127
- value: 4901
128
- });
129
- class d extends u {
130
- constructor({ message: e = "An error occurred when attempting to switch chain." } = {}) {
131
- super(4902, e), Object.defineProperty(this, "code", {
132
- enumerable: !0,
133
- configurable: !0,
134
- writable: !0,
135
- value: 4902
136
- }), Object.defineProperty(this, "name", {
137
- enumerable: !0,
138
- configurable: !0,
139
- writable: !0,
140
- value: "Provider.SwitchChainError"
141
- });
142
- }
143
- }
144
- Object.defineProperty(d, "code", {
145
- enumerable: !0,
146
- configurable: !0,
147
- writable: !0,
148
- value: 4902
149
- });
150
- class b extends u {
151
- constructor({ message: e = "This Wallet does not support a capability that was not marked as optional." } = {}) {
152
- super(5700, e), Object.defineProperty(this, "code", {
153
- enumerable: !0,
154
- configurable: !0,
155
- writable: !0,
156
- value: 5700
157
- }), Object.defineProperty(this, "name", {
158
- enumerable: !0,
159
- configurable: !0,
160
- writable: !0,
161
- value: "Provider.UnsupportedNonOptionalCapabilityError"
162
- });
163
- }
164
- }
165
- Object.defineProperty(b, "code", {
166
- enumerable: !0,
167
- configurable: !0,
168
- writable: !0,
169
- value: 5700
170
- });
171
- class s extends u {
172
- constructor({ message: e = "This Wallet does not support the requested chain ID." } = {}) {
173
- super(5710, e), Object.defineProperty(this, "code", {
174
- enumerable: !0,
175
- configurable: !0,
176
- writable: !0,
177
- value: 5710
178
- }), Object.defineProperty(this, "name", {
179
- enumerable: !0,
180
- configurable: !0,
181
- writable: !0,
182
- value: "Provider.UnsupportedChainIdError"
183
- });
184
- }
185
- }
186
- Object.defineProperty(s, "code", {
187
- enumerable: !0,
188
- configurable: !0,
189
- writable: !0,
190
- value: 5710
191
- });
192
- class f extends u {
193
- constructor({ message: e = "There is already a bundle submitted with this ID." } = {}) {
194
- super(5720, e), Object.defineProperty(this, "code", {
195
- enumerable: !0,
196
- configurable: !0,
197
- writable: !0,
198
- value: 5720
199
- }), Object.defineProperty(this, "name", {
200
- enumerable: !0,
201
- configurable: !0,
202
- writable: !0,
203
- value: "Provider.DuplicateIdError"
204
- });
205
- }
206
- }
207
- Object.defineProperty(f, "code", {
208
- enumerable: !0,
209
- configurable: !0,
210
- writable: !0,
211
- value: 5720
212
- });
213
- class p extends u {
214
- constructor({ message: e = "This bundle id is unknown / has not been submitted." } = {}) {
215
- super(5730, e), Object.defineProperty(this, "code", {
216
- enumerable: !0,
217
- configurable: !0,
218
- writable: !0,
219
- value: 5730
220
- }), Object.defineProperty(this, "name", {
221
- enumerable: !0,
222
- configurable: !0,
223
- writable: !0,
224
- value: "Provider.UnknownBundleIdError"
225
- });
226
- }
227
- }
228
- Object.defineProperty(p, "code", {
229
- enumerable: !0,
230
- configurable: !0,
231
- writable: !0,
232
- value: 5730
233
- });
234
- class h extends u {
235
- constructor({ message: e = "The call bundle is too large for the Wallet to process." } = {}) {
236
- super(5740, e), Object.defineProperty(this, "code", {
237
- enumerable: !0,
238
- configurable: !0,
239
- writable: !0,
240
- value: 5740
241
- }), Object.defineProperty(this, "name", {
242
- enumerable: !0,
243
- configurable: !0,
244
- writable: !0,
245
- value: "Provider.BundleTooLargeError"
246
- });
247
- }
248
- }
249
- Object.defineProperty(h, "code", {
250
- enumerable: !0,
251
- configurable: !0,
252
- writable: !0,
253
- value: 5740
254
- });
255
- class m extends u {
256
- constructor({ message: e = "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade." } = {}) {
257
- super(5750, e), Object.defineProperty(this, "code", {
258
- enumerable: !0,
259
- configurable: !0,
260
- writable: !0,
261
- value: 5750
262
- }), Object.defineProperty(this, "name", {
263
- enumerable: !0,
264
- configurable: !0,
265
- writable: !0,
266
- value: "Provider.AtomicReadyWalletRejectedUpgradeError"
267
- });
268
- }
269
- }
270
- Object.defineProperty(m, "code", {
271
- enumerable: !0,
272
- configurable: !0,
273
- writable: !0,
274
- value: 5750
275
- });
276
- class w extends u {
277
- constructor({ message: e = "The wallet does not support atomic execution but the request requires it." } = {}) {
278
- super(5760, e), Object.defineProperty(this, "code", {
279
- enumerable: !0,
280
- configurable: !0,
281
- writable: !0,
282
- value: 5760
283
- }), Object.defineProperty(this, "name", {
284
- enumerable: !0,
285
- configurable: !0,
286
- writable: !0,
287
- value: "Provider.AtomicityNotSupportedError"
288
- });
289
- }
290
- }
291
- Object.defineProperty(w, "code", {
292
- enumerable: !0,
293
- configurable: !0,
294
- writable: !0,
295
- value: 5760
296
- });
297
- function q(r, e = {}) {
298
- const { includeEvents: t = !0 } = e;
299
- if (!r)
300
- throw new E();
1
+ import { handleChainId as t } from "./index.native142.js";
2
+ import { handleDisconnect as e } from "./index.native143.js";
3
+ import { handleSwitchEthereumChain as a } from "./index.native144.js";
4
+ import { handleAccounts as n } from "./index.native145.js";
5
+ import { handleEthSign as o } from "./index.native146.js";
6
+ import { handleGetCallsStatus as r } from "./index.native147.js";
7
+ import { handleGetCapabilities as i } from "./index.native148.js";
8
+ import { handlePersonalSign as l } from "./index.native149.js";
9
+ import { handleRequestAccounts as h } from "./index.native150.js";
10
+ import { handleSendCalls as m } from "./index.native151.js";
11
+ import { handleSendTransaction as s } from "./index.native152.js";
12
+ import { handleSignTypedData as d } from "./index.native153.js";
13
+ function E() {
301
14
  return {
302
- ...t ? {
303
- on: r.on?.bind(r),
304
- removeListener: r.removeListener?.bind(r)
305
- } : {},
306
- async request(v) {
307
- try {
308
- const o = await r.request(v);
309
- return o && typeof o == "object" && "jsonrpc" in o ? y(o) : o;
310
- } catch (o) {
311
- throw O(o);
312
- }
313
- }
15
+ eth_accounts: n,
16
+ eth_requestAccounts: h,
17
+ personal_sign: l,
18
+ eth_sendTransaction: s,
19
+ eth_signTypedData_v4: d,
20
+ wallet_disconnect: e,
21
+ wallet_switchEthereumChain: a,
22
+ eth_sign: o,
23
+ eth_chainId: t,
24
+ wallet_sendCalls: m,
25
+ wallet_getCallsStatus: r,
26
+ wallet_getCapabilities: i
314
27
  };
315
28
  }
316
- function O(r) {
317
- const e = j(r);
318
- if (e instanceof g) {
319
- if (!e.data)
320
- return e;
321
- const { code: t } = e.data;
322
- if (t === c.code)
323
- return new c(e);
324
- if (t === l.code)
325
- return new l(e);
326
- if (t === n.code)
327
- return new n(e);
328
- if (t === a.code)
329
- return new a(e);
330
- if (t === i.code)
331
- return new i(e);
332
- if (t === d.code)
333
- return new d(e);
334
- if (t === m.code)
335
- return new m(e);
336
- if (t === w.code)
337
- return new w(e);
338
- if (t === h.code)
339
- return new h(e);
340
- if (t === p.code)
341
- return new p(e);
342
- if (t === f.code)
343
- return new f(e);
344
- if (t === s.code)
345
- return new s(e);
346
- if (t === b.code)
347
- return new b(e);
348
- }
349
- return e;
350
- }
351
- class E extends P {
352
- constructor() {
353
- super("`provider` is undefined."), Object.defineProperty(this, "name", {
354
- enumerable: !0,
355
- configurable: !0,
356
- writable: !0,
357
- value: "Provider.IsUndefinedError"
358
- });
359
- }
360
- }
361
29
  export {
362
- m as AtomicReadyWalletRejectedUpgradeError,
363
- w as AtomicityNotSupportedError,
364
- h as BundleTooLargeError,
365
- l as ChainDisconnectedError,
366
- c as DisconnectedError,
367
- f as DuplicateIdError,
368
- E as IsUndefinedError,
369
- u as ProviderRpcError,
370
- d as SwitchChainError,
371
- a as UnauthorizedError,
372
- p as UnknownBundleIdError,
373
- s as UnsupportedChainIdError,
374
- i as UnsupportedMethodError,
375
- b as UnsupportedNonOptionalCapabilityError,
376
- n as UserRejectedRequestError,
377
- q as from,
378
- O as parseError
30
+ E as createSmartAccountHandlers
379
31
  };
@@ -1,31 +1,4 @@
1
- import { handleAccounts as t } from "./index.native133.js";
2
- import { handleEthSign as e } from "./index.native134.js";
3
- import { handleGetCallsStatus as a } from "./index.native135.js";
4
- import { handleGetCapabilities as n } from "./index.native136.js";
5
- import { handlePersonalSign as o } from "./index.native137.js";
6
- import { handleRequestAccounts as r } from "./index.native138.js";
7
- import { handleSendCalls as i } from "./index.native139.js";
8
- import { handleSendTransaction as l } from "./index.native140.js";
9
- import { handleSignTypedData as h } from "./index.native141.js";
10
- import { handleChainId as s } from "./index.native142.js";
11
- import { handleDisconnect as m } from "./index.native143.js";
12
- import { handleSwitchEthereumChain as d } from "./index.native144.js";
13
- function D() {
14
- return {
15
- eth_accounts: t,
16
- eth_requestAccounts: r,
17
- personal_sign: o,
18
- eth_sendTransaction: l,
19
- eth_signTypedData_v4: h,
20
- wallet_disconnect: m,
21
- wallet_switchEthereumChain: d,
22
- eth_sign: e,
23
- eth_chainId: s,
24
- wallet_sendCalls: i,
25
- wallet_getCallsStatus: a,
26
- wallet_getCapabilities: n
27
- };
28
- }
1
+ var s = {};
29
2
  export {
30
- D as createEOAHandlers
3
+ s as __exports
31
4
  };
@@ -1,31 +1,4 @@
1
- import { handleChainId as t } from "./index.native142.js";
2
- import { handleDisconnect as e } from "./index.native143.js";
3
- import { handleSwitchEthereumChain as a } from "./index.native144.js";
4
- import { handleAccounts as n } from "./index.native145.js";
5
- import { handleEthSign as o } from "./index.native146.js";
6
- import { handleGetCallsStatus as r } from "./index.native147.js";
7
- import { handleGetCapabilities as i } from "./index.native148.js";
8
- import { handlePersonalSign as l } from "./index.native149.js";
9
- import { handleRequestAccounts as h } from "./index.native150.js";
10
- import { handleSendCalls as m } from "./index.native151.js";
11
- import { handleSendTransaction as s } from "./index.native152.js";
12
- import { handleSignTypedData as d } from "./index.native153.js";
13
- function E() {
14
- return {
15
- eth_accounts: n,
16
- eth_requestAccounts: h,
17
- personal_sign: l,
18
- eth_sendTransaction: s,
19
- eth_signTypedData_v4: d,
20
- wallet_disconnect: e,
21
- wallet_switchEthereumChain: a,
22
- eth_sign: o,
23
- eth_chainId: t,
24
- wallet_sendCalls: m,
25
- wallet_getCallsStatus: r,
26
- wallet_getCapabilities: i
27
- };
28
- }
1
+ var e = {};
29
2
  export {
30
- E as createSmartAccountHandlers
3
+ e as __exports
31
4
  };
@@ -1,4 +1,4 @@
1
- const o = "0.0.82";
1
+ const o = "0.0.83";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.82";
1
+ export declare const VERSION = "0.0.83";
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.82";
1
+ export declare const VERSION = "0.0.83";
@@ -1,9 +1,130 @@
1
- function f(e, { dir: n = "left" } = {}) {
2
- let t = typeof e == "string" ? e.replace("0x", "") : e, i = 0;
3
- for (let l = 0; l < t.length - 1 && t[n === "left" ? l : t.length - l - 1].toString() === "0"; l++)
4
- i++;
5
- return t = n === "left" ? t.slice(i) : t.slice(0, t.length - i), typeof e == "string" ? (t.length === 1 && n === "right" && (t = `${t}0`), `0x${t.length % 2 === 1 ? `0${t}` : t}`) : t;
1
+ import { NegativeOffsetError as o, PositionOutOfBoundsError as e, RecursiveReadLimitExceededError as n } from "./index.web153.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++;
122
+ }
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;
6
127
  }
7
128
  export {
8
- f as trim
129
+ a as createCursor
9
130
  };
@@ -1,45 +1,26 @@
1
- import { BaseError as l } from "./index.web102.js";
2
- import { createCursor as r } from "./index.web103.js";
3
- import { hexToBytes as g } from "./index.web90.js";
4
- import { bytesToHex as u } from "./index.web88.js";
5
- function m(n, e = "hex") {
6
- const i = s(n), h = r(new Uint8Array(i.length));
7
- return i.encode(h), e === "hex" ? u(h.bytes) : h.bytes;
1
+ import { SizeOverflowError as u } from "./index.web102.js";
2
+ import { size as t } from "./index.web95.js";
3
+ function s(n, { size: i }) {
4
+ if (t(n) > i)
5
+ throw new u({
6
+ givenSize: t(n),
7
+ maxSize: i
8
+ });
8
9
  }
9
- function s(n) {
10
- return Array.isArray(n) ? p(n.map((e) => s(e))) : y(n);
10
+ function z(n, i = {}) {
11
+ const { signed: o } = i;
12
+ i.size && s(n, { size: i.size });
13
+ const e = BigInt(n);
14
+ if (!o)
15
+ return e;
16
+ const r = (n.length - 2) / 2, f = (1n << BigInt(r) * 8n - 1n) - 1n;
17
+ return e <= f ? e : e - BigInt(`0x${"f".padStart(r * 2, "f")}`) - 1n;
11
18
  }
12
- function p(n) {
13
- const e = n.reduce((t, f) => t + f.length, 0), i = o(e);
14
- return {
15
- length: e <= 55 ? 1 + e : 1 + i + e,
16
- encode(t) {
17
- e <= 55 ? t.pushByte(192 + e) : (t.pushByte(247 + i), i === 1 ? t.pushUint8(e) : i === 2 ? t.pushUint16(e) : i === 3 ? t.pushUint24(e) : t.pushUint32(e));
18
- for (const { encode: f } of n)
19
- f(t);
20
- }
21
- };
22
- }
23
- function y(n) {
24
- const e = typeof n == "string" ? g(n) : n, i = o(e.length);
25
- return {
26
- length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + i + e.length,
27
- encode(t) {
28
- e.length === 1 && e[0] < 128 ? t.pushBytes(e) : e.length <= 55 ? (t.pushByte(128 + e.length), t.pushBytes(e)) : (t.pushByte(183 + i), i === 1 ? t.pushUint8(e.length) : i === 2 ? t.pushUint16(e.length) : i === 3 ? t.pushUint24(e.length) : t.pushUint32(e.length), t.pushBytes(e));
29
- }
30
- };
31
- }
32
- function o(n) {
33
- if (n < 2 ** 8)
34
- return 1;
35
- if (n < 2 ** 16)
36
- return 2;
37
- if (n < 2 ** 24)
38
- return 3;
39
- if (n < 2 ** 32)
40
- return 4;
41
- throw new l("Length is too large.");
19
+ function g(n, i = {}) {
20
+ return Number(z(n, i));
42
21
  }
43
22
  export {
44
- m as toRlp
23
+ s as assertSize,
24
+ z as hexToBigInt,
25
+ g as hexToNumber
45
26
  };