UNPKG

@sega-so/sega-sdk

Version:

An SDK for building applications on top of SEGA.

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