@gardenfi/swap 0.0.2 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +2 -2
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +2 -2
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +7 -7
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +2 -2
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +3 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +32 -78
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +4 -3
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +8 -31
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +116 -115
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +62 -4
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +23 -14
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +36 -11
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +41 -18
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +56 -56
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +39 -19
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +10 -14
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +12 -12
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +28 -281
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +32 -569
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +9 -33
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +29 -3
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +49 -8
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +70 -116
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +38 -58
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +74 -21
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +8 -36
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +5 -40
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +17 -58
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +8 -40
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +13 -9
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +7 -31
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +15 -35
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +46 -9
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +13 -29
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +16 -50
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +13 -70
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +6 -41
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +34 -76
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +7 -6
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +7 -5
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +29 -17
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +10 -8
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +14 -13
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +11 -6
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +121 -16
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +80 -44
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +176 -12
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +44 -16
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +5 -12
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +13 -5
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +13 -34
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +103 -9
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +75 -8
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +89 -29
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +151 -10
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +138 -14
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +69 -12
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +23 -121
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +161 -79
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +6 -177
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +13 -44
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +19 -6
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +106 -14
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +78 -14
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +8 -102
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +26 -73
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +85 -84
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +3 -152
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +2 -139
- package/dist/index172.cjs +2 -1
- package/dist/index172.js +3 -70
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +9 -24
- package/dist/index174.cjs +20 -1
- package/dist/index174.js +324 -162
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +13 -6
- package/dist/index176.cjs +2 -1
- package/dist/index176.js +59 -13
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +2 -20
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +7 -106
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +32 -79
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +3 -3
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +20 -8
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +5 -28
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +70 -68
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +6 -3
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +6 -2
- package/dist/index185.cjs +9 -2
- package/dist/index185.js +35 -2
- package/dist/index186.cjs +2 -1
- package/dist/index186.js +121 -9
- package/dist/index187.cjs +1 -20
- package/dist/index187.js +3 -327
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +16 -11
- package/dist/index189.cjs +1 -2
- package/dist/index189.js +30 -56
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -18
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +36 -2
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +22 -6
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +9 -32
- package/dist/index193.cjs +4 -1
- package/dist/index193.js +194 -21
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +2 -6
- package/dist/index195.cjs +3 -1
- package/dist/index195.js +450 -72
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +27 -5
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +161 -5
- package/dist/index198.cjs +1 -9
- package/dist/index198.js +126 -34
- package/dist/index199.cjs +1 -2
- package/dist/index199.js +33 -115
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +28 -3
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +52 -15
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +182 -24
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +4 -36
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +69 -19
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +18 -6
- package/dist/index206.cjs +1 -4
- package/dist/index206.js +3 -195
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +17 -2
- package/dist/index208.cjs +1 -3
- package/dist/index208.js +23 -451
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +29 -22
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +19 -19
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +3 -162
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +26 -126
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +35 -37
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +8 -27
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +24 -54
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +27 -190
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +76 -4
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +19 -62
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +8 -20
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +11 -3
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +11 -16
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +6 -23
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +6 -34
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +14 -3
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +31 -26
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +5 -37
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +37 -8
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +109 -23
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +48 -27
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +30 -73
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +8 -21
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +7 -8
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +15 -9
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +22 -11
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +104 -6
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +3 -7
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +5 -13
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +30 -31
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +21 -5
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +3 -37
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +16 -110
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +5 -49
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +8 -32
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +103 -8
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +64 -7
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +6 -16
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +27 -22
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +32 -102
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +17 -3
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +78 -5
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +2 -32
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +14 -20
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +18 -3
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +17 -17
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +10 -5
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +79 -8
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +3 -104
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +30 -62
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +115 -6
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +4 -28
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +14 -33
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +11 -16
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +17 -77
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +59 -2
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +20 -14
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +14 -19
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +283 -16
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +573 -10
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +1 -1
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +2 -2
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +1 -1
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +1 -1
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +2 -2
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +3 -3
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +58 -58
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +140 -54
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +5 -120
- package/dist/index283.cjs +2 -1
- package/dist/index283.js +42 -5
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +2 -8
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +5 -4
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +9 -162
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +20 -5
- package/dist/index288.cjs +1 -2
- package/dist/index288.js +8 -41
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +73 -2
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +65 -5
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +187 -9
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +20 -17
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +42 -8
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +24 -71
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +86 -61
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +35 -183
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +15 -21
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +5 -34
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +7 -25
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +4 -12
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +37 -90
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +15 -40
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +8 -16
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +9 -13
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +16 -37
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +22 -15
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +13 -8
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +14 -43
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +12 -318
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +7 -603
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +16 -110
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +25 -167
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +27 -297
- package/dist/index313.cjs +2 -1
- package/dist/index313.js +18 -93
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +14 -56
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +11 -53
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +11 -43
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +32 -14
- package/dist/index318.cjs +1 -1
- package/dist/index318.js +114 -316
- package/dist/index319.cjs +1 -1
- package/dist/index319.js +100 -56
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +5 -18
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +7 -30
- package/dist/index322.cjs +1 -1
- package/dist/index322.js +26 -3
- package/dist/index323.cjs +1 -7
- package/dist/index323.js +16 -237
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +215 -48
- package/dist/index325.cjs +1 -1
- package/dist/index325.js +39 -209
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +311 -72
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +602 -26
- package/dist/index328.cjs +1 -1
- package/dist/index328.js +109 -76
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +167 -7
- package/dist/index330.cjs +1 -1
- package/dist/index330.js +301 -11
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +93 -13
- package/dist/index332.cjs +1 -1
- package/dist/index332.js +53 -9
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +53 -9
- package/dist/index334.cjs +1 -1
- package/dist/index334.js +43 -15
- package/dist/index335.cjs +1 -1
- package/dist/index335.js +14 -21
- package/dist/index336.cjs +1 -1
- package/dist/index336.js +317 -13
- package/dist/index337.cjs +1 -1
- package/dist/index337.js +58 -13
- package/dist/index338.cjs +1 -1
- package/dist/index338.js +19 -9
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +28 -14
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +3 -25
- package/dist/index341.cjs +7 -1
- package/dist/index341.js +233 -27
- package/dist/index342.cjs +1 -2
- package/dist/index342.js +48 -19
- package/dist/index343.cjs +1 -1
- package/dist/index343.js +211 -13
- package/dist/index344.cjs +1 -1
- package/dist/index344.js +80 -32
- package/dist/index345.cjs +1 -1
- package/dist/index345.js +26 -112
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +74 -101
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +7 -6
- package/dist/index348.cjs +1 -1
- package/dist/index348.js +120 -7
- package/dist/index349.cjs +1 -1
- package/dist/index349.js +4 -26
- package/dist/index350.cjs +2 -1
- package/dist/index350.js +193 -16
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +72 -209
- package/dist/index352.cjs +1 -2
- package/dist/index352.js +317 -167
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +160 -16
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +5 -15
- package/dist/index355.cjs +1 -1
- package/dist/index355.js +12 -7
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +16 -52
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +9 -21
- package/dist/index358.cjs +1 -1
- package/dist/index358.js +53 -2
- package/dist/index361.cjs +1 -1
- package/dist/index361.js +3 -94
- package/dist/index362.cjs +1 -1
- package/dist/index362.js +137 -25
- package/dist/index363.cjs +1 -1
- package/dist/index363.js +129 -144
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +74 -350
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +2 -276
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +43 -171
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +658 -10
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +171 -101
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +94 -5
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +27 -72
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +148 -9
- package/dist/index372.cjs +1 -1
- package/dist/index372.js +354 -31
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +70 -137
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +30 -2
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +5 -133
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +272 -75
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +171 -2
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +10 -43
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +99 -649
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +2 -2
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +8 -176
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +2 -344
- package/dist/index382.cjs +1 -1
- package/dist/index382.js +15 -154
- package/dist/index383.cjs +1 -1
- package/dist/index383.js +63 -3
- package/dist/index384.cjs +1 -1
- package/dist/index384.js +106 -59
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +3 -110
- package/dist/index386.cjs +1 -1
- package/dist/index386.js +2 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +88 -12
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +13 -58
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +12 -522
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +59 -30
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +522 -26
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +16 -12
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +12 -35
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +14 -16
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +38 -17
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +15 -18
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +17 -19
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +17 -42
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +15 -39
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +49 -29
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +46 -29
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +26 -20
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +27 -18
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +16 -14
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +28 -15
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +28 -14
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +13 -86
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +13 -13
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +17 -32
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +9 -14
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +32 -17
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +14 -9
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +28 -19
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +10 -10
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +15 -15
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +3 -3
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +9 -9
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +27 -19
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +13 -13
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +3 -3
- package/dist/src/lib/constants/wagmiConfig.d.ts +9 -9
- package/dist/src/lib/store/swapStore.d.ts +1 -1
- package/dist/src/lib/types/types.d.ts +0 -1
- package/package.json +6 -6
package/dist/index67.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Typography as t } from "@gardenfi/garden-book";
|
|
3
|
+
import { motion as c } from "framer-motion";
|
|
4
|
+
import { expandWithDelayAnimation as n } from "./index66.js";
|
|
5
|
+
import { swapStore as o } from "./index6.js";
|
|
6
|
+
import { AddressDetails as i } from "./index268.js";
|
|
7
|
+
const h = ({
|
|
8
|
+
refundAddress: a,
|
|
9
|
+
receiveAddress: m,
|
|
10
|
+
networkFeesValue: r
|
|
11
|
+
}) => {
|
|
12
|
+
const { outputAsset: l, outputAmount: s } = o();
|
|
13
|
+
return /* @__PURE__ */ e.createElement(c.div, { className: "flex flex-col", ...n }, /* @__PURE__ */ e.createElement("div", { className: "h-full" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4 pt-1" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Network fee")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, r === 0 ? "Free" : "$" + r))), /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Minimum received")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, s, " ", l == null ? void 0 : l.symbol))), (m || a) && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-stretch justify-center" }, m && /* @__PURE__ */ e.createElement(i, { address: m }), a && /* @__PURE__ */ e.createElement(i, { address: a, isRefund: !0 })))));
|
|
9
14
|
};
|
|
10
15
|
export {
|
|
11
|
-
|
|
16
|
+
h as SwapSavingsAndAddresses
|
|
12
17
|
};
|
package/dist/index71.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 o=require("./index86.cjs"),f=require("./index87.cjs"),t=require("./index88.cjs");function u(i,{size:e}){if(f.size(i)>e)throw new o.SizeOverflowError({givenSize:f.size(i),maxSize:e})}function a(i,e={}){const{signed:n}=e;e.size&&u(i,{size:e.size});const r=BigInt(i);if(!n)return r;const s=(i.length-2)/2,z=(1n<<BigInt(s)*8n-1n)-1n;return r<=z?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function c(i,e={}){let n=i;if(e.size&&(u(n,{size:e.size}),n=t.trim(n)),t.trim(n)==="0x00")return!1;if(t.trim(n)==="0x01")return!0;throw new o.InvalidHexBooleanError(n)}function g(i,e={}){const n=a(i,e),r=Number(n);if(!Number.isSafeInteger(r))throw new o.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${n}n`});return r}exports.assertSize=u;exports.hexToBigInt=a;exports.hexToBool=c;exports.hexToNumber=g;
|
package/dist/index71.js
CHANGED
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import { SizeOverflowError as
|
|
1
|
+
import { IntegerOutOfRangeError as s, SizeOverflowError as a, InvalidHexBooleanError as z } from "./index86.js";
|
|
2
2
|
import { size as f } from "./index87.js";
|
|
3
3
|
import { trim as t } from "./index88.js";
|
|
4
|
-
function u(
|
|
5
|
-
if (f(
|
|
6
|
-
throw new
|
|
7
|
-
givenSize: f(
|
|
4
|
+
function u(r, { size: e }) {
|
|
5
|
+
if (f(r) > e)
|
|
6
|
+
throw new a({
|
|
7
|
+
givenSize: f(r),
|
|
8
8
|
maxSize: e
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function g(r, e = {}) {
|
|
12
12
|
const { signed: n } = e;
|
|
13
|
-
e.size && u(
|
|
14
|
-
const
|
|
13
|
+
e.size && u(r, { size: e.size });
|
|
14
|
+
const i = BigInt(r);
|
|
15
15
|
if (!n)
|
|
16
|
-
return
|
|
17
|
-
const o = (
|
|
18
|
-
return
|
|
16
|
+
return i;
|
|
17
|
+
const o = (r.length - 2) / 2, m = (1n << BigInt(o) * 8n - 1n) - 1n;
|
|
18
|
+
return i <= m ? i : i - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
let n =
|
|
20
|
+
function x(r, e = {}) {
|
|
21
|
+
let n = r;
|
|
22
22
|
if (e.size && (u(n, { size: e.size }), n = t(n)), t(n) === "0x00")
|
|
23
23
|
return !1;
|
|
24
24
|
if (t(n) === "0x01")
|
|
25
25
|
return !0;
|
|
26
|
-
throw new
|
|
26
|
+
throw new z(n);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
28
|
+
function E(r, e = {}) {
|
|
29
|
+
const n = g(r, e), i = Number(n);
|
|
30
|
+
if (!Number.isSafeInteger(i))
|
|
31
|
+
throw new s({
|
|
32
|
+
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
33
|
+
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
34
|
+
signed: e.signed,
|
|
35
|
+
size: e.size,
|
|
36
|
+
value: `${n}n`
|
|
37
|
+
});
|
|
38
|
+
return i;
|
|
30
39
|
}
|
|
31
40
|
export {
|
|
32
41
|
u as assertSize,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
g as hexToBigInt,
|
|
43
|
+
x as hexToBool,
|
|
44
|
+
E as hexToNumber
|
|
36
45
|
};
|
package/dist/index76.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index113.cjs"),d=require("./index114.cjs"),h=require("./index115.cjs"),u=require("./index116.cjs"),w=require("./index77.cjs"),r=require("./index117.cjs"),v=require("./index118.cjs"),y=require("./index109.cjs"),n=require("./index119.cjs"),c=require("./index120.cjs"),k=require("./index121.cjs"),S=Symbol.for("@mysten/SuiClient");class M extends u.Experimental_BaseClient{constructor(e){super({network:e.network??"unknown"}),this.jsonRpc=this,this.transport=e.transport??new y.JsonRpcHTTPTransport({url:e.url}),this.core=new k.JSONRpcCoreClient({jsonRpcClient:this,mvr:e.mvr})}get[S](){return!0}async getRpcApiVersion({signal:e}={}){return(await this.transport.request({method:"rpc.discover",params:[],signal:e})).info.version}async getCoins({coinType:e,owner:a,cursor:s,limit:t,signal:o}){if(!a||!r.isValidSuiAddress(r.normalizeSuiAddress(a)))throw new Error("Invalid Sui address");return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getCoins",params:[a,e,s,t],signal:o})}async getAllCoins(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllCoins",params:[e.owner,e.cursor,e.limit],signal:e.signal})}async getBalance({owner:e,coinType:a,signal:s}){if(!e||!r.isValidSuiAddress(r.normalizeSuiAddress(e)))throw new Error("Invalid Sui address");return a&&c.hasMvrName(a)&&(a=(await this.core.mvr.resolveType({type:a})).type),await this.transport.request({method:"suix_getBalance",params:[e,a],signal:s})}async getAllBalances(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllBalances",params:[e.owner],signal:e.signal})}async getCoinMetadata({coinType:e,signal:a}){return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getCoinMetadata",params:[e],signal:a})}async getTotalSupply({coinType:e,signal:a}){return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getTotalSupply",params:[e],signal:a})}async call(e,a,{signal:s}={}){return await this.transport.request({method:e,params:a,signal:s})}async getMoveFunctionArgTypes({package:e,module:a,function:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getMoveFunctionArgTypes",params:[e,a,s],signal:t})}async getNormalizedMoveModulesByPackage({package:e,signal:a}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveModulesByPackage",params:[e],signal:a})}async getNormalizedMoveModule({package:e,module:a,signal:s}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveModule",params:[e,a],signal:s})}async getNormalizedMoveFunction({package:e,module:a,function:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveFunction",params:[e,a,s],signal:t})}async getNormalizedMoveStruct({package:e,module:a,struct:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveStruct",params:[e,a,s],signal:t})}async getOwnedObjects(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");const a=e.filter?{...e.filter}:void 0;return a&&"MoveModule"in a&&n.isValidNamedPackage(a.MoveModule.package)?a.MoveModule={module:a.MoveModule.module,package:(await this.core.mvr.resolvePackage({package:a.MoveModule.package})).package}:a&&"StructType"in a&&c.hasMvrName(a.StructType)&&(a.StructType=(await this.core.mvr.resolveType({type:a.StructType})).type),await this.transport.request({method:"suix_getOwnedObjects",params:[e.owner,{filter:a,options:e.options},e.cursor,e.limit],signal:e.signal})}async getObject(e){if(!e.id||!r.isValidSuiObjectId(r.normalizeSuiObjectId(e.id)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"sui_getObject",params:[e.id,e.options],signal:e.signal})}async tryGetPastObject(e){return await this.transport.request({method:"sui_tryGetPastObject",params:[e.id,e.version,e.options],signal:e.signal})}async multiGetObjects(e){if(e.ids.forEach(s=>{if(!s||!r.isValidSuiObjectId(r.normalizeSuiObjectId(s)))throw new Error(`Invalid Sui Object id ${s}`)}),e.ids.length!==new Set(e.ids).size)throw new Error(`Duplicate object ids in batch call ${e.ids}`);return await this.transport.request({method:"sui_multiGetObjects",params:[e.ids,e.options],signal:e.signal})}async queryTransactionBlocks({filter:e,options:a,cursor:s,limit:t,order:o,signal:i}){return e&&"MoveFunction"in e&&n.isValidNamedPackage(e.MoveFunction.package)&&(e={...e,MoveFunction:{package:(await this.core.mvr.resolvePackage({package:e.MoveFunction.package})).package}}),await this.transport.request({method:"suix_queryTransactionBlocks",params:[{filter:e,options:a},s,t,(o||"descending")==="descending"],signal:i})}async getTransactionBlock(e){if(!r.isValidTransactionDigest(e.digest))throw new Error("Invalid Transaction digest");return await this.transport.request({method:"sui_getTransactionBlock",params:[e.digest,e.options],signal:e.signal})}async multiGetTransactionBlocks(e){if(e.digests.forEach(s=>{if(!r.isValidTransactionDigest(s))throw new Error(`Invalid Transaction digest ${s}`)}),e.digests.length!==new Set(e.digests).size)throw new Error(`Duplicate digests in batch call ${e.digests}`);return await this.transport.request({method:"sui_multiGetTransactionBlocks",params:[e.digests,e.options],signal:e.signal})}async executeTransactionBlock({transactionBlock:e,signature:a,options:s,requestType:t,signal:o}){const i=await this.transport.request({method:"sui_executeTransactionBlock",params:[typeof e=="string"?e:d.toBase64(e),Array.isArray(a)?a:[a],s],signal:o});if(t==="WaitForLocalExecution")try{await this.waitForTransaction({digest:i.digest})}catch{}return i}async signAndExecuteTransaction({transaction:e,signer:a,...s}){let t;e instanceof Uint8Array?t=e:(e.setSenderIfNotSet(a.toSuiAddress()),t=await e.build({client:this}));const{signature:o,bytes:i}=await a.signTransaction(t);return this.executeTransactionBlock({transactionBlock:i,signature:o,...s})}async getTotalTransactionBlocks({signal:e}={}){const a=await this.transport.request({method:"sui_getTotalTransactionBlocks",params:[],signal:e});return BigInt(a)}async getReferenceGasPrice({signal:e}={}){const a=await this.transport.request({method:"suix_getReferenceGasPrice",params:[],signal:e});return BigInt(a)}async getStakes(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getStakes",params:[e.owner],signal:e.signal})}async getStakesByIds(e){return e.stakedSuiIds.forEach(a=>{if(!a||!r.isValidSuiObjectId(r.normalizeSuiObjectId(a)))throw new Error(`Invalid Sui Stake id ${a}`)}),await this.transport.request({method:"suix_getStakesByIds",params:[e.stakedSuiIds],signal:e.signal})}async getLatestSuiSystemState({signal:e}={}){return await this.transport.request({method:"suix_getLatestSuiSystemState",params:[],signal:e})}async queryEvents({query:e,cursor:a,limit:s,order:t,signal:o}){return e&&"MoveEventType"in e&&c.hasMvrName(e.MoveEventType)&&(e={...e,MoveEventType:(await this.core.mvr.resolveType({type:e.MoveEventType})).type}),e&&"MoveEventModule"in e&&n.isValidNamedPackage(e.MoveEventModule.package)&&(e={...e,MoveEventModule:{module:e.MoveEventModule.module,package:(await this.core.mvr.resolvePackage({package:e.MoveEventModule.package})).package}}),"MoveModule"in e&&n.isValidNamedPackage(e.MoveModule.package)&&(e={...e,MoveModule:{module:e.MoveModule.module,package:(await this.core.mvr.resolvePackage({package:e.MoveModule.package})).package}}),await this.transport.request({method:"suix_queryEvents",params:[e,a,s,(t||"descending")==="descending"],signal:o})}async subscribeEvent(e){return this.transport.subscribe({method:"suix_subscribeEvent",unsubscribe:"suix_unsubscribeEvent",params:[e.filter],onMessage:e.onMessage,signal:e.signal})}async subscribeTransaction(e){return this.transport.subscribe({method:"suix_subscribeTransaction",unsubscribe:"suix_unsubscribeTransaction",params:[e.filter],onMessage:e.onMessage,signal:e.signal})}async devInspectTransactionBlock(e){var s,t;let a;if(w.isTransaction(e.transactionBlock))e.transactionBlock.setSenderIfNotSet(e.sender),a=d.toBase64(await e.transactionBlock.build({client:this,onlyTransactionKind:!0}));else if(typeof e.transactionBlock=="string")a=e.transactionBlock;else if(e.transactionBlock instanceof Uint8Array)a=d.toBase64(e.transactionBlock);else throw new Error("Unknown transaction block format.");return(s=e.signal)==null||s.throwIfAborted(),await this.transport.request({method:"sui_devInspectTransactionBlock",params:[e.sender,a,(t=e.gasPrice)==null?void 0:t.toString(),e.epoch],signal:e.signal})}async dryRunTransactionBlock(e){return await this.transport.request({method:"sui_dryRunTransactionBlock",params:[typeof e.transactionBlock=="string"?e.transactionBlock:d.toBase64(e.transactionBlock)]})}async getDynamicFields(e){if(!e.parentId||!r.isValidSuiObjectId(r.normalizeSuiObjectId(e.parentId)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"suix_getDynamicFields",params:[e.parentId,e.cursor,e.limit],signal:e.signal})}async getDynamicFieldObject(e){return await this.transport.request({method:"suix_getDynamicFieldObject",params:[e.parentId,e.name],signal:e.signal})}async getLatestCheckpointSequenceNumber({signal:e}={}){const a=await this.transport.request({method:"sui_getLatestCheckpointSequenceNumber",params:[],signal:e});return String(a)}async getCheckpoint(e){return await this.transport.request({method:"sui_getCheckpoint",params:[e.id],signal:e.signal})}async getCheckpoints(e){return await this.transport.request({method:"sui_getCheckpoints",params:[e.cursor,e==null?void 0:e.limit,e.descendingOrder],signal:e.signal})}async getCommitteeInfo(e){return await this.transport.request({method:"suix_getCommitteeInfo",params:[e==null?void 0:e.epoch],signal:e==null?void 0:e.signal})}async getNetworkMetrics({signal:e}={}){return await this.transport.request({method:"suix_getNetworkMetrics",params:[],signal:e})}async getAddressMetrics({signal:e}={}){return await this.transport.request({method:"suix_getLatestAddressMetrics",params:[],signal:e})}async getEpochMetrics(e){return await this.transport.request({method:"suix_getEpochMetrics",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getAllEpochAddressMetrics(e){return await this.transport.request({method:"suix_getAllEpochAddressMetrics",params:[e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getEpochs(e){return await this.transport.request({method:"suix_getEpochs",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getMoveCallMetrics({signal:e}={}){return await this.transport.request({method:"suix_getMoveCallMetrics",params:[],signal:e})}async getCurrentEpoch({signal:e}={}){return await this.transport.request({method:"suix_getCurrentEpoch",params:[],signal:e})}async getValidatorsApy({signal:e}={}){return await this.transport.request({method:"suix_getValidatorsApy",params:[],signal:e})}async getChainIdentifier({signal:e}={}){const a=await this.getCheckpoint({id:"0",signal:e}),s=m.fromBase58(a.digest);return h.toHex(s.slice(0,4))}async resolveNameServiceAddress(e){return await this.transport.request({method:"suix_resolveNameServiceAddress",params:[e.name],signal:e.signal})}async resolveNameServiceNames({format:e="dot",...a}){const{nextCursor:s,hasNextPage:t,data:o}=await this.transport.request({method:"suix_resolveNameServiceNames",params:[a.address,a.cursor,a.limit],signal:a.signal});return{hasNextPage:t,nextCursor:s,data:o.map(i=>v.normalizeSuiNSName(i,e))}}async getProtocolConfig(e){return await this.transport.request({method:"sui_getProtocolConfig",params:[e==null?void 0:e.version],signal:e==null?void 0:e.signal})}async verifyZkLoginSignature(e){return await this.transport.request({method:"sui_verifyZkLoginSignature",params:[e.bytes,e.signature,e.intentScope,e.author],signal:e.signal})}async waitForTransaction({signal:e,timeout:a=60*1e3,pollInterval:s=2*1e3,...t}){const o=AbortSignal.timeout(a),i=new Promise((l,g)=>{o.addEventListener("abort",()=>g(o.reason))});for(i.catch(()=>{});!o.aborted;){e==null||e.throwIfAborted();try{return await this.getTransactionBlock(t)}catch{await Promise.race([new Promise(l=>setTimeout(l,s)),i])}}throw o.throwIfAborted(),new Error("Unexpected error while waiting for transaction block.")}}exports.SuiJsonRpcClient=M;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index259.cjs"),d=require("./index260.cjs"),h=require("./index261.cjs"),u=require("./index262.cjs"),w=require("./index77.cjs"),r=require("./index263.cjs"),v=require("./index264.cjs"),y=require("./index255.cjs"),n=require("./index265.cjs"),c=require("./index266.cjs"),k=require("./index267.cjs"),S=Symbol.for("@mysten/SuiClient");class M extends u.Experimental_BaseClient{constructor(e){super({network:e.network??"unknown"}),this.jsonRpc=this,this.transport=e.transport??new y.JsonRpcHTTPTransport({url:e.url}),this.core=new k.JSONRpcCoreClient({jsonRpcClient:this,mvr:e.mvr})}get[S](){return!0}async getRpcApiVersion({signal:e}={}){return(await this.transport.request({method:"rpc.discover",params:[],signal:e})).info.version}async getCoins({coinType:e,owner:a,cursor:s,limit:t,signal:o}){if(!a||!r.isValidSuiAddress(r.normalizeSuiAddress(a)))throw new Error("Invalid Sui address");return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getCoins",params:[a,e,s,t],signal:o})}async getAllCoins(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllCoins",params:[e.owner,e.cursor,e.limit],signal:e.signal})}async getBalance({owner:e,coinType:a,signal:s}){if(!e||!r.isValidSuiAddress(r.normalizeSuiAddress(e)))throw new Error("Invalid Sui address");return a&&c.hasMvrName(a)&&(a=(await this.core.mvr.resolveType({type:a})).type),await this.transport.request({method:"suix_getBalance",params:[e,a],signal:s})}async getAllBalances(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllBalances",params:[e.owner],signal:e.signal})}async getCoinMetadata({coinType:e,signal:a}){return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getCoinMetadata",params:[e],signal:a})}async getTotalSupply({coinType:e,signal:a}){return e&&c.hasMvrName(e)&&(e=(await this.core.mvr.resolveType({type:e})).type),await this.transport.request({method:"suix_getTotalSupply",params:[e],signal:a})}async call(e,a,{signal:s}={}){return await this.transport.request({method:e,params:a,signal:s})}async getMoveFunctionArgTypes({package:e,module:a,function:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getMoveFunctionArgTypes",params:[e,a,s],signal:t})}async getNormalizedMoveModulesByPackage({package:e,signal:a}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveModulesByPackage",params:[e],signal:a})}async getNormalizedMoveModule({package:e,module:a,signal:s}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveModule",params:[e,a],signal:s})}async getNormalizedMoveFunction({package:e,module:a,function:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveFunction",params:[e,a,s],signal:t})}async getNormalizedMoveStruct({package:e,module:a,struct:s,signal:t}){return e&&n.isValidNamedPackage(e)&&(e=(await this.core.mvr.resolvePackage({package:e})).package),await this.transport.request({method:"sui_getNormalizedMoveStruct",params:[e,a,s],signal:t})}async getOwnedObjects(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");const a=e.filter?{...e.filter}:void 0;return a&&"MoveModule"in a&&n.isValidNamedPackage(a.MoveModule.package)?a.MoveModule={module:a.MoveModule.module,package:(await this.core.mvr.resolvePackage({package:a.MoveModule.package})).package}:a&&"StructType"in a&&c.hasMvrName(a.StructType)&&(a.StructType=(await this.core.mvr.resolveType({type:a.StructType})).type),await this.transport.request({method:"suix_getOwnedObjects",params:[e.owner,{filter:a,options:e.options},e.cursor,e.limit],signal:e.signal})}async getObject(e){if(!e.id||!r.isValidSuiObjectId(r.normalizeSuiObjectId(e.id)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"sui_getObject",params:[e.id,e.options],signal:e.signal})}async tryGetPastObject(e){return await this.transport.request({method:"sui_tryGetPastObject",params:[e.id,e.version,e.options],signal:e.signal})}async multiGetObjects(e){if(e.ids.forEach(s=>{if(!s||!r.isValidSuiObjectId(r.normalizeSuiObjectId(s)))throw new Error(`Invalid Sui Object id ${s}`)}),e.ids.length!==new Set(e.ids).size)throw new Error(`Duplicate object ids in batch call ${e.ids}`);return await this.transport.request({method:"sui_multiGetObjects",params:[e.ids,e.options],signal:e.signal})}async queryTransactionBlocks({filter:e,options:a,cursor:s,limit:t,order:o,signal:i}){return e&&"MoveFunction"in e&&n.isValidNamedPackage(e.MoveFunction.package)&&(e={...e,MoveFunction:{package:(await this.core.mvr.resolvePackage({package:e.MoveFunction.package})).package}}),await this.transport.request({method:"suix_queryTransactionBlocks",params:[{filter:e,options:a},s,t,(o||"descending")==="descending"],signal:i})}async getTransactionBlock(e){if(!r.isValidTransactionDigest(e.digest))throw new Error("Invalid Transaction digest");return await this.transport.request({method:"sui_getTransactionBlock",params:[e.digest,e.options],signal:e.signal})}async multiGetTransactionBlocks(e){if(e.digests.forEach(s=>{if(!r.isValidTransactionDigest(s))throw new Error(`Invalid Transaction digest ${s}`)}),e.digests.length!==new Set(e.digests).size)throw new Error(`Duplicate digests in batch call ${e.digests}`);return await this.transport.request({method:"sui_multiGetTransactionBlocks",params:[e.digests,e.options],signal:e.signal})}async executeTransactionBlock({transactionBlock:e,signature:a,options:s,requestType:t,signal:o}){const i=await this.transport.request({method:"sui_executeTransactionBlock",params:[typeof e=="string"?e:d.toBase64(e),Array.isArray(a)?a:[a],s],signal:o});if(t==="WaitForLocalExecution")try{await this.waitForTransaction({digest:i.digest})}catch{}return i}async signAndExecuteTransaction({transaction:e,signer:a,...s}){let t;e instanceof Uint8Array?t=e:(e.setSenderIfNotSet(a.toSuiAddress()),t=await e.build({client:this}));const{signature:o,bytes:i}=await a.signTransaction(t);return this.executeTransactionBlock({transactionBlock:i,signature:o,...s})}async getTotalTransactionBlocks({signal:e}={}){const a=await this.transport.request({method:"sui_getTotalTransactionBlocks",params:[],signal:e});return BigInt(a)}async getReferenceGasPrice({signal:e}={}){const a=await this.transport.request({method:"suix_getReferenceGasPrice",params:[],signal:e});return BigInt(a)}async getStakes(e){if(!e.owner||!r.isValidSuiAddress(r.normalizeSuiAddress(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getStakes",params:[e.owner],signal:e.signal})}async getStakesByIds(e){return e.stakedSuiIds.forEach(a=>{if(!a||!r.isValidSuiObjectId(r.normalizeSuiObjectId(a)))throw new Error(`Invalid Sui Stake id ${a}`)}),await this.transport.request({method:"suix_getStakesByIds",params:[e.stakedSuiIds],signal:e.signal})}async getLatestSuiSystemState({signal:e}={}){return await this.transport.request({method:"suix_getLatestSuiSystemState",params:[],signal:e})}async queryEvents({query:e,cursor:a,limit:s,order:t,signal:o}){return e&&"MoveEventType"in e&&c.hasMvrName(e.MoveEventType)&&(e={...e,MoveEventType:(await this.core.mvr.resolveType({type:e.MoveEventType})).type}),e&&"MoveEventModule"in e&&n.isValidNamedPackage(e.MoveEventModule.package)&&(e={...e,MoveEventModule:{module:e.MoveEventModule.module,package:(await this.core.mvr.resolvePackage({package:e.MoveEventModule.package})).package}}),"MoveModule"in e&&n.isValidNamedPackage(e.MoveModule.package)&&(e={...e,MoveModule:{module:e.MoveModule.module,package:(await this.core.mvr.resolvePackage({package:e.MoveModule.package})).package}}),await this.transport.request({method:"suix_queryEvents",params:[e,a,s,(t||"descending")==="descending"],signal:o})}async subscribeEvent(e){return this.transport.subscribe({method:"suix_subscribeEvent",unsubscribe:"suix_unsubscribeEvent",params:[e.filter],onMessage:e.onMessage,signal:e.signal})}async subscribeTransaction(e){return this.transport.subscribe({method:"suix_subscribeTransaction",unsubscribe:"suix_unsubscribeTransaction",params:[e.filter],onMessage:e.onMessage,signal:e.signal})}async devInspectTransactionBlock(e){var s,t;let a;if(w.isTransaction(e.transactionBlock))e.transactionBlock.setSenderIfNotSet(e.sender),a=d.toBase64(await e.transactionBlock.build({client:this,onlyTransactionKind:!0}));else if(typeof e.transactionBlock=="string")a=e.transactionBlock;else if(e.transactionBlock instanceof Uint8Array)a=d.toBase64(e.transactionBlock);else throw new Error("Unknown transaction block format.");return(s=e.signal)==null||s.throwIfAborted(),await this.transport.request({method:"sui_devInspectTransactionBlock",params:[e.sender,a,(t=e.gasPrice)==null?void 0:t.toString(),e.epoch],signal:e.signal})}async dryRunTransactionBlock(e){return await this.transport.request({method:"sui_dryRunTransactionBlock",params:[typeof e.transactionBlock=="string"?e.transactionBlock:d.toBase64(e.transactionBlock)]})}async getDynamicFields(e){if(!e.parentId||!r.isValidSuiObjectId(r.normalizeSuiObjectId(e.parentId)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"suix_getDynamicFields",params:[e.parentId,e.cursor,e.limit],signal:e.signal})}async getDynamicFieldObject(e){return await this.transport.request({method:"suix_getDynamicFieldObject",params:[e.parentId,e.name],signal:e.signal})}async getLatestCheckpointSequenceNumber({signal:e}={}){const a=await this.transport.request({method:"sui_getLatestCheckpointSequenceNumber",params:[],signal:e});return String(a)}async getCheckpoint(e){return await this.transport.request({method:"sui_getCheckpoint",params:[e.id],signal:e.signal})}async getCheckpoints(e){return await this.transport.request({method:"sui_getCheckpoints",params:[e.cursor,e==null?void 0:e.limit,e.descendingOrder],signal:e.signal})}async getCommitteeInfo(e){return await this.transport.request({method:"suix_getCommitteeInfo",params:[e==null?void 0:e.epoch],signal:e==null?void 0:e.signal})}async getNetworkMetrics({signal:e}={}){return await this.transport.request({method:"suix_getNetworkMetrics",params:[],signal:e})}async getAddressMetrics({signal:e}={}){return await this.transport.request({method:"suix_getLatestAddressMetrics",params:[],signal:e})}async getEpochMetrics(e){return await this.transport.request({method:"suix_getEpochMetrics",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getAllEpochAddressMetrics(e){return await this.transport.request({method:"suix_getAllEpochAddressMetrics",params:[e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getEpochs(e){return await this.transport.request({method:"suix_getEpochs",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder],signal:e==null?void 0:e.signal})}async getMoveCallMetrics({signal:e}={}){return await this.transport.request({method:"suix_getMoveCallMetrics",params:[],signal:e})}async getCurrentEpoch({signal:e}={}){return await this.transport.request({method:"suix_getCurrentEpoch",params:[],signal:e})}async getValidatorsApy({signal:e}={}){return await this.transport.request({method:"suix_getValidatorsApy",params:[],signal:e})}async getChainIdentifier({signal:e}={}){const a=await this.getCheckpoint({id:"0",signal:e}),s=m.fromBase58(a.digest);return h.toHex(s.slice(0,4))}async resolveNameServiceAddress(e){return await this.transport.request({method:"suix_resolveNameServiceAddress",params:[e.name],signal:e.signal})}async resolveNameServiceNames({format:e="dot",...a}){const{nextCursor:s,hasNextPage:t,data:o}=await this.transport.request({method:"suix_resolveNameServiceNames",params:[a.address,a.cursor,a.limit],signal:a.signal});return{hasNextPage:t,nextCursor:s,data:o.map(i=>v.normalizeSuiNSName(i,e))}}async getProtocolConfig(e){return await this.transport.request({method:"sui_getProtocolConfig",params:[e==null?void 0:e.version],signal:e==null?void 0:e.signal})}async verifyZkLoginSignature(e){return await this.transport.request({method:"sui_verifyZkLoginSignature",params:[e.bytes,e.signature,e.intentScope,e.author],signal:e.signal})}async waitForTransaction({signal:e,timeout:a=60*1e3,pollInterval:s=2*1e3,...t}){const o=AbortSignal.timeout(a),i=new Promise((l,g)=>{o.addEventListener("abort",()=>g(o.reason))});for(i.catch(()=>{});!o.aborted;){e==null||e.throwIfAborted();try{return await this.getTransactionBlock(t)}catch{await Promise.race([new Promise(l=>setTimeout(l,s)),i])}}throw o.throwIfAborted(),new Error("Unexpected error while waiting for transaction block.")}}exports.SuiJsonRpcClient=M;
|
package/dist/index76.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { fromBase58 as u } from "./
|
|
2
|
-
import { toBase64 as d } from "./
|
|
3
|
-
import { toHex as y } from "./
|
|
4
|
-
import { Experimental_BaseClient as k } from "./
|
|
1
|
+
import { fromBase58 as u } from "./index259.js";
|
|
2
|
+
import { toBase64 as d } from "./index260.js";
|
|
3
|
+
import { toHex as y } from "./index261.js";
|
|
4
|
+
import { Experimental_BaseClient as k } from "./index262.js";
|
|
5
5
|
import { isTransaction as f } from "./index77.js";
|
|
6
|
-
import { isValidSuiAddress as n, normalizeSuiAddress as c, isValidSuiObjectId as m, normalizeSuiObjectId as g, isValidTransactionDigest as w } from "./
|
|
7
|
-
import { normalizeSuiNSName as M } from "./
|
|
8
|
-
import { JsonRpcHTTPTransport as S } from "./
|
|
9
|
-
import { isValidNamedPackage as i } from "./
|
|
10
|
-
import { hasMvrName as l } from "./
|
|
11
|
-
import { JSONRpcCoreClient as b } from "./
|
|
6
|
+
import { isValidSuiAddress as n, normalizeSuiAddress as c, isValidSuiObjectId as m, normalizeSuiObjectId as g, isValidTransactionDigest as w } from "./index263.js";
|
|
7
|
+
import { normalizeSuiNSName as M } from "./index264.js";
|
|
8
|
+
import { JsonRpcHTTPTransport as S } from "./index255.js";
|
|
9
|
+
import { isValidNamedPackage as i } from "./index265.js";
|
|
10
|
+
import { hasMvrName as l } from "./index266.js";
|
|
11
|
+
import { JSONRpcCoreClient as b } from "./index267.js";
|
|
12
12
|
const _ = Symbol.for("@mysten/SuiClient");
|
|
13
13
|
class j extends k {
|
|
14
14
|
/**
|
package/dist/index77.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index114.cjs"),V=require("./index308.cjs"),S=require("./index309.cjs"),et=require("./index117.cjs"),R=require("./index310.cjs"),T=require("./index311.cjs"),F=require("./index312.cjs"),nt=require("./index313.cjs"),$=require("./index314.cjs"),J=require("./index315.cjs"),st=require("./index316.cjs"),it=require("./index317.cjs"),_=require("./index318.cjs"),U=require("./index319.cjs"),rt=require("./index320.cjs");var Y=s=>{throw TypeError(s)},E=(s,t,e)=>t.has(s)||Y("Cannot "+e),n=(s,t,e)=>(E(s,t,"read from private field"),e?e.call(s):t.get(s)),w=(s,t,e)=>t.has(s)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),l=(s,t,e,r)=>(E(s,t,"write to private field"),t.set(s,e),e),d=(s,t,e)=>(E(s,t,"access private method"),e),P,k,y,b,p,m,g,I,i,h,H,j,O,N,v,z,B,L,Q;function A(s,t=1/0){const e={$kind:"Result",get Result(){return typeof s=="function"?s():s}},r=[],a=o=>r[o]??(r[o]={$kind:"NestedResult",get NestedResult(){return[typeof s=="function"?s():s,o]}});return new Proxy(e,{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(o,f){if(f in o)return Reflect.get(o,f);if(f===Symbol.iterator)return function*(){let c=0;for(;c<t;)yield a(c),c++};if(typeof f=="symbol")return;const u=parseInt(f,10);if(!(Number.isNaN(u)||u<0))return a(u)}})}const X=Symbol.for("@mysten/transaction");function Z(s){return!!s&&typeof s=="object"&&s[X]===!0}const K={buildPlugins:new Map,serializationPlugins:new Map},M=Symbol.for("@mysten/transaction/registry");function C(){try{const s=globalThis;return s[M]||(s[M]=K),s[M]}catch{return K}}const tt=class x{constructor(){w(this,h),w(this,P),w(this,k),w(this,y,new Map),w(this,b,[]),w(this,p,[]),w(this,m,new Set),w(this,g,new Set),w(this,I,new Map),w(this,i),this.object=st.createObjectMethods(e=>{var o,f;if(typeof e=="function")return this.object(this.add(e));if(typeof e=="object"&&S.is(T.ArgumentSchema,e))return e;const r=U.getIdFromCallArg(e),a=n(this,i).inputs.find(u=>r===U.getIdFromCallArg(u));return(o=a==null?void 0:a.Object)!=null&&o.SharedObject&&typeof e=="object"&&((f=e.Object)!=null&&f.SharedObject)&&(a.Object.SharedObject.mutable=a.Object.SharedObject.mutable||e.Object.SharedObject.mutable),a?{$kind:"Input",Input:n(this,i).inputs.indexOf(a),type:"object"}:d(this,h,O).call(this,"object",typeof e=="string"?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:et.normalizeSuiAddress(e)}}:e)});const t=C();l(this,i,new _.TransactionDataBuilder),l(this,k,[...t.buildPlugins.values()]),l(this,P,[...t.serializationPlugins.values()])}static fromKind(t){const e=new x;return l(e,i,_.TransactionDataBuilder.fromKindBytes(typeof t=="string"?W.fromBase64(t):t)),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static from(t){const e=new x;return Z(t)?l(e,i,_.TransactionDataBuilder.restore(t.getData())):typeof t!="string"||!t.startsWith("{")?l(e,i,_.TransactionDataBuilder.fromBytes(typeof t=="string"?W.fromBase64(t):t)):l(e,i,_.TransactionDataBuilder.restore(JSON.parse(t))),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static registerGlobalSerializationPlugin(t,e){C().serializationPlugins.set(t,e??t)}static unregisterGlobalSerializationPlugin(t){C().serializationPlugins.delete(t)}static registerGlobalBuildPlugin(t,e){C().buildPlugins.set(t,e??t)}static unregisterGlobalBuildPlugin(t){C().buildPlugins.delete(t)}addSerializationPlugin(t){n(this,P).push(t)}addBuildPlugin(t){n(this,k).push(t)}addIntentResolver(t,e){if(n(this,y).has(t)&&n(this,y).get(t)!==e)throw new Error(`Intent resolver for ${t} already exists`);n(this,y).set(t,e)}setSender(t){n(this,i).sender=t}setSenderIfNotSet(t){n(this,i).sender||(n(this,i).sender=t)}setExpiration(t){n(this,i).expiration=t?S.parse(T.TransactionExpiration,t):null}setGasPrice(t){n(this,i).gasConfig.price=String(t)}setGasBudget(t){n(this,i).gasConfig.budget=String(t)}setGasBudgetIfNotSet(t){n(this,i).gasData.budget==null&&(n(this,i).gasConfig.budget=String(t))}setGasOwner(t){n(this,i).gasConfig.owner=t}setGasPayment(t){n(this,i).gasConfig.payment=t.map(e=>S.parse(T.ObjectRefSchema,e))}get blockData(){return F.serializeV1TransactionData(n(this,i).snapshot())}getData(){return n(this,i).snapshot()}get[X](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:it.createPure(t=>V.isSerializedBcs(t)?d(this,h,O).call(this,"pure",{$kind:"Pure",Pure:{bytes:t.toBase64()}}):d(this,h,O).call(this,"pure",S.is(T.NormalizedCallArg,t)?S.parse(T.NormalizedCallArg,t):t instanceof Uint8Array?$.Inputs.Pure(t):{$kind:"UnresolvedPure",UnresolvedPure:{value:t}}))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...t){return this.object($.Inputs.ObjectRef(...t))}receivingRef(...t){return this.object($.Inputs.ReceivingRef(...t))}sharedObjectRef(...t){return this.object($.Inputs.SharedObjectRef(...t))}add(t){if(typeof t=="function"){if(n(this,I).has(t))return n(this,I).get(t);const e=d(this,h,H).call(this),r=t(e);if(!(r&&typeof r=="object"&&"then"in r))return l(this,m,n(e,m)),n(this,I).set(t,r),r;const a=d(this,h,j).call(this,{$kind:"$Intent",$Intent:{name:"AsyncTransactionThunk",inputs:{},data:{resultIndex:n(this,i).commands.length,result:null}}});n(this,g).add(Promise.resolve(r).then(f=>{a.$Intent.data.result=f}));const o=A(()=>a.$Intent.data.resultIndex);return n(this,I).set(t,o),o}else d(this,h,j).call(this,t);return A(n(this,i).commands.length-1)}splitCoins(t,e){const r=R.Commands.SplitCoins(typeof t=="string"?this.object(t):d(this,h,v).call(this,t),e.map(a=>typeof a=="number"||typeof a=="bigint"||typeof a=="string"?this.pure.u64(a):d(this,h,N).call(this,a)));return d(this,h,j).call(this,r),A(n(this,i).commands.length-1,e.length)}mergeCoins(t,e){return this.add(R.Commands.MergeCoins(this.object(t),e.map(r=>this.object(r))))}publish({modules:t,dependencies:e}){return this.add(R.Commands.Publish({modules:t,dependencies:e}))}upgrade({modules:t,dependencies:e,package:r,ticket:a}){return this.add(R.Commands.Upgrade({modules:t,dependencies:e,package:r,ticket:this.object(a)}))}moveCall({arguments:t,...e}){return this.add(R.Commands.MoveCall({...e,arguments:t==null?void 0:t.map(r=>d(this,h,N).call(this,r))}))}transferObjects(t,e){return this.add(R.Commands.TransferObjects(t.map(r=>this.object(r)),typeof e=="string"?this.pure.address(e):d(this,h,N).call(this,e)))}makeMoveVec({type:t,elements:e}){return this.add(R.Commands.MakeMoveVec({type:t,elements:e.map(r=>this.object(r))}))}serialize(){return JSON.stringify(F.serializeV1TransactionData(n(this,i).snapshot()))}async toJSON(t={}){await this.prepareForSerialization(t);const e=this.isFullyResolved();return JSON.stringify(S.parse(nt.SerializedTransactionDataV2Schema,e?{...n(this,i).snapshot(),digest:n(this,i).getDigest()}:n(this,i).snapshot()),(r,a)=>typeof a=="bigint"?a.toString():a,2)}async sign(t){const{signer:e,...r}=t,a=await this.build(r);return e.signTransaction(a)}isFullyResolved(){return!(!n(this,i).sender||n(this,g).size>0||n(this,i).commands.some(t=>t.$Intent)||J.needsTransactionResolution(n(this,i),{}))}async build(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).build({onlyTransactionKind:t.onlyTransactionKind})}async getDigest(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).getDigest()}async prepareForSerialization(t){var a;await d(this,h,L).call(this),d(this,h,Q).call(this);const e=new Set;for(const o of n(this,i).commands)o.$Intent&&e.add(o.$Intent.name);const r=[...n(this,P)];for(const o of e)if(!((a=t.supportedIntents)!=null&&a.includes(o))){if(!n(this,y).has(o))throw new Error(`Missing intent resolver for ${o}`);r.push(n(this,y).get(o))}r.push(rt.namedPackagesPlugin()),await d(this,h,B).call(this,r,t)}};P=new WeakMap;k=new WeakMap;y=new WeakMap;b=new WeakMap;p=new WeakMap;m=new WeakMap;g=new WeakMap;I=new WeakMap;i=new WeakMap;h=new WeakSet;H=function(){const s=new tt;return l(s,i,n(this,i)),l(s,P,n(this,P)),l(s,k,n(this,k)),l(s,y,n(this,y)),l(s,g,n(this,g)),l(s,m,new Set(n(this,m))),l(s,I,n(this,I)),n(this,b).push(n(s,b)),n(this,p).push(n(s,p)),s};j=function(s){const t=n(this,i).commands.length;return n(this,p).push(s),n(this,m).add(t),n(this,i).commands.push(s),n(this,i).mapCommandArguments(t,e=>{if(e.$kind==="Result"&&!n(this,m).has(e.Result))throw new Error(`Result { Result: ${e.Result} } is not available to use in the current transaction`);if(e.$kind==="NestedResult"&&!n(this,m).has(e.NestedResult[0]))throw new Error(`Result { NestedResult: [${e.NestedResult[0]}, ${e.NestedResult[1]}] } is not available to use in the current transaction`);if(e.$kind==="Input"&&e.Input>=n(this,i).inputs.length)throw new Error(`Input { Input: ${e.Input} } references an input that does not exist in the current transaction`);return e}),s};O=function(s,t){return n(this,b).push(t),n(this,i).addInput(s,t)};N=function(s){return V.isSerializedBcs(s)?this.pure(s):d(this,h,v).call(this,s)};v=function(s){if(typeof s=="function"){const t=this.add(s);return typeof t=="function"?d(this,h,v).call(this,t):S.parse(T.ArgumentSchema,t)}return S.parse(T.ArgumentSchema,s)};z=async function(s){if(!s.onlyTransactionKind&&!n(this,i).sender)throw new Error("Missing transaction sender");await d(this,h,B).call(this,[...n(this,k),J.resolveTransactionPlugin],s)};B=async function(s,t){try{const e=r=>{if(r>=s.length)return()=>{};const a=s[r];return async()=>{const o=e(r+1);let f=!1,u=!1;if(await a(n(this,i),t,async()=>{if(f)throw new Error(`next() was call multiple times in TransactionPlugin ${r}`);f=!0,await o(),u=!0}),!f)throw new Error(`next() was not called in TransactionPlugin ${r}`);if(!u)throw new Error(`next() was not awaited in TransactionPlugin ${r}`)}};await e(0)()}finally{l(this,b,n(this,i).inputs.slice()),l(this,p,n(this,i).commands.slice()),l(this,m,new Set(n(this,p).map((e,r)=>r)))}};L=async function(){for(;n(this,g).size>0;){const s=Promise.all(n(this,g));n(this,g).clear(),n(this,g).add(s),await s,n(this,g).delete(s)}};Q=function(){var f;const s=n(this,i).commands,t=n(this,i).inputs,e=n(this,p).flat(1/0),r=n(this,b).flat(1/0);if(e.length!==s.length)throw new Error("Unexpected number of commands found in transaction data");if(r.length!==t.length)throw new Error("Unexpected number of inputs found in transaction data");const a=e.filter(u=>{var c;return((c=u.$Intent)==null?void 0:c.name)!=="AsyncTransactionThunk"});n(this,i).commands=a,n(this,i).inputs=r,l(this,p,a),l(this,b,r),l(this,m,new Set(a.map((u,c)=>c)));function o(u){var q;const c=s[u];if(((q=c.$Intent)==null?void 0:q.name)==="AsyncTransactionThunk"){const G=c.$Intent.data.result;if(G==null)throw new Error("AsyncTransactionThunk has not been resolved");return o(G.Result)}const D=a.indexOf(c);if(D===-1)throw new Error("Unable to find original index for command");return D}n(this,i).mapArguments(u=>{if(u.$kind==="Input"){const c=r.indexOf(t[u.Input]);if(c===-1)throw new Error("Input has not been resolved");return{...u,Input:c}}else if(u.$kind==="Result"){const c=o(u.Result);return{...u,Result:c}}else if(u.$kind==="NestedResult"){const c=o(u.NestedResult[0]);return{...u,NestedResult:[c,u.NestedResult[1]]}}return u});for(const[u,c]of s.entries())if(((f=c.$Intent)==null?void 0:f.name)==="AsyncTransactionThunk")try{c.$Intent.data.resultIndex=o(u)}catch{}};let at=tt;exports.Transaction=at;exports.isTransaction=Z;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index260.cjs"),V=require("./index326.cjs"),S=require("./index327.cjs"),et=require("./index263.cjs"),R=require("./index328.cjs"),T=require("./index329.cjs"),F=require("./index330.cjs"),nt=require("./index331.cjs"),$=require("./index332.cjs"),J=require("./index333.cjs"),st=require("./index334.cjs"),it=require("./index335.cjs"),_=require("./index336.cjs"),U=require("./index337.cjs"),rt=require("./index338.cjs");var Y=s=>{throw TypeError(s)},E=(s,t,e)=>t.has(s)||Y("Cannot "+e),n=(s,t,e)=>(E(s,t,"read from private field"),e?e.call(s):t.get(s)),w=(s,t,e)=>t.has(s)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),l=(s,t,e,r)=>(E(s,t,"write to private field"),t.set(s,e),e),d=(s,t,e)=>(E(s,t,"access private method"),e),P,k,y,b,p,m,g,I,i,h,H,j,O,N,v,z,B,L,Q;function A(s,t=1/0){const e={$kind:"Result",get Result(){return typeof s=="function"?s():s}},r=[],a=o=>r[o]??(r[o]={$kind:"NestedResult",get NestedResult(){return[typeof s=="function"?s():s,o]}});return new Proxy(e,{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(o,f){if(f in o)return Reflect.get(o,f);if(f===Symbol.iterator)return function*(){let c=0;for(;c<t;)yield a(c),c++};if(typeof f=="symbol")return;const u=parseInt(f,10);if(!(Number.isNaN(u)||u<0))return a(u)}})}const X=Symbol.for("@mysten/transaction");function Z(s){return!!s&&typeof s=="object"&&s[X]===!0}const K={buildPlugins:new Map,serializationPlugins:new Map},M=Symbol.for("@mysten/transaction/registry");function C(){try{const s=globalThis;return s[M]||(s[M]=K),s[M]}catch{return K}}const tt=class x{constructor(){w(this,h),w(this,P),w(this,k),w(this,y,new Map),w(this,b,[]),w(this,p,[]),w(this,m,new Set),w(this,g,new Set),w(this,I,new Map),w(this,i),this.object=st.createObjectMethods(e=>{var o,f;if(typeof e=="function")return this.object(this.add(e));if(typeof e=="object"&&S.is(T.ArgumentSchema,e))return e;const r=U.getIdFromCallArg(e),a=n(this,i).inputs.find(u=>r===U.getIdFromCallArg(u));return(o=a==null?void 0:a.Object)!=null&&o.SharedObject&&typeof e=="object"&&((f=e.Object)!=null&&f.SharedObject)&&(a.Object.SharedObject.mutable=a.Object.SharedObject.mutable||e.Object.SharedObject.mutable),a?{$kind:"Input",Input:n(this,i).inputs.indexOf(a),type:"object"}:d(this,h,O).call(this,"object",typeof e=="string"?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:et.normalizeSuiAddress(e)}}:e)});const t=C();l(this,i,new _.TransactionDataBuilder),l(this,k,[...t.buildPlugins.values()]),l(this,P,[...t.serializationPlugins.values()])}static fromKind(t){const e=new x;return l(e,i,_.TransactionDataBuilder.fromKindBytes(typeof t=="string"?W.fromBase64(t):t)),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static from(t){const e=new x;return Z(t)?l(e,i,_.TransactionDataBuilder.restore(t.getData())):typeof t!="string"||!t.startsWith("{")?l(e,i,_.TransactionDataBuilder.fromBytes(typeof t=="string"?W.fromBase64(t):t)):l(e,i,_.TransactionDataBuilder.restore(JSON.parse(t))),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static registerGlobalSerializationPlugin(t,e){C().serializationPlugins.set(t,e??t)}static unregisterGlobalSerializationPlugin(t){C().serializationPlugins.delete(t)}static registerGlobalBuildPlugin(t,e){C().buildPlugins.set(t,e??t)}static unregisterGlobalBuildPlugin(t){C().buildPlugins.delete(t)}addSerializationPlugin(t){n(this,P).push(t)}addBuildPlugin(t){n(this,k).push(t)}addIntentResolver(t,e){if(n(this,y).has(t)&&n(this,y).get(t)!==e)throw new Error(`Intent resolver for ${t} already exists`);n(this,y).set(t,e)}setSender(t){n(this,i).sender=t}setSenderIfNotSet(t){n(this,i).sender||(n(this,i).sender=t)}setExpiration(t){n(this,i).expiration=t?S.parse(T.TransactionExpiration,t):null}setGasPrice(t){n(this,i).gasConfig.price=String(t)}setGasBudget(t){n(this,i).gasConfig.budget=String(t)}setGasBudgetIfNotSet(t){n(this,i).gasData.budget==null&&(n(this,i).gasConfig.budget=String(t))}setGasOwner(t){n(this,i).gasConfig.owner=t}setGasPayment(t){n(this,i).gasConfig.payment=t.map(e=>S.parse(T.ObjectRefSchema,e))}get blockData(){return F.serializeV1TransactionData(n(this,i).snapshot())}getData(){return n(this,i).snapshot()}get[X](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:it.createPure(t=>V.isSerializedBcs(t)?d(this,h,O).call(this,"pure",{$kind:"Pure",Pure:{bytes:t.toBase64()}}):d(this,h,O).call(this,"pure",S.is(T.NormalizedCallArg,t)?S.parse(T.NormalizedCallArg,t):t instanceof Uint8Array?$.Inputs.Pure(t):{$kind:"UnresolvedPure",UnresolvedPure:{value:t}}))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...t){return this.object($.Inputs.ObjectRef(...t))}receivingRef(...t){return this.object($.Inputs.ReceivingRef(...t))}sharedObjectRef(...t){return this.object($.Inputs.SharedObjectRef(...t))}add(t){if(typeof t=="function"){if(n(this,I).has(t))return n(this,I).get(t);const e=d(this,h,H).call(this),r=t(e);if(!(r&&typeof r=="object"&&"then"in r))return l(this,m,n(e,m)),n(this,I).set(t,r),r;const a=d(this,h,j).call(this,{$kind:"$Intent",$Intent:{name:"AsyncTransactionThunk",inputs:{},data:{resultIndex:n(this,i).commands.length,result:null}}});n(this,g).add(Promise.resolve(r).then(f=>{a.$Intent.data.result=f}));const o=A(()=>a.$Intent.data.resultIndex);return n(this,I).set(t,o),o}else d(this,h,j).call(this,t);return A(n(this,i).commands.length-1)}splitCoins(t,e){const r=R.Commands.SplitCoins(typeof t=="string"?this.object(t):d(this,h,v).call(this,t),e.map(a=>typeof a=="number"||typeof a=="bigint"||typeof a=="string"?this.pure.u64(a):d(this,h,N).call(this,a)));return d(this,h,j).call(this,r),A(n(this,i).commands.length-1,e.length)}mergeCoins(t,e){return this.add(R.Commands.MergeCoins(this.object(t),e.map(r=>this.object(r))))}publish({modules:t,dependencies:e}){return this.add(R.Commands.Publish({modules:t,dependencies:e}))}upgrade({modules:t,dependencies:e,package:r,ticket:a}){return this.add(R.Commands.Upgrade({modules:t,dependencies:e,package:r,ticket:this.object(a)}))}moveCall({arguments:t,...e}){return this.add(R.Commands.MoveCall({...e,arguments:t==null?void 0:t.map(r=>d(this,h,N).call(this,r))}))}transferObjects(t,e){return this.add(R.Commands.TransferObjects(t.map(r=>this.object(r)),typeof e=="string"?this.pure.address(e):d(this,h,N).call(this,e)))}makeMoveVec({type:t,elements:e}){return this.add(R.Commands.MakeMoveVec({type:t,elements:e.map(r=>this.object(r))}))}serialize(){return JSON.stringify(F.serializeV1TransactionData(n(this,i).snapshot()))}async toJSON(t={}){await this.prepareForSerialization(t);const e=this.isFullyResolved();return JSON.stringify(S.parse(nt.SerializedTransactionDataV2Schema,e?{...n(this,i).snapshot(),digest:n(this,i).getDigest()}:n(this,i).snapshot()),(r,a)=>typeof a=="bigint"?a.toString():a,2)}async sign(t){const{signer:e,...r}=t,a=await this.build(r);return e.signTransaction(a)}isFullyResolved(){return!(!n(this,i).sender||n(this,g).size>0||n(this,i).commands.some(t=>t.$Intent)||J.needsTransactionResolution(n(this,i),{}))}async build(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).build({onlyTransactionKind:t.onlyTransactionKind})}async getDigest(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).getDigest()}async prepareForSerialization(t){var a;await d(this,h,L).call(this),d(this,h,Q).call(this);const e=new Set;for(const o of n(this,i).commands)o.$Intent&&e.add(o.$Intent.name);const r=[...n(this,P)];for(const o of e)if(!((a=t.supportedIntents)!=null&&a.includes(o))){if(!n(this,y).has(o))throw new Error(`Missing intent resolver for ${o}`);r.push(n(this,y).get(o))}r.push(rt.namedPackagesPlugin()),await d(this,h,B).call(this,r,t)}};P=new WeakMap;k=new WeakMap;y=new WeakMap;b=new WeakMap;p=new WeakMap;m=new WeakMap;g=new WeakMap;I=new WeakMap;i=new WeakMap;h=new WeakSet;H=function(){const s=new tt;return l(s,i,n(this,i)),l(s,P,n(this,P)),l(s,k,n(this,k)),l(s,y,n(this,y)),l(s,g,n(this,g)),l(s,m,new Set(n(this,m))),l(s,I,n(this,I)),n(this,b).push(n(s,b)),n(this,p).push(n(s,p)),s};j=function(s){const t=n(this,i).commands.length;return n(this,p).push(s),n(this,m).add(t),n(this,i).commands.push(s),n(this,i).mapCommandArguments(t,e=>{if(e.$kind==="Result"&&!n(this,m).has(e.Result))throw new Error(`Result { Result: ${e.Result} } is not available to use in the current transaction`);if(e.$kind==="NestedResult"&&!n(this,m).has(e.NestedResult[0]))throw new Error(`Result { NestedResult: [${e.NestedResult[0]}, ${e.NestedResult[1]}] } is not available to use in the current transaction`);if(e.$kind==="Input"&&e.Input>=n(this,i).inputs.length)throw new Error(`Input { Input: ${e.Input} } references an input that does not exist in the current transaction`);return e}),s};O=function(s,t){return n(this,b).push(t),n(this,i).addInput(s,t)};N=function(s){return V.isSerializedBcs(s)?this.pure(s):d(this,h,v).call(this,s)};v=function(s){if(typeof s=="function"){const t=this.add(s);return typeof t=="function"?d(this,h,v).call(this,t):S.parse(T.ArgumentSchema,t)}return S.parse(T.ArgumentSchema,s)};z=async function(s){if(!s.onlyTransactionKind&&!n(this,i).sender)throw new Error("Missing transaction sender");await d(this,h,B).call(this,[...n(this,k),J.resolveTransactionPlugin],s)};B=async function(s,t){try{const e=r=>{if(r>=s.length)return()=>{};const a=s[r];return async()=>{const o=e(r+1);let f=!1,u=!1;if(await a(n(this,i),t,async()=>{if(f)throw new Error(`next() was call multiple times in TransactionPlugin ${r}`);f=!0,await o(),u=!0}),!f)throw new Error(`next() was not called in TransactionPlugin ${r}`);if(!u)throw new Error(`next() was not awaited in TransactionPlugin ${r}`)}};await e(0)()}finally{l(this,b,n(this,i).inputs.slice()),l(this,p,n(this,i).commands.slice()),l(this,m,new Set(n(this,p).map((e,r)=>r)))}};L=async function(){for(;n(this,g).size>0;){const s=Promise.all(n(this,g));n(this,g).clear(),n(this,g).add(s),await s,n(this,g).delete(s)}};Q=function(){var f;const s=n(this,i).commands,t=n(this,i).inputs,e=n(this,p).flat(1/0),r=n(this,b).flat(1/0);if(e.length!==s.length)throw new Error("Unexpected number of commands found in transaction data");if(r.length!==t.length)throw new Error("Unexpected number of inputs found in transaction data");const a=e.filter(u=>{var c;return((c=u.$Intent)==null?void 0:c.name)!=="AsyncTransactionThunk"});n(this,i).commands=a,n(this,i).inputs=r,l(this,p,a),l(this,b,r),l(this,m,new Set(a.map((u,c)=>c)));function o(u){var q;const c=s[u];if(((q=c.$Intent)==null?void 0:q.name)==="AsyncTransactionThunk"){const G=c.$Intent.data.result;if(G==null)throw new Error("AsyncTransactionThunk has not been resolved");return o(G.Result)}const D=a.indexOf(c);if(D===-1)throw new Error("Unable to find original index for command");return D}n(this,i).mapArguments(u=>{if(u.$kind==="Input"){const c=r.indexOf(t[u.Input]);if(c===-1)throw new Error("Input has not been resolved");return{...u,Input:c}}else if(u.$kind==="Result"){const c=o(u.Result);return{...u,Result:c}}else if(u.$kind==="NestedResult"){const c=o(u.NestedResult[0]);return{...u,NestedResult:[c,u.NestedResult[1]]}}return u});for(const[u,c]of s.entries())if(((f=c.$Intent)==null?void 0:f.name)==="AsyncTransactionThunk")try{c.$Intent.data.resultIndex=o(u)}catch{}};let at=tt;exports.Transaction=at;exports.isTransaction=Z;
|
package/dist/index77.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { fromBase64 as F } from "./
|
|
2
|
-
import { isSerializedBcs as q } from "./
|
|
3
|
-
import { parse as P, is as U } from "./
|
|
4
|
-
import { normalizeSuiAddress as et } from "./
|
|
5
|
-
import { Commands as S } from "./
|
|
6
|
-
import { ArgumentSchema as x, TransactionExpiration as nt, ObjectRefSchema as st, NormalizedCallArg as K } from "./
|
|
7
|
-
import { serializeV1TransactionData as J } from "./
|
|
8
|
-
import { SerializedTransactionDataV2Schema as it } from "./
|
|
9
|
-
import { Inputs as $ } from "./
|
|
10
|
-
import { needsTransactionResolution as rt, resolveTransactionPlugin as at } from "./
|
|
11
|
-
import { createObjectMethods as ot } from "./
|
|
12
|
-
import { createPure as lt } from "./
|
|
13
|
-
import { TransactionDataBuilder as T } from "./
|
|
14
|
-
import { getIdFromCallArg as V } from "./
|
|
15
|
-
import { namedPackagesPlugin as ut } from "./
|
|
1
|
+
import { fromBase64 as F } from "./index260.js";
|
|
2
|
+
import { isSerializedBcs as q } from "./index326.js";
|
|
3
|
+
import { parse as P, is as U } from "./index327.js";
|
|
4
|
+
import { normalizeSuiAddress as et } from "./index263.js";
|
|
5
|
+
import { Commands as S } from "./index328.js";
|
|
6
|
+
import { ArgumentSchema as x, TransactionExpiration as nt, ObjectRefSchema as st, NormalizedCallArg as K } from "./index329.js";
|
|
7
|
+
import { serializeV1TransactionData as J } from "./index330.js";
|
|
8
|
+
import { SerializedTransactionDataV2Schema as it } from "./index331.js";
|
|
9
|
+
import { Inputs as $ } from "./index332.js";
|
|
10
|
+
import { needsTransactionResolution as rt, resolveTransactionPlugin as at } from "./index333.js";
|
|
11
|
+
import { createObjectMethods as ot } from "./index334.js";
|
|
12
|
+
import { createPure as lt } from "./index335.js";
|
|
13
|
+
import { TransactionDataBuilder as T } from "./index336.js";
|
|
14
|
+
import { getIdFromCallArg as V } from "./index337.js";
|
|
15
|
+
import { namedPackagesPlugin as ut } from "./index338.js";
|
|
16
16
|
var H = (s) => {
|
|
17
17
|
throw TypeError(s);
|
|
18
18
|
}, z = (s, t, e) => t.has(s) || H("Cannot " + e), n = (s, t, e) => (z(s, t, "read from private field"), e ? e.call(s) : t.get(s)), w = (s, t, e) => t.has(s) ? H("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), u = (s, t, e, r) => (z(s, t, "write to private field"), t.set(s, e), e), d = (s, t, e) => (z(s, t, "access private method"), e), I, k, y, b, p, m, g, R, i, c, L, j, O, N, C, A, G, Q, X;
|
package/dist/index78.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index176.cjs");class r extends s.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}exports.InvalidAddressError=r;
|
package/dist/index78.js
CHANGED
package/dist/index79.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index217.cjs"),i=require("./index97.cjs"),o=/^0x[a-fA-F0-9]{40}$/,t=new c.LruMap(8192);function f(e,n){const{strict:s=!0}=n??{},r=`${e}.${s}`;if(t.has(r))return t.get(r);const u=o.test(e)?e.toLowerCase()===e?!0:s?i.checksumAddress(e)===e:!0:!1;return t.set(r,u),u}exports.isAddress=f;exports.isAddressCache=t;
|
package/dist/index79.js
CHANGED
package/dist/index81.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index86.cjs"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index86.cjs"),f=require("./index209.cjs"),x=require("./index71.cjs"),z=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function H(e,n={}){return typeof e=="number"||typeof e=="bigint"?d(e,n):typeof e=="string"?m(e,n):typeof e=="boolean"?b(e,n):u(e,n)}function b(e,n={}){const t=`0x${Number(e)}`;return typeof n.size=="number"?(x.assertSize(t,{size:n.size}),f.pad(t,{size:n.size})):t}function u(e,n={}){let t="";for(let i=0;i<e.length;i++)t+=z[e[i]];const r=`0x${t}`;return typeof n.size=="number"?(x.assertSize(r,{size:n.size}),f.pad(r,{dir:"right",size:n.size})):r}function d(e,n={}){const{signed:t,size:r}=n,i=BigInt(e);let o;r?t?o=(1n<<BigInt(r)*8n-1n)-1n:o=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof o=="bigint"&&t?-o-1n:0;if(o&&i>o||i<c){const s=typeof e=="bigint"?"n":"";throw new y.IntegerOutOfRangeError({max:o?`${o}${s}`:void 0,min:`${c}${s}`,signed:t,size:r,value:`${e}${s}`})}const g=`0x${(t&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?f.pad(g,{size:r}):g}const T=new TextEncoder;function m(e,n={}){const t=T.encode(e);return u(t,n)}exports.boolToHex=b;exports.bytesToHex=u;exports.numberToHex=d;exports.stringToHex=m;exports.toHex=H;
|
package/dist/index81.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntegerOutOfRangeError as x } from "./index86.js";
|
|
2
|
-
import { pad as s } from "./
|
|
2
|
+
import { pad as s } from "./index209.js";
|
|
3
3
|
import { assertSize as c } from "./index71.js";
|
|
4
4
|
const b = /* @__PURE__ */ Array.from({ length: 256 }, (n, e) => e.toString(16).padStart(2, "0"));
|
|
5
5
|
function B(n, e = {}) {
|
package/dist/index82.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index176.cjs"),u=require("./index198.cjs"),f=require("./index201.cjs"),g=require("./index81.cjs");function c(n,e="hex"){const i=o(n),s=u.createCursor(new Uint8Array(i.length));return i.encode(s),e==="hex"?g.bytesToHex(s.bytes):s.bytes}function o(n){return Array.isArray(n)?p(n.map(e=>o(e))):y(n)}function p(n){const e=n.reduce((t,h)=>t+h.length,0),i=l(e);return{length:e<=55?1+e:1+i+e,encode(t){e<=55?t.pushByte(192+e):(t.pushByte(247+i),i===1?t.pushUint8(e):i===2?t.pushUint16(e):i===3?t.pushUint24(e):t.pushUint32(e));for(const{encode:h}of n)h(t)}}}function y(n){const e=typeof n=="string"?f.hexToBytes(n):n,i=l(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+i+e.length,encode(t){e.length===1&&e[0]<128?t.pushBytes(e):e.length<=55?(t.pushByte(128+e.length),t.pushBytes(e)):(t.pushByte(183+i),i===1?t.pushUint8(e.length):i===2?t.pushUint16(e.length):i===3?t.pushUint24(e.length):t.pushUint32(e.length),t.pushBytes(e))}}}function l(n){if(n<2**8)return 1;if(n<2**16)return 2;if(n<2**24)return 3;if(n<2**32)return 4;throw new r.BaseError("Length is too large.")}exports.toRlp=c;
|
package/dist/index82.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseError as l } from "./
|
|
2
|
-
import { createCursor as r } from "./
|
|
3
|
-
import { hexToBytes as g } from "./
|
|
1
|
+
import { BaseError as l } from "./index176.js";
|
|
2
|
+
import { createCursor as r } from "./index198.js";
|
|
3
|
+
import { hexToBytes as g } from "./index201.js";
|
|
4
4
|
import { bytesToHex as u } from "./index81.js";
|
|
5
5
|
function m(n, e = "hex") {
|
|
6
6
|
const i = s(n), h = r(new Uint8Array(i.length));
|
package/dist/index83.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index186.cjs"),G=require("./index253.cjs"),R=require("./index218.cjs"),S=require("./index219.cjs"),B=require("./index220.cjs"),V=require("./index223.cjs"),L=require("./index80.cjs"),h=require("./index88.cjs"),r=require("./index81.cjs"),d=require("./index82.cjs"),y=require("./index249.cjs"),C=require("./index251.cjs"),v=require("./index252.cjs");function k(e,o){const n=C.getTransactionType(e);return n==="eip1559"?_(e,o):n==="eip2930"?j(e,o):n==="eip4844"?Y(e,o):n==="eip7702"?w(e,o):M(e,o)}function w(e,o){const{authorizationList:n,chainId:s,gas:i,nonce:c,to:a,value:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP7702(e);const b=v.serializeAccessList(l),m=G.serializeAuthorizationList(n);return L.concatHex(["0x04",d.toRlp([r.numberToHex(s),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",i?r.numberToHex(i):"0x",a??"0x",x?r.numberToHex(x):"0x",T??"0x",b,m,...z(e,o)])])}function Y(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerBlobGas:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP4844(e);let b=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof m>"u")){const f=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(p=>r.bytesToHex(p)),P=e.kzg,H=R.blobsToCommitments({blobs:f,kzg:P});if(typeof b>"u"&&(b=B.commitmentsToVersionedHashes({commitments:H})),typeof m>"u"){const p=S.blobsToProofs({blobs:f,commitments:H,kzg:P});m=V.toBlobSidecars({blobs:f,commitments:H,proofs:p})}}const I=v.serializeAccessList(l),A=[r.numberToHex(n),i?r.numberToHex(i):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",T??"0x",I,x?r.numberToHex(x):"0x",b??[],...z(e,o)],q=[],g=[],E=[];if(m)for(let f=0;f<m.length;f++){const{blob:P,commitment:H,proof:p}=m[f];q.push(P),g.push(H),E.push(p)}return L.concatHex(["0x03",m?d.toRlp([A,q,g,E]):d.toRlp(A)])}function _(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerGas:x,maxPriorityFeePerGas:u,accessList:t,data:l}=e;y.assertTransactionEIP1559(e);const T=v.serializeAccessList(t),b=[r.numberToHex(n),i?r.numberToHex(i):"0x",u?r.numberToHex(u):"0x",x?r.numberToHex(x):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",l??"0x",T,...z(e,o)];return L.concatHex(["0x02",d.toRlp(b)])}function j(e,o){const{chainId:n,gas:s,data:i,nonce:c,to:a,value:x,accessList:u,gasPrice:t}=e;y.assertTransactionEIP2930(e);const l=v.serializeAccessList(u),T=[r.numberToHex(n),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x",l,...z(e,o)];return L.concatHex(["0x01",d.toRlp(T)])}function M(e,o){const{chainId:n=0,gas:s,data:i,nonce:c,to:a,value:x,gasPrice:u}=e;y.assertTransactionLegacy(e);let t=[c?r.numberToHex(c):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x"];if(o){const l=(()=>{if(o.v>=35n)return(o.v-35n)/2n>0?o.v:27n+(o.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+o.v-27n);const m=27n+(o.v===27n?0n:1n);if(o.v!==m)throw new F.InvalidLegacyVError({v:o.v});return m})(),T=h.trim(o.r),b=h.trim(o.s);t=[...t,r.numberToHex(l),T==="0x00"?"0x":T,b==="0x00"?"0x":b]}else n>0&&(t=[...t,r.numberToHex(n),"0x","0x"]);return d.toRlp(t)}function z(e,o){const n=o??e,{v:s,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof s>"u"&&typeof i>"u")return[];const c=h.trim(n.r),a=h.trim(n.s);return[typeof i=="number"?i?r.numberToHex(1):"0x":s===0n?"0x":s===1n?r.numberToHex(1):s===27n?"0x":r.numberToHex(1),c==="0x00"?"0x":c,a==="0x00"?"0x":a]}exports.serializeTransaction=k;exports.toYParitySignatureArray=z;
|
package/dist/index83.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { InvalidLegacyVError as H } from "./
|
|
2
|
-
import { serializeAuthorizationList as g } from "./
|
|
3
|
-
import { blobsToCommitments as B } from "./
|
|
4
|
-
import { blobsToProofs as V } from "./
|
|
5
|
-
import { commitmentsToVersionedHashes as C } from "./
|
|
6
|
-
import { toBlobSidecars as k } from "./
|
|
1
|
+
import { InvalidLegacyVError as H } from "./index186.js";
|
|
2
|
+
import { serializeAuthorizationList as g } from "./index253.js";
|
|
3
|
+
import { blobsToCommitments as B } from "./index218.js";
|
|
4
|
+
import { blobsToProofs as V } from "./index219.js";
|
|
5
|
+
import { commitmentsToVersionedHashes as C } from "./index220.js";
|
|
6
|
+
import { toBlobSidecars as k } from "./index223.js";
|
|
7
7
|
import { concatHex as h } from "./index80.js";
|
|
8
8
|
import { trim as T } from "./index88.js";
|
|
9
9
|
import { numberToHex as o, bytesToHex as w } from "./index81.js";
|
|
10
10
|
import { toRlp as b } from "./index82.js";
|
|
11
|
-
import { assertTransactionEIP1559 as S, assertTransactionEIP2930 as _, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./
|
|
12
|
-
import { getTransactionType as q } from "./
|
|
13
|
-
import { serializeAccessList as v } from "./
|
|
11
|
+
import { assertTransactionEIP1559 as S, assertTransactionEIP2930 as _, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index249.js";
|
|
12
|
+
import { getTransactionType as q } from "./index251.js";
|
|
13
|
+
import { serializeAccessList as v } from "./index252.js";
|
|
14
14
|
function te(e, r) {
|
|
15
15
|
const i = q(e);
|
|
16
16
|
return i === "eip1559" ? K(e, r) : i === "eip2930" ? M(e, r) : i === "eip4844" ? J(e, r) : i === "eip7702" ? D(e, r) : N(e, r);
|
package/dist/index85.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index176.cjs");class a extends r.BaseError{constructor({blockNumber:e,chain:t,contract:o}){super(`Chain "${t.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...e&&o.blockCreated&&o.blockCreated>e?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class i extends r.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class s extends r.BaseError{constructor({chainId:e}){super(typeof e=="number"?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}exports.ChainDoesNotSupportContract=a;exports.ClientChainNotConfiguredError=i;exports.InvalidChainIdError=s;
|
package/dist/index85.js
CHANGED
package/dist/index86.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index176.cjs");class l extends o.BaseError{constructor({max:e,min:r,signed:s,size:n,value:t}){super(`Number "${t}" is not in safe ${n?`${n*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class i extends o.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class u extends o.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class c extends o.BaseError{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}exports.IntegerOutOfRangeError=l;exports.InvalidBytesBooleanError=i;exports.InvalidHexBooleanError=u;exports.SizeOverflowError=c;
|
package/dist/index86.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseError as o } from "./
|
|
1
|
+
import { BaseError as o } from "./index176.js";
|
|
2
2
|
class i extends o {
|
|
3
3
|
constructor({ max: e, min: r, signed: s, size: a, value: t }) {
|
|
4
4
|
super(`Number "${t}" is not in safe ${a ? `${a * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
|
package/dist/index9.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),v=require("@gardenfi/garden-book"),T=require("@gardenfi/react-hooks"),b=require("./index23.cjs"),A=require("./index24.cjs"),k=require("./index6.cjs"),q=require("./index25.cjs"),s=require("./index12.cjs"),M=({isOpen:n=!0})=>{const[o,r]=e.useState(!1),{evmAddress:d,bitcoinAddress:u,solanaAddress:f,suiAddress:m,starknetAddress:g}=q.useAddresses(),[H,h]=e.useState({bitcoin:"",evm:"",starknet:"",solana:"",sui:"",tron:"",litecoin:"",alpen_signet:"",xrpl:"",spark:""}),{garden:t}=T.useGarden(),{fetchTransactions:a,totalItems:l,transactions:c,loadMore:w}=b.transactionHistoryStore(),{showFeesAndRateDetails:y,showBtcAddress:x}=k.swapStore(),E=e.useMemo(()=>c.length<l,[c.length,l]),S=async()=>{if(t){r(!0);try{await w(t,H)}finally{r(!1)}}};if(e.useEffect(()=>{if(!t||!n)return;const i={bitcoin:u||"",evm:d||"",starknet:g||"",solana:f||"",sui:m||"",tron:"",litecoin:"",alpen_signet:"",xrpl:"",spark:""};h(i),a(t,i)},[t,n,a]),!n)return null;const p=(y?x?s.HEIGHTS.large:s.HEIGHTS.medium:s.HEIGHTS.small)-s.BUFFER_HEIGHT.small;return e.createElement("div",{className:"flex flex-col h-full w-full gap-3 overflow-y-auto"},e.createElement("div",{className:"scrollbar-hide flex flex-1 flex-col gap-5 overflow-y-auto h-full items-center rounded-2xl pb-6",style:{minHeight:p}},e.createElement("div",{className:"flex flex-col rounded-2xl w-full bg-white/50"},e.createElement(A.Transactions,null)),E&&e.createElement(v.Button,{onClick:S,variant:o?"disabled":"secondary",className:"mx-auto min-h-10 w-1/4"},o?"Loading...":"Load More")))};exports.TransactionHistory=M;
|
package/dist/index9.js
CHANGED
|
@@ -1,53 +1,61 @@
|
|
|
1
1
|
import t, { useState as d, useMemo as b, useEffect as M } from "react";
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useGarden as
|
|
4
|
-
import { transactionHistoryStore as
|
|
2
|
+
import { Button as k } from "@gardenfi/garden-book";
|
|
3
|
+
import { useGarden as L } from "@gardenfi/react-hooks";
|
|
4
|
+
import { transactionHistoryStore as T } from "./index23.js";
|
|
5
5
|
import { Transactions as I } from "./index24.js";
|
|
6
6
|
import { swapStore as N } from "./index6.js";
|
|
7
7
|
import { useAddresses as S } from "./index25.js";
|
|
8
|
-
import { HEIGHTS as
|
|
8
|
+
import { HEIGHTS as o, BUFFER_HEIGHT as B } from "./index12.js";
|
|
9
9
|
const j = ({
|
|
10
|
-
isOpen:
|
|
10
|
+
isOpen: s = !0
|
|
11
11
|
}) => {
|
|
12
12
|
const [r, a] = d(!1), {
|
|
13
13
|
evmAddress: m,
|
|
14
14
|
bitcoinAddress: f,
|
|
15
15
|
solanaAddress: u,
|
|
16
|
-
suiAddress:
|
|
17
|
-
starknetAddress:
|
|
18
|
-
} = S(), [
|
|
16
|
+
suiAddress: p,
|
|
17
|
+
starknetAddress: g
|
|
18
|
+
} = S(), [h, w] = d({
|
|
19
19
|
bitcoin: "",
|
|
20
20
|
evm: "",
|
|
21
21
|
starknet: "",
|
|
22
22
|
solana: "",
|
|
23
23
|
sui: "",
|
|
24
|
-
tron: ""
|
|
25
|
-
|
|
24
|
+
tron: "",
|
|
25
|
+
litecoin: "",
|
|
26
|
+
alpen_signet: "",
|
|
27
|
+
xrpl: "",
|
|
28
|
+
spark: ""
|
|
29
|
+
}), { garden: e } = L(), { fetchTransactions: n, totalItems: l, transactions: i, loadMore: x } = T(), { showFeesAndRateDetails: v, showBtcAddress: y } = N(), E = b(
|
|
26
30
|
() => i.length < l,
|
|
27
31
|
[i.length, l]
|
|
28
32
|
), A = async () => {
|
|
29
33
|
if (e) {
|
|
30
34
|
a(!0);
|
|
31
35
|
try {
|
|
32
|
-
await x(e,
|
|
36
|
+
await x(e, h);
|
|
33
37
|
} finally {
|
|
34
38
|
a(!1);
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
if (M(() => {
|
|
39
|
-
if (!e || !
|
|
43
|
+
if (!e || !s) return;
|
|
40
44
|
const c = {
|
|
41
45
|
bitcoin: f || "",
|
|
42
46
|
evm: m || "",
|
|
43
|
-
starknet:
|
|
47
|
+
starknet: g || "",
|
|
44
48
|
solana: u || "",
|
|
45
|
-
sui:
|
|
46
|
-
tron: ""
|
|
49
|
+
sui: p || "",
|
|
50
|
+
tron: "",
|
|
51
|
+
litecoin: "",
|
|
52
|
+
alpen_signet: "",
|
|
53
|
+
xrpl: "",
|
|
54
|
+
spark: ""
|
|
47
55
|
};
|
|
48
|
-
|
|
49
|
-
}, [e,
|
|
50
|
-
const H = (v ? y ?
|
|
56
|
+
w(c), n(e, c);
|
|
57
|
+
}, [e, s, n]), !s) return null;
|
|
58
|
+
const H = (v ? y ? o.large : o.medium : o.small) - B.small;
|
|
51
59
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col h-full w-full gap-3 overflow-y-auto" }, /* @__PURE__ */ t.createElement(
|
|
52
60
|
"div",
|
|
53
61
|
{
|
|
@@ -56,7 +64,7 @@ const j = ({
|
|
|
56
64
|
},
|
|
57
65
|
/* @__PURE__ */ t.createElement("div", { className: "flex flex-col rounded-2xl w-full bg-white/50" }, /* @__PURE__ */ t.createElement(I, null)),
|
|
58
66
|
E && /* @__PURE__ */ t.createElement(
|
|
59
|
-
|
|
67
|
+
k,
|
|
60
68
|
{
|
|
61
69
|
onClick: A,
|
|
62
70
|
variant: r ? "disabled" : "secondary",
|
package/dist/index92.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index46.cjs"),x=require("./index93.cjs"),E=require("./index94.cjs"),V=require("./index95.cjs"),S=require("./index96.cjs"),N=require("./index97.cjs"),T=require("./index98.cjs"),F=require("./index99.cjs"),k=require("./index80.cjs"),B=require("./index100.cjs"),P=require("./index71.cjs"),w=require("./index81.cjs"),b=require("./index101.cjs"),j=require("./index102.cjs"),p=require("./index103.cjs"),I=require("./index104.cjs"),W=require("./index91.cjs"),D=require("./index105.cjs"),H=require("./index106.cjs"),q=require("./index107.cjs");async function L(i,a){var s,d,f,g;const{address:n,chain:r=i.chain,hash:c,erc6492VerifierAddress:u=a.universalSignatureVerifierAddress??((d=(s=r==null?void 0:r.contracts)==null?void 0:s.erc6492Verifier)==null?void 0:d.address),multicallAddress:o=a.multicallAddress??((g=(f=r==null?void 0:r.contracts)==null?void 0:f.multicall3)==null?void 0:g.address)}=a;if(r!=null&&r.verifyHash)return await r.verifyHash(i,a);const e=(()=>{const t=a.signature;return B.isHex(t)?t:typeof t=="object"&&"r"in t&&"s"in t?p.serializeSignature(t):w.bytesToHex(t)})();try{return H.validate(e)?await m(i,{...a,multicallAddress:o,signature:e}):await M(i,{...a,verifierAddress:u,signature:e})}catch(t){try{if(T.isAddressEqual(N.getAddress(n),await j.recoverAddress({hash:c,signature:e})))return!0}catch{}if(t instanceof l)return!1;throw t}}async function m(i,a){var v;const{address:n,blockNumber:r,blockTag:c,hash:u,multicallAddress:o}=a,{authorization:e,data:s,signature:d,to:f}=H.unwrap(a.signature);if(await W.getCode(i,{address:n,blockNumber:r,blockTag:c})===k.concatHex(["0xef0100",e.address]))return await z(i,{address:n,blockNumber:r,blockTag:c,hash:u,signature:d});const t={address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:w.numberToHex(e.r,{size:32}),s:w.numberToHex(e.s,{size:32}),yParity:e.yParity};if(!await F.verifyAuthorization({address:n,authorization:t}))throw new l;const A=await b.getAction(i,D.readContract,"readContract")({...o?{address:o}:{code:x.multicall3Bytecode},authorizationList:[t],abi:h.multicall3Abi,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...s?[{allowFailure:!0,target:f??n,callData:s}]:[],{allowFailure:!0,target:n,callData:S.encodeFunctionData({abi:h.erc1271Abi,functionName:"isValidSignature",args:[u,d]})}]]}),y=(v=A[A.length-1])==null?void 0:v.returnData;if(y!=null&&y.startsWith("0x1626ba7e"))return!0;throw new l}async function M(i,a){const{address:n,factory:r,factoryData:c,hash:u,signature:o,verifierAddress:e,...s}=a,d=await(async()=>!r&&!c||q.validate(o)?o:q.wrap({data:c,signature:o,to:r}))(),f=e?{to:e,data:S.encodeFunctionData({abi:h.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[n,u,d]}),...s}:{data:V.encodeDeployData({abi:h.erc6492SignatureValidatorAbi,args:[n,u,d],bytecode:x.erc6492SignatureValidatorByteCode}),...s},{data:g}=await b.getAction(i,I.call,"call")(f).catch(t=>{throw t instanceof E.CallExecutionError?new l:t});if(P.hexToBool(g??"0x0"))return!0;throw new l}async function z(i,a){const{address:n,blockNumber:r,blockTag:c,hash:u,signature:o}=a;if((await b.getAction(i,D.readContract,"readContract")({address:n,abi:h.erc1271Abi,args:[u,o],blockNumber:r,blockTag:c,functionName:"isValidSignature"}).catch(s=>{throw s instanceof E.ContractFunctionExecutionError?new l:s})).startsWith("0x1626ba7e"))return!0;throw new l}class l extends Error{}exports.verifyErc1271=z;exports.verifyErc8010=m;exports.verifyHash=L;
|
package/dist/index92.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { multicall3Abi as V, erc1271Abi as v, erc6492SignatureValidatorAbi as b } from "./
|
|
1
|
+
import { multicall3Abi as V, erc1271Abi as v, erc6492SignatureValidatorAbi as b } from "./index46.js";
|
|
2
2
|
import { multicall3Bytecode as z, erc6492SignatureValidatorByteCode as D } from "./index93.js";
|
|
3
3
|
import { CallExecutionError as N, ContractFunctionExecutionError as S } from "./index94.js";
|
|
4
4
|
import { encodeDeployData as C } from "./index95.js";
|