@gardenfi/utils 2.1.3-beta.5 → 2.1.3-beta.6
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 +34 -30
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +2 -44
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +6 -10
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +50 -5
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +16 -10
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +10 -3
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +5 -26
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +14 -4
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +3 -6
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +25 -46
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +4 -123
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +6 -7
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +115 -17
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +92 -19
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +124 -16
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +6 -39
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +20 -20
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +16 -10
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +39 -5
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +20 -105
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +12 -3
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +7 -4
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +107 -9
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +37 -134
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +3 -2
- package/dist/index121.cjs +1 -2
- package/dist/index121.js +4 -3
- package/dist/index122.cjs +1 -20
- package/dist/index122.js +9 -327
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -14
- package/dist/index124.cjs +2 -1
- package/dist/index124.js +3 -5
- package/dist/index125.cjs +20 -1
- package/dist/index125.js +327 -2
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +13 -7
- package/dist/index127.cjs +1 -3
- package/dist/index127.js +4 -215
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +2 -32
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +7 -21
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +21 -10
- package/dist/index130.cjs +3 -1
- package/dist/index130.js +215 -5
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +30 -72
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +21 -5
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +5 -5
- package/dist/index134.cjs +1 -9
- package/dist/index134.js +69 -31
- package/dist/index135.cjs +1 -3
- package/dist/index135.js +5 -110
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +6 -3
- package/dist/index137.cjs +9 -1
- package/dist/index137.js +28 -16
- package/dist/index138.cjs +3 -3
- package/dist/index138.js +96 -437
- package/dist/index139.cjs +1 -2
- package/dist/index139.js +3 -55
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +142 -2
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +17 -20
- package/dist/index141.cjs +3 -1
- package/dist/index141.js +439 -21
- package/dist/index142.cjs +2 -1
- package/dist/index142.js +51 -32
- package/dist/index143.cjs +1 -4
- package/dist/index143.js +18 -186
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +31 -6
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +33 -10
- package/dist/index146.cjs +4 -1
- package/dist/index146.js +189 -13
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +6 -25
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +12 -8
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +15 -52
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +13 -33
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +23 -41
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +8 -8
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +55 -7
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +44 -15
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +8 -18
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +7 -21
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +16 -51
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +18 -11
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +21 -161
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +50 -20
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +2 -19
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +11 -127
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +154 -31
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +21 -6
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +127 -27
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +31 -184
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +7 -4
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +26 -61
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +192 -3
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +4 -21
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +60 -14
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +24 -186
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +3 -24
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +20 -11
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +15 -33
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +24 -3
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +11 -18
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +33 -26
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +3 -37
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +18 -10
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +26 -24
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +35 -27
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +18 -120
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +10 -65
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +25 -9
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +28 -33
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +65 -24
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +9 -24
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +33 -3
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +24 -14
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +24 -103
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +3 -80
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +14 -5
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +121 -2
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +103 -6
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +78 -21
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +5 -37
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +6 -13
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +24 -39
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +34 -5
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +13 -11
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +42 -19
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +5 -78
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +12 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -13
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +19 -37
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +73 -106
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +2 -50
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +36 -31
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +111 -8
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +49 -6
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +32 -6
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +8 -11
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +6 -10
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +6 -13
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +13 -464
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +11 -32
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +11 -5
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +13 -7
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +32 -8
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +5 -21
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +7 -31
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +8 -20
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +20 -3
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +31 -17
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +20 -10
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +464 -36
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +3 -21
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +16 -21
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +10 -5
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +21 -5
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +22 -8
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +5 -104
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +5 -112
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +8 -18
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +99 -166
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +3 -18
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +36 -31
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +18 -10
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +170 -15
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +16 -21
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +11 -2
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +16 -13
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +21 -11
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +30 -47
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +2 -12
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +13 -7
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +12 -9
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +26 -31
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +47 -13
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +10 -13
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +7 -9
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +9 -30
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +12 -23
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +14 -12
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +9 -24
- package/dist/index247.cjs +1 -2
- package/dist/index247.js +24 -24
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +12 -13
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +23 -14
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +8 -12
- package/dist/index250.cjs +2 -1
- package/dist/index250.js +23 -51
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +13 -25
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +14 -12
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +52 -15
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +25 -5
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +13 -13
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +14 -9
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +5 -16
- package/dist/index258.cjs +1 -2
- package/dist/index258.js +13 -41
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +11 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +31 -58
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +16 -5
- package/dist/index261.cjs +2 -1
- package/dist/index261.js +40 -9
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +2 -20
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +5 -8
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +9 -65
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +17 -63
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +8 -186
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +66 -22
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +61 -38
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +179 -69
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +32 -13
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +21 -39
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +35 -9
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +70 -7
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +40 -12
- package/dist/index274.cjs +1 -2
- package/dist/index274.js +16 -18
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +12 -12
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +12 -11
- package/dist/index277.cjs +2 -1
- package/dist/index277.js +16 -14
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +13 -222
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +11 -6
- package/dist/index28.cjs +1 -16
- package/dist/index28.js +11 -113
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +104 -7
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +16 -26
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +214 -34
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +6 -18
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +7 -71
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +22 -63
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +19 -3
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +104 -136
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +3 -155
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +138 -7
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +57 -7
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +140 -98
- package/dist/index291.cjs +1 -2
- package/dist/index291.js +9 -134
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +109 -24
- package/dist/index293.cjs +2 -1
- package/dist/index293.js +127 -31
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +205 -10
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +42 -19
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +75 -65
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +10 -39
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +18 -641
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +16 -12
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +12 -31
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +68 -206
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +634 -149
- package/dist/index302.cjs +1 -2
- package/dist/index302.js +174 -63
- package/dist/index303.cjs +2 -1
- package/dist/index303.js +66 -4
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +4 -40
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +40 -7
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +7 -62
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +57 -72
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +78 -4
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +4 -195
- package/dist/index31.cjs +16 -1
- package/dist/index31.js +112 -28
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +192 -16
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +3 -3
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +1 -1
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +5 -105
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +2 -5
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +22 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +7 -16
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +30 -32
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +25 -40
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +16 -151
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +28 -30
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +41 -35
- package/dist/index38.cjs +1 -2
- package/dist/index38.js +151 -59
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +35 -32
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +17 -21
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +38 -15
- package/dist/index41.cjs +2 -1
- package/dist/index41.js +59 -8
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +33 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +15 -26
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +7 -30
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +2 -4
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +44 -8
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +30 -67
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +3 -9
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +9 -28
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +68 -71
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +9 -19
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +26 -108
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +71 -60
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +19 -24
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +110 -40
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +57 -34
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +20 -54
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +37 -159
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +36 -39
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +6 -6
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +58 -9
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +163 -34
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +40 -9
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -50
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +36 -85
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +9 -41
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +50 -8
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +85 -6
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +41 -17
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +8 -8
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +105 -22
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +6 -13
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +17 -7
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +8 -9
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +13 -46
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +7 -13
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +9 -16
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +46 -13
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +13 -6
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +15 -34
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +13 -9
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +10 -2
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +5 -7
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +35 -26
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +9 -10
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +8 -9
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +25 -114
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +10 -80
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +13 -180
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +117 -6
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +80 -13
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +181 -13
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +19 -119
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +5 -92
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +13 -75
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +13 -88
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +89 -132
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +69 -63
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +88 -23
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +135 -106
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +69 -6
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +23 -50
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +108 -15
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/approve.d.ts +1 -1
- package/dist/src/lib/auth/apikey/apikey.d.ts +1 -1
- package/dist/src/lib/auth/auth.types.d.ts +1 -1
- package/dist/src/lib/auth/passkey/passkey.d.ts +1 -1
- package/dist/src/lib/auth/passkey/passkeyLogin.d.ts +3 -3
- package/dist/src/lib/auth/siwe/siwe.d.ts +1 -1
- package/dist/src/lib/blockNumber/blockNumber.d.ts +2 -9
- package/dist/src/lib/blockNumber/index.d.ts +1 -1
- package/dist/src/lib/fetcher.d.ts +45 -0
- package/dist/src/lib/retry.d.ts +16 -0
- package/dist/src/lib/safeParseJson.d.ts +7 -0
- package/dist/src/lib/tryCatch.d.ts +7 -0
- package/dist/src/lib/types.d.ts +3 -0
- package/dist/src/lib/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index317.cjs +0 -1
- package/dist/index317.js +0 -24
package/dist/index87.js
CHANGED
|
@@ -1,9 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { multicall3Abi as P } from "./index22.js";
|
|
2
|
+
import { AbiDecodingZeroDataError as _ } from "./index125.js";
|
|
3
|
+
import { BaseError as v } from "./index41.js";
|
|
4
|
+
import { RawContractError as q } from "./index130.js";
|
|
5
|
+
import { decodeFunctionResult as B } from "./index173.js";
|
|
6
|
+
import { encodeFunctionData as O } from "./index180.js";
|
|
7
|
+
import { getChainContractAddress as T } from "./index217.js";
|
|
8
|
+
import { getContractError as F } from "./index224.js";
|
|
9
|
+
import { getAction as Z } from "./index32.js";
|
|
10
|
+
import { readContract as G } from "./index36.js";
|
|
11
|
+
async function X(n, w) {
|
|
12
|
+
var D;
|
|
13
|
+
const { account: b, allowFailure: u = !0, batchSize: j, blockNumber: p, blockTag: y, multicallAddress: N, stateOverride: R } = w, d = w.contracts, C = j ?? (typeof ((D = n.batch) == null ? void 0 : D.multicall) == "object" && n.batch.multicall.batchSize || 1024);
|
|
14
|
+
let m = N;
|
|
15
|
+
if (!m) {
|
|
16
|
+
if (!n.chain)
|
|
17
|
+
throw new Error("client chain not configured. multicallAddress is required.");
|
|
18
|
+
m = T({
|
|
19
|
+
blockNumber: p,
|
|
20
|
+
chain: n.chain,
|
|
21
|
+
contract: "multicall3"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const e = [[]];
|
|
25
|
+
let a = 0, f = 0;
|
|
26
|
+
for (let t = 0; t < d.length; t++) {
|
|
27
|
+
const { abi: o, address: s, args: r, functionName: i } = d[t];
|
|
28
|
+
try {
|
|
29
|
+
const c = O({ abi: o, args: r, functionName: i });
|
|
30
|
+
f += (c.length - 2) / 2, // Check if batching is enabled.
|
|
31
|
+
C > 0 && // Check if the current size of the batch exceeds the size limit.
|
|
32
|
+
f > C && // Check if the current chunk is not already empty.
|
|
33
|
+
e[a].length > 0 && (a++, f = (c.length - 2) / 2, e[a] = []), e[a] = [
|
|
34
|
+
...e[a],
|
|
35
|
+
{
|
|
36
|
+
allowFailure: !0,
|
|
37
|
+
callData: c,
|
|
38
|
+
target: s
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
} catch (c) {
|
|
42
|
+
const g = F(c, {
|
|
43
|
+
abi: o,
|
|
44
|
+
address: s,
|
|
45
|
+
args: r,
|
|
46
|
+
docsPath: "/docs/contract/multicall",
|
|
47
|
+
functionName: i,
|
|
48
|
+
sender: b
|
|
49
|
+
});
|
|
50
|
+
if (!u)
|
|
51
|
+
throw g;
|
|
52
|
+
e[a] = [
|
|
53
|
+
...e[a],
|
|
54
|
+
{
|
|
55
|
+
allowFailure: !0,
|
|
56
|
+
callData: "0x",
|
|
57
|
+
target: s
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const A = await Promise.allSettled(e.map((t) => Z(n, G, "readContract")({
|
|
63
|
+
abi: P,
|
|
64
|
+
account: b,
|
|
65
|
+
address: m,
|
|
66
|
+
args: [t],
|
|
67
|
+
blockNumber: p,
|
|
68
|
+
blockTag: y,
|
|
69
|
+
functionName: "aggregate3",
|
|
70
|
+
stateOverride: R
|
|
71
|
+
}))), l = [];
|
|
72
|
+
for (let t = 0; t < A.length; t++) {
|
|
73
|
+
const o = A[t];
|
|
74
|
+
if (o.status === "rejected") {
|
|
75
|
+
if (!u)
|
|
76
|
+
throw o.reason;
|
|
77
|
+
for (let r = 0; r < e[t].length; r++)
|
|
78
|
+
l.push({
|
|
79
|
+
status: "failure",
|
|
80
|
+
error: o.reason,
|
|
81
|
+
result: void 0
|
|
82
|
+
});
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const s = o.value;
|
|
86
|
+
for (let r = 0; r < s.length; r++) {
|
|
87
|
+
const { returnData: i, success: c } = s[r], { callData: g } = e[t][r], { abi: S, address: x, functionName: k, args: z } = d[l.length];
|
|
88
|
+
try {
|
|
89
|
+
if (g === "0x")
|
|
90
|
+
throw new _();
|
|
91
|
+
if (!c)
|
|
92
|
+
throw new q({ data: i });
|
|
93
|
+
const h = B({
|
|
94
|
+
abi: S,
|
|
95
|
+
args: z,
|
|
96
|
+
data: i,
|
|
97
|
+
functionName: k
|
|
98
|
+
});
|
|
99
|
+
l.push(u ? { result: h, status: "success" } : h);
|
|
100
|
+
} catch (h) {
|
|
101
|
+
const E = F(h, {
|
|
102
|
+
abi: S,
|
|
103
|
+
address: x,
|
|
104
|
+
args: z,
|
|
105
|
+
docsPath: "/docs/contract/multicall",
|
|
106
|
+
functionName: k
|
|
107
|
+
});
|
|
108
|
+
if (!u)
|
|
109
|
+
throw E;
|
|
110
|
+
l.push({ error: E, result: void 0, status: "failure" });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (l.length !== d.length)
|
|
115
|
+
throw new v("multicall results mismatch");
|
|
116
|
+
return l;
|
|
6
117
|
}
|
|
7
118
|
export {
|
|
8
|
-
|
|
119
|
+
X as multicall
|
|
9
120
|
};
|
package/dist/index88.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("./index236.cjs"),D=require("./index48.cjs"),F=require("./index125.cjs"),C=require("./index130.cjs"),H=require("./index146.cjs"),S=require("./index173.cjs"),A=require("./index180.cjs"),U=require("./index153.cjs"),j=require("./index224.cjs"),z=require("./index247.cjs"),I=require("./index158.cjs"),L=require("./index160.cjs"),M=require("./index187.cjs"),P=require("./index240.cjs"),V=require("./index200.cjs");async function Z(v,O){const{blockNumber:m,blockTag:w="latest",blocks:q,returnFullTransactions:N,traceTransfers:R,validation:x}=O;try{const c=[];for(const t of q){const l=t.blockOverrides?B.toRpc(t.blockOverrides):void 0,e=t.calls.map(n=>{const r=n,o=r.account?D.parseAccount(r.account):void 0,u={...r,data:r.abi?A.encodeFunctionData(r):r.data,from:r.from??(o==null?void 0:o.address)};return V.assertRequest(u),M.formatTransactionRequest(u)}),f=t.stateOverrides?P.serializeStateOverride(t.stateOverrides):void 0;c.push({blockOverrides:l,calls:e,stateOverrides:f})}const a=(typeof m=="bigint"?U.numberToHex(m):void 0)||w;return(await v.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:N,traceTransfers:R,validation:x},a]})).map((t,l)=>({...I.formatBlock(t),calls:t.calls.map((e,f)=>{var g,k;const{abi:n,args:r,functionName:o,to:u}=q[l].calls[f],b=((g=e.error)==null?void 0:g.data)??e.returnData,E=BigInt(e.gasUsed),h=(k=e.logs)==null?void 0:k.map(s=>L.formatLog(s)),i=e.status==="0x1"?"success":"failure",T=n&&i==="success"&&b!=="0x"?S.decodeFunctionResult({abi:n,data:b,functionName:o}):null,y=(()=>{var p;if(i==="success")return;let s;if(((p=e.error)==null?void 0:p.data)==="0x"?s=new F.AbiDecodingZeroDataError:e.error&&(s=new C.RawContractError(e.error)),!!s)return j.getContractError(s,{abi:n??[],address:u,args:r,functionName:o??"<unknown>"})})();return{data:b,gasUsed:E,logs:h,status:i,...i==="success"?{result:T}:{error:y}}})}))}catch(c){const d=c,a=z.getNodeError(d,{});throw a instanceof H.UnknownNodeError?d:a}}exports.simulateBlocks=Z;
|
package/dist/index88.js
CHANGED
|
@@ -1,16 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { toRpc as y } from "./index236.js";
|
|
2
|
+
import { parseAccount as B } from "./index48.js";
|
|
3
|
+
import { AbiDecodingZeroDataError as C } from "./index125.js";
|
|
4
|
+
import { RawContractError as F } from "./index130.js";
|
|
5
|
+
import { UnknownNodeError as H } from "./index146.js";
|
|
6
|
+
import { decodeFunctionResult as U } from "./index173.js";
|
|
7
|
+
import { encodeFunctionData as A } from "./index180.js";
|
|
8
|
+
import { numberToHex as S } from "./index153.js";
|
|
9
|
+
import { getContractError as z } from "./index224.js";
|
|
10
|
+
import { getNodeError as I } from "./index247.js";
|
|
11
|
+
import { formatBlock as L } from "./index158.js";
|
|
12
|
+
import { formatLog as V } from "./index160.js";
|
|
13
|
+
import { formatTransactionRequest as Z } from "./index187.js";
|
|
14
|
+
import { serializeStateOverride as _ } from "./index240.js";
|
|
15
|
+
import { assertRequest as j } from "./index200.js";
|
|
16
|
+
async function ar(w, x) {
|
|
17
|
+
const { blockNumber: p, blockTag: N = "latest", blocks: b, returnFullTransactions: O, traceTransfers: h, validation: E } = x;
|
|
18
|
+
try {
|
|
19
|
+
const a = [];
|
|
20
|
+
for (const t of b) {
|
|
21
|
+
const f = t.blockOverrides ? y(t.blockOverrides) : void 0, r = t.calls.map((n) => {
|
|
22
|
+
const o = n, e = o.account ? B(o.account) : void 0, i = {
|
|
23
|
+
...o,
|
|
24
|
+
data: o.abi ? A(o) : o.data,
|
|
25
|
+
from: o.from ?? (e == null ? void 0 : e.address)
|
|
26
|
+
};
|
|
27
|
+
return j(i), Z(i);
|
|
28
|
+
}), d = t.stateOverrides ? _(t.stateOverrides) : void 0;
|
|
29
|
+
a.push({
|
|
30
|
+
blockOverrides: f,
|
|
31
|
+
calls: r,
|
|
32
|
+
stateOverrides: d
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const c = (typeof p == "bigint" ? S(p) : void 0) || N;
|
|
36
|
+
return (await w.request({
|
|
37
|
+
method: "eth_simulateV1",
|
|
38
|
+
params: [
|
|
39
|
+
{ blockStateCalls: a, returnFullTransactions: O, traceTransfers: h, validation: E },
|
|
40
|
+
c
|
|
41
|
+
]
|
|
42
|
+
})).map((t, f) => ({
|
|
43
|
+
...L(t),
|
|
44
|
+
calls: t.calls.map((r, d) => {
|
|
45
|
+
var k, g;
|
|
46
|
+
const { abi: n, args: o, functionName: e, to: i } = b[f].calls[d], l = ((k = r.error) == null ? void 0 : k.data) ?? r.returnData, R = BigInt(r.gasUsed), T = (g = r.logs) == null ? void 0 : g.map((s) => V(s)), m = r.status === "0x1" ? "success" : "failure", q = n && m === "success" && l !== "0x" ? U({
|
|
47
|
+
abi: n,
|
|
48
|
+
data: l,
|
|
49
|
+
functionName: e
|
|
50
|
+
}) : null, D = (() => {
|
|
51
|
+
var v;
|
|
52
|
+
if (m === "success")
|
|
53
|
+
return;
|
|
54
|
+
let s;
|
|
55
|
+
if (((v = r.error) == null ? void 0 : v.data) === "0x" ? s = new C() : r.error && (s = new F(r.error)), !!s)
|
|
56
|
+
return z(s, {
|
|
57
|
+
abi: n ?? [],
|
|
58
|
+
address: i,
|
|
59
|
+
args: o,
|
|
60
|
+
functionName: e ?? "<unknown>"
|
|
61
|
+
});
|
|
62
|
+
})();
|
|
63
|
+
return {
|
|
64
|
+
data: l,
|
|
65
|
+
gasUsed: R,
|
|
66
|
+
logs: T,
|
|
67
|
+
status: m,
|
|
68
|
+
...m === "success" ? {
|
|
69
|
+
result: q
|
|
70
|
+
} : {
|
|
71
|
+
error: D
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
})
|
|
75
|
+
}));
|
|
76
|
+
} catch (a) {
|
|
77
|
+
const u = a, c = I(u, {});
|
|
78
|
+
throw c instanceof H ? u : c;
|
|
79
|
+
}
|
|
13
80
|
}
|
|
14
81
|
export {
|
|
15
|
-
|
|
82
|
+
ar as simulateBlocks
|
|
16
83
|
};
|
package/dist/index89.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 z=require("./index248.cjs"),a=require("./index249.cjs"),Q=require("./index48.cjs"),n=require("./index120.cjs"),W=require("./index121.cjs"),X=require("./index41.cjs"),Y=require("./index180.cjs"),Z=require("./index62.cjs"),$=require("./index88.cjs"),k=require("./index185.cjs"),_="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function ss(q,o){const{blockNumber:C,blockTag:v,calls:N,stateOverrides:d,traceAssetChanges:f,traceTransfers:T,validation:w}=o,t=o.account?Q.parseAccount(o.account):void 0;if(f&&!t)throw new X.BaseError("`account` is required when `traceAssetChanges` is true");const B=t?z.encode(z.from("constructor(bytes, bytes)"),{bytecode:W.deploylessCallViaBytecodeBytecode,args:[_,a.encodeData(a.from("function getBalance(address)"),[t.address])]}):void 0,c=f?await Promise.all(o.calls.map(async s=>{if(!s.data&&!s.abi)return;const{accessList:e}=await Z.createAccessList(q,{account:t.address,...s,data:s.abi?Y.encodeFunctionData(s):s.data});return e.map(({address:r,storageKeys:i})=>i.length>0?r:null)})).then(s=>s.flat().filter(Boolean)):[],P=d==null?void 0:d.map(s=>s.address===(t==null?void 0:t.address)?{...s,nonce:0}:s),l=await $.simulateBlocks(q,{blockNumber:C,blockTag:v,blocks:[...f?[{calls:[{data:B}],stateOverrides:d},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[t.address],to:s,from:n.zeroAddress,nonce:e})),stateOverrides:[{address:n.zeroAddress,nonce:0}]}]:[],{calls:[...N,{}].map((s,e)=>({...s,from:t==null?void 0:t.address,nonce:e})),stateOverrides:P},...f?[{calls:[{data:B}]},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[t.address],to:s,from:n.zeroAddress,nonce:e})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function decimals() returns (uint256)")],functionName:"decimals",from:n.zeroAddress,nonce:e})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:n.zeroAddress,nonce:e})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function symbol() returns (string)")],functionName:"symbol",from:n.zeroAddress,nonce:e})),stateOverrides:[{address:n.zeroAddress,nonce:0}]}]:[]],traceTransfers:T,validation:w}),I=f?l[2]:l[0],[u,b,,m,g,p,A,y]=f?l:[],{calls:D,...F}=I,L=D.slice(0,-1)??[],R=(u==null?void 0:u.calls)??[],S=(b==null?void 0:b.calls)??[],U=[...R,...S].map(s=>s.status==="success"?k.hexToBigInt(s.data):null),E=(m==null?void 0:m.calls)??[],H=(g==null?void 0:g.calls)??[],j=[...E,...H].map(s=>s.status==="success"?k.hexToBigInt(s.data):null),x=((p==null?void 0:p.calls)??[]).map(s=>s.status==="success"?s.result:null),M=((y==null?void 0:y.calls)??[]).map(s=>s.status==="success"?s.result:null),V=((A==null?void 0:A.calls)??[]).map(s=>s.status==="success"?s.result:null),h=[];for(const[s,e]of j.entries()){const r=U[s];if(typeof e!="bigint"||typeof r!="bigint")continue;const i=x[s-1],G=M[s-1],J=V[s-1],O=s===0?{address:n.ethAddress,decimals:18,symbol:"ETH"}:{address:c[s-1],decimals:J||i?Number(i??1):void 0,symbol:G??void 0};h.some(K=>K.token.address===O.address)||h.push({token:O,value:{pre:r,post:e,diff:e-r}})}return{assetChanges:h,block:F,results:L}}exports.simulateCalls=ss;
|
package/dist/index89.js
CHANGED
|
@@ -1,16 +1,184 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { encode as K, from as M } from "./index248.js";
|
|
2
|
+
import { encodeData as Q, from as c } from "./index249.js";
|
|
3
|
+
import { parseAccount as W } from "./index48.js";
|
|
4
|
+
import { zeroAddress as t, ethAddress as X } from "./index120.js";
|
|
5
|
+
import { deploylessCallViaBytecodeBytecode as Y } from "./index121.js";
|
|
6
|
+
import { BaseError as Z } from "./index41.js";
|
|
7
|
+
import { encodeFunctionData as _ } from "./index180.js";
|
|
8
|
+
import { createAccessList as ss } from "./index62.js";
|
|
9
|
+
import { simulateBlocks as es } from "./index88.js";
|
|
10
|
+
import { hexToBigInt as N } from "./index185.js";
|
|
11
|
+
const fs = "0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";
|
|
12
|
+
async function bs(B, r) {
|
|
13
|
+
const { blockNumber: v, blockTag: w, calls: C, stateOverrides: d, traceAssetChanges: a, traceTransfers: P, validation: T } = r, f = r.account ? W(r.account) : void 0;
|
|
14
|
+
if (a && !f)
|
|
15
|
+
throw new Z("`account` is required when `traceAssetChanges` is true");
|
|
16
|
+
const k = f ? K(M("constructor(bytes, bytes)"), {
|
|
17
|
+
bytecode: Y,
|
|
18
|
+
args: [
|
|
19
|
+
fs,
|
|
20
|
+
Q(c("function getBalance(address)"), [f.address])
|
|
21
|
+
]
|
|
22
|
+
}) : void 0, n = a ? await Promise.all(r.calls.map(async (s) => {
|
|
23
|
+
if (!s.data && !s.abi)
|
|
24
|
+
return;
|
|
25
|
+
const { accessList: e } = await ss(B, {
|
|
26
|
+
account: f.address,
|
|
27
|
+
...s,
|
|
28
|
+
data: s.abi ? _(s) : s.data
|
|
29
|
+
});
|
|
30
|
+
return e.map(({ address: o, storageKeys: i }) => i.length > 0 ? o : null);
|
|
31
|
+
})).then((s) => s.flat().filter(Boolean)) : [], I = d == null ? void 0 : d.map((s) => s.address === (f == null ? void 0 : f.address) ? {
|
|
32
|
+
...s,
|
|
33
|
+
nonce: 0
|
|
34
|
+
} : s), l = await es(B, {
|
|
35
|
+
blockNumber: v,
|
|
36
|
+
blockTag: w,
|
|
37
|
+
blocks: [
|
|
38
|
+
...a ? [
|
|
39
|
+
// ETH pre balances
|
|
40
|
+
{
|
|
41
|
+
calls: [{ data: k }],
|
|
42
|
+
stateOverrides: d
|
|
43
|
+
},
|
|
44
|
+
// Asset pre balances
|
|
45
|
+
{
|
|
46
|
+
calls: n.map((s, e) => ({
|
|
47
|
+
abi: [
|
|
48
|
+
c("function balanceOf(address) returns (uint256)")
|
|
49
|
+
],
|
|
50
|
+
functionName: "balanceOf",
|
|
51
|
+
args: [f.address],
|
|
52
|
+
to: s,
|
|
53
|
+
from: t,
|
|
54
|
+
nonce: e
|
|
55
|
+
})),
|
|
56
|
+
stateOverrides: [
|
|
57
|
+
{
|
|
58
|
+
address: t,
|
|
59
|
+
nonce: 0
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
] : [],
|
|
64
|
+
{
|
|
65
|
+
calls: [...C, {}].map((s, e) => ({
|
|
66
|
+
...s,
|
|
67
|
+
from: f == null ? void 0 : f.address,
|
|
68
|
+
nonce: e
|
|
69
|
+
})),
|
|
70
|
+
stateOverrides: I
|
|
71
|
+
},
|
|
72
|
+
...a ? [
|
|
73
|
+
// ETH post balances
|
|
74
|
+
{
|
|
75
|
+
calls: [{ data: k }]
|
|
76
|
+
},
|
|
77
|
+
// Asset post balances
|
|
78
|
+
{
|
|
79
|
+
calls: n.map((s, e) => ({
|
|
80
|
+
abi: [
|
|
81
|
+
c("function balanceOf(address) returns (uint256)")
|
|
82
|
+
],
|
|
83
|
+
functionName: "balanceOf",
|
|
84
|
+
args: [f.address],
|
|
85
|
+
to: s,
|
|
86
|
+
from: t,
|
|
87
|
+
nonce: e
|
|
88
|
+
})),
|
|
89
|
+
stateOverrides: [
|
|
90
|
+
{
|
|
91
|
+
address: t,
|
|
92
|
+
nonce: 0
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
// Decimals
|
|
97
|
+
{
|
|
98
|
+
calls: n.map((s, e) => ({
|
|
99
|
+
to: s,
|
|
100
|
+
abi: [
|
|
101
|
+
c("function decimals() returns (uint256)")
|
|
102
|
+
],
|
|
103
|
+
functionName: "decimals",
|
|
104
|
+
from: t,
|
|
105
|
+
nonce: e
|
|
106
|
+
})),
|
|
107
|
+
stateOverrides: [
|
|
108
|
+
{
|
|
109
|
+
address: t,
|
|
110
|
+
nonce: 0
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
// Token URI
|
|
115
|
+
{
|
|
116
|
+
calls: n.map((s, e) => ({
|
|
117
|
+
to: s,
|
|
118
|
+
abi: [
|
|
119
|
+
c("function tokenURI(uint256) returns (string)")
|
|
120
|
+
],
|
|
121
|
+
functionName: "tokenURI",
|
|
122
|
+
args: [0n],
|
|
123
|
+
from: t,
|
|
124
|
+
nonce: e
|
|
125
|
+
})),
|
|
126
|
+
stateOverrides: [
|
|
127
|
+
{
|
|
128
|
+
address: t,
|
|
129
|
+
nonce: 0
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
// Symbols
|
|
134
|
+
{
|
|
135
|
+
calls: n.map((s, e) => ({
|
|
136
|
+
to: s,
|
|
137
|
+
abi: [c("function symbol() returns (string)")],
|
|
138
|
+
functionName: "symbol",
|
|
139
|
+
from: t,
|
|
140
|
+
nonce: e
|
|
141
|
+
})),
|
|
142
|
+
stateOverrides: [
|
|
143
|
+
{
|
|
144
|
+
address: t,
|
|
145
|
+
nonce: 0
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
] : []
|
|
150
|
+
],
|
|
151
|
+
traceTransfers: P,
|
|
152
|
+
validation: T
|
|
153
|
+
}), D = a ? l[2] : l[0], [u, b, , m, p, g, y, h] = a ? l : [], { calls: R, ...U } = D, E = R.slice(0, -1) ?? [], L = (u == null ? void 0 : u.calls) ?? [], q = (b == null ? void 0 : b.calls) ?? [], z = [...L, ...q].map((s) => s.status === "success" ? N(s.data) : null), F = (m == null ? void 0 : m.calls) ?? [], H = (p == null ? void 0 : p.calls) ?? [], S = [...F, ...H].map((s) => s.status === "success" ? N(s.data) : null), V = ((g == null ? void 0 : g.calls) ?? []).map((s) => s.status === "success" ? s.result : null), $ = ((h == null ? void 0 : h.calls) ?? []).map((s) => s.status === "success" ? s.result : null), j = ((y == null ? void 0 : y.calls) ?? []).map((s) => s.status === "success" ? s.result : null), O = [];
|
|
154
|
+
for (const [s, e] of S.entries()) {
|
|
155
|
+
const o = z[s];
|
|
156
|
+
if (typeof e != "bigint" || typeof o != "bigint")
|
|
157
|
+
continue;
|
|
158
|
+
const i = V[s - 1], x = $[s - 1], G = j[s - 1], A = s === 0 ? {
|
|
159
|
+
address: X,
|
|
160
|
+
decimals: 18,
|
|
161
|
+
symbol: "ETH"
|
|
162
|
+
} : {
|
|
163
|
+
address: n[s - 1],
|
|
164
|
+
decimals: G || i ? Number(i ?? 1) : void 0,
|
|
165
|
+
symbol: x ?? void 0
|
|
166
|
+
};
|
|
167
|
+
O.some((J) => J.token.address === A.address) || O.push({
|
|
168
|
+
token: A,
|
|
169
|
+
value: {
|
|
170
|
+
pre: o,
|
|
171
|
+
post: e,
|
|
172
|
+
diff: e - o
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
assetChanges: O,
|
|
178
|
+
block: U,
|
|
179
|
+
results: E
|
|
180
|
+
};
|
|
13
181
|
}
|
|
14
182
|
export {
|
|
15
|
-
|
|
183
|
+
bs as simulateCalls
|
|
16
184
|
};
|
package/dist/index9.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class r extends URL{constructor(t,e){super(t,e)}endpoint(t){t.startsWith("/")||(t=`/${t}`);const e=`${this.pathname!=="/"?this.pathname:""}${t}`;return new r(e,this)}socket(){if(this.protocol==="https:")return this.origin.replace("https","wss");if(this.protocol==="http:")return this.origin.replace("http","ws");throw new Error("Invalid protocol")}addSearchParams(t){const e=new URLSearchParams(this.search);for(const s in t)e.set(s,t[s]);return new r(`${this.pathname}?${e.toString()}`,this)}}exports.Url=r;
|
package/dist/index9.js
CHANGED
|
@@ -1,126 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { MemoryStorage as w } from "./index13.js";
|
|
5
|
-
import { StoreKeys as d } from "./index14.js";
|
|
6
|
-
import { add0x as g, parseJwt as p, Authorization as k } from "./index3.js";
|
|
7
|
-
import { createWalletClient as y } from "./index27.js";
|
|
8
|
-
import { http as C } from "./index26.js";
|
|
9
|
-
import { privateKeyToAccount as T } from "./index22.js";
|
|
10
|
-
import { createSiweMessage as v } from "./index28.js";
|
|
11
|
-
import { mainnet as S } from "./index24.js";
|
|
12
|
-
class f {
|
|
13
|
-
constructor(e, n, t) {
|
|
14
|
-
if (this.url = e.endpoint("siwe"), this.walletClient = n, this.domain = (t == null ? void 0 : t.domain) || "app.garden.finance", this.domain.startsWith("https://") && (this.domain = this.domain.split("https://")[1]), this.signingStatement = (t == null ? void 0 : t.signingStatement) ?? "Garden.fi", this.store = (t == null ? void 0 : t.store) ?? (typeof window < "u" ? window.localStorage : new w()), typeof window > "u") {
|
|
15
|
-
const i = new m();
|
|
16
|
-
this.fetchWithCookies = u(fetch, i);
|
|
17
|
-
} else
|
|
18
|
-
this.fetchWithCookies = window.fetch.bind(window);
|
|
1
|
+
class r extends URL {
|
|
2
|
+
constructor(t, s) {
|
|
3
|
+
super(t, s);
|
|
19
4
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
chain: S
|
|
25
|
-
});
|
|
26
|
-
return new f(e, i, t);
|
|
5
|
+
endpoint(t) {
|
|
6
|
+
t.startsWith("/") || (t = `/${t}`);
|
|
7
|
+
const s = `${this.pathname !== "/" ? this.pathname : ""}${t}`;
|
|
8
|
+
return new r(s, this);
|
|
27
9
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
t.exp > i && t.user_id.toLowerCase() === n.toLowerCase()
|
|
35
|
-
);
|
|
36
|
-
} catch {
|
|
37
|
-
return s(!1);
|
|
38
|
-
}
|
|
10
|
+
socket() {
|
|
11
|
+
if (this.protocol === "https:")
|
|
12
|
+
return this.origin.replace("https", "wss");
|
|
13
|
+
if (this.protocol === "http:")
|
|
14
|
+
return this.origin.replace("http", "ws");
|
|
15
|
+
throw new Error("Invalid protocol");
|
|
39
16
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (e) {
|
|
46
|
-
const o = this.verifyToken(
|
|
47
|
-
e,
|
|
48
|
-
this.walletClient.account.address
|
|
49
|
-
);
|
|
50
|
-
if (o.ok && o.val) return s(e);
|
|
51
|
-
}
|
|
52
|
-
const n = await this.signStatement();
|
|
53
|
-
if (n.error)
|
|
54
|
-
return r(n.error);
|
|
55
|
-
let t;
|
|
56
|
-
try {
|
|
57
|
-
const a = await (await this.fetchWithCookies(
|
|
58
|
-
this.url.endpoint("tokens"),
|
|
59
|
-
{
|
|
60
|
-
method: "POST",
|
|
61
|
-
body: JSON.stringify({
|
|
62
|
-
...n.val
|
|
63
|
-
}),
|
|
64
|
-
headers: {
|
|
65
|
-
"Content-Type": "application/json"
|
|
66
|
-
},
|
|
67
|
-
credentials: "include"
|
|
68
|
-
}
|
|
69
|
-
)).json();
|
|
70
|
-
if (a.error || !a.result)
|
|
71
|
-
return r(a.error ?? "Failed to get token");
|
|
72
|
-
t = a.result;
|
|
73
|
-
} catch (o) {
|
|
74
|
-
return r("Failed to get token", o);
|
|
75
|
-
}
|
|
76
|
-
if (!this.verifyToken(t, this.walletClient.account.address).val)
|
|
77
|
-
throw new Error("Token verification failed");
|
|
78
|
-
return this.store.setItem(d.AUTH_TOKEN, t), s(t);
|
|
79
|
-
}
|
|
80
|
-
async signStatement() {
|
|
81
|
-
var a;
|
|
82
|
-
if (!((a = this.walletClient.account) != null && a.address))
|
|
83
|
-
return r("Wallet client does not have a valid account");
|
|
84
|
-
const e = /* @__PURE__ */ new Date(), n = new Date(e.getTime() + 300 * 1e3);
|
|
85
|
-
let t;
|
|
86
|
-
try {
|
|
87
|
-
const l = await (await this.fetchWithCookies(this.url.endpoint("challenges"), {
|
|
88
|
-
method: "POST",
|
|
89
|
-
headers: {
|
|
90
|
-
"Content-Type": "application/json"
|
|
91
|
-
},
|
|
92
|
-
credentials: "include"
|
|
93
|
-
})).json();
|
|
94
|
-
if (l.error || !l.result)
|
|
95
|
-
return r("Failed to get nonce");
|
|
96
|
-
t = l.result;
|
|
97
|
-
} catch (h) {
|
|
98
|
-
return r("Failed to get nonce", h);
|
|
99
|
-
}
|
|
100
|
-
const i = await this.walletClient.getChainId(), c = v({
|
|
101
|
-
domain: this.domain,
|
|
102
|
-
address: this.walletClient.account.address,
|
|
103
|
-
statement: this.signingStatement,
|
|
104
|
-
nonce: t,
|
|
105
|
-
uri: "https://" + this.domain,
|
|
106
|
-
version: "1",
|
|
107
|
-
chainId: i,
|
|
108
|
-
notBefore: n
|
|
109
|
-
}), o = await this.walletClient.signMessage({
|
|
110
|
-
account: this.walletClient.account,
|
|
111
|
-
message: c
|
|
112
|
-
});
|
|
113
|
-
return s({
|
|
114
|
-
message: c,
|
|
115
|
-
signature: o,
|
|
116
|
-
nonce: t
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
async getAuthHeaders() {
|
|
120
|
-
const e = await this.getToken();
|
|
121
|
-
return e.error ? r(e.error) : s({ Authorization: k(e.val) });
|
|
17
|
+
addSearchParams(t) {
|
|
18
|
+
const s = new URLSearchParams(this.search);
|
|
19
|
+
for (const e in t)
|
|
20
|
+
s.set(e, t[e]);
|
|
21
|
+
return new r(`${this.pathname}?${s.toString()}`, this);
|
|
122
22
|
}
|
|
123
23
|
}
|
|
124
24
|
export {
|
|
125
|
-
|
|
25
|
+
r as Url
|
|
126
26
|
};
|
package/dist/index90.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 e(n,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}exports.uninstallFilter=e;
|