@gardenfi/utils 2.1.3-beta.2 → 2.1.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +9 -10
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +16 -5
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +64 -13
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +11 -3
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +13 -26
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +8 -4
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +10 -6
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +25 -58
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +14 -125
- package/dist/index109.cjs +3 -1
- package/dist/index109.js +110 -7
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +51 -21
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +24 -17
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +113 -38
- package/dist/index113.cjs +20 -1
- package/dist/index113.js +326 -21
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +80 -11
- package/dist/index115.cjs +4 -1
- package/dist/index115.js +194 -6
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +24 -106
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +182 -3
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +13 -4
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +25 -9
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +3 -2
- package/dist/index121.cjs +1 -2
- package/dist/index121.js +89 -3
- package/dist/index122.cjs +1 -20
- package/dist/index122.js +32 -326
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +15 -13
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +2 -5
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +76 -2
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +138 -7
- package/dist/index127.cjs +3 -3
- package/dist/index127.js +430 -194
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +63 -32
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +6 -21
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +69 -5
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +5 -73
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +21 -5
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +3 -5
- package/dist/index134.cjs +1 -9
- package/dist/index134.js +13 -34
- package/dist/index135.cjs +1 -3
- package/dist/index135.js +55 -106
- package/dist/index136.cjs +2 -1
- package/dist/index136.js +25 -3
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +13 -23
- package/dist/index138.cjs +1 -3
- package/dist/index138.js +26 -451
- package/dist/index139.cjs +1 -2
- package/dist/index139.js +7 -54
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +35 -23
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +8 -33
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +9 -35
- package/dist/index143.cjs +1 -4
- package/dist/index143.js +15 -194
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +92 -7
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +20 -12
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +4 -18
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +6 -27
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +26 -8
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +9 -55
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +8 -45
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +10 -8
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +11 -7
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +13 -16
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +14 -18
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +7 -21
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +20 -50
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +6 -11
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +19 -159
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +40 -21
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +17 -127
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +20 -37
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +80 -6
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +44 -27
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +11 -191
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +53 -4
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +3 -62
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +6 -3
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +5 -20
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +11 -16
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +13 -23
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +13 -11
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +5 -34
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +14 -3
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +103 -18
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +6 -27
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +151 -36
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +35 -10
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +30 -24
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +8 -27
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +66 -63
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +9 -9
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +71 -33
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +18 -23
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +110 -24
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +23 -3
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +50 -14
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +104 -101
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +9 -81
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +2 -6
- package/dist/index190.cjs +2 -1
- package/dist/index190.js +3 -7
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +12 -26
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +4 -37
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +2 -14
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +30 -41
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +21 -5
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +5 -11
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +5 -19
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +5 -78
- package/dist/index199.cjs +9 -1
- package/dist/index199.js +36 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +3 -38
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +22 -107
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +25 -41
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +35 -32
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +8 -8
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +12 -6
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +18 -6
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +27 -11
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +8 -10
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +55 -13
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +8 -32
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +8 -5
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +18 -7
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +161 -8
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +127 -20
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +37 -30
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +27 -20
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +191 -3
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +4 -18
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +3 -11
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -9
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +17 -18
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +16 -22
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +11 -5
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +34 -5
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +3 -9
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +27 -104
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +24 -111
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +27 -17
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +6 -171
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +27 -17
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +37 -25
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +41 -12
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +78 -15
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +2 -6
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +37 -13
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +49 -10
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +6 -16
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +6 -10
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +31 -15
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +5 -23
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +6 -28
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +4 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +16 -12
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +10 -12
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +5 -47
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +8 -11
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +104 -7
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +112 -9
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +18 -13
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +169 -12
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +17 -9
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +25 -24
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +13 -12
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +15 -24
- package/dist/index254.cjs +1 -2
- package/dist/index254.js +5 -24
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -12
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +10 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +16 -52
- package/dist/index258.cjs +1 -2
- package/dist/index258.js +3 -41
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +141 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +5 -5
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +155 -5
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +9 -10
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +110 -16
- package/dist/index263.cjs +2 -1
- package/dist/index263.js +134 -8
- package/dist/index264.cjs +2 -1
- package/dist/index264.js +41 -66
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +2 -66
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +5 -186
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +8 -20
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +17 -40
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +8 -76
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +2 -2
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +66 -40
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +64 -15
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +185 -12
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +21 -11
- package/dist/index274.cjs +1 -2
- package/dist/index274.js +42 -18
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +75 -13
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +40 -11
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +16 -16
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +12 -222
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +12 -6
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index280.cjs +2 -1
- package/dist/index280.js +19 -7
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +13 -25
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +11 -34
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +15 -17
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +213 -60
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +6 -67
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +7 -41
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +27 -2
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +32 -204
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +18 -3
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +16 -7
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +62 -132
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +62 -150
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +40 -9
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +2 -114
- package/dist/index294.cjs +1 -2
- package/dist/index294.js +197 -125
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +1 -1
- package/dist/index297.cjs +2 -1
- package/dist/index297.js +66 -68
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +4 -642
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +40 -172
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +45 -31
- package/dist/index300.cjs +1 -2
- package/dist/index300.js +7 -66
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +62 -4
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +70 -33
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +4 -8
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +187 -55
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +68 -77
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +643 -4
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +159 -181
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +3 -3
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +9 -28
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +18 -16
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +120 -28
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +57 -41
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +23 -151
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +10 -35
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +18 -36
- package/dist/index38.cjs +1 -2
- package/dist/index38.js +6 -59
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +10 -32
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +32 -15
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +16 -8
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +17 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +7 -26
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +32 -30
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +24 -3
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +21 -8
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +56 -66
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +38 -7
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +36 -27
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +161 -67
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +110 -18
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +28 -108
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +3 -60
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +2 -25
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +4 -41
- package/dist/index56.cjs +2 -1
- package/dist/index56.js +59 -37
- package/dist/index57.cjs +2 -1
- package/dist/index57.js +50 -54
- package/dist/index58.cjs +3 -1
- package/dist/index58.js +206 -156
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +13 -40
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +12 -9
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +24 -36
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +28 -9
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +44 -47
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +19 -85
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +10 -40
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +40 -8
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +8 -5
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +7 -17
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +31 -8
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +36 -13
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +36 -7
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +9 -9
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +25 -42
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +22 -13
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +85 -16
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +50 -13
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +23 -6
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +41 -35
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +17 -9
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +5 -7
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +32 -25
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +9 -10
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +12 -13
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +100 -106
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +8 -80
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +6 -181
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +7 -6
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +21 -13
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +8 -13
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +31 -93
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +13 -75
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +7 -88
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +9 -138
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +16 -69
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +73 -23
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +34 -108
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +46 -6
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +14 -50
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +11 -14
- package/package.json +1 -1
package/dist/index307.js
CHANGED
|
@@ -1,197 +1,175 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
for (let o = 0; o < n.length; o++)
|
|
9
|
-
t.push(u({
|
|
10
|
-
checksumAddress: e,
|
|
11
|
-
parameter: n[o],
|
|
12
|
-
value: r[o]
|
|
13
|
-
}));
|
|
14
|
-
return t;
|
|
1
|
+
import { validateField as y, nLength as I } from "./index284.js";
|
|
2
|
+
import { validateObject as M, bitLen as z, bitMask as E } from "./index294.js";
|
|
3
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
4
|
+
const F = BigInt(0), b = BigInt(1);
|
|
5
|
+
function h(e, s) {
|
|
6
|
+
const t = s.negate();
|
|
7
|
+
return e ? t : s;
|
|
15
8
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const [i, c] = o;
|
|
20
|
-
return P(r, {
|
|
21
|
-
checksumAddress: e,
|
|
22
|
-
length: i,
|
|
23
|
-
parameter: {
|
|
24
|
-
...t,
|
|
25
|
-
type: c
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
if (t.type === "tuple")
|
|
30
|
-
return R(r, {
|
|
31
|
-
checksumAddress: e,
|
|
32
|
-
parameter: t
|
|
33
|
-
});
|
|
34
|
-
if (t.type === "address")
|
|
35
|
-
return N(r, {
|
|
36
|
-
checksum: e
|
|
37
|
-
});
|
|
38
|
-
if (t.type === "bool")
|
|
39
|
-
return C(r);
|
|
40
|
-
if (t.type.startsWith("uint") || t.type.startsWith("int")) {
|
|
41
|
-
const i = t.type.startsWith("int"), [, , c = "256"] = L.exec(t.type) ?? [];
|
|
42
|
-
return M(r, {
|
|
43
|
-
signed: i,
|
|
44
|
-
size: Number(c)
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
if (t.type.startsWith("bytes"))
|
|
48
|
-
return $(r, { type: t.type });
|
|
49
|
-
if (t.type === "string")
|
|
50
|
-
return W(r);
|
|
51
|
-
throw new g(t.type);
|
|
9
|
+
function B(e, s) {
|
|
10
|
+
if (!Number.isSafeInteger(e) || e <= 0 || e > s)
|
|
11
|
+
throw new Error("invalid window size, expected [1.." + s + "], got W=" + e);
|
|
52
12
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
c ? n += 32 : n += d(s);
|
|
58
|
-
}
|
|
59
|
-
const r = [], t = [];
|
|
60
|
-
let o = 0;
|
|
61
|
-
for (let i = 0; i < e.length; i++) {
|
|
62
|
-
const { dynamic: c, encoded: s } = e[i];
|
|
63
|
-
c ? (r.push(f(n + o, { size: 32 })), t.push(s), o += d(s)) : r.push(s);
|
|
64
|
-
}
|
|
65
|
-
return p(...r, ...t);
|
|
13
|
+
function m(e, s) {
|
|
14
|
+
B(e, s);
|
|
15
|
+
const t = Math.ceil(s / e) + 1, n = 2 ** (e - 1), i = 2 ** e, o = E(e), r = BigInt(e);
|
|
16
|
+
return { windows: t, windowSize: n, mask: o, maxNumber: i, shiftBy: r };
|
|
66
17
|
}
|
|
67
|
-
function
|
|
68
|
-
const {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
18
|
+
function A(e, s, t) {
|
|
19
|
+
const { windowSize: n, mask: i, maxNumber: o, shiftBy: r } = t;
|
|
20
|
+
let f = Number(e & i), a = e >> r;
|
|
21
|
+
f > n && (f -= o, a += b);
|
|
22
|
+
const w = s * n, c = w + Math.abs(f) - 1, l = f === 0, u = f < 0, d = s % 2 !== 0;
|
|
23
|
+
return { nextN: a, offset: c, isZero: l, isNeg: u, isNegF: d, offsetF: w };
|
|
73
24
|
}
|
|
74
|
-
function
|
|
75
|
-
const { checksumAddress: r, length: t, parameter: o } = n, i = t === null;
|
|
25
|
+
function O(e, s) {
|
|
76
26
|
if (!Array.isArray(e))
|
|
77
|
-
throw new
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
type: `${o.type}[${t}]`
|
|
83
|
-
});
|
|
84
|
-
let c = !1;
|
|
85
|
-
const s = [];
|
|
86
|
-
for (let a = 0; a < e.length; a++) {
|
|
87
|
-
const m = u({
|
|
88
|
-
checksumAddress: r,
|
|
89
|
-
parameter: o,
|
|
90
|
-
value: e[a]
|
|
91
|
-
});
|
|
92
|
-
m.dynamic && (c = !0), s.push(m);
|
|
93
|
-
}
|
|
94
|
-
if (i || c) {
|
|
95
|
-
const a = l(s);
|
|
96
|
-
if (i) {
|
|
97
|
-
const m = f(s.length, { size: 32 });
|
|
98
|
-
return {
|
|
99
|
-
dynamic: !0,
|
|
100
|
-
encoded: s.length > 0 ? p(m, a) : m
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
if (c)
|
|
104
|
-
return { dynamic: !0, encoded: a };
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
dynamic: !1,
|
|
108
|
-
encoded: p(...s.map(({ encoded: a }) => a))
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function $(e, { type: n }) {
|
|
112
|
-
const [, r] = n.split("bytes"), t = d(e);
|
|
113
|
-
if (!r) {
|
|
114
|
-
let o = e;
|
|
115
|
-
return t % 32 !== 0 && (o = y(o, Math.ceil((e.length - 2) / 2 / 32) * 32)), {
|
|
116
|
-
dynamic: !0,
|
|
117
|
-
encoded: p(h(f(t, { size: 32 })), o)
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
if (t !== Number.parseInt(r))
|
|
121
|
-
throw new z({
|
|
122
|
-
expectedSize: Number.parseInt(r),
|
|
123
|
-
value: e
|
|
124
|
-
});
|
|
125
|
-
return { dynamic: !1, encoded: y(e) };
|
|
27
|
+
throw new Error("array expected");
|
|
28
|
+
e.forEach((t, n) => {
|
|
29
|
+
if (!(t instanceof s))
|
|
30
|
+
throw new Error("invalid point at index " + n);
|
|
31
|
+
});
|
|
126
32
|
}
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
throw new
|
|
130
|
-
|
|
33
|
+
function k(e, s) {
|
|
34
|
+
if (!Array.isArray(e))
|
|
35
|
+
throw new Error("array of scalars expected");
|
|
36
|
+
e.forEach((t, n) => {
|
|
37
|
+
if (!s.isValid(t))
|
|
38
|
+
throw new Error("invalid scalar at index " + n);
|
|
39
|
+
});
|
|
131
40
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (e > t || e < o)
|
|
136
|
-
throw new E({
|
|
137
|
-
max: t.toString(),
|
|
138
|
-
min: o.toString(),
|
|
139
|
-
signed: n,
|
|
140
|
-
size: r / 8,
|
|
141
|
-
value: e.toString()
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
dynamic: !1,
|
|
146
|
-
encoded: f(e, {
|
|
147
|
-
size: 32,
|
|
148
|
-
signed: n
|
|
149
|
-
})
|
|
150
|
-
};
|
|
41
|
+
const p = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
|
|
42
|
+
function N(e) {
|
|
43
|
+
return x.get(e) || 1;
|
|
151
44
|
}
|
|
152
|
-
function
|
|
153
|
-
const n = I(e), r = Math.ceil(d(n) / 32), t = [];
|
|
154
|
-
for (let o = 0; o < r; o++)
|
|
155
|
-
t.push(y(B(n, o * 32, (o + 1) * 32)));
|
|
45
|
+
function R(e, s) {
|
|
156
46
|
return {
|
|
157
|
-
|
|
158
|
-
|
|
47
|
+
constTimeNegate: h,
|
|
48
|
+
hasPrecomputes(t) {
|
|
49
|
+
return N(t) !== 1;
|
|
50
|
+
},
|
|
51
|
+
// non-const time multiplication ladder
|
|
52
|
+
unsafeLadder(t, n, i = e.ZERO) {
|
|
53
|
+
let o = t;
|
|
54
|
+
for (; n > F; )
|
|
55
|
+
n & b && (i = i.add(o)), o = o.double(), n >>= b;
|
|
56
|
+
return i;
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Creates a wNAF precomputation window. Used for caching.
|
|
60
|
+
* Default window size is set by `utils.precompute()` and is equal to 8.
|
|
61
|
+
* Number of precomputed points depends on the curve size:
|
|
62
|
+
* 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:
|
|
63
|
+
* - 𝑊 is the window size
|
|
64
|
+
* - 𝑛 is the bitlength of the curve order.
|
|
65
|
+
* For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.
|
|
66
|
+
* @param elm Point instance
|
|
67
|
+
* @param W window size
|
|
68
|
+
* @returns precomputed point tables flattened to a single array
|
|
69
|
+
*/
|
|
70
|
+
precomputeWindow(t, n) {
|
|
71
|
+
const { windows: i, windowSize: o } = m(n, s), r = [];
|
|
72
|
+
let f = t, a = f;
|
|
73
|
+
for (let w = 0; w < i; w++) {
|
|
74
|
+
a = f, r.push(a);
|
|
75
|
+
for (let c = 1; c < o; c++)
|
|
76
|
+
a = a.add(f), r.push(a);
|
|
77
|
+
f = a.double();
|
|
78
|
+
}
|
|
79
|
+
return r;
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* Implements ec multiplication using precomputed tables and w-ary non-adjacent form.
|
|
83
|
+
* @param W window size
|
|
84
|
+
* @param precomputes precomputed tables
|
|
85
|
+
* @param n scalar (we don't check here, but should be less than curve order)
|
|
86
|
+
* @returns real and fake (for const-time) points
|
|
87
|
+
*/
|
|
88
|
+
wNAF(t, n, i) {
|
|
89
|
+
let o = e.ZERO, r = e.BASE;
|
|
90
|
+
const f = m(t, s);
|
|
91
|
+
for (let a = 0; a < f.windows; a++) {
|
|
92
|
+
const { nextN: w, offset: c, isZero: l, isNeg: u, isNegF: d, offsetF: g } = A(i, a, f);
|
|
93
|
+
i = w, l ? r = r.add(h(d, n[g])) : o = o.add(h(u, n[c]));
|
|
94
|
+
}
|
|
95
|
+
return { p: o, f: r };
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.
|
|
99
|
+
* @param W window size
|
|
100
|
+
* @param precomputes precomputed tables
|
|
101
|
+
* @param n scalar (we don't check here, but should be less than curve order)
|
|
102
|
+
* @param acc accumulator point to add result of multiplication
|
|
103
|
+
* @returns point
|
|
104
|
+
*/
|
|
105
|
+
wNAFUnsafe(t, n, i, o = e.ZERO) {
|
|
106
|
+
const r = m(t, s);
|
|
107
|
+
for (let f = 0; f < r.windows && i !== F; f++) {
|
|
108
|
+
const { nextN: a, offset: w, isZero: c, isNeg: l } = A(i, f, r);
|
|
109
|
+
if (i = a, !c) {
|
|
110
|
+
const u = n[w];
|
|
111
|
+
o = o.add(l ? u.negate() : u);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return o;
|
|
115
|
+
},
|
|
116
|
+
getPrecomputes(t, n, i) {
|
|
117
|
+
let o = p.get(n);
|
|
118
|
+
return o || (o = this.precomputeWindow(n, t), t !== 1 && p.set(n, i(o))), o;
|
|
119
|
+
},
|
|
120
|
+
wNAFCached(t, n, i) {
|
|
121
|
+
const o = N(t);
|
|
122
|
+
return this.wNAF(o, this.getPrecomputes(o, t, i), n);
|
|
123
|
+
},
|
|
124
|
+
wNAFCachedUnsafe(t, n, i, o) {
|
|
125
|
+
const r = N(t);
|
|
126
|
+
return r === 1 ? this.unsafeLadder(t, n, o) : this.wNAFUnsafe(r, this.getPrecomputes(r, t, i), n, o);
|
|
127
|
+
},
|
|
128
|
+
// We calculate precomputes for elliptic curve point multiplication
|
|
129
|
+
// using windowed method. This specifies window size and
|
|
130
|
+
// stores precomputed values. Usually only base point would be precomputed.
|
|
131
|
+
setWindowSize(t, n) {
|
|
132
|
+
B(n, s), x.set(t, n), p.delete(t);
|
|
133
|
+
}
|
|
159
134
|
};
|
|
160
135
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const i =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
136
|
+
function j(e, s, t, n) {
|
|
137
|
+
if (O(t, e), k(n, s), t.length !== n.length)
|
|
138
|
+
throw new Error("arrays of points and scalars must have equal length");
|
|
139
|
+
const i = e.ZERO, o = z(BigInt(t.length)), r = o > 12 ? o - 3 : o > 4 ? o - 2 : o ? 2 : 1, f = E(r), a = new Array(Number(f) + 1).fill(i), w = Math.floor((s.BITS - 1) / r) * r;
|
|
140
|
+
let c = i;
|
|
141
|
+
for (let l = w; l >= 0; l -= r) {
|
|
142
|
+
a.fill(i);
|
|
143
|
+
for (let d = 0; d < n.length; d++) {
|
|
144
|
+
const g = n[d], S = Number(g >> BigInt(l) & f);
|
|
145
|
+
a[S] = a[S].add(t[d]);
|
|
146
|
+
}
|
|
147
|
+
let u = i;
|
|
148
|
+
for (let d = a.length - 1, g = i; d > 0; d--)
|
|
149
|
+
g = g.add(a[d]), u = u.add(g);
|
|
150
|
+
if (c = c.add(u), l !== 0)
|
|
151
|
+
for (let d = 0; d < r; d++)
|
|
152
|
+
c = c.double();
|
|
172
153
|
}
|
|
173
|
-
return
|
|
174
|
-
dynamic: o,
|
|
175
|
-
encoded: o ? l(i) : p(...i.map(({ encoded: c }) => c))
|
|
176
|
-
};
|
|
154
|
+
return c;
|
|
177
155
|
}
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
156
|
+
function v(e) {
|
|
157
|
+
return y(e.Fp), M(e, {
|
|
158
|
+
n: "bigint",
|
|
159
|
+
h: "bigint",
|
|
160
|
+
Gx: "field",
|
|
161
|
+
Gy: "field"
|
|
162
|
+
}, {
|
|
163
|
+
nBitLength: "isSafeInteger",
|
|
164
|
+
nByteLength: "isSafeInteger"
|
|
165
|
+
}), Object.freeze({
|
|
166
|
+
...I(e.n, e.nBitLength),
|
|
167
|
+
...e,
|
|
168
|
+
p: e.Fp.ORDER
|
|
169
|
+
});
|
|
184
170
|
}
|
|
185
171
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
C as encodeBoolean,
|
|
190
|
-
$ as encodeBytes,
|
|
191
|
-
M as encodeNumber,
|
|
192
|
-
W as encodeString,
|
|
193
|
-
R as encodeTuple,
|
|
194
|
-
k as getArrayComponents,
|
|
195
|
-
u as prepareParameter,
|
|
196
|
-
q as prepareParameters
|
|
172
|
+
j as pippenger,
|
|
173
|
+
v as validateBasic,
|
|
174
|
+
R as wNAF
|
|
197
175
|
};
|
package/dist/index308.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index297.cjs"),y=require("./index260.cjs"),s=require("./index309.cjs"),z=require("./index299.cjs"),S=new TextEncoder;function x(e){return e instanceof Uint8Array?e:typeof e=="string"?h(e):g(e)}function g(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function h(e,t={}){const{size:r}=t;let n=e;r&&(z.assertSize(e,r),n=y.padRight(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);const d=i.length/2,f=new Uint8Array(d);for(let c=0,o=0;c<d;c++){const u=s.charCodeToBase16(i.charCodeAt(o++)),b=s.charCodeToBase16(i.charCodeAt(o++));if(u===void 0||b===void 0)throw new a.BaseError(`Invalid byte sequence ("${i[o-2]}${i[o-1]}" in "${i}").`);f[c]=u*16+b}return f}function m(e,t={}){const{size:r}=t,n=S.encode(e);return typeof r=="number"?(s.assertSize(n,r),l(n,r)):n}function l(e,t){return s.pad(e,{dir:"right",size:t})}function E(e){return e.length}class p extends a.BaseError{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class $ extends a.BaseError{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}exports.SizeExceedsPaddingSizeError=$;exports.SizeOverflowError=p;exports.from=x;exports.fromArray=g;exports.fromHex=h;exports.fromString=m;exports.padRight=l;exports.size=E;
|
package/dist/index308.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseError as c } from "./
|
|
2
|
-
import { padRight as h } from "./
|
|
1
|
+
import { BaseError as c } from "./index297.js";
|
|
2
|
+
import { padRight as h } from "./index260.js";
|
|
3
3
|
import { charCodeToBase16 as b, assertSize as g, pad as m } from "./index309.js";
|
|
4
|
-
import { assertSize as p } from "./
|
|
4
|
+
import { assertSize as p } from "./index299.js";
|
|
5
5
|
const l = /* @__PURE__ */ new TextEncoder();
|
|
6
6
|
function E(e) {
|
|
7
7
|
return e instanceof Uint8Array ? e : typeof e == "string" ? y(e) : z(e);
|
package/dist/index31.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 s=require("./index32.cjs"),i=require("./index33.cjs");function d(e,o){const{abi:a,args:n,bytecode:r,...t}=o,c=s.encodeDeployData({abi:a,args:n,bytecode:r});return i.sendTransaction(e,{...t,...t.authorizationList?{to:null}:{},data:c})}exports.deployContract=d;
|
package/dist/index31.js
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
args: e,
|
|
10
|
-
functionName: s
|
|
1
|
+
import { encodeDeployData as i } from "./index32.js";
|
|
2
|
+
import { sendTransaction as s } from "./index33.js";
|
|
3
|
+
function p(o, a) {
|
|
4
|
+
const { abi: n, args: r, bytecode: e, ...t } = a, c = i({ abi: n, args: r, bytecode: e });
|
|
5
|
+
return s(o, {
|
|
6
|
+
...t,
|
|
7
|
+
...t.authorizationList ? { to: null } : {},
|
|
8
|
+
data: c
|
|
11
9
|
});
|
|
12
|
-
try {
|
|
13
|
-
return await g(i, G, "estimateGas")({
|
|
14
|
-
data: `${d}${c ? c.replace("0x", "") : ""}`,
|
|
15
|
-
to: r,
|
|
16
|
-
...t
|
|
17
|
-
});
|
|
18
|
-
} catch (n) {
|
|
19
|
-
const a = t.account ? f(t.account) : void 0;
|
|
20
|
-
throw p(n, {
|
|
21
|
-
abi: o,
|
|
22
|
-
address: r,
|
|
23
|
-
args: e,
|
|
24
|
-
docsPath: "/docs/contract/estimateContractGas",
|
|
25
|
-
functionName: s,
|
|
26
|
-
sender: a == null ? void 0 : a.address
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
10
|
}
|
|
30
11
|
export {
|
|
31
|
-
|
|
12
|
+
p as deployContract
|
|
32
13
|
};
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index113.cjs"),u=require("./index212.cjs"),d=require("./index217.cjs"),r="/docs/contract/encodeDeployData";function b(i){const{abi:a,args:o,bytecode:n}=i;if(!o||o.length===0)return n;const t=a.find(c=>"type"in c&&c.type==="constructor");if(!t)throw new e.AbiConstructorNotFoundError({docsPath:r});if(!("inputs"in t))throw new e.AbiConstructorParamsNotFoundError({docsPath:r});if(!t.inputs||t.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:r});const s=d.encodeAbiParameters(t.inputs,o);return u.concatHex([n,s])}exports.encodeDeployData=b;
|
package/dist/index32.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { AbiConstructorNotFoundError as p, AbiConstructorParamsNotFoundError as i } from "./index113.js";
|
|
2
|
+
import { concatHex as u } from "./index212.js";
|
|
3
|
+
import { encodeAbiParameters as d } from "./index217.js";
|
|
4
|
+
const r = "/docs/contract/encodeDeployData";
|
|
5
|
+
function w(c) {
|
|
6
|
+
const { abi: s, args: o, bytecode: n } = c;
|
|
7
|
+
if (!o || o.length === 0)
|
|
8
|
+
return n;
|
|
9
|
+
const t = s.find((e) => "type" in e && e.type === "constructor");
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new p({ docsPath: r });
|
|
12
|
+
if (!("inputs" in t))
|
|
13
|
+
throw new i({ docsPath: r });
|
|
14
|
+
if (!t.inputs || t.inputs.length === 0)
|
|
15
|
+
throw new i({ docsPath: r });
|
|
16
|
+
const a = d(t.inputs, o);
|
|
17
|
+
return u([n, a]);
|
|
16
18
|
}
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
w as encodeDeployData
|
|
19
21
|
};
|
package/dist/index33.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 G=require("./index53.cjs"),u=require("./index136.cjs"),O=require("./index56.cjs"),j=require("./index82.cjs"),B=require("./index155.cjs"),U=require("./index137.cjs"),W=require("./index60.cjs"),k=require("./index61.cjs"),l=require("./index43.cjs"),D=require("./index156.cjs"),H=require("./index64.cjs"),J=require("./index92.cjs"),L=require("./index84.cjs"),K=require("./index157.cjs"),f=new D.LruMap(128);async function Q(r,e){var M,z,I,S;const{account:d=r.account,chain:n=r.chain,accessList:w,authorizationList:s,blobs:q,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,type:C,value:N,...P}=e;if(typeof d>"u")throw new u.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const t=d?G.parseAccount(d):null;try{H.assertRequest(e);const a=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await j.recoverAuthorizationAddress({authorization:s[0]}).catch(()=>{throw new O.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((t==null?void 0:t.type)==="json-rpc"||t===null){let i;n!==null&&(i=await l.getAction(r,J.getChainId,"getChainId")({}),B.assertCurrentChain({currentChainId:i,chain:n}));const c=(I=(z=(M=r.chain)==null?void 0:M.formatters)==null?void 0:z.transactionRequest)==null?void 0:I.format,F=(c||k.formatTransactionRequest)({...W.extract(P,{format:c}),accessList:w,authorizationList:s,blobs:q,chainId:i,data:m,from:t==null?void 0:t.address,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,to:a,type:C,value:N}),v=f.get(r.uid),_=v?"wallet_sendTransaction":"eth_sendTransaction";try{return await r.request({method:_,params:[F]},{retryCount:0})}catch(x){if(v===!1)throw x;const o=x;if(o.name==="InvalidInputRpcError"||o.name==="InvalidParamsRpcError"||o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError")return await r.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(p=>(f.set(r.uid,!0),p)).catch(p=>{const h=p;throw h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"?(f.set(r.uid,!1),o):h});throw o}}if((t==null?void 0:t.type)==="local"){const i=await l.getAction(r,L.prepareTransactionRequest,"prepareTransactionRequest")({account:t,accessList:w,authorizationList:s,blobs:q,chain:n,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,nonceManager:t.nonceManager,parameters:[...L.defaultParameters,"sidecars"],type:C,value:N,...P,to:a}),c=(S=n==null?void 0:n.serializers)==null?void 0:S.transaction,b=await t.signTransaction(i,{serializer:c});return await l.getAction(r,K.sendRawTransaction,"sendRawTransaction")({serializedTransaction:b})}throw(t==null?void 0:t.type)==="smart"?new u.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new u.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:t==null?void 0:t.type})}catch(a){throw a instanceof u.AccountTypeNotSupportedError?a:U.getTransactionError(a,{...e,account:t,chain:e.chain||void 0})}}exports.sendTransaction=Q;
|
package/dist/index33.js
CHANGED
|
@@ -1,36 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { parseAccount as _ } from "./index53.js";
|
|
2
|
+
import { AccountNotFoundError as G, AccountTypeNotSupportedError as p } from "./index136.js";
|
|
3
|
+
import { BaseError as B } from "./index56.js";
|
|
4
|
+
import { recoverAuthorizationAddress as O } from "./index82.js";
|
|
5
|
+
import { assertCurrentChain as U } from "./index155.js";
|
|
6
|
+
import { getTransactionError as W } from "./index137.js";
|
|
7
|
+
import { extract as j } from "./index60.js";
|
|
8
|
+
import { formatTransactionRequest as k } from "./index61.js";
|
|
9
|
+
import { getAction as f } from "./index43.js";
|
|
10
|
+
import { LruMap as D } from "./index156.js";
|
|
11
|
+
import { assertRequest as H } from "./index64.js";
|
|
12
|
+
import { getChainId as J } from "./index92.js";
|
|
13
|
+
import { prepareTransactionRequest as K, defaultParameters as Q } from "./index84.js";
|
|
14
|
+
import { sendRawTransaction as V } from "./index157.js";
|
|
15
|
+
const h = new D(128);
|
|
16
|
+
async function mr(t, o) {
|
|
17
|
+
var z, A, F, I;
|
|
18
|
+
const { account: d = t.account, chain: e = t.chain, accessList: w, authorizationList: s, blobs: l, data: y, gas: T, gasPrice: g, maxFeePerBlobGas: R, maxFeePerGas: E, maxPriorityFeePerGas: q, nonce: P, type: C, value: N, ...M } = o;
|
|
19
|
+
if (typeof d > "u")
|
|
20
|
+
throw new G({
|
|
21
|
+
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
17
22
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
const r = d ? _(d) : null;
|
|
24
|
+
try {
|
|
25
|
+
H(o);
|
|
26
|
+
const a = await (async () => {
|
|
27
|
+
if (o.to)
|
|
28
|
+
return o.to;
|
|
29
|
+
if (o.to !== null && s && s.length > 0)
|
|
30
|
+
return await O({
|
|
31
|
+
authorization: s[0]
|
|
32
|
+
}).catch(() => {
|
|
33
|
+
throw new B("`to` is required. Could not infer from `authorizationList`.");
|
|
34
|
+
});
|
|
35
|
+
})();
|
|
36
|
+
if ((r == null ? void 0 : r.type) === "json-rpc" || r === null) {
|
|
37
|
+
let i;
|
|
38
|
+
e !== null && (i = await f(t, J, "getChainId")({}), U({
|
|
39
|
+
currentChainId: i,
|
|
40
|
+
chain: e
|
|
41
|
+
}));
|
|
42
|
+
const c = (F = (A = (z = t.chain) == null ? void 0 : z.formatters) == null ? void 0 : A.transactionRequest) == null ? void 0 : F.format, b = (c || k)({
|
|
43
|
+
// Pick out extra data that might exist on the chain's transaction request type.
|
|
44
|
+
...j(M, { format: c }),
|
|
45
|
+
accessList: w,
|
|
46
|
+
authorizationList: s,
|
|
47
|
+
blobs: l,
|
|
48
|
+
chainId: i,
|
|
49
|
+
data: y,
|
|
50
|
+
from: r == null ? void 0 : r.address,
|
|
51
|
+
gas: T,
|
|
52
|
+
gasPrice: g,
|
|
53
|
+
maxFeePerBlobGas: R,
|
|
54
|
+
maxFeePerGas: E,
|
|
55
|
+
maxPriorityFeePerGas: q,
|
|
56
|
+
nonce: P,
|
|
57
|
+
to: a,
|
|
58
|
+
type: C,
|
|
59
|
+
value: N
|
|
60
|
+
}), v = h.get(t.uid), S = v ? "wallet_sendTransaction" : "eth_sendTransaction";
|
|
61
|
+
try {
|
|
62
|
+
return await t.request({
|
|
63
|
+
method: S,
|
|
64
|
+
params: [b]
|
|
65
|
+
}, { retryCount: 0 });
|
|
66
|
+
} catch (L) {
|
|
67
|
+
if (v === !1)
|
|
68
|
+
throw L;
|
|
69
|
+
const n = L;
|
|
70
|
+
if (n.name === "InvalidInputRpcError" || n.name === "InvalidParamsRpcError" || n.name === "MethodNotFoundRpcError" || n.name === "MethodNotSupportedRpcError")
|
|
71
|
+
return await t.request({
|
|
72
|
+
method: "wallet_sendTransaction",
|
|
73
|
+
params: [b]
|
|
74
|
+
}, { retryCount: 0 }).then((m) => (h.set(t.uid, !0), m)).catch((m) => {
|
|
75
|
+
const u = m;
|
|
76
|
+
throw u.name === "MethodNotFoundRpcError" || u.name === "MethodNotSupportedRpcError" ? (h.set(t.uid, !1), n) : u;
|
|
77
|
+
});
|
|
78
|
+
throw n;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if ((r == null ? void 0 : r.type) === "local") {
|
|
82
|
+
const i = await f(t, K, "prepareTransactionRequest")({
|
|
83
|
+
account: r,
|
|
84
|
+
accessList: w,
|
|
85
|
+
authorizationList: s,
|
|
86
|
+
blobs: l,
|
|
87
|
+
chain: e,
|
|
88
|
+
data: y,
|
|
89
|
+
gas: T,
|
|
90
|
+
gasPrice: g,
|
|
91
|
+
maxFeePerBlobGas: R,
|
|
92
|
+
maxFeePerGas: E,
|
|
93
|
+
maxPriorityFeePerGas: q,
|
|
94
|
+
nonce: P,
|
|
95
|
+
nonceManager: r.nonceManager,
|
|
96
|
+
parameters: [...Q, "sidecars"],
|
|
97
|
+
type: C,
|
|
98
|
+
value: N,
|
|
99
|
+
...M,
|
|
100
|
+
to: a
|
|
101
|
+
}), c = (I = e == null ? void 0 : e.serializers) == null ? void 0 : I.transaction, x = await r.signTransaction(i, {
|
|
102
|
+
serializer: c
|
|
103
|
+
});
|
|
104
|
+
return await f(t, V, "sendRawTransaction")({
|
|
105
|
+
serializedTransaction: x
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
throw (r == null ? void 0 : r.type) === "smart" ? new p({
|
|
109
|
+
metaMessages: [
|
|
110
|
+
"Consider using the `sendUserOperation` Action instead."
|
|
111
|
+
],
|
|
112
|
+
docsPath: "/docs/actions/bundler/sendUserOperation",
|
|
113
|
+
type: "smart"
|
|
114
|
+
}) : new p({
|
|
115
|
+
docsPath: "/docs/actions/wallet/sendTransaction",
|
|
116
|
+
type: r == null ? void 0 : r.type
|
|
23
117
|
});
|
|
24
118
|
} catch (a) {
|
|
25
|
-
throw
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
docsPath: "/docs/contract/readContract",
|
|
30
|
-
functionName: r
|
|
119
|
+
throw a instanceof p ? a : W(a, {
|
|
120
|
+
...o,
|
|
121
|
+
account: r,
|
|
122
|
+
chain: o.chain || void 0
|
|
31
123
|
});
|
|
32
124
|
}
|
|
33
125
|
}
|
|
34
126
|
export {
|
|
35
|
-
|
|
127
|
+
mr as sendTransaction
|
|
36
128
|
};
|