test-raydium-sdk-v2
Version:
An SDK for building applications on top of Raydium.
2 lines • 2.17 kB
JavaScript
import{TOKEN_PROGRAM_ID as s}from"@solana/spl-token";import{PublicKey as t,SystemProgram as u,SYSVAR_RENT_PUBKEY as a}from"@solana/web3.js";function r({pubkey:n,isSigner:o=!1,isWritable:e=!0}){return{pubkey:n,isWritable:e,isSigner:o}}var w=[r({pubkey:s,isWritable:!1}),r({pubkey:u.programId,isWritable:!1}),r({pubkey:a,isWritable:!1})];function p({publicKey:n,transformSol:o}){let e=y(n.toString());if(e instanceof t)return o&&e.equals(c)?i:e;if(o&&e.toString()===c.toBase58())return i;if(typeof e=="string"){if(e===t.default.toBase58())return t.default;try{return new t(e)}catch{throw new Error("invalid public key")}}throw new Error("invalid public key")}function y(n){try{return new t(n)}catch{return n}}var R=new t("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"),f=new t("SysvarRent111111111111111111111111111111111"),P=new t("SysvarC1ock11111111111111111111111111111111"),K=new t("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),k=new t("Sysvar1nstructions1111111111111111111111111"),m=new t("4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R"),g=new t("Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS"),W=new t("SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt"),D=new t("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),Y=new t("Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"),N=new t("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"),d=new t("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj"),T=new t("USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX"),U=new t("NRVwhjBQiUPYtfDT5zRBVJajzFQHaBUNtC7SNVvqRFa"),C=new t("ANAxByE6G2WjFp7A4NqtWYXb3mgruyzZYg3spfxe6Lbo"),E=new t("7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs"),i=new t("So11111111111111111111111111111111111111112"),c=t.default;function v(n){return p({publicKey:n,transformSol:!0})}export{C as ANAMint,P as CLOCK_PROGRAM_ID,E as ETHMint,k as INSTRUCTION_PROGRAM_ID,R as MEMO_PROGRAM_ID,K as METADATA_PROGRAM_ID,U as NRVMint,g as PAIMint,m as RAYMint,f as RENT_PROGRAM_ID,c as SOLMint,W as SRMMint,D as USDCMint,T as USDHMint,Y as USDTMint,i as WSOLMint,r as accountMeta,w as commonSystemAccountMeta,N as mSOLMint,v as solToWSol,d as stSOLMint,y as tryParsePublicKey,p as validateAndParsePublicKey};
//# sourceMappingURL=pubKey.mjs.map