@gardenfi/utils 3.1.0 → 3.1.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index100.cjs +1 -2
- package/dist/index100.js +119 -114
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +5 -14
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +21 -24
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +43 -31
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +37 -43
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +6 -6
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +88 -101
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +14 -37
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +3 -8
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +26 -20
- package/dist/index110.cjs +2 -1
- package/dist/index110.js +25 -2
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +9 -75
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +8 -15
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +10 -151
- package/dist/index114.cjs +1 -20
- package/dist/index114.js +11 -326
- package/dist/index115.cjs +1 -3
- package/dist/index115.js +13 -451
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +19 -71
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +14 -16
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -10
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +6 -125
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +18 -5
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +10 -45
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +56 -36
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +6 -6
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +13 -90
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +7 -14
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +138 -3
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +7 -26
- package/dist/index128.cjs +1 -2
- package/dist/index128.js +19 -22
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +17 -9
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +43 -8
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +21 -10
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +80 -11
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +11 -13
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +7 -15
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +6 -14
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +41 -4
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +5 -6
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +33 -18
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +9 -10
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +60 -58
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +19 -6
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +106 -13
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +78 -7
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +7 -136
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +90 -7
- package/dist/index146.cjs +2 -1
- package/dist/index146.js +3 -22
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +9 -18
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +13 -43
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +4 -21
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +11 -79
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +2 -12
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +32 -14
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +21 -6
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +5 -41
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +5 -33
- package/dist/index157.cjs +9 -1
- package/dist/index157.js +34 -8
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +3 -61
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +18 -19
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +19 -105
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +27 -70
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +6 -7
- package/dist/index163.cjs +4 -1
- package/dist/index163.js +192 -88
- package/dist/index164.cjs +1 -2
- package/dist/index164.js +28 -3
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +162 -9
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +127 -13
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +27 -4
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +56 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +191 -31
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +4 -22
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +20 -5
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +3 -6
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +16 -5
- package/dist/index174.cjs +1 -9
- package/dist/index174.js +11 -35
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +35 -3
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +3 -19
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +25 -18
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +8 -35
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +23 -6
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -4
- package/dist/index180.js +28 -194
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +3 -27
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +6 -161
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +6 -127
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +32 -27
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -192
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +38 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +43 -14
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +33 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +16 -15
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +40 -32
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +105 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +3 -28
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +5 -25
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +3 -28
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +17 -6
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +5 -6
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +8 -32
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +104 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +5 -37
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +6 -49
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +25 -30
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +34 -17
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +13 -42
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +74 -100
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +2 -3
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +17 -4
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +171 -3
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +10 -8
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +25 -5
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +18 -27
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +15 -78
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +13 -18
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -17
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +16 -10
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +10 -102
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +18 -15
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +23 -213
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -9
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +43 -105
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +8 -205
- package/dist/index222.cjs +2 -1
- package/dist/index222.js +40 -41
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +2 -79
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +6 -2
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +10 -24
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +17 -44
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +8 -9
- package/dist/index228.cjs +1 -2
- package/dist/index228.js +66 -41
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +66 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +188 -5
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +27 -9
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +74 -17
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +40 -8
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +16 -66
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +12 -64
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +11 -188
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +12 -28
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +17 -74
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +105 -37
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +5 -5
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +6 -16
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +7 -14
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +26 -11
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +102 -11
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +16 -6
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +215 -7
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +205 -18
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +41 -25
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +77 -10
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +2 -20
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +3 -3
- package/dist/index250.cjs +2 -1
- package/dist/index250.js +88 -654
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +14 -177
- package/dist/index252.cjs +1 -2
- package/dist/index252.js +68 -91
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +657 -14
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +176 -67
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +171 -13
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +109 -32
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +30 -32
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +3 -55
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -46
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +4 -26
- package/dist/index35.cjs +2 -1
- package/dist/index35.js +59 -6
- package/dist/index36.cjs +2 -1
- package/dist/index36.js +54 -18
- package/dist/index37.cjs +3 -1
- package/dist/index37.js +215 -15
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +23 -5
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +18 -13
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +10 -10
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +19 -11
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +45 -11
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +13 -3
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +12 -21
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +24 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +28 -3
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +47 -16
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +16 -5
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +10 -170
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +30 -102
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +34 -169
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +7 -111
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +29 -30
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +23 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +8 -4
- package/dist/index56.cjs +1 -2
- package/dist/index56.js +69 -58
- package/dist/index57.cjs +1 -2
- package/dist/index57.js +43 -51
- package/dist/index58.cjs +1 -3
- package/dist/index58.js +16 -208
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +36 -22
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +17 -18
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +6 -10
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +9 -20
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +10 -10
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +164 -12
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +31 -23
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +74 -25
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +13 -47
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +51 -16
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +7 -11
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +7 -31
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +21 -36
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +8 -7
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +29 -27
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +15 -21
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +73 -7
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +35 -70
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +16 -46
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +73 -21
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +12 -37
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +29 -17
- package/dist/index81.cjs +2 -1
- package/dist/index81.js +120 -6
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +13 -8
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +24 -13
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +31 -162
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +39 -72
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -12
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +102 -50
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +37 -7
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +8 -7
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +20 -21
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +2 -9
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +75 -31
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +15 -16
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +150 -72
- package/dist/index95.cjs +20 -1
- package/dist/index95.js +326 -35
- package/dist/index96.cjs +3 -1
- package/dist/index96.js +451 -16
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +70 -72
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +16 -12
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +10 -29
- package/package.json +1 -1
package/dist/index106.js
CHANGED
|
@@ -1,106 +1,93 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
retryCount: N
|
|
59
|
-
}), s = !1), r = await u(t, y, "getTransactionReceipt")({ hash: m }), a > 1 && (!r.blockNumber || d - r.blockNumber + 1n < a))
|
|
60
|
-
return;
|
|
61
|
-
p(() => e.resolve(r));
|
|
62
|
-
} catch (T) {
|
|
63
|
-
if (T instanceof W || T instanceof q) {
|
|
64
|
-
if (!l) {
|
|
65
|
-
s = !1;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
i = l, s = !0;
|
|
70
|
-
const k = await B(() => u(t, J, "getBlock")({
|
|
71
|
-
blockNumber: d,
|
|
72
|
-
includeTransactions: !0
|
|
73
|
-
}), {
|
|
74
|
-
delay: R,
|
|
75
|
-
retryCount: N,
|
|
76
|
-
shouldRetry: ({ error: f }) => f instanceof M
|
|
77
|
-
});
|
|
78
|
-
s = !1;
|
|
79
|
-
const n = k.transactions.find(({ from: f, nonce: D }) => f === i.from && D === i.nonce);
|
|
80
|
-
if (!n || (r = await u(t, y, "getTransactionReceipt")({
|
|
81
|
-
hash: n.hash
|
|
82
|
-
}), a > 1 && (!r.blockNumber || d - r.blockNumber + 1n < a)))
|
|
83
|
-
return;
|
|
84
|
-
let g = "replaced";
|
|
85
|
-
n.to === i.to && n.value === i.value && n.input === i.input ? g = "repriced" : n.from === n.to && n.value === 0n && (g = "cancelled"), p(() => {
|
|
86
|
-
var f;
|
|
87
|
-
(f = e.onReplaced) == null || f.call(e, {
|
|
88
|
-
reason: g,
|
|
89
|
-
replacedTransaction: i,
|
|
90
|
-
transaction: n,
|
|
91
|
-
transactionReceipt: r
|
|
92
|
-
}), e.resolve(r);
|
|
93
|
-
});
|
|
94
|
-
} catch (k) {
|
|
95
|
-
p(() => e.reject(k));
|
|
96
|
-
}
|
|
97
|
-
} else
|
|
98
|
-
p(() => e.reject(T));
|
|
99
|
-
}
|
|
1
|
+
import { parseAccount as E } from "./index32.js";
|
|
2
|
+
import { BaseError as w } from "./index35.js";
|
|
3
|
+
import { UnsupportedNonOptionalCapabilityError as L, AtomicityNotSupportedError as N } from "./index96.js";
|
|
4
|
+
import { encodeFunctionData as T } from "./index40.js";
|
|
5
|
+
import { concat as g } from "./index120.js";
|
|
6
|
+
import { hexToBigInt as k } from "./index65.js";
|
|
7
|
+
import { numberToHex as c } from "./index42.js";
|
|
8
|
+
import { getTransactionError as _ } from "./index67.js";
|
|
9
|
+
import { sendTransaction as S } from "./index100.js";
|
|
10
|
+
const q = "0x5792579257925792579257925792579257925792579257925792579257925792", A = c(0, {
|
|
11
|
+
size: 32
|
|
12
|
+
});
|
|
13
|
+
async function P(i, s) {
|
|
14
|
+
const { account: f = i.account, capabilities: l, chain: d = i.chain, experimental_fallback: b, experimental_fallbackDelay: m = 32, forceAtomic: h = !1, id: C, version: v = "2.0.0" } = s, r = f ? E(f) : null, u = s.calls.map((t) => {
|
|
15
|
+
const e = t, a = e.abi ? T({
|
|
16
|
+
abi: e.abi,
|
|
17
|
+
functionName: e.functionName,
|
|
18
|
+
args: e.args
|
|
19
|
+
}) : e.data;
|
|
20
|
+
return {
|
|
21
|
+
data: e.dataSuffix && a ? g([a, e.dataSuffix]) : a,
|
|
22
|
+
to: e.to,
|
|
23
|
+
value: e.value ? c(e.value) : void 0
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
try {
|
|
27
|
+
const t = await i.request({
|
|
28
|
+
method: "wallet_sendCalls",
|
|
29
|
+
params: [
|
|
30
|
+
{
|
|
31
|
+
atomicRequired: h,
|
|
32
|
+
calls: u,
|
|
33
|
+
capabilities: l,
|
|
34
|
+
chainId: c(d.id),
|
|
35
|
+
from: r == null ? void 0 : r.address,
|
|
36
|
+
id: C,
|
|
37
|
+
version: v
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}, { retryCount: 0 });
|
|
41
|
+
return typeof t == "string" ? { id: t } : t;
|
|
42
|
+
} catch (t) {
|
|
43
|
+
const e = t;
|
|
44
|
+
if (b && (e.name === "MethodNotFoundRpcError" || e.name === "MethodNotSupportedRpcError" || e.name === "UnknownRpcError" || e.details.toLowerCase().includes("does not exist / is not available") || e.details.toLowerCase().includes("missing or invalid. request()") || e.details.toLowerCase().includes("did not match any variant of untagged enum") || e.details.toLowerCase().includes("account upgraded to unsupported contract") || e.details.toLowerCase().includes("eip-7702 not supported") || e.details.toLowerCase().includes("unsupported wc_ method") || // magic.link
|
|
45
|
+
e.details.toLowerCase().includes("feature toggled misconfigured") || // Trust Wallet
|
|
46
|
+
e.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))) {
|
|
47
|
+
if (l && Object.values(l).some((n) => !n.optional)) {
|
|
48
|
+
const n = "non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";
|
|
49
|
+
throw new L(new w(n, {
|
|
50
|
+
details: n
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
if (h && u.length > 1) {
|
|
54
|
+
const o = "`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";
|
|
55
|
+
throw new N(new w(o, {
|
|
56
|
+
details: o
|
|
57
|
+
}));
|
|
100
58
|
}
|
|
59
|
+
const a = [];
|
|
60
|
+
for (const o of u) {
|
|
61
|
+
const n = S(i, {
|
|
62
|
+
account: r,
|
|
63
|
+
chain: d,
|
|
64
|
+
data: o.data,
|
|
65
|
+
to: o.to,
|
|
66
|
+
value: o.value ? k(o.value) : void 0
|
|
67
|
+
});
|
|
68
|
+
a.push(n), m > 0 && await new Promise((x) => setTimeout(x, m));
|
|
69
|
+
}
|
|
70
|
+
const p = await Promise.allSettled(a);
|
|
71
|
+
if (p.every((o) => o.status === "rejected"))
|
|
72
|
+
throw p[0].reason;
|
|
73
|
+
const y = p.map((o) => o.status === "fulfilled" ? o.value : A);
|
|
74
|
+
return {
|
|
75
|
+
id: g([
|
|
76
|
+
...y,
|
|
77
|
+
c(d.id, { size: 32 }),
|
|
78
|
+
q
|
|
79
|
+
])
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
throw _(t, {
|
|
83
|
+
...s,
|
|
84
|
+
account: r,
|
|
85
|
+
chain: s.chain
|
|
101
86
|
});
|
|
102
|
-
}
|
|
87
|
+
}
|
|
103
88
|
}
|
|
104
89
|
export {
|
|
105
|
-
|
|
90
|
+
q as fallbackMagicIdentifier,
|
|
91
|
+
A as fallbackTransactionErrorMagicIdentifier,
|
|
92
|
+
P as sendCalls
|
|
106
93
|
};
|
package/dist/index107.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index32.cjs"),p=require("./index42.cjs");async function f(s,c={}){const{account:n=s.account,chainId:t}=c,e=n?l.parseAccount(n):void 0,o=t?[e==null?void 0:e.address,[p.numberToHex(t)]]:[e==null?void 0:e.address],u=await s.request({method:"wallet_getCapabilities",params:o}),a={};for(const[r,b]of Object.entries(u)){a[Number(r)]={};for(let[i,d]of Object.entries(b))i==="addSubAccount"&&(i="unstable_addSubAccount"),a[Number(r)][i]=d}return typeof t=="number"?a[t]:a}exports.getCapabilities=f;
|
package/dist/index107.js
CHANGED
|
@@ -1,40 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
t instanceof Promise && t.catch(() => {
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
w();
|
|
18
|
-
}, o = c();
|
|
19
|
-
if (f.set(s, [
|
|
20
|
-
...o,
|
|
21
|
-
{ id: i, fns: l }
|
|
22
|
-
]), o && o.length > 0)
|
|
23
|
-
return r;
|
|
24
|
-
const u = {};
|
|
25
|
-
for (const n in l)
|
|
26
|
-
u[n] = (...e) => {
|
|
27
|
-
var p, h;
|
|
28
|
-
const t = c();
|
|
29
|
-
if (t.length !== 0)
|
|
30
|
-
for (const C of t)
|
|
31
|
-
(h = (p = C.fns)[n]) == null || h.call(p, ...e);
|
|
32
|
-
};
|
|
33
|
-
const a = m(u);
|
|
34
|
-
return typeof a == "function" && g.set(s, a), r;
|
|
1
|
+
import { parseAccount as p } from "./index32.js";
|
|
2
|
+
import { numberToHex as f } from "./index42.js";
|
|
3
|
+
async function h(s, n = {}) {
|
|
4
|
+
const { account: o = s.account, chainId: t } = n, e = o ? p(o) : void 0, c = t ? [e == null ? void 0 : e.address, [f(t)]] : [e == null ? void 0 : e.address], b = await s.request({
|
|
5
|
+
method: "wallet_getCapabilities",
|
|
6
|
+
params: c
|
|
7
|
+
}), a = {};
|
|
8
|
+
for (const [r, u] of Object.entries(b)) {
|
|
9
|
+
a[Number(r)] = {};
|
|
10
|
+
for (let [i, d] of Object.entries(u))
|
|
11
|
+
i === "addSubAccount" && (i = "unstable_addSubAccount"), a[Number(r)][i] = d;
|
|
12
|
+
}
|
|
13
|
+
return typeof t == "number" ? a[t] : a;
|
|
35
14
|
}
|
|
36
15
|
export {
|
|
37
|
-
|
|
38
|
-
f as listenersCache,
|
|
39
|
-
y as observe
|
|
16
|
+
h as getCapabilities
|
|
40
17
|
};
|
package/dist/index108.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function s(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}exports.getPermissions=s;
|
package/dist/index108.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
}, n = () => {
|
|
4
|
-
};
|
|
5
|
-
return { promise: new Promise((r, o) => {
|
|
6
|
-
e = r, n = o;
|
|
7
|
-
}), resolve: e, reject: n };
|
|
1
|
+
async function t(e) {
|
|
2
|
+
return await e.request({ method: "wallet_getPermissions" }, { dedupe: !0 });
|
|
8
3
|
}
|
|
9
4
|
export {
|
|
10
|
-
|
|
5
|
+
t as getPermissions
|
|
11
6
|
};
|
package/dist/index109.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index32.cjs"),f=require("./index110.cjs"),g=require("./index111.cjs"),s=require("./index55.cjs"),h=require("./index69.cjs"),A=require("./index82.cjs");async function p(o,n){var i;const{account:c=o.account,chainId:u,nonce:a}=n;if(!c)throw new f.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const r=d.parseAccount(c),t=(()=>{if(n.executor)return n.executor==="self"?n.executor:d.parseAccount(n.executor)})(),e={address:n.contractAddress??n.address,chainId:u,nonce:a};return typeof e.chainId>"u"&&(e.chainId=((i=o.chain)==null?void 0:i.id)??await s.getAction(o,h.getChainId,"getChainId")({})),typeof e.nonce>"u"&&(e.nonce=await s.getAction(o,A.getTransactionCount,"getTransactionCount")({address:r.address,blockTag:"pending"}),(t==="self"||t!=null&&t.address&&g.isAddressEqual(t.address,r.address))&&(e.nonce+=1)),e}exports.prepareAuthorization=p;
|
package/dist/index109.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { parseAccount as e } from "./index32.js";
|
|
2
|
+
import { AccountNotFoundError as f } from "./index110.js";
|
|
3
|
+
import { isAddressEqual as h } from "./index111.js";
|
|
4
|
+
import { getAction as a } from "./index55.js";
|
|
5
|
+
import { getChainId as p } from "./index69.js";
|
|
6
|
+
import { getTransactionCount as g } from "./index82.js";
|
|
7
|
+
async function y(r, o) {
|
|
8
|
+
var i;
|
|
9
|
+
const { account: c = r.account, chainId: s, nonce: u } = o;
|
|
10
|
+
if (!c)
|
|
11
|
+
throw new f({
|
|
12
|
+
docsPath: "/docs/eip7702/prepareAuthorization"
|
|
13
|
+
});
|
|
14
|
+
const d = e(c), t = (() => {
|
|
15
|
+
if (o.executor)
|
|
16
|
+
return o.executor === "self" ? o.executor : e(o.executor);
|
|
17
|
+
})(), n = {
|
|
18
|
+
address: o.contractAddress ?? o.address,
|
|
19
|
+
chainId: s,
|
|
20
|
+
nonce: u
|
|
21
|
+
};
|
|
22
|
+
return typeof n.chainId > "u" && (n.chainId = ((i = r.chain) == null ? void 0 : i.id) ?? await a(r, p, "getChainId")({})), typeof n.nonce > "u" && (n.nonce = await a(r, g, "getTransactionCount")({
|
|
23
|
+
address: d.address,
|
|
24
|
+
blockTag: "pending"
|
|
25
|
+
}), (t === "self" || t != null && t.address && h(t.address, d.address)) && (n.nonce += 1)), n;
|
|
20
26
|
}
|
|
21
27
|
export {
|
|
22
|
-
|
|
28
|
+
y as prepareAuthorization
|
|
23
29
|
};
|
package/dist/index110.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index35.cjs");class c extends t.BaseError{constructor({docsPath:o}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
2
|
+
`),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}class u extends t.BaseError{constructor({docsPath:o,metaMessages:e,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:o,metaMessages:e,name:"AccountTypeNotSupportedError"})}}exports.AccountNotFoundError=c;exports.AccountTypeNotSupportedError=u;
|
package/dist/index110.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseError as t } from "./index35.js";
|
|
2
|
+
class u extends t {
|
|
3
|
+
constructor({ docsPath: o } = {}) {
|
|
4
|
+
super([
|
|
5
|
+
"Could not find an Account to execute with this Action.",
|
|
6
|
+
"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."
|
|
7
|
+
].join(`
|
|
8
|
+
`), {
|
|
9
|
+
docsPath: o,
|
|
10
|
+
docsSlug: "account",
|
|
11
|
+
name: "AccountNotFoundError"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class s extends t {
|
|
16
|
+
constructor({ docsPath: o, metaMessages: c, type: r }) {
|
|
17
|
+
super(`Account type "${r}" is not supported.`, {
|
|
18
|
+
docsPath: o,
|
|
19
|
+
metaMessages: c,
|
|
20
|
+
name: "AccountTypeNotSupportedError"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
2
24
|
export {
|
|
3
|
-
|
|
25
|
+
u as AccountNotFoundError,
|
|
26
|
+
s as AccountTypeNotSupportedError
|
|
4
27
|
};
|
package/dist/index111.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index150.cjs"),d=require("./index174.cjs");function t(s,r){if(!d.isAddress(s,{strict:!1}))throw new e.InvalidAddressError({address:s});if(!d.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return s.toLowerCase()===r.toLowerCase()}exports.isAddressEqual=t;
|
package/dist/index111.js
CHANGED
|
@@ -1,78 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let t;
|
|
10
|
-
return B ? (() => {
|
|
11
|
-
const f = N([
|
|
12
|
-
"watchBlockNumber",
|
|
13
|
-
r.uid,
|
|
14
|
-
b,
|
|
15
|
-
p,
|
|
16
|
-
i
|
|
17
|
-
]);
|
|
18
|
-
return y(f, { onBlockNumber: l, onError: a }, (e) => h(async () => {
|
|
19
|
-
var u;
|
|
20
|
-
try {
|
|
21
|
-
const o = await g(r, v, "getBlockNumber")({ cacheTime: 0 });
|
|
22
|
-
if (t !== void 0) {
|
|
23
|
-
if (o === t)
|
|
24
|
-
return;
|
|
25
|
-
if (o - t > 1 && p)
|
|
26
|
-
for (let s = t + 1n; s < o; s++)
|
|
27
|
-
e.onBlockNumber(s, t), t = s;
|
|
28
|
-
}
|
|
29
|
-
(t === void 0 || o > t) && (e.onBlockNumber(o, t), t = o);
|
|
30
|
-
} catch (o) {
|
|
31
|
-
(u = e.onError) == null || u.call(e, o);
|
|
32
|
-
}
|
|
33
|
-
}, {
|
|
34
|
-
emitOnBegin: b,
|
|
35
|
-
interval: i
|
|
36
|
-
}));
|
|
37
|
-
})() : (() => {
|
|
38
|
-
const f = N([
|
|
39
|
-
"watchBlockNumber",
|
|
40
|
-
r.uid,
|
|
41
|
-
b,
|
|
42
|
-
p
|
|
43
|
-
]);
|
|
44
|
-
return y(f, { onBlockNumber: l, onError: a }, (e) => {
|
|
45
|
-
let u = !0, o = () => u = !1;
|
|
46
|
-
return (async () => {
|
|
47
|
-
try {
|
|
48
|
-
const s = (() => {
|
|
49
|
-
if (r.transport.type === "fallback") {
|
|
50
|
-
const c = r.transport.transports.find((n) => n.config.type === "webSocket" || n.config.type === "ipc");
|
|
51
|
-
return c ? c.value : r.transport;
|
|
52
|
-
}
|
|
53
|
-
return r.transport;
|
|
54
|
-
})(), { unsubscribe: d } = await s.subscribe({
|
|
55
|
-
params: ["newHeads"],
|
|
56
|
-
onData(c) {
|
|
57
|
-
var m;
|
|
58
|
-
if (!u)
|
|
59
|
-
return;
|
|
60
|
-
const n = w((m = c.result) == null ? void 0 : m.number);
|
|
61
|
-
e.onBlockNumber(n, t), t = n;
|
|
62
|
-
},
|
|
63
|
-
onError(c) {
|
|
64
|
-
var n;
|
|
65
|
-
(n = e.onError) == null || n.call(e, c);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
o = d, u || o();
|
|
69
|
-
} catch (s) {
|
|
70
|
-
a == null || a(s);
|
|
71
|
-
}
|
|
72
|
-
})(), () => o();
|
|
73
|
-
});
|
|
74
|
-
})();
|
|
1
|
+
import { InvalidAddressError as e } from "./index150.js";
|
|
2
|
+
import { isAddress as o } from "./index174.js";
|
|
3
|
+
function i(r, s) {
|
|
4
|
+
if (!o(r, { strict: !1 }))
|
|
5
|
+
throw new e({ address: r });
|
|
6
|
+
if (!o(s, { strict: !1 }))
|
|
7
|
+
throw new e({ address: s });
|
|
8
|
+
return r.toLowerCase() === s.toLowerCase();
|
|
75
9
|
}
|
|
76
10
|
export {
|
|
77
|
-
|
|
11
|
+
i as isAddressEqual
|
|
78
12
|
};
|
package/dist/index112.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index168.cjs"),l=require("./index42.cjs");function c(o){const{kzg:s}=o,n=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),e=typeof o.blobs[0]=="string"?o.blobs.map(t=>i.hexToBytes(t)):o.blobs,b=[];for(const t of e)b.push(Uint8Array.from(s.blobToKzgCommitment(t)));return n==="bytes"?b:b.map(t=>l.bytesToHex(t))}exports.blobsToCommitments=c;
|
package/dist/index112.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const u = await (t == null ? void 0 : t(n)) ?? c;
|
|
9
|
-
await r(u);
|
|
10
|
-
const l = async () => {
|
|
11
|
-
w && (await o({ unpoll: a }), await r(c), l());
|
|
12
|
-
};
|
|
13
|
-
l();
|
|
14
|
-
})(), a;
|
|
1
|
+
import { hexToBytes as i } from "./index168.js";
|
|
2
|
+
import { bytesToHex as f } from "./index42.js";
|
|
3
|
+
function y(o) {
|
|
4
|
+
const { kzg: s } = o, n = o.to ?? (typeof o.blobs[0] == "string" ? "hex" : "bytes"), m = typeof o.blobs[0] == "string" ? o.blobs.map((t) => i(t)) : o.blobs, b = [];
|
|
5
|
+
for (const t of m)
|
|
6
|
+
b.push(Uint8Array.from(s.blobToKzgCommitment(t)));
|
|
7
|
+
return n === "bytes" ? b : b.map((t) => f(t));
|
|
15
8
|
}
|
|
16
9
|
export {
|
|
17
|
-
|
|
10
|
+
y as blobsToCommitments
|
|
18
11
|
};
|
package/dist/index113.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index168.cjs"),y=require("./index42.cjs");function f(t){const{kzg:c}=t,e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>b.hexToBytes(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>b.hexToBytes(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){const l=n[o],m=i[o];s.push(Uint8Array.from(c.computeBlobKzgProof(l,m)))}return e==="bytes"?s:s.map(o=>y.bytesToHex(o))}exports.blobsToProofs=f;
|