require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../crypto/poseidon.cjs`);let t=require(`@coral-xyz/anchor`),n=require(`@solana/web3.js`);var r=e=>new TextEncoder().encode(e),i=e=>{let t=[],n=e;for(;n>0n;)t.unshift(Number(n%256n)),n/=256n;for(;t.length<32;)t.unshift(0);return t},a=e=>({extraRandomization:i(e.extraRandomization),stealthAddress:i(e.stealthAddress),h0:i(e.H0),h1:i(e.H1)}),o=(e,t)=>{let i=[r(`hinkal`),t.toBytes()],[a]=n.PublicKey.findProgramAddressSync(i,e);return a},s=(e,t)=>{let i=[r(`hinkal_merkle`),t.toBytes()],[a]=n.PublicKey.findProgramAddressSync(i,e);return a},c=(e,t)=>{let i=[r(`hinkal_merkle_access_token`),t.toBytes()],[a]=n.PublicKey.findProgramAddressSync(i,e);return a},l=(e,i,a)=>{let o=[r(`hinkal_swapper`),i.toBytes(),new Uint8Array(new t.BN(a.toString()).toArray(`be`,32))],[s]=n.PublicKey.findProgramAddressSync(o,e);return s},u=(t,n,r)=>l(t,n,e.poseidonFunction(r)),d=(e,t)=>{let i=[r(`hinkal_vault`),t.toBytes()],[a]=n.PublicKey.findProgramAddressSync(i,e);return a},f=(e,t,a)=>{let o=i(e),s=[r(`hinkal_access_keys`),a.toBytes(),new Uint8Array(o)],[c]=n.PublicKey.findProgramAddressSync(s,t);return c},p=(e,t,i)=>{let a=[r(`hinkal_token_limit`),t.toBytes(),i.toBytes()],[o]=n.PublicKey.findProgramAddressSync(a,e);return o};exports.buildAnchorStealthAddressStructure=a,exports.encodeToByte32Array=i,exports.getAccessTokenAccountPublicKey=f,exports.getAccessTokenMerkleAccountPublicKey=c,exports.getMerkleAccountPublicKey=s,exports.getStorageAccountPublicKey=o,exports.getStorageVaultPublicKey=d,exports.getSwapperAccountPublicKey=l,exports.getSwapperAccountPublicKeyFromSalt=u,exports.getTokenLimitStorageAccountPublicKey=p;