@gardenfi/utils 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index100.cjs +1 -2
- package/dist/index100.js +27 -119
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +90 -14
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +4 -25
- package/dist/index103.cjs +2 -1
- package/dist/index103.js +3 -34
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +9 -45
- package/dist/index105.cjs +20 -1
- package/dist/index105.js +326 -6
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +13 -103
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +4 -37
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +2 -9
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +7 -20
- package/dist/index110.cjs +2 -1
- package/dist/index110.js +55 -2
- package/dist/index111.cjs +3 -1
- package/dist/index111.js +211 -71
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +32 -16
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +20 -150
- package/dist/index114.cjs +1 -20
- package/dist/index114.js +5 -326
- package/dist/index115.cjs +1 -3
- package/dist/index115.js +72 -450
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +5 -73
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +5 -16
- package/dist/index118.cjs +9 -1
- package/dist/index118.js +35 -10
- package/dist/index119.cjs +2 -1
- package/dist/index119.js +114 -119
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +3 -6
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +17 -44
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +17 -35
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +35 -6
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +21 -88
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +7 -13
- package/dist/index126.cjs +4 -1
- package/dist/index126.js +194 -3
- package/dist/index127.cjs +3 -1
- package/dist/index127.js +451 -26
- package/dist/index128.cjs +1 -2
- package/dist/index128.js +22 -19
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +161 -9
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +127 -8
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +38 -10
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +6 -11
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +27 -13
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +189 -19
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +4 -15
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +73 -4
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +20 -6
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +3 -19
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +16 -10
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +22 -57
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +18 -6
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +34 -13
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +3 -8
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +18 -138
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +27 -7
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +36 -21
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +10 -17
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +24 -42
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +28 -21
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +70 -75
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +9 -11
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +15 -7
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +8 -6
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +10 -41
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +11 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +6 -33
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +6 -9
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +13 -60
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +32 -19
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +5 -107
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +32 -73
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +109 -7
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +166 -85
- package/dist/index164.cjs +1 -2
- package/dist/index164.js +50 -3
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +33 -9
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +7 -13
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +17 -4
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +21 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +41 -30
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +22 -21
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +21 -5
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +51 -5
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +12 -5
- package/dist/index174.cjs +1 -9
- package/dist/index174.js +24 -35
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +25 -3
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +100 -14
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +3 -21
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +5 -35
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +30 -7
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -4
- package/dist/index180.js +3 -194
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +17 -27
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +8 -161
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +79 -126
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +5 -27
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +26 -190
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +17 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +75 -17
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +2 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +14 -16
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +17 -33
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +18 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +10 -27
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +28 -23
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +2 -29
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +13 -6
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +12 -6
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +46 -31
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +12 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +7 -37
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +68 -47
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +46 -32
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +36 -16
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +17 -42
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +6 -104
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +10 -3
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +13 -5
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +13 -3
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +8 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +35 -8
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +16 -5
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +29 -27
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +14 -78
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +7 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +103 -18
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +74 -16
- package/dist/index216.cjs +2 -1
- package/dist/index216.js +24 -10
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +10 -102
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +18 -15
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +101 -212
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +16 -108
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +206 -198
- package/dist/index222.cjs +2 -1
- package/dist/index222.js +40 -41
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +2 -79
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +6 -2
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +10 -24
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +17 -44
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +8 -9
- package/dist/index228.cjs +1 -2
- package/dist/index228.js +66 -41
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +66 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +188 -5
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +27 -9
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +74 -17
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +40 -8
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +16 -66
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +12 -64
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +11 -188
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +12 -28
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +103 -71
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +202 -36
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +5 -5
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +41 -15
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +77 -12
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +2 -12
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +19 -12
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +2 -2
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +25 -18
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +45 -25
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +9 -11
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +24 -19
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +2 -2
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +2 -2
- package/dist/index252.cjs +1 -2
- package/dist/index252.js +68 -91
- package/dist/index253.cjs +2 -1
- package/dist/index253.js +91 -14
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +14 -68
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +3 -3
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +2 -2
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +12 -12
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +7 -171
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +30 -110
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +29 -30
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +17 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +34 -4
- package/dist/index56.cjs +1 -2
- package/dist/index56.js +43 -58
- package/dist/index57.cjs +1 -2
- package/dist/index57.js +150 -53
- package/dist/index58.cjs +1 -3
- package/dist/index58.js +39 -213
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +57 -22
- package/dist/index60.cjs +2 -1
- package/dist/index60.js +59 -18
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +13 -10
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +37 -20
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +15 -13
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +8 -12
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +20 -24
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +2 -29
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +44 -46
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +33 -16
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +8 -10
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +58 -29
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +76 -35
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +7 -7
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +16 -29
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +9 -21
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +5 -7
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +13 -69
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +3 -46
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +25 -22
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +161 -34
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +4 -17
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +6 -6
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +89 -8
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +9 -12
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +6 -164
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +13 -77
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +125 -13
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +137 -50
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +7 -7
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +21 -7
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +17 -21
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +43 -8
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +20 -30
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +11 -16
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +6 -73
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +5 -35
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +19 -16
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +103 -72
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +78 -12
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +8 -28
- package/package.json +1 -1
package/dist/index176.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 f=require("./index243.cjs"),c=require("./index238.cjs"),A=BigInt(0),u=BigInt(1),H=BigInt(2),L=BigInt(7),S=BigInt(256),T=BigInt(113),O=[],y=[],w=[];for(let n=0,t=u,s=1,i=0;n<24;n++){[s,i]=[i,(2*s+3*i)%5],O.push(2*(5*i+s)),y.push((n+1)*(n+2)/2%64);let o=A;for(let r=0;r<7;r++)t=(t<<u^(t>>L)*T)%S,t&H&&(o^=u<<(u<<BigInt(r))-u);w.push(o)}const _=f.split(w,!0),F=_[0],X=_[1],I=(n,t,s)=>s>32?f.rotlBH(n,t,s):f.rotlSH(n,t,s),x=(n,t,s)=>s>32?f.rotlBL(n,t,s):f.rotlSL(n,t,s);function b(n,t=24){const s=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let e=0;e<10;e++)s[e]=n[e]^n[e+10]^n[e+20]^n[e+30]^n[e+40];for(let e=0;e<10;e+=2){const h=(e+8)%10,l=(e+2)%10,p=s[l],a=s[l+1],g=I(p,a,1)^s[h],B=x(p,a,1)^s[h+1];for(let d=0;d<50;d+=10)n[e+d]^=g,n[e+d+1]^=B}let o=n[2],r=n[3];for(let e=0;e<24;e++){const h=y[e],l=I(o,r,h),p=x(o,r,h),a=O[e];o=n[a],r=n[a+1],n[a]=l,n[a+1]=p}for(let e=0;e<50;e+=10){for(let h=0;h<10;h++)s[h]=n[e+h];for(let h=0;h<10;h++)n[e+h]^=~s[(h+2)%10]&s[(h+4)%10]}n[0]^=F[i],n[1]^=X[i]}c.clean(s)}class k extends c.Hash{constructor(t,s,i,o=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=s,this.outputLen=i,this.enableXOF=o,this.rounds=r,c.anumber(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=c.u32(this.state)}clone(){return this._cloneInto()}keccak(){c.swap32IfBE(this.state32),b(this.state32,this.rounds),c.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(t){c.aexists(this),t=c.toBytes(t),c.abytes(t);const{blockLen:s,state:i}=this,o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let h=0;h<e;h++)i[this.pos++]^=t[r++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:i,blockLen:o}=this;t[i]^=s,s&128&&i===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){c.aexists(this,!1),c.abytes(t),this.finish();const s=this.state,{blockLen:i}=this;for(let o=0,r=t.length;o<r;){this.posOut>=i&&this.keccak();const e=Math.min(i-this.posOut,r-o);t.set(s.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return c.anumber(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(c.aoutput(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,c.clean(this.state)}_cloneInto(t){const{blockLen:s,suffix:i,outputLen:o,rounds:r,enableXOF:e}=this;return t||(t=new k(s,i,o,e,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=i,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const m=(n,t,s)=>c.createHasher(()=>new k(t,n,s)),E=m(1,136,256/8);exports.Keccak=k;exports.keccakP=b;exports.keccak_256=E;
|
package/dist/index176.js
CHANGED
|
@@ -1,21 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index243.js";
|
|
2
|
+
import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index238.js";
|
|
3
|
+
const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
|
|
4
|
+
for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
|
|
5
|
+
[s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
|
|
6
|
+
let o = R;
|
|
7
|
+
for (let r = 0; r < 7; r++)
|
|
8
|
+
t = (t << f ^ (t >> q) * z) % v, t & j && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
|
|
9
|
+
B.push(o);
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
const A = L(B, !0), C = A[0], D = A[1], O = (n, t, s) => s > 32 ? m(n, t, s) : T(n, t, s), w = (n, t, s) => s > 32 ? F(n, t, s) : S(n, t, s);
|
|
12
|
+
function G(n, t = 24) {
|
|
13
|
+
const s = new Uint32Array(10);
|
|
14
|
+
for (let i = 24 - t; i < 24; i++) {
|
|
15
|
+
for (let e = 0; e < 10; e++)
|
|
16
|
+
s[e] = n[e] ^ n[e + 10] ^ n[e + 20] ^ n[e + 30] ^ n[e + 40];
|
|
17
|
+
for (let e = 0; e < 10; e += 2) {
|
|
18
|
+
const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], b = O(u, c, 1) ^ s[h], H = w(u, c, 1) ^ s[h + 1];
|
|
19
|
+
for (let a = 0; a < 50; a += 10)
|
|
20
|
+
n[e + a] ^= b, n[e + a + 1] ^= H;
|
|
21
|
+
}
|
|
22
|
+
let o = n[2], r = n[3];
|
|
23
|
+
for (let e = 0; e < 24; e++) {
|
|
24
|
+
const h = g[e], l = O(o, r, h), u = w(o, r, h), c = _[e];
|
|
25
|
+
o = n[c], r = n[c + 1], n[c] = l, n[c + 1] = u;
|
|
26
|
+
}
|
|
27
|
+
for (let e = 0; e < 50; e += 10) {
|
|
28
|
+
for (let h = 0; h < 10; h++)
|
|
29
|
+
s[h] = n[e + h];
|
|
30
|
+
for (let h = 0; h < 10; h++)
|
|
31
|
+
n[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
|
|
32
|
+
}
|
|
33
|
+
n[0] ^= C[i], n[1] ^= D[i];
|
|
10
34
|
}
|
|
35
|
+
y(s);
|
|
11
36
|
}
|
|
12
|
-
class
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
class p extends E {
|
|
38
|
+
// NOTE: we accept arguments in bytes instead of bits here.
|
|
39
|
+
constructor(t, s, i, o = !1, r = 24) {
|
|
40
|
+
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, d(i), !(0 < t && t < 200))
|
|
41
|
+
throw new Error("only keccak-f1600 function is supported");
|
|
42
|
+
this.state = new Uint8Array(200), this.state32 = U(this.state);
|
|
43
|
+
}
|
|
44
|
+
clone() {
|
|
45
|
+
return this._cloneInto();
|
|
46
|
+
}
|
|
47
|
+
keccak() {
|
|
48
|
+
I(this.state32), G(this.state32, this.rounds), I(this.state32), this.posOut = 0, this.pos = 0;
|
|
49
|
+
}
|
|
50
|
+
update(t) {
|
|
51
|
+
x(this), t = P(t), k(t);
|
|
52
|
+
const { blockLen: s, state: i } = this, o = t.length;
|
|
53
|
+
for (let r = 0; r < o; ) {
|
|
54
|
+
const e = Math.min(s - this.pos, o - r);
|
|
55
|
+
for (let h = 0; h < e; h++)
|
|
56
|
+
i[this.pos++] ^= t[r++];
|
|
57
|
+
this.pos === s && this.keccak();
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
finish() {
|
|
62
|
+
if (this.finished)
|
|
63
|
+
return;
|
|
64
|
+
this.finished = !0;
|
|
65
|
+
const { state: t, suffix: s, pos: i, blockLen: o } = this;
|
|
66
|
+
t[i] ^= s, s & 128 && i === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
|
|
67
|
+
}
|
|
68
|
+
writeInto(t) {
|
|
69
|
+
x(this, !1), k(t), this.finish();
|
|
70
|
+
const s = this.state, { blockLen: i } = this;
|
|
71
|
+
for (let o = 0, r = t.length; o < r; ) {
|
|
72
|
+
this.posOut >= i && this.keccak();
|
|
73
|
+
const e = Math.min(i - this.posOut, r - o);
|
|
74
|
+
t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
|
|
75
|
+
}
|
|
76
|
+
return t;
|
|
77
|
+
}
|
|
78
|
+
xofInto(t) {
|
|
79
|
+
if (!this.enableXOF)
|
|
80
|
+
throw new Error("XOF is not possible for this instance");
|
|
81
|
+
return this.writeInto(t);
|
|
82
|
+
}
|
|
83
|
+
xof(t) {
|
|
84
|
+
return d(t), this.xofInto(new Uint8Array(t));
|
|
85
|
+
}
|
|
86
|
+
digestInto(t) {
|
|
87
|
+
if (M(t, this), this.finished)
|
|
88
|
+
throw new Error("digest() was already called");
|
|
89
|
+
return this.writeInto(t), this.destroy(), t;
|
|
90
|
+
}
|
|
91
|
+
digest() {
|
|
92
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
93
|
+
}
|
|
94
|
+
destroy() {
|
|
95
|
+
this.destroyed = !0, y(this.state);
|
|
96
|
+
}
|
|
97
|
+
_cloneInto(t) {
|
|
98
|
+
const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: e } = this;
|
|
99
|
+
return t || (t = new p(s, i, o, e, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = i, t.outputLen = o, t.enableXOF = e, t.destroyed = this.destroyed, t;
|
|
15
100
|
}
|
|
16
101
|
}
|
|
102
|
+
const J = (n, t, s) => X(() => new p(t, n, s)), Q = J(1, 136, 256 / 8);
|
|
17
103
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
104
|
+
p as Keccak,
|
|
105
|
+
G as keccakP,
|
|
106
|
+
Q as keccak_256
|
|
21
107
|
};
|
package/dist/index177.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index219.cjs"),s=e.sha256;exports.sha256=s;
|
package/dist/index177.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
constructor({ max: e, min: r, signed: s, size: t, value: a }) {
|
|
4
|
-
super(`Number "${a}" is not in safe ${t ? `${t * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class u extends o {
|
|
8
|
-
constructor(e) {
|
|
9
|
-
super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
10
|
-
name: "InvalidBytesBooleanError"
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class c extends o {
|
|
15
|
-
constructor({ givenSize: e, maxSize: r }) {
|
|
16
|
-
super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import { sha256 as s } from "./index219.js";
|
|
2
|
+
const o = s;
|
|
19
3
|
export {
|
|
20
|
-
|
|
21
|
-
u as InvalidBytesBooleanError,
|
|
22
|
-
c as SizeOverflowError
|
|
4
|
+
o as sha256
|
|
23
5
|
};
|
package/dist/index178.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index244.cjs"),r=require("./index245.cjs");function n(t){return e.hashSignature(r.toSignature(t))}exports.toSignatureHash=n;
|
package/dist/index178.js
CHANGED
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class v extends l {
|
|
6
|
-
constructor(e, { account: r, docsPath: n, chain: t, data: d, gas: p, gasPrice: o, maxFeePerGas: i, maxPriorityFeePerGas: m, nonce: g, to: u, value: f }) {
|
|
7
|
-
var a;
|
|
8
|
-
const E = b({
|
|
9
|
-
from: r == null ? void 0 : r.address,
|
|
10
|
-
to: u,
|
|
11
|
-
value: typeof f < "u" && `${y(f)} ${((a = t == null ? void 0 : t.nativeCurrency) == null ? void 0 : a.symbol) || "ETH"}`,
|
|
12
|
-
data: d,
|
|
13
|
-
gas: p,
|
|
14
|
-
gasPrice: typeof o < "u" && `${s(o)} gwei`,
|
|
15
|
-
maxFeePerGas: typeof i < "u" && `${s(i)} gwei`,
|
|
16
|
-
maxPriorityFeePerGas: typeof m < "u" && `${s(m)} gwei`,
|
|
17
|
-
nonce: g
|
|
18
|
-
});
|
|
19
|
-
super(e.shortMessage, {
|
|
20
|
-
cause: e,
|
|
21
|
-
docsPath: n,
|
|
22
|
-
metaMessages: [
|
|
23
|
-
...e.metaMessages ? [...e.metaMessages, " "] : [],
|
|
24
|
-
"Estimate Gas Arguments:",
|
|
25
|
-
E
|
|
26
|
-
].filter(Boolean),
|
|
27
|
-
name: "EstimateGasExecutionError"
|
|
28
|
-
}), Object.defineProperty(this, "cause", {
|
|
29
|
-
enumerable: !0,
|
|
30
|
-
configurable: !0,
|
|
31
|
-
writable: !0,
|
|
32
|
-
value: void 0
|
|
33
|
-
}), this.cause = e;
|
|
34
|
-
}
|
|
1
|
+
import { hashSignature as t } from "./index244.js";
|
|
2
|
+
import { toSignature as o } from "./index245.js";
|
|
3
|
+
function a(r) {
|
|
4
|
+
return t(o(r));
|
|
35
5
|
}
|
|
36
6
|
export {
|
|
37
|
-
|
|
7
|
+
a as toSignatureHash
|
|
38
8
|
};
|
package/dist/index179.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=new Map,i=new Map;function p(o){const a=(s,t)=>({clear:()=>t.delete(s),get:()=>t.get(s),set:n=>t.set(s,n)}),r=a(o,c),e=a(o,i);return{clear:()=>{r.clear(),e.clear()},promise:r,response:e}}async function l(o,{cacheKey:a,cacheTime:r=Number.POSITIVE_INFINITY}){const e=p(a),s=e.response.get();if(s&&r>0&&Date.now()-s.created.getTime()<r)return s.data;let t=e.promise.get();t||(t=o(),e.promise.set(t));try{const n=await t;return e.response.set({created:new Date,data:n}),n}finally{e.promise.clear()}}exports.getCache=p;exports.promiseCache=c;exports.responseCache=i;exports.withCache=l;
|
package/dist/index179.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
2
|
+
function p(o) {
|
|
3
|
+
const a = (s, t) => ({
|
|
4
|
+
clear: () => t.delete(s),
|
|
5
|
+
get: () => t.get(s),
|
|
6
|
+
set: (r) => t.set(s, r)
|
|
7
|
+
}), n = a(o, i), e = a(o, c);
|
|
8
|
+
return {
|
|
9
|
+
clear: () => {
|
|
10
|
+
n.clear(), e.clear();
|
|
11
|
+
},
|
|
12
|
+
promise: n,
|
|
13
|
+
response: e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
async function l(o, { cacheKey: a, cacheTime: n = Number.POSITIVE_INFINITY }) {
|
|
17
|
+
const e = p(a), s = e.response.get();
|
|
18
|
+
if (s && n > 0 && Date.now() - s.created.getTime() < n)
|
|
19
|
+
return s.data;
|
|
20
|
+
let t = e.promise.get();
|
|
21
|
+
t || (t = o(), e.promise.set(t));
|
|
22
|
+
try {
|
|
23
|
+
const r = await t;
|
|
24
|
+
return e.response.set({ created: /* @__PURE__ */ new Date(), data: r }), r;
|
|
25
|
+
} finally {
|
|
26
|
+
e.promise.clear();
|
|
7
27
|
}
|
|
8
28
|
}
|
|
9
29
|
export {
|
|
10
|
-
p as
|
|
30
|
+
p as getCache,
|
|
31
|
+
i as promiseCache,
|
|
32
|
+
c as responseCache,
|
|
33
|
+
l as withCache
|
|
11
34
|
};
|
package/dist/index18.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index51.cjs"),P=require("./index52.cjs"),v=require("./index53.cjs"),q=require("./index54.cjs"),F=require("./index55.cjs"),_=require("./index56.cjs"),x=require("./index57.cjs"),b=require("./index58.cjs");function G({abi:t,address:o,client:l}){const n=l,[s,f]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],h=s!=null,A=f!=null,u={};let m=!1,w=!1,d=!1;for(const a of t)if(a.type==="function"?a.stateMutability==="view"||a.stateMutability==="pure"?m=!0:w=!0:a.type==="event"&&(d=!0),m&&w&&d)break;return h&&(m&&(u.read=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(s,F.readContract,"readContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),w&&(u.simulate=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(s,_.simulateContract,"simulateContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),d&&(u.createEventFilter=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,P.createContractEventFilter,"createContractEventFilter")({abi:t,address:o,eventName:e,args:r,...C})}}}),u.getEvents=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,q.getContractEvents,"getContractEvents")({abi:t,address:o,eventName:e,args:r,...C})}}}),u.watchEvent=new Proxy({},{get(a,e){return(...i)=>{const c=t.find(g=>g.type==="event"&&g.name===e),{args:r,options:C}=E(i,c);return p.getAction(s,x.watchContractEvent,"watchContractEvent")({abi:t,address:o,eventName:e,args:r,...C})}}}))),A&&w&&(u.write=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i);return p.getAction(f,b.writeContract,"writeContract")({abi:t,address:o,functionName:e,args:c,...r})}}})),(h||A)&&w&&(u.estimateGas=new Proxy({},{get(a,e){return(...i)=>{const{args:c,options:r}=y(i),C=s??f;return p.getAction(C,v.estimateContractGas,"estimateContractGas")({abi:t,address:o,functionName:e,args:c,...r,account:r.account??f.account})}}})),u.address=o,u.abi=t,u}function y(t){const o=t.length&&Array.isArray(t[0]),l=o?t[0]:[],n=(o?t[1]:t[0])??{};return{args:l,options:n}}function E(t,o){let l=!1;Array.isArray(t[0])?l=!0:t.length===1?l=o.inputs.some(f=>f.indexed):t.length===2&&(l=!0);const n=l?t[0]:void 0,s=(l?t[1]:t[0])??{};return{args:n,options:s}}exports.getContract=G;exports.getEventParameters=E;exports.getFunctionParameters=y;
|
package/dist/index18.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getAction as g } from "./
|
|
2
|
-
import { createContractEventFilter as v } from "./
|
|
3
|
-
import { estimateContractGas as A } from "./
|
|
4
|
-
import { getContractEvents as _ } from "./
|
|
5
|
-
import { readContract as x } from "./
|
|
6
|
-
import { simulateContract as F } from "./
|
|
7
|
-
import { watchContractEvent as G } from "./
|
|
8
|
-
import { writeContract as b } from "./
|
|
1
|
+
import { getAction as g } from "./index51.js";
|
|
2
|
+
import { createContractEventFilter as v } from "./index52.js";
|
|
3
|
+
import { estimateContractGas as A } from "./index53.js";
|
|
4
|
+
import { getContractEvents as _ } from "./index54.js";
|
|
5
|
+
import { readContract as x } from "./index55.js";
|
|
6
|
+
import { simulateContract as F } from "./index56.js";
|
|
7
|
+
import { watchContractEvent as G } from "./index57.js";
|
|
8
|
+
import { writeContract as b } from "./index58.js";
|
|
9
9
|
function D({ abi: t, address: o, client: f }) {
|
|
10
10
|
const e = f, [a, p] = e ? "public" in e && "wallet" in e ? [e.public, e.wallet] : "public" in e ? [e.public, void 0] : "wallet" in e ? [void 0, e.wallet] : [e, e] : [void 0, void 0], d = a != null, P = p != null, u = {};
|
|
11
11
|
let y = !1, w = !1, E = !1;
|
package/dist/index180.cjs
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
2
|
-
`),{cause:r,name:"NonceTooLowError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class h extends o.BaseError{constructor({cause:r,nonce:e}={}){super(`Nonce provided for the transaction ${e?`(${e}) `:""}exceeds the maximum allowed nonce.`,{cause:r,name:"NonceMaxValueError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class f extends o.BaseError{constructor({cause:r}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
3
|
-
`),{cause:r,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class p extends o.BaseError{constructor({cause:r,gas:e}={}){super(`The amount of gas ${e?`(${e}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:r,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class g extends o.BaseError{constructor({cause:r,gas:e}={}){super(`The amount of gas ${e?`(${e}) `:""}provided for the transaction is too low.`,{cause:r,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class b extends o.BaseError{constructor({cause:r}){super("The transaction type is not supported for this chain.",{cause:r,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class E extends o.BaseError{constructor({cause:r,maxPriorityFeePerGas:e,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${a.formatGwei(n)} gwei`:""}).`].join(`
|
|
4
|
-
`),{cause:r,name:"TipAboveFeeCapError"})}}Object.defineProperty(E,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class w extends o.BaseError{constructor({cause:r}){super(`An error occurred while executing: ${r==null?void 0:r.shortMessage}`,{cause:r,name:"UnknownNodeError"})}}exports.ExecutionRevertedError=s;exports.FeeCapTooHighError=c;exports.FeeCapTooLowError=u;exports.InsufficientFundsError=f;exports.IntrinsicGasTooHighError=p;exports.IntrinsicGasTooLowError=g;exports.NonceMaxValueError=h;exports.NonceTooHighError=l;exports.NonceTooLowError=d;exports.TipAboveFeeCapError=E;exports.TransactionTypeNotSupportedError=b;exports.UnknownNodeError=w;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function i(e){return new Promise(t=>setTimeout(t,e))}exports.wait=i;
|
package/dist/index180.js
CHANGED
|
@@ -1,197 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
class i extends t {
|
|
4
|
-
constructor({ cause: r, message: e } = {}) {
|
|
5
|
-
var s;
|
|
6
|
-
const n = (s = e == null ? void 0 : e.replace("execution reverted: ", "")) == null ? void 0 : s.replace("execution reverted", "");
|
|
7
|
-
super(`Execution reverted ${n ? `with reason: ${n}` : "for an unknown reason"}.`, {
|
|
8
|
-
cause: r,
|
|
9
|
-
name: "ExecutionRevertedError"
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(i, "code", {
|
|
14
|
-
enumerable: !0,
|
|
15
|
-
configurable: !0,
|
|
16
|
-
writable: !0,
|
|
17
|
-
value: 3
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(i, "nodeMessage", {
|
|
20
|
-
enumerable: !0,
|
|
21
|
-
configurable: !0,
|
|
22
|
-
writable: !0,
|
|
23
|
-
value: /execution reverted|gas required exceeds allowance/
|
|
24
|
-
});
|
|
25
|
-
class c extends t {
|
|
26
|
-
constructor({ cause: r, maxFeePerGas: e } = {}) {
|
|
27
|
-
super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
28
|
-
cause: r,
|
|
29
|
-
name: "FeeCapTooHighError"
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
Object.defineProperty(c, "nodeMessage", {
|
|
34
|
-
enumerable: !0,
|
|
35
|
-
configurable: !0,
|
|
36
|
-
writable: !0,
|
|
37
|
-
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
38
|
-
});
|
|
39
|
-
class u extends t {
|
|
40
|
-
constructor({ cause: r, maxFeePerGas: e } = {}) {
|
|
41
|
-
super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${a(e)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
42
|
-
cause: r,
|
|
43
|
-
name: "FeeCapTooLowError"
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
Object.defineProperty(u, "nodeMessage", {
|
|
48
|
-
enumerable: !0,
|
|
49
|
-
configurable: !0,
|
|
50
|
-
writable: !0,
|
|
51
|
-
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
52
|
-
});
|
|
53
|
-
class l extends t {
|
|
54
|
-
constructor({ cause: r, nonce: e } = {}) {
|
|
55
|
-
super(`Nonce provided for the transaction ${e ? `(${e}) ` : ""}is higher than the next one expected.`, { cause: r, name: "NonceTooHighError" });
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
Object.defineProperty(l, "nodeMessage", {
|
|
59
|
-
enumerable: !0,
|
|
60
|
-
configurable: !0,
|
|
61
|
-
writable: !0,
|
|
62
|
-
value: /nonce too high/
|
|
63
|
-
});
|
|
64
|
-
class d extends t {
|
|
65
|
-
constructor({ cause: r, nonce: e } = {}) {
|
|
66
|
-
super([
|
|
67
|
-
`Nonce provided for the transaction ${e ? `(${e}) ` : ""}is lower than the current nonce of the account.`,
|
|
68
|
-
"Try increasing the nonce or find the latest nonce with `getTransactionCount`."
|
|
69
|
-
].join(`
|
|
70
|
-
`), { cause: r, name: "NonceTooLowError" });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
Object.defineProperty(d, "nodeMessage", {
|
|
74
|
-
enumerable: !0,
|
|
75
|
-
configurable: !0,
|
|
76
|
-
writable: !0,
|
|
77
|
-
value: /nonce too low|transaction already imported|already known/
|
|
78
|
-
});
|
|
79
|
-
class h extends t {
|
|
80
|
-
constructor({ cause: r, nonce: e } = {}) {
|
|
81
|
-
super(`Nonce provided for the transaction ${e ? `(${e}) ` : ""}exceeds the maximum allowed nonce.`, { cause: r, name: "NonceMaxValueError" });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
Object.defineProperty(h, "nodeMessage", {
|
|
85
|
-
enumerable: !0,
|
|
86
|
-
configurable: !0,
|
|
87
|
-
writable: !0,
|
|
88
|
-
value: /nonce has max value/
|
|
89
|
-
});
|
|
90
|
-
class f extends t {
|
|
91
|
-
constructor({ cause: r } = {}) {
|
|
92
|
-
super([
|
|
93
|
-
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
94
|
-
].join(`
|
|
95
|
-
`), {
|
|
96
|
-
cause: r,
|
|
97
|
-
metaMessages: [
|
|
98
|
-
"This error could arise when the account does not have enough funds to:",
|
|
99
|
-
" - pay for the total gas fee,",
|
|
100
|
-
" - pay for the value to send.",
|
|
101
|
-
" ",
|
|
102
|
-
"The cost of the transaction is calculated as `gas * gas fee + value`, where:",
|
|
103
|
-
" - `gas` is the amount of gas needed for transaction to execute,",
|
|
104
|
-
" - `gas fee` is the gas fee,",
|
|
105
|
-
" - `value` is the amount of ether to send to the recipient."
|
|
106
|
-
],
|
|
107
|
-
name: "InsufficientFundsError"
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
Object.defineProperty(f, "nodeMessage", {
|
|
112
|
-
enumerable: !0,
|
|
113
|
-
configurable: !0,
|
|
114
|
-
writable: !0,
|
|
115
|
-
value: /insufficient funds|exceeds transaction sender account balance/
|
|
116
|
-
});
|
|
117
|
-
class p extends t {
|
|
118
|
-
constructor({ cause: r, gas: e } = {}) {
|
|
119
|
-
super(`The amount of gas ${e ? `(${e}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
120
|
-
cause: r,
|
|
121
|
-
name: "IntrinsicGasTooHighError"
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
Object.defineProperty(p, "nodeMessage", {
|
|
126
|
-
enumerable: !0,
|
|
127
|
-
configurable: !0,
|
|
128
|
-
writable: !0,
|
|
129
|
-
value: /intrinsic gas too high|gas limit reached/
|
|
130
|
-
});
|
|
131
|
-
class b extends t {
|
|
132
|
-
constructor({ cause: r, gas: e } = {}) {
|
|
133
|
-
super(`The amount of gas ${e ? `(${e}) ` : ""}provided for the transaction is too low.`, {
|
|
134
|
-
cause: r,
|
|
135
|
-
name: "IntrinsicGasTooLowError"
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
Object.defineProperty(b, "nodeMessage", {
|
|
140
|
-
enumerable: !0,
|
|
141
|
-
configurable: !0,
|
|
142
|
-
writable: !0,
|
|
143
|
-
value: /intrinsic gas too low/
|
|
144
|
-
});
|
|
145
|
-
class g extends t {
|
|
146
|
-
constructor({ cause: r }) {
|
|
147
|
-
super("The transaction type is not supported for this chain.", {
|
|
148
|
-
cause: r,
|
|
149
|
-
name: "TransactionTypeNotSupportedError"
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
Object.defineProperty(g, "nodeMessage", {
|
|
154
|
-
enumerable: !0,
|
|
155
|
-
configurable: !0,
|
|
156
|
-
writable: !0,
|
|
157
|
-
value: /transaction type not valid/
|
|
158
|
-
});
|
|
159
|
-
class m extends t {
|
|
160
|
-
constructor({ cause: r, maxPriorityFeePerGas: e, maxFeePerGas: n } = {}) {
|
|
161
|
-
super([
|
|
162
|
-
`The provided tip (\`maxPriorityFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${a(n)} gwei` : ""}).`
|
|
163
|
-
].join(`
|
|
164
|
-
`), {
|
|
165
|
-
cause: r,
|
|
166
|
-
name: "TipAboveFeeCapError"
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
Object.defineProperty(m, "nodeMessage", {
|
|
171
|
-
enumerable: !0,
|
|
172
|
-
configurable: !0,
|
|
173
|
-
writable: !0,
|
|
174
|
-
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
175
|
-
});
|
|
176
|
-
class v extends t {
|
|
177
|
-
constructor({ cause: r }) {
|
|
178
|
-
super(`An error occurred while executing: ${r == null ? void 0 : r.shortMessage}`, {
|
|
179
|
-
cause: r,
|
|
180
|
-
name: "UnknownNodeError"
|
|
181
|
-
});
|
|
182
|
-
}
|
|
1
|
+
async function n(e) {
|
|
2
|
+
return new Promise((t) => setTimeout(t, e));
|
|
183
3
|
}
|
|
184
4
|
export {
|
|
185
|
-
|
|
186
|
-
c as FeeCapTooHighError,
|
|
187
|
-
u as FeeCapTooLowError,
|
|
188
|
-
f as InsufficientFundsError,
|
|
189
|
-
p as IntrinsicGasTooHighError,
|
|
190
|
-
b as IntrinsicGasTooLowError,
|
|
191
|
-
h as NonceMaxValueError,
|
|
192
|
-
l as NonceTooHighError,
|
|
193
|
-
d as NonceTooLowError,
|
|
194
|
-
m as TipAboveFeeCapError,
|
|
195
|
-
g as TransactionTypeNotSupportedError,
|
|
196
|
-
v as UnknownNodeError
|
|
5
|
+
n as wait
|
|
197
6
|
};
|
package/dist/index181.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(n,{errorInstance:r=new Error("timed out"),timeout:i,signal:a}){return new Promise((l,e)=>{(async()=>{let o;try{const t=new AbortController;i>0&&(o=setTimeout(()=>{a&&t.abort()},i)),l(await n({signal:(t==null?void 0:t.signal)||null}))}catch(t){(t==null?void 0:t.name)==="AbortError"&&e(r),e(t)}finally{clearTimeout(o)}})()})}exports.withTimeout=u;
|
package/dist/index181.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class y extends t {
|
|
19
|
-
constructor({ type: r }) {
|
|
20
|
-
super(`Struct type "${r}" is invalid.`, {
|
|
21
|
-
metaMessages: ["Struct type must not be a Solidity type."],
|
|
22
|
-
name: "InvalidStructTypeError"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
1
|
+
function u(r, { errorInstance: e = new Error("timed out"), timeout: i, signal: a }) {
|
|
2
|
+
return new Promise((l, n) => {
|
|
3
|
+
(async () => {
|
|
4
|
+
let o;
|
|
5
|
+
try {
|
|
6
|
+
const t = new AbortController();
|
|
7
|
+
i > 0 && (o = setTimeout(() => {
|
|
8
|
+
a && t.abort();
|
|
9
|
+
}, i)), l(await r({ signal: (t == null ? void 0 : t.signal) || null }));
|
|
10
|
+
} catch (t) {
|
|
11
|
+
(t == null ? void 0 : t.name) === "AbortError" && n(e), n(t);
|
|
12
|
+
} finally {
|
|
13
|
+
clearTimeout(o);
|
|
14
|
+
}
|
|
15
|
+
})();
|
|
16
|
+
});
|
|
25
17
|
}
|
|
26
18
|
export {
|
|
27
|
-
|
|
28
|
-
p as InvalidPrimaryTypeError,
|
|
29
|
-
y as InvalidStructTypeError
|
|
19
|
+
u as withTimeout
|
|
30
20
|
};
|
package/dist/index182.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 n=require("./index103.cjs"),o=require("./index141.cjs"),s=require("./index107.cjs"),r=require("./index33.cjs");function c(e){const t=typeof e=="string"?r.stringToHex(e):typeof e.raw=="string"?e.raw:r.bytesToHex(e.raw),i=r.stringToHex(`${n.presignMessagePrefix}${s.size(t)}`);return o.concat([i,t])}exports.toPrefixedMessage=c;
|