@gardenfi/utils 3.0.0-beta.1 → 3.0.0-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/index.cjs +1 -1
- package/dist/index.js +36 -35
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +125 -3
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +5 -26
- package/dist/index102.cjs +1 -2
- package/dist/index102.js +20 -23
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +45 -9
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +38 -8
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +6 -10
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +90 -11
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +14 -13
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +3 -14
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +26 -4
- package/dist/index110.cjs +2 -1
- package/dist/index110.js +24 -6
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +9 -18
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +8 -13
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +10 -6
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +11 -7
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +13 -21
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +21 -7
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +14 -21
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -17
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +5 -39
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +18 -21
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +10 -80
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +57 -10
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +6 -58
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +13 -13
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +7 -8
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +137 -20
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +7 -6
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +19 -33
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +17 -32
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +43 -9
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +20 -49
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +79 -18
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +10 -105
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +8 -63
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +6 -9
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +41 -71
- package/dist/index137.cjs +1 -2
- package/dist/index137.js +6 -3
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +14 -9
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +34 -13
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +55 -4
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +24 -11
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +7 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +19 -32
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +15 -21
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +5 -5
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +13 -5
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +10 -5
- package/dist/index148.cjs +1 -9
- package/dist/index148.js +10 -33
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +12 -3
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +8 -18
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +3 -20
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +16 -35
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +5 -8
- package/dist/index154.cjs +1 -4
- package/dist/index154.js +163 -186
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +98 -22
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +33 -161
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +8 -126
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +60 -27
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +19 -55
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +103 -188
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +79 -4
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +7 -18
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +72 -3
- package/dist/index164.cjs +2 -1
- package/dist/index164.js +3 -17
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +9 -12
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +11 -32
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +5 -3
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +2 -28
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +32 -9
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +18 -22
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +5 -28
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +5 -3
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +5 -6
- package/dist/index174.cjs +9 -1
- package/dist/index174.js +35 -6
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +3 -33
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +19 -5
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +14 -31
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +32 -46
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +8 -32
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +5 -5
- package/dist/index180.cjs +4 -1
- package/dist/index180.js +194 -8
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +25 -40
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +160 -50
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +125 -102
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +28 -3
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +191 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +4 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +20 -17
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +3 -6
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +16 -8
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +31 -100
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +3 -6
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +27 -6
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +25 -27
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +28 -34
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +6 -13
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +6 -78
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +33 -2
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +5 -19
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +32 -166
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +8 -8
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +48 -16
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +32 -10
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +15 -23
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +41 -17
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +104 -15
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +3 -6
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +5 -13
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +3 -10
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -16
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +8 -24
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +5 -46
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +27 -9
- package/dist/index212.cjs +1 -2
- package/dist/index212.js +77 -40
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +2 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +18 -5
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +16 -9
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +10 -19
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +24 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +46 -66
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +9 -65
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +8 -8
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +99 -184
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +15 -27
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +209 -71
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +105 -37
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +205 -15
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +41 -12
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +78 -11
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +2 -13
- package/dist/index228.cjs +2 -1
- package/dist/index228.js +40 -18
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +2 -109
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +26 -12
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +5 -6
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +11 -7
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +17 -101
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +8 -26
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +66 -16
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +63 -212
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +185 -39
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +26 -76
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +77 -2
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +38 -9
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +8 -59
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +16 -19
- package/dist/index241.cjs +1 -2
- package/dist/index241.js +8 -61
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +11 -14
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +11 -67
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +6 -657
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +6 -206
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +22 -173
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +19 -4
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +12 -2
- package/dist/index249.cjs +1 -0
- package/dist/index249.js +22 -0
- package/dist/index25.cjs +1 -16
- package/dist/index25.js +12 -113
- package/dist/index250.cjs +2 -0
- package/dist/index250.js +94 -0
- package/dist/index251.cjs +1 -0
- package/dist/index251.js +17 -0
- package/dist/index252.cjs +1 -0
- package/dist/index252.js +660 -0
- package/dist/index253.cjs +1 -0
- package/dist/index253.js +180 -0
- package/dist/index254.cjs +1 -0
- package/dist/index254.js +71 -0
- package/dist/index255.cjs +1 -0
- package/dist/index255.js +7 -0
- package/dist/index256.cjs +1 -0
- package/dist/index256.js +4 -0
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +59 -30
- package/dist/index27.cjs +16 -1
- package/dist/index27.js +111 -24
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +29 -7
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +35 -35
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +41 -24
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +9 -9
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +11 -11
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +3 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +3 -3
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +3 -3
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +15 -15
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +14 -17
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +8 -8
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +14 -14
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +60 -56
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +8 -8
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +3 -3
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +131 -76
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +2 -2
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +76 -6
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +13 -21
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +51 -8
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +7 -31
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +7 -7
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +21 -16
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +8 -73
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +31 -35
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +15 -15
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +69 -61
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +35 -11
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +15 -13
- package/dist/index78.cjs +1 -3
- package/dist/index78.js +72 -92
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +11 -23
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +28 -32
- package/dist/index81.cjs +2 -1
- package/dist/index81.js +118 -42
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +13 -5
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +24 -151
- package/dist/index84.cjs +1 -20
- package/dist/index84.js +31 -324
- package/dist/index85.cjs +1 -3
- package/dist/index85.js +42 -449
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +6 -64
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +101 -35
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +36 -14
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +9 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +19 -15
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +2 -11
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +72 -122
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +15 -5
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +151 -21
- package/dist/index95.cjs +20 -1
- package/dist/index95.js +326 -45
- package/dist/index96.cjs +3 -1
- package/dist/index96.js +451 -38
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +64 -6
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +15 -87
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +10 -14
- package/dist/src/lib/utils.d.ts +15 -0
- package/package.json +3 -3
package/dist/index120.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const e
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const i = u({ domain: t, message: a, primaryType: o, types: n });
|
|
17
|
-
return r.request({
|
|
18
|
-
method: "eth_signTypedData_v4",
|
|
19
|
-
params: [e.address, i]
|
|
20
|
-
}, { retryCount: 0 });
|
|
1
|
+
function i(t) {
|
|
2
|
+
return typeof t[0] == "string" ? f(t) : c(t);
|
|
3
|
+
}
|
|
4
|
+
function c(t) {
|
|
5
|
+
let n = 0;
|
|
6
|
+
for (const e of t)
|
|
7
|
+
n += e.length;
|
|
8
|
+
const r = new Uint8Array(n);
|
|
9
|
+
let o = 0;
|
|
10
|
+
for (const e of t)
|
|
11
|
+
r.set(e, o), o += e.length;
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
function f(t) {
|
|
15
|
+
return `0x${t.reduce((n, r) => n + r.replace("0x", ""), "")}`;
|
|
21
16
|
}
|
|
22
17
|
export {
|
|
23
|
-
|
|
18
|
+
i as concat,
|
|
19
|
+
c as concatBytes,
|
|
20
|
+
f as concatHex
|
|
24
21
|
};
|
package/dist/index121.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("./index106.cjs"),u=require("./index122.cjs");async function i(s,t){const{chain:n=s.chain}=t,o=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),a=await l.sendCalls(s,t);return await u.waitForCallsStatus(s,{...t,id:a.id,timeout:o})}exports.sendCallsSync=i;
|
package/dist/index121.js
CHANGED
|
@@ -1,83 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const { domain: i, message: p, primaryType: n, types: t } = e, o = (u, g) => {
|
|
11
|
-
const s = { ...g };
|
|
12
|
-
for (const r of u) {
|
|
13
|
-
const { name: a, type: c } = r;
|
|
14
|
-
c === "address" && (s[a] = s[a].toLowerCase());
|
|
15
|
-
}
|
|
16
|
-
return s;
|
|
17
|
-
}, y = t.EIP712Domain ? i ? o(t.EIP712Domain, i) : {} : {}, m = (() => {
|
|
18
|
-
if (n !== "EIP712Domain")
|
|
19
|
-
return o(t[n], p);
|
|
20
|
-
})();
|
|
21
|
-
return x({ domain: y, message: m, primaryType: n, types: t });
|
|
22
|
-
}
|
|
23
|
-
function H(e) {
|
|
24
|
-
const { domain: i, message: p, primaryType: n, types: t } = e, o = (y, m) => {
|
|
25
|
-
for (const u of y) {
|
|
26
|
-
const { name: g, type: s } = u, r = m[g], a = s.match(d);
|
|
27
|
-
if (a && (typeof r == "number" || typeof r == "bigint")) {
|
|
28
|
-
const [l, f, b] = a;
|
|
29
|
-
T(r, {
|
|
30
|
-
signed: f === "int",
|
|
31
|
-
size: Number.parseInt(b, 10) / 8
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
if (s === "address" && typeof r == "string" && !P(r))
|
|
35
|
-
throw new D({ address: r });
|
|
36
|
-
const c = s.match(_);
|
|
37
|
-
if (c) {
|
|
38
|
-
const [l, f] = c;
|
|
39
|
-
if (f && h(r) !== Number.parseInt(f, 10))
|
|
40
|
-
throw new v({
|
|
41
|
-
expectedSize: Number.parseInt(f, 10),
|
|
42
|
-
givenSize: h(r)
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const I = t[s];
|
|
46
|
-
I && (S(s), o(I, r));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
if (t.EIP712Domain && i) {
|
|
50
|
-
if (typeof i != "object")
|
|
51
|
-
throw new E({ domain: i });
|
|
52
|
-
o(t.EIP712Domain, i);
|
|
53
|
-
}
|
|
54
|
-
if (n !== "EIP712Domain")
|
|
55
|
-
if (t[n])
|
|
56
|
-
o(t[n], p);
|
|
57
|
-
else
|
|
58
|
-
throw new w({ primaryType: n, types: t });
|
|
59
|
-
}
|
|
60
|
-
function L({ domain: e }) {
|
|
61
|
-
return [
|
|
62
|
-
typeof (e == null ? void 0 : e.name) == "string" && { name: "name", type: "string" },
|
|
63
|
-
(e == null ? void 0 : e.version) && { name: "version", type: "string" },
|
|
64
|
-
(typeof (e == null ? void 0 : e.chainId) == "number" || typeof (e == null ? void 0 : e.chainId) == "bigint") && {
|
|
65
|
-
name: "chainId",
|
|
66
|
-
type: "uint256"
|
|
67
|
-
},
|
|
68
|
-
(e == null ? void 0 : e.verifyingContract) && {
|
|
69
|
-
name: "verifyingContract",
|
|
70
|
-
type: "address"
|
|
71
|
-
},
|
|
72
|
-
(e == null ? void 0 : e.salt) && { name: "salt", type: "bytes32" }
|
|
73
|
-
].filter(Boolean);
|
|
74
|
-
}
|
|
75
|
-
function S(e) {
|
|
76
|
-
if (e === "address" || e === "bool" || e === "string" || e.startsWith("bytes") || e.startsWith("uint") || e.startsWith("int"))
|
|
77
|
-
throw new z({ type: e });
|
|
1
|
+
import { sendCalls as a } from "./index106.js";
|
|
2
|
+
import { waitForCallsStatus as u } from "./index122.js";
|
|
3
|
+
async function d(o, t) {
|
|
4
|
+
const { chain: s = o.chain } = t, i = t.timeout ?? Math.max(((s == null ? void 0 : s.blockTime) ?? 0) * 3, 5e3), n = await a(o, t);
|
|
5
|
+
return await u(o, {
|
|
6
|
+
...t,
|
|
7
|
+
id: n.id,
|
|
8
|
+
timeout: i
|
|
9
|
+
});
|
|
78
10
|
}
|
|
79
11
|
export {
|
|
80
|
-
|
|
81
|
-
F as serializeTypedData,
|
|
82
|
-
H as validateTypedData
|
|
12
|
+
d as sendCallsSync
|
|
83
13
|
};
|
package/dist/index122.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 q=require("./index35.cjs"),C=require("./index134.cjs"),p=require("./index55.cjs"),F=require("./index88.cjs"),T=require("./index93.cjs"),E=require("./index89.cjs"),R=require("./index90.cjs"),j=require("./index91.cjs"),B=require("./index103.cjs");async function I(r,s){const{id:o,pollingInterval:y=r.pollingInterval,status:g=({statusCode:t})=>t===200||t>=300,retryCount:m=4,retryDelay:v=({count:t})=>~~(1<<t)*200,timeout:l=6e4,throwOnFailure:f=!1}=s,S=j.stringify(["waitForCallsStatus",r.uid,o]),{promise:b,resolve:h,reject:n}=E.withResolvers();let i;const u=F.observe(S,{resolve:h,reject:n},t=>{const c=T.poll(async()=>{const w=e=>{clearTimeout(i),c(),e(),u()};try{const e=await R.withRetry(async()=>{const a=await p.getAction(r,B.getCallsStatus,"getCallsStatus")({id:o});if(f&&a.status==="failure")throw new C.BundleFailedError(a);return a},{retryCount:m,delay:v});if(!g(e))return;w(()=>t.resolve(e))}catch(e){w(()=>t.reject(e))}},{interval:y,emitOnBegin:!0});return c});return i=l?setTimeout(()=>{u(),clearTimeout(i),n(new d({id:o}))},l):void 0,await b}class d extends q.BaseError{constructor({id:s}){super(`Timed out while waiting for call bundle with id "${s}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}exports.WaitForCallsStatusTimeoutError=d;exports.waitForCallsStatus=I;
|
package/dist/index122.js
CHANGED
|
@@ -1,14 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { BaseError as C } from "./index35.js";
|
|
2
|
+
import { BundleFailedError as F } from "./index134.js";
|
|
3
|
+
import { getAction as S } from "./index55.js";
|
|
4
|
+
import { observe as T } from "./index88.js";
|
|
5
|
+
import { poll as b } from "./index93.js";
|
|
6
|
+
import { withResolvers as E } from "./index89.js";
|
|
7
|
+
import { withRetry as B } from "./index90.js";
|
|
8
|
+
import { stringify as I } from "./index91.js";
|
|
9
|
+
import { getCallsStatus as j } from "./index103.js";
|
|
10
|
+
async function z(e, o) {
|
|
11
|
+
const {
|
|
12
|
+
id: i,
|
|
13
|
+
pollingInterval: f = e.pollingInterval,
|
|
14
|
+
status: p = ({ statusCode: t }) => t === 200 || t >= 300,
|
|
15
|
+
retryCount: w = 4,
|
|
16
|
+
retryDelay: d = ({ count: t }) => ~~(1 << t) * 200,
|
|
17
|
+
// exponential backoff
|
|
18
|
+
timeout: l = 6e4,
|
|
19
|
+
throwOnFailure: y = !1
|
|
20
|
+
} = o, v = I(["waitForCallsStatus", e.uid, i]), { promise: g, resolve: h, reject: n } = E();
|
|
21
|
+
let s;
|
|
22
|
+
const u = T(v, { resolve: h, reject: n }, (t) => {
|
|
23
|
+
const m = b(async () => {
|
|
24
|
+
const c = (r) => {
|
|
25
|
+
clearTimeout(s), m(), r(), u();
|
|
26
|
+
};
|
|
27
|
+
try {
|
|
28
|
+
const r = await B(async () => {
|
|
29
|
+
const a = await S(e, j, "getCallsStatus")({ id: i });
|
|
30
|
+
if (y && a.status === "failure")
|
|
31
|
+
throw new F(a);
|
|
32
|
+
return a;
|
|
33
|
+
}, {
|
|
34
|
+
retryCount: w,
|
|
35
|
+
delay: d
|
|
36
|
+
});
|
|
37
|
+
if (!p(r))
|
|
38
|
+
return;
|
|
39
|
+
c(() => t.resolve(r));
|
|
40
|
+
} catch (r) {
|
|
41
|
+
c(() => t.reject(r));
|
|
8
42
|
}
|
|
9
|
-
|
|
10
|
-
|
|
43
|
+
}, {
|
|
44
|
+
interval: f,
|
|
45
|
+
emitOnBegin: !0
|
|
46
|
+
});
|
|
47
|
+
return m;
|
|
48
|
+
});
|
|
49
|
+
return s = l ? setTimeout(() => {
|
|
50
|
+
u(), clearTimeout(s), n(new x({ id: i }));
|
|
51
|
+
}, l) : void 0, await g;
|
|
52
|
+
}
|
|
53
|
+
class x extends C {
|
|
54
|
+
constructor({ id: o }) {
|
|
55
|
+
super(`Timed out while waiting for call bundle with id "${o}" to be confirmed.`, { name: "WaitForCallsStatusTimeoutError" });
|
|
56
|
+
}
|
|
11
57
|
}
|
|
12
58
|
export {
|
|
13
|
-
|
|
59
|
+
x as WaitForCallsStatusTimeoutError,
|
|
60
|
+
z as waitForCallsStatus
|
|
14
61
|
};
|
package/dist/index123.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function t(e,{serializedTransaction:n}){return e.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}exports.sendRawTransaction=t;
|
package/dist/index123.js
CHANGED
|
@@ -1,61 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { withResolvers as E } from "./index125.js";
|
|
7
|
-
import { withRetry as B } from "./index126.js";
|
|
8
|
-
import { stringify as I } from "./index89.js";
|
|
9
|
-
import { getCallsStatus as j } from "./index95.js";
|
|
10
|
-
async function z(e, o) {
|
|
11
|
-
const {
|
|
12
|
-
id: i,
|
|
13
|
-
pollingInterval: f = e.pollingInterval,
|
|
14
|
-
status: p = ({ statusCode: t }) => t === 200 || t >= 300,
|
|
15
|
-
retryCount: w = 4,
|
|
16
|
-
retryDelay: d = ({ count: t }) => ~~(1 << t) * 200,
|
|
17
|
-
// exponential backoff
|
|
18
|
-
timeout: l = 6e4,
|
|
19
|
-
throwOnFailure: y = !1
|
|
20
|
-
} = o, v = I(["waitForCallsStatus", e.uid, i]), { promise: g, resolve: h, reject: n } = E();
|
|
21
|
-
let s;
|
|
22
|
-
const u = T(v, { resolve: h, reject: n }, (t) => {
|
|
23
|
-
const m = b(async () => {
|
|
24
|
-
const c = (r) => {
|
|
25
|
-
clearTimeout(s), m(), r(), u();
|
|
26
|
-
};
|
|
27
|
-
try {
|
|
28
|
-
const r = await B(async () => {
|
|
29
|
-
const a = await S(e, j, "getCallsStatus")({ id: i });
|
|
30
|
-
if (y && a.status === "failure")
|
|
31
|
-
throw new F(a);
|
|
32
|
-
return a;
|
|
33
|
-
}, {
|
|
34
|
-
retryCount: w,
|
|
35
|
-
delay: d
|
|
36
|
-
});
|
|
37
|
-
if (!p(r))
|
|
38
|
-
return;
|
|
39
|
-
c(() => t.resolve(r));
|
|
40
|
-
} catch (r) {
|
|
41
|
-
c(() => t.reject(r));
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
interval: f,
|
|
45
|
-
emitOnBegin: !0
|
|
46
|
-
});
|
|
47
|
-
return m;
|
|
48
|
-
});
|
|
49
|
-
return s = l ? setTimeout(() => {
|
|
50
|
-
u(), clearTimeout(s), n(new x({ id: i }));
|
|
51
|
-
}, l) : void 0, await g;
|
|
52
|
-
}
|
|
53
|
-
class x extends C {
|
|
54
|
-
constructor({ id: o }) {
|
|
55
|
-
super(`Timed out while waiting for call bundle with id "${o}" to be confirmed.`, { name: "WaitForCallsStatusTimeoutError" });
|
|
56
|
-
}
|
|
1
|
+
async function a(n, { serializedTransaction: t }) {
|
|
2
|
+
return n.request({
|
|
3
|
+
method: "eth_sendRawTransaction",
|
|
4
|
+
params: [t]
|
|
5
|
+
}, { retryCount: 0 });
|
|
57
6
|
}
|
|
58
7
|
export {
|
|
59
|
-
|
|
60
|
-
z as waitForCallsStatus
|
|
8
|
+
a as sendRawTransaction
|
|
61
9
|
};
|
package/dist/index124.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 u=require("./index81.cjs"),f=require("./index83.cjs"),m=require("./index42.cjs");async function d(e,{serializedTransaction:r,throwOnReceiptRevert:s,timeout:n}){var a,o,c;const i=await e.request({method:"eth_sendRawTransactionSync",params:n?[r,m.numberToHex(n)]:[r]},{retryCount:0}),t=(((c=(o=(a=e.chain)==null?void 0:a.formatters)==null?void 0:o.transactionReceipt)==null?void 0:c.format)||f.formatTransactionReceipt)(i);if(t.status==="reverted"&&s)throw new u.TransactionReceiptRevertedError({receipt:t});return t}exports.sendRawTransactionSync=d;
|
package/dist/index124.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { TransactionReceiptRevertedError as i } from "./index81.js";
|
|
2
|
+
import { formatTransactionReceipt as f } from "./index83.js";
|
|
3
|
+
import { numberToHex as p } from "./index42.js";
|
|
4
|
+
async function h(r, { serializedTransaction: e, throwOnReceiptRevert: m, timeout: o }) {
|
|
5
|
+
var a, n, c;
|
|
6
|
+
const s = await r.request({
|
|
7
|
+
method: "eth_sendRawTransactionSync",
|
|
8
|
+
params: o ? [e, p(o)] : [e]
|
|
9
|
+
}, { retryCount: 0 }), t = (((c = (n = (a = r.chain) == null ? void 0 : a.formatters) == null ? void 0 : n.transactionReceipt) == null ? void 0 : c.format) || f)(s);
|
|
10
|
+
if (t.status === "reverted" && m)
|
|
11
|
+
throw new i({ receipt: t });
|
|
12
|
+
return t;
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
h as sendRawTransactionSync
|
|
16
16
|
};
|
package/dist/index125.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index36.cjs");function i({chain:r,currentChainId:t}){if(!r)throw new e.ChainNotFoundError;if(t!==r.id)throw new e.ChainMismatchError({chain:r,currentChainId:t})}exports.assertCurrentChain=i;
|
package/dist/index125.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}), resolve: e, reject: n };
|
|
1
|
+
import { ChainNotFoundError as t, ChainMismatchError as i } from "./index36.js";
|
|
2
|
+
function e({ chain: r, currentChainId: o }) {
|
|
3
|
+
if (!r)
|
|
4
|
+
throw new t();
|
|
5
|
+
if (o !== r.id)
|
|
6
|
+
throw new i({ chain: r, currentChainId: o });
|
|
8
7
|
}
|
|
9
8
|
export {
|
|
10
|
-
|
|
9
|
+
e as assertCurrentChain
|
|
11
10
|
};
|
package/dist/index126.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("./index32.cjs"),u=require("./index110.cjs"),W=require("./index35.cjs"),D=require("./index81.cjs"),H=require("./index62.cjs"),J=require("./index125.cjs"),K=require("./index67.cjs"),Q=require("./index44.cjs"),V=require("./index45.cjs"),d=require("./index55.cjs"),X=require("./index116.cjs"),Y=require("./index48.cjs"),Z=require("./index69.cjs"),$=require("./index87.cjs"),O=require("./index64.cjs"),tt=require("./index124.cjs"),f=new X.LruMap(128);async function et(e,n){var F,M,I,b;const{account:p=e.account,chain:r=e.chain,accessList:m,authorizationList:s,blobs:q,data:y,gas:T,gasPrice:R,maxFeePerBlobGas:g,maxFeePerGas:A,maxPriorityFeePerGas:E,nonce:S,pollingInterval:G,throwOnReceiptRevert:C,type:N,value:P,...v}=n,j=n.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3);if(typeof p>"u")throw new u.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const t=p?U.parseAccount(p):null;try{Y.assertRequest(n);const a=await(async()=>{if(n.to)return n.to;if(n.to!==null&&s&&s.length>0)return await H.recoverAuthorizationAddress({authorization:s[0]}).catch(()=>{throw new W.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((t==null?void 0:t.type)==="json-rpc"||t===null){let c;r!==null&&(c=await d.getAction(e,Z.getChainId,"getChainId")({}),J.assertCurrentChain({currentChainId:c,chain:r}));const i=(I=(M=(F=e.chain)==null?void 0:F.formatters)==null?void 0:M.transactionRequest)==null?void 0:I.format,x=(i||V.formatTransactionRequest)({...Q.extract(v,{format:i}),accessList:m,account:t,authorizationList:s,blobs:q,chainId:c,data:y,gas:T,gasPrice:R,maxFeePerBlobGas:g,maxFeePerGas:A,maxPriorityFeePerGas:E,nonce:S,to:a,type:N,value:P},"sendTransaction"),_=f.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",B=await(async()=>{try{return await e.request({method:k,params:[x]},{retryCount:0})}catch(L){if(_===!1)throw L;const o=L;if(o.name==="InvalidInputRpcError"||o.name==="InvalidParamsRpcError"||o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(w=>(f.set(e.uid,!0),w)).catch(w=>{const l=w;throw l.name==="MethodNotFoundRpcError"||l.name==="MethodNotSupportedRpcError"?(f.set(e.uid,!1),o):l});throw o}})(),h=await d.getAction(e,$.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:B,pollingInterval:G,timeout:j});if(C&&h.status==="reverted")throw new D.TransactionReceiptRevertedError({receipt:h});return h}if((t==null?void 0:t.type)==="local"){const c=await d.getAction(e,O.prepareTransactionRequest,"prepareTransactionRequest")({account:t,accessList:m,authorizationList:s,blobs:q,chain:r,data:y,gas:T,gasPrice:R,maxFeePerBlobGas:g,maxFeePerGas:A,maxPriorityFeePerGas:E,nonce:S,nonceManager:t.nonceManager,parameters:[...O.defaultParameters,"sidecars"],type:N,value:P,...v,to:a}),i=(b=r==null?void 0:r.serializers)==null?void 0:b.transaction,z=await t.signTransaction(c,{serializer:i});return await d.getAction(e,tt.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:z,throwOnReceiptRevert:C})}throw(t==null?void 0:t.type)==="smart"?new u.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new u.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:t==null?void 0:t.type})}catch(a){throw a instanceof u.AccountTypeNotSupportedError?a:K.getTransactionError(a,{...n,account:t,chain:n.chain||void 0})}}exports.sendTransactionSync=et;
|
package/dist/index126.js
CHANGED
|
@@ -1,23 +1,140 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { parseAccount as U } from "./index32.js";
|
|
2
|
+
import { AccountNotFoundError as W, AccountTypeNotSupportedError as h } from "./index110.js";
|
|
3
|
+
import { BaseError as j } from "./index35.js";
|
|
4
|
+
import { TransactionReceiptRevertedError as D } from "./index81.js";
|
|
5
|
+
import { recoverAuthorizationAddress as H } from "./index62.js";
|
|
6
|
+
import { assertCurrentChain as J } from "./index125.js";
|
|
7
|
+
import { getTransactionError as K } from "./index67.js";
|
|
8
|
+
import { extract as Q } from "./index44.js";
|
|
9
|
+
import { formatTransactionRequest as V } from "./index45.js";
|
|
10
|
+
import { getAction as d } from "./index55.js";
|
|
11
|
+
import { LruMap as X } from "./index116.js";
|
|
12
|
+
import { assertRequest as Y } from "./index48.js";
|
|
13
|
+
import { getChainId as Z } from "./index69.js";
|
|
14
|
+
import { waitForTransactionReceipt as $ } from "./index87.js";
|
|
15
|
+
import { prepareTransactionRequest as tt, defaultParameters as rt } from "./index64.js";
|
|
16
|
+
import { sendRawTransactionSync as et } from "./index124.js";
|
|
17
|
+
const w = new X(128);
|
|
18
|
+
async function Tt(r, o) {
|
|
19
|
+
var v, I, z, A;
|
|
20
|
+
const { account: m = r.account, chain: e = r.chain, accessList: l, authorizationList: s, blobs: y, data: R, gas: T, gasPrice: g, maxFeePerBlobGas: E, maxFeePerGas: q, maxPriorityFeePerGas: P, nonce: C, pollingInterval: G, throwOnReceiptRevert: F, type: M, value: N, ...S } = o, O = o.timeout ?? Math.max(((e == null ? void 0 : e.blockTime) ?? 0) * 3, 5e3);
|
|
21
|
+
if (typeof m > "u")
|
|
22
|
+
throw new W({
|
|
23
|
+
docsPath: "/docs/actions/wallet/sendTransactionSync"
|
|
24
|
+
});
|
|
25
|
+
const t = m ? U(m) : null;
|
|
26
|
+
try {
|
|
27
|
+
Y(o);
|
|
28
|
+
const a = await (async () => {
|
|
29
|
+
if (o.to)
|
|
30
|
+
return o.to;
|
|
31
|
+
if (o.to !== null && s && s.length > 0)
|
|
32
|
+
return await H({
|
|
33
|
+
authorization: s[0]
|
|
34
|
+
}).catch(() => {
|
|
35
|
+
throw new j("`to` is required. Could not infer from `authorizationList`.");
|
|
36
|
+
});
|
|
37
|
+
})();
|
|
38
|
+
if ((t == null ? void 0 : t.type) === "json-rpc" || t === null) {
|
|
39
|
+
let i;
|
|
40
|
+
e !== null && (i = await d(r, Z, "getChainId")({}), J({
|
|
41
|
+
currentChainId: i,
|
|
42
|
+
chain: e
|
|
43
|
+
}));
|
|
44
|
+
const c = (z = (I = (v = r.chain) == null ? void 0 : v.formatters) == null ? void 0 : I.transactionRequest) == null ? void 0 : z.format, b = (c || V)({
|
|
45
|
+
// Pick out extra data that might exist on the chain's transaction request type.
|
|
46
|
+
...Q(S, { format: c }),
|
|
47
|
+
accessList: l,
|
|
48
|
+
account: t,
|
|
49
|
+
authorizationList: s,
|
|
50
|
+
blobs: y,
|
|
51
|
+
chainId: i,
|
|
52
|
+
data: R,
|
|
53
|
+
gas: T,
|
|
54
|
+
gasPrice: g,
|
|
55
|
+
maxFeePerBlobGas: E,
|
|
56
|
+
maxFeePerGas: q,
|
|
57
|
+
maxPriorityFeePerGas: P,
|
|
58
|
+
nonce: C,
|
|
59
|
+
to: a,
|
|
60
|
+
type: M,
|
|
61
|
+
value: N
|
|
62
|
+
}, "sendTransaction"), _ = w.get(r.uid), k = _ ? "wallet_sendTransaction" : "eth_sendTransaction", B = await (async () => {
|
|
63
|
+
try {
|
|
64
|
+
return await r.request({
|
|
65
|
+
method: k,
|
|
66
|
+
params: [b]
|
|
67
|
+
}, { retryCount: 0 });
|
|
68
|
+
} catch (L) {
|
|
69
|
+
if (_ === !1)
|
|
70
|
+
throw L;
|
|
71
|
+
const n = L;
|
|
72
|
+
if (n.name === "InvalidInputRpcError" || n.name === "InvalidParamsRpcError" || n.name === "MethodNotFoundRpcError" || n.name === "MethodNotSupportedRpcError")
|
|
73
|
+
return await r.request({
|
|
74
|
+
method: "wallet_sendTransaction",
|
|
75
|
+
params: [b]
|
|
76
|
+
}, { retryCount: 0 }).then((u) => (w.set(r.uid, !0), u)).catch((u) => {
|
|
77
|
+
const f = u;
|
|
78
|
+
throw f.name === "MethodNotFoundRpcError" || f.name === "MethodNotSupportedRpcError" ? (w.set(r.uid, !1), n) : f;
|
|
79
|
+
});
|
|
80
|
+
throw n;
|
|
81
|
+
}
|
|
82
|
+
})(), p = await d(r, $, "waitForTransactionReceipt")({
|
|
83
|
+
checkReplacement: !1,
|
|
84
|
+
hash: B,
|
|
85
|
+
pollingInterval: G,
|
|
86
|
+
timeout: O
|
|
87
|
+
});
|
|
88
|
+
if (F && p.status === "reverted")
|
|
89
|
+
throw new D({ receipt: p });
|
|
90
|
+
return p;
|
|
91
|
+
}
|
|
92
|
+
if ((t == null ? void 0 : t.type) === "local") {
|
|
93
|
+
const i = await d(r, tt, "prepareTransactionRequest")({
|
|
94
|
+
account: t,
|
|
95
|
+
accessList: l,
|
|
96
|
+
authorizationList: s,
|
|
97
|
+
blobs: y,
|
|
98
|
+
chain: e,
|
|
99
|
+
data: R,
|
|
100
|
+
gas: T,
|
|
101
|
+
gasPrice: g,
|
|
102
|
+
maxFeePerBlobGas: E,
|
|
103
|
+
maxFeePerGas: q,
|
|
104
|
+
maxPriorityFeePerGas: P,
|
|
105
|
+
nonce: C,
|
|
106
|
+
nonceManager: t.nonceManager,
|
|
107
|
+
parameters: [...rt, "sidecars"],
|
|
108
|
+
type: M,
|
|
109
|
+
value: N,
|
|
110
|
+
...S,
|
|
111
|
+
to: a
|
|
112
|
+
}), c = (A = e == null ? void 0 : e.serializers) == null ? void 0 : A.transaction, x = await t.signTransaction(i, {
|
|
113
|
+
serializer: c
|
|
114
|
+
});
|
|
115
|
+
return await d(r, et, "sendRawTransactionSync")({
|
|
116
|
+
serializedTransaction: x,
|
|
117
|
+
throwOnReceiptRevert: F
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
throw (t == null ? void 0 : t.type) === "smart" ? new h({
|
|
121
|
+
metaMessages: [
|
|
122
|
+
"Consider using the `sendUserOperation` Action instead."
|
|
123
|
+
],
|
|
124
|
+
docsPath: "/docs/actions/bundler/sendUserOperation",
|
|
125
|
+
type: "smart"
|
|
126
|
+
}) : new h({
|
|
127
|
+
docsPath: "/docs/actions/wallet/sendTransactionSync",
|
|
128
|
+
type: t == null ? void 0 : t.type
|
|
129
|
+
});
|
|
130
|
+
} catch (a) {
|
|
131
|
+
throw a instanceof h ? a : K(a, {
|
|
132
|
+
...o,
|
|
133
|
+
account: t,
|
|
134
|
+
chain: o.chain || void 0
|
|
135
|
+
});
|
|
136
|
+
}
|
|
20
137
|
}
|
|
21
138
|
export {
|
|
22
|
-
|
|
139
|
+
Tt as sendTransactionSync
|
|
23
140
|
};
|
package/dist/index127.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function e(t,s){const{id:a}=s;await t.request({method:"wallet_showCallsStatus",params:[a]})}exports.showCallsStatus=e;
|
package/dist/index127.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
async function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
async function e(t, a) {
|
|
2
|
+
const { id: s } = a;
|
|
3
|
+
await t.request({
|
|
4
|
+
method: "wallet_showCallsStatus",
|
|
5
|
+
params: [s]
|
|
6
|
+
});
|
|
6
7
|
}
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
e as showCallsStatus
|
|
9
10
|
};
|
package/dist/index128.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 u=require("./index32.cjs"),r=require("./index110.cjs"),e=require("./index109.cjs");async function a(t,n){const{account:i=t.account}=n;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const o=u.parseAccount(i);if(!o.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const c=await e.prepareAuthorization(t,n);return o.signAuthorization(c)}exports.signAuthorization=a;
|
package/dist/index128.js
CHANGED
|
@@ -1,38 +1,24 @@
|
|
|
1
|
-
import { parseAccount as
|
|
2
|
-
import { AccountNotFoundError as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (typeof o > "u")
|
|
10
|
-
throw new p({
|
|
11
|
-
docsPath: "/docs/contract/writeContract"
|
|
1
|
+
import { parseAccount as c } from "./index32.js";
|
|
2
|
+
import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./index110.js";
|
|
3
|
+
import { prepareAuthorization as s } from "./index109.js";
|
|
4
|
+
async function A(t, n) {
|
|
5
|
+
const { account: i = t.account } = n;
|
|
6
|
+
if (!i)
|
|
7
|
+
throw new u({
|
|
8
|
+
docsPath: "/docs/eip7702/signAuthorization"
|
|
12
9
|
});
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
to: a,
|
|
22
|
-
account: t,
|
|
23
|
-
...d
|
|
10
|
+
const o = c(i);
|
|
11
|
+
if (!o.signAuthorization)
|
|
12
|
+
throw new a({
|
|
13
|
+
docsPath: "/docs/eip7702/signAuthorization",
|
|
14
|
+
metaMessages: [
|
|
15
|
+
"The `signAuthorization` Action does not support JSON-RPC Accounts."
|
|
16
|
+
],
|
|
17
|
+
type: o.type
|
|
24
18
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
abi: n,
|
|
28
|
-
address: a,
|
|
29
|
-
args: c,
|
|
30
|
-
docsPath: "/docs/contract/writeContract",
|
|
31
|
-
functionName: s,
|
|
32
|
-
sender: t == null ? void 0 : t.address
|
|
33
|
-
});
|
|
34
|
-
}
|
|
19
|
+
const r = await s(t, n);
|
|
20
|
+
return o.signAuthorization(r);
|
|
35
21
|
}
|
|
36
22
|
export {
|
|
37
|
-
|
|
23
|
+
A as signAuthorization
|
|
38
24
|
};
|