goosefx-amm-sdk
Version:
SDK for the GooseFx AMM
2 lines • 1.52 kB
JavaScript
import{PublicKey as h}from"@solana/web3.js";import{PublicKey as m,ComputeBudgetProgram as T,Transaction as B,TransactionMessage as v,Keypair as A,VersionedTransaction as x}from"@solana/web3.js";import{TOKEN_PROGRAM_ID as K}from"@solana/spl-token";import{get as a,set as g}from"lodash";var i=class{constructor(e){this.logLevel=e.logLevel!==void 0?e.logLevel:0,this.name=e.name}set level(e){this.logLevel=e}get time(){return Date.now().toString()}get moduleName(){return this.name}isLogLevel(e){return e<=this.logLevel}error(...e){return this.isLogLevel(0)?(console.error(this.time,this.name,"sdk logger error",...e),this):this}logWithError(...e){let n=e.map(r=>typeof r=="object"?JSON.stringify(r):r).join(", ");throw new Error(n)}warning(...e){return this.isLogLevel(1)?(console.warn(this.time,this.name,"sdk logger warning",...e),this):this}info(...e){return this.isLogLevel(2)?(console.info(this.time,this.name,"sdk logger info",...e),this):this}debug(...e){return this.isLogLevel(3)?(console.debug(this.time,this.name,"sdk logger debug",...e),this):this}},c={},f={};function u(t){let e=a(c,t);if(!e){let n=a(f,t);e=new i({name:t,logLevel:n}),g(c,t,e)}return e}var U=u("Gfx_txUtil");function l(t,e){let[n,r]=m.findProgramAddressSync(t,e);return{publicKey:n,nonce:r}}import{TOKEN_PROGRAM_ID as p}from"@solana/spl-token";function z(t,e,n){return l([t.toBuffer(),(n!=null?n:p).toBuffer(),e.toBuffer()],new h("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"))}export{z as getATAAddress};
//# sourceMappingURL=pda.mjs.map