1import{af as T,ag as b,ah as p,ai as F,aj as G,ak as k,M as K,al as _,am as j,an as q,ao as D,ap as M,aq as N,ar as R,as as U,at as Y,au as g,av as m,aw as i,ax as J,ay as O,az as Q,aA as W,aB as X,aC as Z,aD as v,aE as S}from"./index-c2fc66f8.js";function $(e){const{authorizationList:s}=e;if(s)for(const r of s){const{chainId:n}=r,o=r.address;if(!b(o))throw new p({address:o});if(n<0)throw new T({chainId:n})}A(e)}function ee(e){const{blobVersionedHashes:s}=e;if(s){if(s.length===0)throw new _;for(const r of s){const n=j(r),o=q(D(r,0,1));if(n!==32)throw new M({hash:r,size:n});if(o!==N)throw new R({hash:r,version:o})}}A(e)}function A(e){const{chainId:s,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=e;if(s<=0)throw new T({chainId:s});if(o&&!b(o))throw new p({address:o});if(n&&n>F)throw new G({maxFeePerGas:n});if(r&&n&&r>n)throw new k({maxFeePerGas:n,maxPriorityFeePerGas:r})}function se(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:a}=e;if(s<=0)throw new T({chainId:s});if(a&&!b(a))throw new p({address:a});if(r||o)throw new K("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>F)throw new G({maxFeePerGas:n})}function re(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:a}=e;if(a&&!b(a))throw new p({address:a});if(typeof s<"u"&&s<=0)throw new T({chainId:s});if(r||o)throw new K("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>F)throw new G({maxFeePerGas:n})}function E(e){if(!e||e.length===0)return[];const s=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:o}=e[r];for(let a=0;a<o.length;a++)if(o[a].length-2!==64)throw new U({storageKey:o[a]});if(!b(n,{strict:!1}))throw new p({address:n});s.push([n,o])}return s}function de(e,s){const r=Y(e);return r==="eip1559"?ie(e,s):r==="eip2930"?ae(e,s):r==="eip4844"?oe(e,s):r==="eip7702"?ne(e,s):te(e,s)}function ne(e,s){const{authorizationList:r,chainId:n,gas:o,nonce:a,to:t,value:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;$(e);const l=E(u),x=ce(r);return g(["0x04",m([i(n),a?i(a):"0x",c?i(c):"0x",d?i(d):"0x",o?i(o):"0x",t??"0x",f?i(f):"0x",h??"0x",l,x,...z(e,s)])])}function oe(e,s){const{chainId:r,gas:n,nonce:o,to:a,value:t,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;ee(e);let l=e.blobVersionedHashes,x=e.sidecars;if(e.blobs&&(typeof l>"u"||typeof x>"u")){const P=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(y=>J(y)),I=e.kzg,w=O({blobs:P,kzg:I});if(typeof l>"u"&&(l=Q({commitments:w})),typeof x>"u"){const y=W({blobs:P,commitments:w,kzg:I});x=X({blobs:P,commitments:w,proofs:y})}}const L=E(u),H=[i(r),o?i(o):"0x",c?i(c):"0x",d?i(d):"0x",n?i(n):"0x",a??"0x",t?i(t):"0x",h??"0x",L,f?i(f):"0x",l??[],...z(e,s)],V=[],B=[],C=[];if(x)for(let P=0;P<x.length;P++){const{blob:I,commitment:w,proof:y}=x[P];V.push(I),B.push(w),C.push(y)}return g(["0x03",x?m([H,V,B,C]):m(H)])}function ie(e,s){const{chainId:r,gas:n,nonce:o,to:a,value:t,maxFeePerGas:f,maxPriorityFeePerGas:d,accessList:c,data:u}=e;A(e);const h=E(c),l=[i(r),o?i(o):"0x",d?i(d):"0x",f?i(f):"0x",n?i(n):"0x",a??"0x",t?i(t):"0x",u??"0x",h,...z(e,s)];return g(["0x02",m(l)])}function ae(e,s){const{chainId:r,gas:n,data:o,nonce:a,to:t,value:f,accessList:d,gasPrice:c}=e;se(e);const u=E(d),h=[i(r),a?i(a):"0x",c?i(c):"0x",n?i(n):"0x",t??"0x",f?i(f):"0x",o??"0x",u,...z(e,s)];return g(["0x01",m(h)])}function te(e,s){const{chainId:r=0,gas:n,data:o,nonce:a,to:t,value:f,gasPrice:d}=e;re(e);let c=[a?i(a):"0x",d?i(d):"0x",n?i(n):"0x",t??"0x",f?i(f):"0x",o??"0x"];if(s){const u=(()=>{if(s.v>=35n)return(s.v-35n)/2n>0?s.v:27n+(s.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+s.v-27n);const x=27n+(s.v===27n?0n:1n);if(s.v!==x)throw new Z({v:s.v});return x})(),h=v(s.r),l=v(s.s);c=[...c,i(u),h==="0x00"?"0x":h,l==="0x00"?"0x":l]}else r>0&&(c=[...c,i(r),"0x","0x"]);return m(c)}function z(e,s){const r=s??e,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];const a=v(r.r),t=v(r.s);return[(()=>typeof o=="number"?o?i(1):"0x":n===0n?"0x":n===1n?i(1):n===27n?"0x":i(1))(),a==="0x00"?"0x":a,t==="0x00"?"0x":t]}function ce(e){if(!e||e.length===0)return[];const s=[];for(const r of e){const{chainId:n,nonce:o,...a}=r,t=r.address;s.push([n?S(n):"0x",t,o?S(o):"0x",...z({},a)])}return s}export{E as a,$ as b,ee as c,A as d,se as e,re as f,de as s,z as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.