@gardenfi/swap 0.0.1 → 0.0.2-beta.1
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/README.md +58 -44
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +157 -25
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +6 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +10 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +8 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +16 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +174 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +36 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +54 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +40 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +27 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +82 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +23 -33
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +5 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +35 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +118 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +6 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +18 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +14 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +21 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +61 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +23 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +16 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +67 -63
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +287 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +576 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +36 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +6 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +12 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +119 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +64 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +27 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +39 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +44 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +28 -29
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +61 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +43 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +12 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +34 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +39 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +12 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +32 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +53 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +73 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +44 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +13 -186
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +80 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +11 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +9 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +20 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +11 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +16 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +10 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +19 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +49 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +16 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +49 -46
- package/dist/index150.cjs +1 -0
- package/dist/index150.js +19 -0
- package/dist/index151.cjs +1 -0
- package/dist/index151.js +16 -0
- package/dist/index152.cjs +1 -0
- package/dist/index152.js +9 -0
- package/dist/index153.cjs +1 -0
- package/dist/index153.js +38 -0
- package/dist/index154.cjs +1 -0
- package/dist/index154.js +12 -0
- package/dist/index155.cjs +1 -0
- package/dist/index155.js +11 -0
- package/dist/index156.cjs +1 -0
- package/dist/index156.js +32 -0
- package/dist/index157.cjs +1 -0
- package/dist/index157.js +13 -0
- package/dist/index158.cjs +1 -0
- package/dist/index158.js +17 -0
- package/dist/index159.cjs +1 -0
- package/dist/index159.js +15 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +8 -311
- package/dist/index160.cjs +1 -0
- package/dist/index160.js +124 -0
- package/dist/index161.cjs +1 -0
- package/dist/index161.js +85 -0
- package/dist/index162.cjs +1 -0
- package/dist/index162.js +180 -0
- package/dist/index163.cjs +1 -0
- package/dist/index163.js +47 -0
- package/dist/index164.cjs +1 -0
- package/dist/index164.js +9 -0
- package/dist/index165.cjs +1 -0
- package/dist/index165.js +17 -0
- package/dist/index166.cjs +1 -0
- package/dist/index166.js +17 -0
- package/dist/index167.cjs +1 -0
- package/dist/index167.js +106 -0
- package/dist/index168.cjs +1 -0
- package/dist/index168.js +78 -0
- package/dist/index169.cjs +1 -0
- package/dist/index169.js +92 -0
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +59 -27
- package/dist/index170.cjs +1 -0
- package/dist/index170.js +154 -0
- package/dist/index171.cjs +1 -0
- package/dist/index171.js +141 -0
- package/dist/index172.cjs +1 -0
- package/dist/index172.js +72 -0
- package/dist/index173.cjs +1 -0
- package/dist/index173.js +26 -0
- package/dist/index174.cjs +1 -0
- package/dist/index174.js +167 -0
- package/dist/index175.cjs +1 -0
- package/dist/index175.js +9 -0
- package/dist/index176.cjs +1 -0
- package/dist/index176.js +16 -0
- package/dist/index177.cjs +1 -0
- package/dist/index177.js +22 -0
- package/dist/index178.cjs +1 -0
- package/dist/index178.js +109 -0
- package/dist/index179.cjs +1 -0
- package/dist/index179.js +81 -0
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +74 -14
- package/dist/index180.cjs +1 -0
- package/dist/index180.js +12 -0
- package/dist/index181.cjs +1 -0
- package/dist/index181.js +31 -0
- package/dist/index182.cjs +1 -0
- package/dist/index182.js +93 -0
- package/dist/index183.cjs +1 -0
- package/dist/index183.js +5 -0
- package/dist/index184.cjs +1 -0
- package/dist/index184.js +4 -0
- package/dist/index185.cjs +2 -0
- package/dist/index185.js +5 -0
- package/dist/index186.cjs +1 -0
- package/dist/index186.js +11 -0
- package/dist/index187.cjs +20 -0
- package/dist/index187.js +329 -0
- package/dist/index188.cjs +1 -0
- package/dist/index188.js +16 -0
- package/dist/index189.cjs +2 -0
- package/dist/index189.js +62 -0
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +76 -224
- package/dist/index190.cjs +1 -0
- package/dist/index190.js +4 -0
- package/dist/index191.cjs +1 -0
- package/dist/index191.js +10 -0
- package/dist/index192.cjs +1 -0
- package/dist/index192.js +34 -0
- package/dist/index193.cjs +1 -0
- package/dist/index193.js +24 -0
- package/dist/index194.cjs +1 -0
- package/dist/index194.js +8 -0
- package/dist/index195.cjs +1 -0
- package/dist/index195.js +76 -0
- package/dist/index196.cjs +1 -0
- package/dist/index196.js +8 -0
- package/dist/index197.cjs +1 -0
- package/dist/index197.js +8 -0
- package/dist/index198.cjs +9 -0
- package/dist/index198.js +38 -0
- package/dist/index199.cjs +2 -0
- package/dist/index199.js +123 -0
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +58 -13
- package/dist/index200.cjs +1 -0
- package/dist/index200.js +5 -0
- package/dist/index201.cjs +1 -0
- package/dist/index201.js +21 -0
- package/dist/index202.cjs +1 -0
- package/dist/index202.js +36 -0
- package/dist/index203.cjs +1 -0
- package/dist/index203.js +38 -0
- package/dist/index204.cjs +1 -0
- package/dist/index204.js +26 -0
- package/dist/index205.cjs +1 -0
- package/dist/index205.js +11 -0
- package/dist/index206.cjs +4 -0
- package/dist/index206.js +197 -0
- package/dist/index207.cjs +1 -0
- package/dist/index207.js +4 -0
- package/dist/index208.cjs +3 -0
- package/dist/index208.js +454 -0
- package/dist/index209.cjs +1 -0
- package/dist/index209.js +30 -0
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +146 -85
- package/dist/index210.cjs +1 -0
- package/dist/index210.js +164 -0
- package/dist/index211.cjs +1 -0
- package/dist/index211.js +130 -0
- package/dist/index212.cjs +1 -0
- package/dist/index212.js +41 -0
- package/dist/index213.cjs +1 -0
- package/dist/index213.js +30 -0
- package/dist/index214.cjs +1 -0
- package/dist/index214.js +58 -0
- package/dist/index215.cjs +1 -0
- package/dist/index215.js +194 -0
- package/dist/index216.cjs +1 -0
- package/dist/index216.js +6 -0
- package/dist/index217.cjs +1 -0
- package/dist/index217.js +76 -0
- package/dist/index218.cjs +1 -0
- package/dist/index218.js +23 -0
- package/dist/index219.cjs +1 -0
- package/dist/index219.js +5 -0
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +67 -137
- package/dist/index220.cjs +1 -0
- package/dist/index220.js +19 -0
- package/dist/index221.cjs +1 -0
- package/dist/index221.js +26 -0
- package/dist/index222.cjs +1 -0
- package/dist/index222.js +37 -0
- package/dist/index223.cjs +1 -0
- package/dist/index223.js +5 -0
- package/dist/index224.cjs +1 -0
- package/dist/index224.js +30 -0
- package/dist/index225.cjs +1 -0
- package/dist/index225.js +39 -0
- package/dist/index226.cjs +1 -0
- package/dist/index226.js +11 -0
- package/dist/index227.cjs +1 -0
- package/dist/index227.js +28 -0
- package/dist/index228.cjs +1 -0
- package/dist/index228.js +31 -0
- package/dist/index229.cjs +1 -0
- package/dist/index229.js +78 -0
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +63 -20
- package/dist/index230.cjs +1 -0
- package/dist/index230.js +24 -0
- package/dist/index231.cjs +1 -0
- package/dist/index231.js +11 -0
- package/dist/index232.cjs +1 -0
- package/dist/index232.js +13 -0
- package/dist/index233.cjs +1 -0
- package/dist/index233.js +14 -0
- package/dist/index234.cjs +1 -0
- package/dist/index234.js +9 -0
- package/dist/index235.cjs +1 -0
- package/dist/index235.js +9 -0
- package/dist/index236.cjs +1 -0
- package/dist/index236.js +16 -0
- package/dist/index237.cjs +1 -0
- package/dist/index237.js +35 -0
- package/dist/index238.cjs +1 -0
- package/dist/index238.js +7 -0
- package/dist/index239.cjs +1 -0
- package/dist/index239.js +40 -0
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +31 -17
- package/dist/index240.cjs +1 -0
- package/dist/index240.js +114 -0
- package/dist/index241.cjs +1 -0
- package/dist/index241.js +52 -0
- package/dist/index242.cjs +1 -0
- package/dist/index242.js +35 -0
- package/dist/index243.cjs +1 -0
- package/dist/index243.js +11 -0
- package/dist/index244.cjs +1 -0
- package/dist/index244.js +10 -0
- package/dist/index245.cjs +1 -0
- package/dist/index245.js +19 -0
- package/dist/index246.cjs +1 -0
- package/dist/index246.js +25 -0
- package/dist/index247.cjs +1 -0
- package/dist/index247.js +107 -0
- package/dist/index248.cjs +1 -0
- package/dist/index248.js +5 -0
- package/dist/index249.cjs +1 -0
- package/dist/index249.js +8 -0
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +23 -104
- package/dist/index250.cjs +1 -0
- package/dist/index250.js +34 -0
- package/dist/index251.cjs +1 -0
- package/dist/index251.js +23 -0
- package/dist/index252.cjs +1 -0
- package/dist/index252.js +6 -0
- package/dist/index253.cjs +1 -0
- package/dist/index253.js +20 -0
- package/dist/index254.cjs +1 -0
- package/dist/index254.js +8 -0
- package/dist/index255.cjs +1 -0
- package/dist/index255.js +11 -0
- package/dist/index256.cjs +1 -0
- package/dist/index256.js +106 -0
- package/dist/index257.cjs +1 -0
- package/dist/index257.js +67 -0
- package/dist/index258.cjs +1 -0
- package/dist/index258.js +9 -0
- package/dist/index259.cjs +1 -0
- package/dist/index259.js +30 -0
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +173 -75
- package/dist/index260.cjs +1 -0
- package/dist/index260.js +37 -0
- package/dist/index261.cjs +1 -0
- package/dist/index261.js +19 -0
- package/dist/index262.cjs +1 -0
- package/dist/index262.js +81 -0
- package/dist/index263.cjs +1 -0
- package/dist/index263.js +4 -0
- package/dist/index264.cjs +1 -0
- package/dist/index264.js +17 -0
- package/dist/index265.cjs +1 -0
- package/dist/index265.js +21 -0
- package/dist/index266.cjs +1 -0
- package/dist/index266.js +20 -0
- package/dist/index267.cjs +1 -0
- package/dist/index267.js +13 -0
- package/dist/index268.cjs +1 -0
- package/dist/index268.js +43 -0
- package/dist/index269.cjs +1 -0
- package/dist/index269.js +16 -0
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +34 -9
- package/dist/index270.cjs +1 -0
- package/dist/index270.js +27 -0
- package/dist/index271.cjs +1 -0
- package/dist/index271.js +15 -0
- package/dist/index272.cjs +1 -0
- package/dist/index272.js +12 -0
- package/dist/index273.cjs +1 -0
- package/dist/index273.js +33 -0
- package/dist/index274.cjs +1 -0
- package/dist/index274.js +4 -0
- package/dist/index275.cjs +1 -0
- package/dist/index275.js +50 -0
- package/dist/index276.cjs +1 -0
- package/dist/index276.js +14 -0
- package/dist/index277.cjs +1 -0
- package/dist/index277.js +177 -0
- package/dist/index278.cjs +2 -0
- package/dist/index278.js +94 -0
- package/dist/index279.cjs +1 -0
- package/dist/index279.js +43 -0
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +332 -47
- package/dist/index280.cjs +1 -0
- package/dist/index280.js +7 -0
- package/dist/index281.cjs +1 -0
- package/dist/index281.js +166 -0
- package/dist/index282.cjs +1 -0
- package/dist/index282.js +7 -0
- package/dist/index283.cjs +2 -0
- package/dist/index283.js +44 -0
- package/dist/index284.cjs +1 -0
- package/dist/index284.js +4 -0
- package/dist/index285.cjs +1 -0
- package/dist/index285.js +8 -0
- package/dist/index286.cjs +1 -0
- package/dist/index286.js +13 -0
- package/dist/index287.cjs +1 -0
- package/dist/index287.js +22 -0
- package/dist/index288.cjs +1 -0
- package/dist/index288.js +11 -0
- package/dist/index289.cjs +1 -0
- package/dist/index289.js +75 -0
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +4 -61
- package/dist/index290.cjs +1 -0
- package/dist/index290.js +68 -0
- package/dist/index291.cjs +1 -0
- package/dist/index291.js +191 -0
- package/dist/index292.cjs +1 -0
- package/dist/index292.js +25 -0
- package/dist/index293.cjs +1 -0
- package/dist/index293.js +45 -0
- package/dist/index294.cjs +1 -0
- package/dist/index294.js +28 -0
- package/dist/index295.cjs +1 -0
- package/dist/index295.js +93 -0
- package/dist/index296.cjs +1 -0
- package/dist/index296.js +43 -0
- package/dist/index297.cjs +1 -0
- package/dist/index297.js +19 -0
- package/dist/index298.cjs +1 -0
- package/dist/index298.js +16 -0
- package/dist/index299.cjs +1 -0
- package/dist/index299.js +40 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +9 -5
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +271 -35
- package/dist/index300.cjs +1 -0
- package/dist/index300.js +18 -0
- package/dist/index301.cjs +1 -0
- package/dist/index301.js +11 -0
- package/dist/index302.cjs +1 -0
- package/dist/index302.js +10 -0
- package/dist/index303.cjs +1 -0
- package/dist/index303.js +45 -0
- package/dist/index304.cjs +1 -0
- package/dist/index304.js +323 -0
- package/dist/index305.cjs +1 -0
- package/dist/index305.js +608 -0
- package/dist/index306.cjs +1 -0
- package/dist/index306.js +112 -0
- package/dist/index307.cjs +1 -0
- package/dist/index307.js +170 -0
- package/dist/index308.cjs +1 -0
- package/dist/index308.js +304 -0
- package/dist/index309.cjs +1 -0
- package/dist/index309.js +96 -0
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +19 -41
- package/dist/index310.cjs +1 -0
- package/dist/index310.js +59 -0
- package/dist/index311.cjs +1 -0
- package/dist/index311.js +56 -0
- package/dist/index312.cjs +1 -0
- package/dist/index312.js +47 -0
- package/dist/index313.cjs +1 -0
- package/dist/index313.js +18 -0
- package/dist/index314.cjs +1 -0
- package/dist/index314.js +320 -0
- package/dist/index315.cjs +1 -0
- package/dist/index315.js +62 -0
- package/dist/index316.cjs +1 -0
- package/dist/index316.js +22 -0
- package/dist/index317.cjs +1 -0
- package/dist/index317.js +32 -0
- package/dist/index318.cjs +1 -0
- package/dist/index318.js +6 -0
- package/dist/index319.cjs +7 -0
- package/dist/index319.js +240 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +22 -0
- package/dist/index320.cjs +1 -0
- package/dist/index320.js +50 -0
- package/dist/index321.cjs +1 -0
- package/dist/index321.js +215 -0
- package/dist/index322.cjs +1 -0
- package/dist/index322.js +84 -0
- package/dist/index323.cjs +1 -0
- package/dist/index323.js +32 -0
- package/dist/index324.cjs +1 -0
- package/dist/index324.js +79 -0
- package/dist/index325.cjs +1 -0
- package/dist/index325.js +12 -0
- package/dist/index326.cjs +1 -0
- package/dist/index326.js +19 -0
- package/dist/index327.cjs +1 -0
- package/dist/index327.js +25 -0
- package/dist/index328.cjs +1 -0
- package/dist/index328.js +16 -0
- package/dist/index329.cjs +1 -0
- package/dist/index329.js +16 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +6 -0
- package/dist/index330.cjs +1 -0
- package/dist/index330.js +17 -0
- package/dist/index331.cjs +1 -0
- package/dist/index331.js +12 -0
- package/dist/index332.cjs +1 -0
- package/dist/index332.js +18 -0
- package/dist/index333.cjs +1 -0
- package/dist/index333.js +28 -0
- package/dist/index334.cjs +1 -0
- package/dist/index334.js +34 -0
- package/dist/index335.cjs +2 -0
- package/dist/index335.js +21 -0
- package/dist/index336.cjs +1 -0
- package/dist/index336.js +17 -0
- package/dist/index337.cjs +1 -0
- package/dist/index337.js +14 -0
- package/dist/index338.cjs +1 -0
- package/dist/index338.js +15 -0
- package/dist/index339.cjs +1 -0
- package/dist/index339.js +36 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +28 -0
- package/dist/index340.cjs +1 -0
- package/dist/index340.js +118 -0
- package/dist/index341.cjs +1 -0
- package/dist/index341.js +106 -0
- package/dist/index342.cjs +1 -0
- package/dist/index342.js +9 -0
- package/dist/index343.cjs +1 -0
- package/dist/index343.js +9 -0
- package/dist/index344.cjs +1 -0
- package/dist/index344.js +29 -0
- package/dist/index345.cjs +1 -0
- package/dist/index345.js +19 -0
- package/dist/index346.cjs +1 -0
- package/dist/index346.js +217 -0
- package/dist/index347.cjs +1 -0
- package/dist/index347.js +10 -0
- package/dist/index348.cjs +1 -0
- package/dist/index348.js +122 -0
- package/dist/index349.cjs +1 -0
- package/dist/index349.js +7 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +13 -0
- package/dist/index350.cjs +2 -0
- package/dist/index350.js +196 -0
- package/dist/index351.cjs +1 -0
- package/dist/index351.js +80 -0
- package/dist/index352.cjs +1 -0
- package/dist/index352.js +346 -0
- package/dist/index353.cjs +1 -0
- package/dist/index353.js +163 -0
- package/dist/index354.cjs +1 -0
- package/dist/index354.js +7 -0
- package/dist/index355.cjs +1 -0
- package/dist/index355.js +17 -0
- package/dist/index356.cjs +1 -0
- package/dist/index356.js +19 -0
- package/dist/index357.cjs +1 -0
- package/dist/index357.js +12 -0
- package/dist/index358.cjs +1 -0
- package/dist/index358.js +55 -0
- package/dist/index359.cjs +1 -0
- package/dist/index359.js +209 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +44 -0
- package/dist/index360.cjs +1 -0
- package/dist/index360.js +71 -0
- package/dist/index361.cjs +1 -0
- package/dist/index361.js +97 -0
- package/dist/index362.cjs +1 -0
- package/dist/index362.js +31 -0
- package/dist/index363.cjs +1 -0
- package/dist/index363.js +151 -0
- package/dist/index364.cjs +1 -0
- package/dist/index364.js +357 -0
- package/dist/index365.cjs +1 -0
- package/dist/index365.js +6 -0
- package/dist/index366.cjs +1 -0
- package/dist/index366.js +143 -0
- package/dist/index367.cjs +1 -0
- package/dist/index367.js +76 -0
- package/dist/index368.cjs +1 -0
- package/dist/index368.js +34 -0
- package/dist/index369.cjs +1 -0
- package/dist/index369.js +8 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +90 -0
- package/dist/index370.cjs +1 -0
- package/dist/index370.js +278 -0
- package/dist/index371.cjs +1 -0
- package/dist/index371.js +173 -0
- package/dist/index372.cjs +1 -0
- package/dist/index372.js +12 -0
- package/dist/index373.cjs +1 -0
- package/dist/index373.js +110 -0
- package/dist/index374.cjs +1 -0
- package/dist/index374.js +12 -0
- package/dist/index375.cjs +1 -0
- package/dist/index375.js +136 -0
- package/dist/index376.cjs +1 -0
- package/dist/index376.js +81 -0
- package/dist/index377.cjs +1 -0
- package/dist/index377.js +4 -0
- package/dist/index378.cjs +1 -0
- package/dist/index378.js +45 -0
- package/dist/index379.cjs +1 -0
- package/dist/index379.js +660 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +153 -0
- package/dist/index380.cjs +1 -0
- package/dist/index380.js +180 -0
- package/dist/index381.cjs +1 -0
- package/dist/index381.js +4 -0
- package/dist/index382.cjs +1 -0
- package/dist/index382.js +24 -0
- package/dist/index383.cjs +1 -0
- package/dist/index383.js +112 -0
- package/dist/index384.cjs +1 -0
- package/dist/index384.js +5 -0
- package/dist/index385.cjs +1 -0
- package/dist/index385.js +65 -0
- package/dist/index386.cjs +1 -0
- package/dist/index386.js +134 -0
- package/dist/index387.cjs +1 -0
- package/dist/index387.js +262 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +90 -0
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +33 -23
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +16 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +31 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +20 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +110 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +14 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +61 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +524 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +32 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +28 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +28 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +51 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +30 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +30 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +33 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +32 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +58 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +56 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +38 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +39 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +32 -0
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +273 -91
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +30 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +30 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +17 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +16 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +20 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +12 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +35 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +17 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +15 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +39 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +237 -47
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +44 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +45 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +27 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +57 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +30 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +22 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +730 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +524 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +15 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +14 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +42 -46
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +21 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +48 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +45 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +174 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +23 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +33 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +29 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +7 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +9 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +19 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +69 -93
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +15 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +12 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +159 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +7 -0
- package/dist/index94.cjs +3 -0
- package/dist/index94.js +218 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +21 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +13 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +24 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +12 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +12 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/GardenSwapWidget.d.ts +5 -0
- package/dist/src/lib/common/BottomSheet.d.ts +7 -0
- package/dist/src/lib/common/CopyToClipboard.d.ts +7 -0
- package/dist/src/lib/common/GardenBranding.d.ts +3 -0
- package/dist/src/lib/common/Header.d.ts +3 -0
- package/dist/src/lib/common/Modal.d.ts +0 -2
- package/dist/src/lib/common/Sidebar.d.ts +9 -0
- package/dist/src/lib/common/SwapWidgetBase.d.ts +7 -0
- package/dist/src/lib/components/CreateSwap.d.ts +1 -2
- package/dist/src/lib/components/SwapSavingsAndAddresses.d.ts +1 -1
- package/dist/src/lib/components/SwapWidget.d.ts +4 -2
- package/dist/src/lib/components/swapInProgress/SwapInProgress.d.ts +3 -0
- package/dist/src/lib/components/swapInProgress/SwapInProgressSkeleton.d.ts +3 -0
- package/dist/src/lib/components/transactions/TransactionHistory.d.ts +2 -2
- package/dist/src/lib/components/transactions/Transactions.d.ts +1 -2
- package/dist/src/lib/constants/constants.d.ts +25 -0
- package/dist/src/lib/constants/wagmiConfig.d.ts +1548 -0
- package/dist/src/lib/hooks/useAddresses.d.ts +8 -0
- package/dist/src/lib/hooks/useSwap.d.ts +1 -0
- package/dist/src/lib/store/assetStore.d.ts +11 -0
- package/dist/src/lib/store/heightStore.d.ts +10 -0
- package/dist/src/lib/store/orderInProgressStore.d.ts +10 -0
- package/dist/src/lib/store/swapStore.d.ts +22 -4
- package/dist/src/lib/store/transactionHistoryStore.d.ts +2 -2
- package/dist/src/lib/store/widgetConfigStore.d.ts +8 -0
- package/dist/src/lib/types/types.d.ts +19 -2
- package/dist/src/lib/utils/balance/getBalanceMulticall.d.ts +5 -0
- package/dist/src/lib/utils/balance/getNativeTokenFee.d.ts +7 -0
- package/dist/src/lib/utils/balance/getNetworkFees.d.ts +5 -0
- package/dist/src/lib/utils/balance/getTokenBalance.d.ts +8 -0
- package/dist/src/lib/utils/balance/getmaxBtc.d.ts +3 -0
- package/dist/src/lib/utils/balance/rpcUtils.d.ts +17 -0
- package/dist/src/lib/utils/utils.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +17 -8
- package/dist/index5.cjs +0 -1
- package/dist/index5.js +0 -250
- package/dist/src/lib/GardenComponent.d.ts +0 -6
- package/dist/src/lib/common/Navbar.d.ts +0 -10
package/dist/index323.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
class c extends Error {
|
|
2
|
+
}
|
|
3
|
+
class t extends c {
|
|
4
|
+
constructor(e, d) {
|
|
5
|
+
super(d), this.code = e;
|
|
6
|
+
}
|
|
7
|
+
static fromResponse(e, d) {
|
|
8
|
+
switch (e.code) {
|
|
9
|
+
case "notExists":
|
|
10
|
+
return new t(e.code, `Object ${e.object_id} does not exist`);
|
|
11
|
+
case "dynamicFieldNotFound":
|
|
12
|
+
return new t(
|
|
13
|
+
e.code,
|
|
14
|
+
`Dynamic field not found for object ${e.parent_object_id}`
|
|
15
|
+
);
|
|
16
|
+
case "deleted":
|
|
17
|
+
return new t(e.code, `Object ${e.object_id} has been deleted`);
|
|
18
|
+
case "displayError":
|
|
19
|
+
return new t(e.code, `Display error: ${e.error}`);
|
|
20
|
+
case "unknown":
|
|
21
|
+
default:
|
|
22
|
+
return new t(
|
|
23
|
+
e.code,
|
|
24
|
+
`Unknown error while loading object${d ? ` ${d}` : ""}`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
t as ObjectError,
|
|
31
|
+
c as SuiClientError
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index320.cjs"),c=require("./index314.cjs");function k(n){return{...c.TransactionDataBuilder.fromBytes(n).snapshot(),bcs:n}}function S(n){const e=l.bcs.TransactionEffects.parse(n);switch(e.$kind){case"V1":return O({effects:e.V1});case"V2":return D({bytes:n,effects:e.V2});default:throw new Error(`Unknown transaction effects version: ${e.$kind}`)}}function O(n){throw new Error("V1 effects are not supported yet")}function D({bytes:n,effects:e}){const a=e.changedObjects.map(([s,t])=>{var i,r,u,o,d,p;return{id:s,inputState:t.inputState.$kind==="Exist"?"Exists":"DoesNotExist",inputVersion:((i=t.inputState.Exist)==null?void 0:i[0][0])??null,inputDigest:((r=t.inputState.Exist)==null?void 0:r[0][1])??null,inputOwner:((u=t.inputState.Exist)==null?void 0:u[1])??null,outputState:t.outputState.$kind==="NotExist"?"DoesNotExist":t.outputState.$kind,outputVersion:t.outputState.$kind==="PackageWrite"?(o=t.outputState.PackageWrite)==null?void 0:o[0]:t.outputState.ObjectWrite?e.lamportVersion:null,outputDigest:t.outputState.$kind==="PackageWrite"?(d=t.outputState.PackageWrite)==null?void 0:d[1]:((p=t.outputState.ObjectWrite)==null?void 0:p[0])??null,outputOwner:t.outputState.ObjectWrite?t.outputState.ObjectWrite[1]:null,idOperation:t.idOperation.$kind}});return{bcs:n,digest:e.transactionDigest,version:2,status:e.status.$kind==="Success"?{success:!0,error:null}:{success:!1,error:e.status.Failed.error.$kind},gasUsed:e.gasUsed,transactionDigest:e.transactionDigest,gasObject:e.gasObjectIndex===null?null:a[e.gasObjectIndex]??null,eventsDigest:e.eventsDigest,dependencies:e.dependencies,lamportVersion:e.lamportVersion,changedObjects:a,unchangedConsensusObjects:e.unchangedSharedObjects.map(([s,t])=>({kind:t.$kind==="MutateDeleted"?"MutateConsensusStreamEnded":t.$kind==="ReadDeleted"?"ReadConsensusStreamEnded":t.$kind,objectId:s,version:t.$kind==="ReadOnlyRoot"?t.ReadOnlyRoot[0]:t[t.$kind],digest:t.$kind==="ReadOnlyRoot"?t.ReadOnlyRoot[1]:null})),auxiliaryDataDigest:e.auxDataDigest}}exports.parseTransactionBcs=k;exports.parseTransactionEffectsBcs=S;
|
package/dist/index324.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { bcs as l } from "./index320.js";
|
|
2
|
+
import { TransactionDataBuilder as c } from "./index314.js";
|
|
3
|
+
function D(e) {
|
|
4
|
+
return {
|
|
5
|
+
...c.fromBytes(e).snapshot(),
|
|
6
|
+
bcs: e
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function E(e) {
|
|
10
|
+
const n = l.TransactionEffects.parse(e);
|
|
11
|
+
switch (n.$kind) {
|
|
12
|
+
case "V1":
|
|
13
|
+
return k({ effects: n.V1 });
|
|
14
|
+
case "V2":
|
|
15
|
+
return S({ bytes: e, effects: n.V2 });
|
|
16
|
+
default:
|
|
17
|
+
throw new Error(
|
|
18
|
+
`Unknown transaction effects version: ${n.$kind}`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function k(e) {
|
|
23
|
+
throw new Error("V1 effects are not supported yet");
|
|
24
|
+
}
|
|
25
|
+
function S({
|
|
26
|
+
bytes: e,
|
|
27
|
+
effects: n
|
|
28
|
+
}) {
|
|
29
|
+
const i = n.changedObjects.map(
|
|
30
|
+
([s, t]) => {
|
|
31
|
+
var a, r, u, o, d, p;
|
|
32
|
+
return {
|
|
33
|
+
id: s,
|
|
34
|
+
inputState: t.inputState.$kind === "Exist" ? "Exists" : "DoesNotExist",
|
|
35
|
+
inputVersion: ((a = t.inputState.Exist) == null ? void 0 : a[0][0]) ?? null,
|
|
36
|
+
inputDigest: ((r = t.inputState.Exist) == null ? void 0 : r[0][1]) ?? null,
|
|
37
|
+
inputOwner: ((u = t.inputState.Exist) == null ? void 0 : u[1]) ?? null,
|
|
38
|
+
outputState: t.outputState.$kind === "NotExist" ? "DoesNotExist" : t.outputState.$kind,
|
|
39
|
+
outputVersion: t.outputState.$kind === "PackageWrite" ? (o = t.outputState.PackageWrite) == null ? void 0 : o[0] : t.outputState.ObjectWrite ? n.lamportVersion : null,
|
|
40
|
+
outputDigest: t.outputState.$kind === "PackageWrite" ? (d = t.outputState.PackageWrite) == null ? void 0 : d[1] : ((p = t.outputState.ObjectWrite) == null ? void 0 : p[0]) ?? null,
|
|
41
|
+
outputOwner: t.outputState.ObjectWrite ? t.outputState.ObjectWrite[1] : null,
|
|
42
|
+
idOperation: t.idOperation.$kind
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
return {
|
|
47
|
+
bcs: e,
|
|
48
|
+
digest: n.transactionDigest,
|
|
49
|
+
version: 2,
|
|
50
|
+
status: n.status.$kind === "Success" ? {
|
|
51
|
+
success: !0,
|
|
52
|
+
error: null
|
|
53
|
+
} : {
|
|
54
|
+
success: !1,
|
|
55
|
+
// TODO: add command
|
|
56
|
+
error: n.status.Failed.error.$kind
|
|
57
|
+
},
|
|
58
|
+
gasUsed: n.gasUsed,
|
|
59
|
+
transactionDigest: n.transactionDigest,
|
|
60
|
+
gasObject: n.gasObjectIndex === null ? null : i[n.gasObjectIndex] ?? null,
|
|
61
|
+
eventsDigest: n.eventsDigest,
|
|
62
|
+
dependencies: n.dependencies,
|
|
63
|
+
lamportVersion: n.lamportVersion,
|
|
64
|
+
changedObjects: i,
|
|
65
|
+
unchangedConsensusObjects: n.unchangedSharedObjects.map(
|
|
66
|
+
([s, t]) => ({
|
|
67
|
+
kind: t.$kind === "MutateDeleted" ? "MutateConsensusStreamEnded" : t.$kind === "ReadDeleted" ? "ReadConsensusStreamEnded" : t.$kind,
|
|
68
|
+
objectId: s,
|
|
69
|
+
version: t.$kind === "ReadOnlyRoot" ? t.ReadOnlyRoot[0] : t[t.$kind],
|
|
70
|
+
digest: t.$kind === "ReadOnlyRoot" ? t.ReadOnlyRoot[1] : null
|
|
71
|
+
})
|
|
72
|
+
),
|
|
73
|
+
auxiliaryDataDigest: n.auxDataDigest
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
D as parseTransactionBcs,
|
|
78
|
+
E as parseTransactionEffectsBcs
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index189.cjs"),i=require("./index94.cjs");function f(e){var t,o,a,n,s,u;if(!(e instanceof c.BaseError))return!1;const r=e.walk(l=>l instanceof i.ContractFunctionRevertedError);return r instanceof i.ContractFunctionRevertedError?((t=r.data)==null?void 0:t.errorName)==="HttpError"||((o=r.data)==null?void 0:o.errorName)==="ResolverError"||((a=r.data)==null?void 0:a.errorName)==="ResolverNotContract"||((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ReverseAddressMismatch"||((u=r.data)==null?void 0:u.errorName)==="UnsupportedResolverProfile":!1}exports.isNullUniversalResolverError=f;
|
package/dist/index325.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseError as l } from "./index189.js";
|
|
2
|
+
import { ContractFunctionRevertedError as i } from "./index94.js";
|
|
3
|
+
function c(e) {
|
|
4
|
+
var t, o, a, n, s, u;
|
|
5
|
+
if (!(e instanceof l))
|
|
6
|
+
return !1;
|
|
7
|
+
const r = e.walk((f) => f instanceof i);
|
|
8
|
+
return r instanceof i ? ((t = r.data) == null ? void 0 : t.errorName) === "HttpError" || ((o = r.data) == null ? void 0 : o.errorName) === "ResolverError" || ((a = r.data) == null ? void 0 : a.errorName) === "ResolverNotContract" || ((n = r.data) == null ? void 0 : n.errorName) === "ResolverNotFound" || ((s = r.data) == null ? void 0 : s.errorName) === "ReverseAddressMismatch" || ((u = r.data) == null ? void 0 : u.errorName) === "UnsupportedResolverProfile" : !1;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
c as isNullUniversalResolverError
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index214.cjs"),a=require("./index365.cjs"),c=require("./index243.cjs");function h(i){const r=i.replace(/^\.|\.$/gm,"");if(r.length===0)return new Uint8Array(1);const e=new Uint8Array(l.stringToBytes(r).byteLength+2);let t=0;const o=r.split(".");for(let s=0;s<o.length;s++){let n=l.stringToBytes(o[s]);n.byteLength>255&&(n=l.stringToBytes(a.encodeLabelhash(c.labelhash(o[s])))),e[t]=n.length,e.set(n,t+1),t+=n.length+1}return e.byteLength!==t+1?e.slice(0,t+1):e}exports.packetToBytes=h;
|
package/dist/index326.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { stringToBytes as i } from "./index214.js";
|
|
2
|
+
import { encodeLabelhash as h } from "./index365.js";
|
|
3
|
+
import { labelhash as f } from "./index243.js";
|
|
4
|
+
function y(s) {
|
|
5
|
+
const o = s.replace(/^\.|\.$/gm, "");
|
|
6
|
+
if (o.length === 0)
|
|
7
|
+
return new Uint8Array(1);
|
|
8
|
+
const e = new Uint8Array(i(o).byteLength + 2);
|
|
9
|
+
let t = 0;
|
|
10
|
+
const l = o.split(".");
|
|
11
|
+
for (let r = 0; r < l.length; r++) {
|
|
12
|
+
let n = i(l[r]);
|
|
13
|
+
n.byteLength > 255 && (n = i(h(f(l[r])))), e[t] = n.length, e.set(n, t + 1), t += n.length + 1;
|
|
14
|
+
}
|
|
15
|
+
return e.byteLength !== t + 1 ? e.slice(0, t + 1) : e;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
y as packetToBytes
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index366.cjs");async function f(i,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l(i,{gatewayUrls:t,record:r}):e.parseAvatarUri({uri:r,gatewayUrls:t})}async function l(i,{gatewayUrls:t,record:r}){const n=e.parseNftUri(r),o=await e.getNftTokenUri(i,{nft:n}),{uri:a,isOnChain:c,isEncoded:p}=e.resolveAvatarUri({uri:o,gatewayUrls:t});if(c&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const u=p?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(u);return e.parseAvatarUri({uri:e.getJsonImage(d),gatewayUrls:t})}let s=n.tokenID;return n.namespace==="erc1155"&&(s=s.replace("0x","").padStart(64,"0")),e.getMetadataAvatarUri({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,s)})}exports.parseAvatarRecord=f;
|
package/dist/index327.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./index366.js";
|
|
2
|
+
async function b(r, { gatewayUrls: t, record: e }) {
|
|
3
|
+
return /eip155:/i.test(e) ? U(r, { gatewayUrls: t, record: e }) : o({ uri: e, gatewayUrls: t });
|
|
4
|
+
}
|
|
5
|
+
async function U(r, { gatewayUrls: t, record: e }) {
|
|
6
|
+
const i = f(e), s = await v(r, { nft: i }), { uri: a, isOnChain: c, isEncoded: p } = l({ uri: s, gatewayUrls: t });
|
|
7
|
+
if (c && (a.includes("data:application/json;base64,") || a.startsWith("{"))) {
|
|
8
|
+
const d = p ? (
|
|
9
|
+
// if it is encoded, decode it
|
|
10
|
+
atob(a.replace("data:application/json;base64,", ""))
|
|
11
|
+
) : (
|
|
12
|
+
// if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)
|
|
13
|
+
a
|
|
14
|
+
), u = JSON.parse(d);
|
|
15
|
+
return o({ uri: A(u), gatewayUrls: t });
|
|
16
|
+
}
|
|
17
|
+
let n = i.tokenID;
|
|
18
|
+
return i.namespace === "erc1155" && (n = n.replace("0x", "").padStart(64, "0")), N({
|
|
19
|
+
gatewayUrls: t,
|
|
20
|
+
uri: a.replace(/(?:0x)?{id}/, n)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
b as parseAvatarRecord
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index203.cjs"),i=require("./index206.cjs"),u=require("./index270.cjs");function a(e,{docsPath:o,...r}){const n=(()=>{const t=u.getNodeError(e,r);return t instanceof i.UnknownNodeError?e:t})();return new s.EstimateGasExecutionError(n,{docsPath:o,...r})}exports.getEstimateGasError=a;
|
package/dist/index328.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EstimateGasExecutionError as i } from "./index203.js";
|
|
2
|
+
import { UnknownNodeError as m } from "./index206.js";
|
|
3
|
+
import { getNodeError as s } from "./index270.js";
|
|
4
|
+
function a(r, { docsPath: e, ...o }) {
|
|
5
|
+
const n = (() => {
|
|
6
|
+
const t = s(r, o);
|
|
7
|
+
return t instanceof m ? r : t;
|
|
8
|
+
})();
|
|
9
|
+
return new i(n, {
|
|
10
|
+
docsPath: e,
|
|
11
|
+
...o
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as getEstimateGasError
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index206.cjs"),i=require("./index199.cjs"),s=require("./index270.cjs");function u(r,{docsPath:o,...e}){const t=(()=>{const n=s.getNodeError(r,e);return n instanceof c.UnknownNodeError?r:n})();return new i.TransactionExecutionError(t,{docsPath:o,...e})}exports.getTransactionError=u;
|
package/dist/index329.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UnknownNodeError as c } from "./index206.js";
|
|
2
|
+
import { TransactionExecutionError as i } from "./index199.js";
|
|
3
|
+
import { getNodeError as u } from "./index270.js";
|
|
4
|
+
function s(r, { docsPath: t, ...o }) {
|
|
5
|
+
const e = (() => {
|
|
6
|
+
const n = u(r, o);
|
|
7
|
+
return n instanceof c ? r : n;
|
|
8
|
+
})();
|
|
9
|
+
return new i(e, {
|
|
10
|
+
docsPath: t,
|
|
11
|
+
...o
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as getTransactionError
|
|
16
|
+
};
|
package/dist/index33.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("@gardenfi/garden-book"),r=()=>e.createElement("div",{className:"text-xs h-4 text-mid-grey flex items-center justify-center gap-1.5 px-2"},e.createElement(t.Typography,{size:"h5",weight:"medium",className:"!text-mid-grey"},"Powered by"),e.createElement(t.GardenFullLogo,{width:58}));exports.GardenBranding=r;
|
package/dist/index33.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Typography as t, GardenFullLogo as r } from "@gardenfi/garden-book";
|
|
3
|
+
const i = () => /* @__PURE__ */ e.createElement("div", { className: "text-xs h-4 text-mid-grey flex items-center justify-center gap-1.5 px-2" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "medium", className: "!text-mid-grey" }, "Powered by"), /* @__PURE__ */ e.createElement(r, { width: 58 }));
|
|
4
|
+
export {
|
|
5
|
+
i as GardenBranding
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index189.cjs");class e extends t.BaseError{constructor({address:o}){super(`No EIP-712 domain found on contract "${o}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${o}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}exports.Eip712DomainNotFoundError=e;
|
package/dist/index330.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseError as t } from "./index189.js";
|
|
2
|
+
class r extends t {
|
|
3
|
+
constructor({ address: o }) {
|
|
4
|
+
super(`No EIP-712 domain found on contract "${o}".`, {
|
|
5
|
+
metaMessages: [
|
|
6
|
+
"Ensure that:",
|
|
7
|
+
`- The contract is deployed at the address "${o}".`,
|
|
8
|
+
"- `eip712Domain()` function exists on the contract.",
|
|
9
|
+
"- `eip712Domain()` function matches signature to ERC-5267 specification."
|
|
10
|
+
],
|
|
11
|
+
name: "Eip712DomainNotFoundError"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
r as Eip712DomainNotFoundError
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(a=>BigInt(a)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(a=>a.map(r=>BigInt(r)))}}exports.formatFeeHistory=o;
|
package/dist/index331.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function s(a) {
|
|
2
|
+
var t;
|
|
3
|
+
return {
|
|
4
|
+
baseFeePerGas: a.baseFeePerGas.map((e) => BigInt(e)),
|
|
5
|
+
gasUsedRatio: a.gasUsedRatio,
|
|
6
|
+
oldestBlock: BigInt(a.oldestBlock),
|
|
7
|
+
reward: (t = a.reward) == null ? void 0 : t.map((e) => e.map((r) => BigInt(r)))
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
s as formatFeeHistory
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index71.cjs");function a(e){return e.map(n=>({...n,value:BigInt(n.value)}))}function r(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?t.hexToNumber(e.nonce):void 0,storageProof:e.storageProof?a(e.storageProof):void 0}}exports.formatProof=r;
|
package/dist/index332.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { hexToNumber as a } from "./index71.js";
|
|
2
|
+
function t(e) {
|
|
3
|
+
return e.map((n) => ({
|
|
4
|
+
...n,
|
|
5
|
+
value: BigInt(n.value)
|
|
6
|
+
}));
|
|
7
|
+
}
|
|
8
|
+
function o(e) {
|
|
9
|
+
return {
|
|
10
|
+
...e,
|
|
11
|
+
balance: e.balance ? BigInt(e.balance) : void 0,
|
|
12
|
+
nonce: e.nonce ? a(e.nonce) : void 0,
|
|
13
|
+
storageProof: e.storageProof ? t(e.storageProof) : void 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
o as formatProof
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index375.cjs"),b=require("./index350.cjs"),d=require("./index277.cjs");function m(...t){var e;const[o,r]=(()=>{if(Array.isArray(t[0])){const[s,f]=t;return[c(s),f]}return t})(),{bytecode:u,args:n}=r;return d.concat(u,(e=o.inputs)!=null&&e.length&&(n!=null&&n.length)?b.encode(o.inputs,n):"0x")}function y(t){return i.from(t)}function c(t){const o=t.find(r=>r.type==="constructor");if(!o)throw new i.NotFoundError({name:"constructor"});return o}exports.encode=m;exports.from=y;exports.fromAbi=c;
|
package/dist/index333.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { from as f, NotFoundError as s } from "./index375.js";
|
|
2
|
+
import { encode as m } from "./index350.js";
|
|
3
|
+
import { concat as p } from "./index277.js";
|
|
4
|
+
function h(...o) {
|
|
5
|
+
var c;
|
|
6
|
+
const [n, r] = (() => {
|
|
7
|
+
if (Array.isArray(o[0])) {
|
|
8
|
+
const [e, u] = o;
|
|
9
|
+
return [d(e), u];
|
|
10
|
+
}
|
|
11
|
+
return o;
|
|
12
|
+
})(), { bytecode: i, args: t } = r;
|
|
13
|
+
return p(i, (c = n.inputs) != null && c.length && (t != null && t.length) ? m(n.inputs, t) : "0x");
|
|
14
|
+
}
|
|
15
|
+
function A(o) {
|
|
16
|
+
return f(o);
|
|
17
|
+
}
|
|
18
|
+
function d(o) {
|
|
19
|
+
const n = o.find((r) => r.type === "constructor");
|
|
20
|
+
if (!n)
|
|
21
|
+
throw new s({ name: "constructor" });
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
h as encode,
|
|
26
|
+
A as from,
|
|
27
|
+
d as fromAbi
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index375.cjs"),l=require("./index350.cjs"),A=require("./index277.cjs");function y(...t){const[e,n=[]]=(()=>{if(Array.isArray(t[0])){const[m,g,a]=t;return[c(m,g,{args:a}),a]}const[b,d]=t;return[b,d]})(),{overloads:o}=e,i=o?c([e,...o],e.name,{args:n}):e,u=f(i),s=n.length>0?l.encode(i.inputs,n):void 0;return s?A.concat(u,s):u}function S(t,e={}){return r.from(t,e)}function c(t,e,n){const o=r.fromAbi(t,e,n);if(o.type!=="function")throw new r.NotFoundError({name:e,type:"function"});return o}function f(t){return r.getSelector(t)}exports.encodeData=y;exports.from=S;exports.fromAbi=c;exports.getSelector=f;
|
package/dist/index334.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { from as g, fromAbi as b, NotFoundError as l, getSelector as p } from "./index375.js";
|
|
2
|
+
import { encode as A } from "./index350.js";
|
|
3
|
+
import { concat as y } from "./index277.js";
|
|
4
|
+
function w(...o) {
|
|
5
|
+
const [t, n = []] = (() => {
|
|
6
|
+
if (Array.isArray(o[0])) {
|
|
7
|
+
const [m, d, f] = o;
|
|
8
|
+
return [u(m, d, { args: f }), f];
|
|
9
|
+
}
|
|
10
|
+
const [s, a] = o;
|
|
11
|
+
return [s, a];
|
|
12
|
+
})(), { overloads: r } = t, e = r ? u([t, ...r], t.name, {
|
|
13
|
+
args: n
|
|
14
|
+
}) : t, c = F(e), i = n.length > 0 ? A(e.inputs, n) : void 0;
|
|
15
|
+
return i ? y(c, i) : c;
|
|
16
|
+
}
|
|
17
|
+
function v(o, t = {}) {
|
|
18
|
+
return g(o, t);
|
|
19
|
+
}
|
|
20
|
+
function u(o, t, n) {
|
|
21
|
+
const r = b(o, t, n);
|
|
22
|
+
if (r.type !== "function")
|
|
23
|
+
throw new l({ name: t, type: "function" });
|
|
24
|
+
return r;
|
|
25
|
+
}
|
|
26
|
+
function F(o) {
|
|
27
|
+
return p(o);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
w as encodeData,
|
|
31
|
+
v as from,
|
|
32
|
+
u as fromAbi,
|
|
33
|
+
F as getSelector
|
|
34
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function x(e){var c,d,f;const{scheme:n,statement:t,...p}=((c=e.match(h))==null?void 0:c.groups)??{},{chainId:s,expirationTime:i,issuedAt:o,notBefore:r,requestId:a,...m}=((d=e.match(A))==null?void 0:d.groups)??{},u=(f=e.split("Resources:")[1])==null?void 0:f.split(`
|
|
2
|
+
- `).slice(1);return{...p,...m,...s?{chainId:Number(s)}:{},...i?{expirationTime:new Date(i)}:{},...o?{issuedAt:new Date(o)}:{},...r?{notBefore:new Date(r)}:{},...a?{requestId:a}:{},...u?{resources:u}:{},...n?{scheme:n}:{},...t?{statement:t}:{}}}const h=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,A=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;exports.parseSiweMessage=x;
|
package/dist/index335.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function A(e) {
|
|
2
|
+
var c, d, f;
|
|
3
|
+
const { scheme: n, statement: t, ...p } = ((c = e.match(m)) == null ? void 0 : c.groups) ?? {}, { chainId: s, expirationTime: i, issuedAt: o, notBefore: r, requestId: a, ...x } = ((d = e.match(h)) == null ? void 0 : d.groups) ?? {}, u = (f = e.split("Resources:")[1]) == null ? void 0 : f.split(`
|
|
4
|
+
- `).slice(1);
|
|
5
|
+
return {
|
|
6
|
+
...p,
|
|
7
|
+
...x,
|
|
8
|
+
...s ? { chainId: Number(s) } : {},
|
|
9
|
+
...i ? { expirationTime: new Date(i) } : {},
|
|
10
|
+
...o ? { issuedAt: new Date(o) } : {},
|
|
11
|
+
...r ? { notBefore: new Date(r) } : {},
|
|
12
|
+
...a ? { requestId: a } : {},
|
|
13
|
+
...u ? { resources: u } : {},
|
|
14
|
+
...n ? { scheme: n } : {},
|
|
15
|
+
...t ? { statement: t } : {}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const m = /^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/, h = /(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;
|
|
19
|
+
export {
|
|
20
|
+
A as parseSiweMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index79.cjs"),f=require("./index98.cjs");function u(n){const{address:s,domain:r,message:e,nonce:t,scheme:i,time:a=new Date}=n;if(r&&e.domain!==r||t&&e.nonce!==t||i&&e.scheme!==i||e.expirationTime&&a>=e.expirationTime||e.notBefore&&a<e.notBefore)return!1;try{if(!e.address||!d.isAddress(e.address,{strict:!1})||s&&!f.isAddressEqual(e.address,s))return!1}catch{return!1}return!0}exports.validateSiweMessage=u;
|
package/dist/index336.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isAddress as f } from "./index79.js";
|
|
2
|
+
import { isAddressEqual as o } from "./index98.js";
|
|
3
|
+
function l(n) {
|
|
4
|
+
const { address: r, domain: s, message: e, nonce: t, scheme: a, time: i = /* @__PURE__ */ new Date() } = n;
|
|
5
|
+
if (s && e.domain !== s || t && e.nonce !== t || a && e.scheme !== a || e.expirationTime && i >= e.expirationTime || e.notBefore && i < e.notBefore)
|
|
6
|
+
return !1;
|
|
7
|
+
try {
|
|
8
|
+
if (!e.address || !f(e.address, { strict: !1 }) || r && !o(e.address, r))
|
|
9
|
+
return !1;
|
|
10
|
+
} catch {
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
return !0;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
l as validateSiweMessage
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index230.cjs"),t=new o.LruMap(8192);function i(r,{enabled:n=!0,id:e}){if(!n||!e)return r();if(t.get(e))return t.get(e);const u=r().finally(()=>t.delete(e));return t.set(e,u),u}exports.promiseCache=t;exports.withDedupe=i;
|
package/dist/index337.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LruMap as u } from "./index230.js";
|
|
2
|
+
const t = /* @__PURE__ */ new u(8192);
|
|
3
|
+
function s(r, { enabled: o = !0, id: e }) {
|
|
4
|
+
if (!o || !e)
|
|
5
|
+
return r();
|
|
6
|
+
if (t.get(e))
|
|
7
|
+
return t.get(e);
|
|
8
|
+
const n = r().finally(() => t.delete(e));
|
|
9
|
+
return t.set(e, n), n;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
t as promiseCache,
|
|
13
|
+
s as withDedupe
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const t=e();exports.idCache=t;
|
package/dist/index338.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=BigInt(2**32-1),i=BigInt(32);function d(r,o=!1){return o?{h:Number(r&c),l:Number(r>>i&c)}:{h:Number(r>>i&c)|0,l:Number(r&c)|0}}function a(r,o=!1){const t=r.length;let n=new Uint32Array(t),l=new Uint32Array(t);for(let e=0;e<t;e++){const{h:s,l:u}=d(r[e],o);[n[e],l[e]]=[s,u]}return[n,l]}const B=(r,o,t)=>r>>>t|o<<32-t,H=(r,o,t)=>r<<32-t|o>>>t,L=(r,o,t)=>r<<64-t|o>>>t-32,S=(r,o,t)=>r>>>t-32|o<<64-t,f=(r,o)=>o,g=(r,o)=>r,h=(r,o,t)=>r<<t|o>>>32-t,m=(r,o,t)=>o<<t|r>>>32-t,b=(r,o,t)=>o<<t-32|r>>>64-t,A=(r,o,t)=>r<<t-32|o>>>64-t;function y(r,o,t,n){const l=(o>>>0)+(n>>>0);return{h:r+t+(l/2**32|0)|0,l:l|0}}const N=(r,o,t)=>(r>>>0)+(o>>>0)+(t>>>0),_=(r,o,t,n)=>o+t+n+(r/2**32|0)|0;exports.add=y;exports.add3H=_;exports.add3L=N;exports.fromBig=d;exports.rotlBH=b;exports.rotlBL=A;exports.rotlSH=h;exports.rotlSL=m;exports.rotr32H=f;exports.rotr32L=g;exports.rotrBH=L;exports.rotrBL=S;exports.rotrSH=B;exports.rotrSL=H;exports.split=a;
|
package/dist/index339.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const l = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
|
|
2
|
+
function f(r, n = !1) {
|
|
3
|
+
return n ? { h: Number(r & l), l: Number(r >> i & l) } : { h: Number(r >> i & l) | 0, l: Number(r & l) | 0 };
|
|
4
|
+
}
|
|
5
|
+
function a(r, n = !1) {
|
|
6
|
+
const t = r.length;
|
|
7
|
+
let o = new Uint32Array(t), c = new Uint32Array(t);
|
|
8
|
+
for (let e = 0; e < t; e++) {
|
|
9
|
+
const { h: s, l: u } = f(r[e], n);
|
|
10
|
+
[o[e], c[e]] = [s, u];
|
|
11
|
+
}
|
|
12
|
+
return [o, c];
|
|
13
|
+
}
|
|
14
|
+
const h = (r, n, t) => r >>> t | n << 32 - t, B = (r, n, t) => r << 32 - t | n >>> t, d = (r, n, t) => r << 64 - t | n >>> t - 32, H = (r, n, t) => r >>> t - 32 | n << 64 - t, L = (r, n) => n, m = (r, n) => r, A = (r, n, t) => r << t | n >>> 32 - t, S = (r, n, t) => n << t | r >>> 32 - t, b = (r, n, t) => n << t - 32 | r >>> 64 - t, g = (r, n, t) => r << t - 32 | n >>> 64 - t;
|
|
15
|
+
function N(r, n, t, o) {
|
|
16
|
+
const c = (n >>> 0) + (o >>> 0);
|
|
17
|
+
return { h: r + t + (c / 2 ** 32 | 0) | 0, l: c | 0 };
|
|
18
|
+
}
|
|
19
|
+
const _ = (r, n, t) => (r >>> 0) + (n >>> 0) + (t >>> 0), U = (r, n, t, o) => n + t + o + (r / 2 ** 32 | 0) | 0;
|
|
20
|
+
export {
|
|
21
|
+
N as add,
|
|
22
|
+
U as add3H,
|
|
23
|
+
_ as add3L,
|
|
24
|
+
f as fromBig,
|
|
25
|
+
b as rotlBH,
|
|
26
|
+
g as rotlBL,
|
|
27
|
+
A as rotlSH,
|
|
28
|
+
S as rotlSL,
|
|
29
|
+
L as rotr32H,
|
|
30
|
+
m as rotr32L,
|
|
31
|
+
d as rotrBH,
|
|
32
|
+
H as rotrBL,
|
|
33
|
+
h as rotrSH,
|
|
34
|
+
B as rotrSL,
|
|
35
|
+
a as split
|
|
36
|
+
};
|
package/dist/index34.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("bignumber.js"),f=t=>{const e=new Date().getTime()-new Date(t).getTime(),r=Math.floor(e/(1e3*3600*24)),o=Math.floor(e/(1e3*3600)),i=Math.floor(e/(1e3*60));return r>3?`on ${new Date(t).toLocaleDateString()}`:r>0?`${r} day${r>1?"s":""} ago`:o>0?`${o} hour${o>1?"s":""} ago`:i>0?`${i} minute${i>1?"s":""} ago`:"Just now"},g=(t,n)=>n&&n.find(e=>`${e.chain}:${e.symbol.toLowerCase()}`===t.asset),m=(t,n,e)=>{var c;const r=new u(t);if(r.isZero())return 0;const o=r.dividedBy(10**n),i=e||(Number(o)>1e4?2:4);let s=o.toFixed(i,u.ROUND_DOWN);for(;(c=s.split(".")[1])!=null&&c.split("").every(a=>a==="0")&&s.split(".")[1].length<8;)s=o.toFixed(s.split(".")[1].length+2,u.ROUND_DOWN);return Number(s)},l=(t,n=6,e=4)=>`${t.slice(0,n)}...${t.slice(-e)}`,D=(t,n)=>{const e=m(t,n);return Number(e).toLocaleString("en-US",{maximumFractionDigits:2})};exports.formatAmount=m;exports.formatAmountUsd=D;exports.getAssetFromSwap=g;exports.getDayDifference=f;exports.getTrimmedAddress=l;
|
package/dist/index34.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import c from "bignumber.js";
|
|
2
|
+
const l = (t) => {
|
|
3
|
+
const e = (/* @__PURE__ */ new Date()).getTime() - new Date(t).getTime(), o = Math.floor(e / (1e3 * 3600 * 24)), r = Math.floor(e / (1e3 * 3600)), i = Math.floor(e / (1e3 * 60));
|
|
4
|
+
return o > 3 ? `on ${new Date(t).toLocaleDateString()}` : o > 0 ? `${o} day${o > 1 ? "s" : ""} ago` : r > 0 ? `${r} hour${r > 1 ? "s" : ""} ago` : i > 0 ? `${i} minute${i > 1 ? "s" : ""} ago` : "Just now";
|
|
5
|
+
}, g = (t, n) => n && n.find(
|
|
6
|
+
(e) => `${e.chain}:${e.symbol.toLowerCase()}` === t.asset
|
|
7
|
+
), f = (t, n, e) => {
|
|
8
|
+
var u;
|
|
9
|
+
const o = new c(t);
|
|
10
|
+
if (o.isZero()) return 0;
|
|
11
|
+
const r = o.dividedBy(10 ** n), i = e || (Number(r) > 1e4 ? 2 : 4);
|
|
12
|
+
let s = r.toFixed(i, c.ROUND_DOWN);
|
|
13
|
+
for (; (u = s.split(".")[1]) != null && u.split("").every((m) => m === "0") && s.split(".")[1].length < 8; )
|
|
14
|
+
s = r.toFixed(s.split(".")[1].length + 2, c.ROUND_DOWN);
|
|
15
|
+
return Number(s);
|
|
16
|
+
}, D = (t, n = 6, e = 4) => `${t.slice(0, n)}...${t.slice(-e)}`, $ = (t, n) => {
|
|
17
|
+
const e = f(t, n);
|
|
18
|
+
return Number(e).toLocaleString("en-US", {
|
|
19
|
+
maximumFractionDigits: 2
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
f as formatAmount,
|
|
24
|
+
$ as formatAmountUsd,
|
|
25
|
+
g as getAssetFromSwap,
|
|
26
|
+
l as getDayDifference,
|
|
27
|
+
D as getTrimmedAddress
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index377.cjs");/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function p(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function u(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function f(t,...e){if(!p(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function h(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");u(t.outputLen),u(t.blockLen)}function g(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function b(t,e){f(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function d(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function m(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function B(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function E(t,e){return t<<32-e|t>>>e}const c=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function s(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const x=c?t=>t:t=>s(t);function l(t){for(let e=0;e<t.length;e++)t[e]=s(t[e]);return t}const L=c?t=>t:l;function w(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function a(t){return typeof t=="string"&&(t=w(t)),f(t),t}function A(...t){let e=0;for(let n=0;n<t.length;n++){const o=t[n];f(o),e+=o.length}const r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){const y=t[n];r.set(y,o),o+=y.length}return r}class U{}function H(t){const e=n=>t().update(a(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function S(t){const e=(n,o)=>t(o).update(a(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function V(t=32){if(i.crypto&&typeof i.crypto.getRandomValues=="function")return i.crypto.getRandomValues(new Uint8Array(t));if(i.crypto&&typeof i.crypto.randomBytes=="function")return Uint8Array.from(i.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}exports.Hash=U;exports.abytes=f;exports.aexists=g;exports.ahash=h;exports.anumber=u;exports.aoutput=b;exports.byteSwap=s;exports.byteSwap32=l;exports.clean=m;exports.concatBytes=A;exports.createHasher=H;exports.createOptHasher=S;exports.createView=B;exports.isBytes=p;exports.isLE=c;exports.randomBytes=V;exports.rotr=E;exports.swap32IfBE=L;exports.swap8IfBE=x;exports.toBytes=a;exports.u32=d;exports.utf8ToBytes=w;
|