@raydium-io/raydium-sdk-v2
Version:
An SDK for building applications on top of Raydium.
2 lines • 3.71 kB
JavaScript
import{PublicKey as E}from"@solana/web3.js";import _,{isBN as U}from"bn.js";import{bits as M,BitStructure as W,blob as A,Blob as j,cstr as z,f32 as H,f32be as J,f64 as Q,f64be as X,greedy as Y,Layout as C,ns64 as Z,ns64be as $,nu64 as ee,nu64be as te,offset as I,s16 as ne,s16be as re,s24 as oe,s24be as se,s32 as ae,s32be as ue,s40 as ie,s40be as ce,s48 as pe,s48be as ye,s8 as de,seq as v,struct as Pe,Structure as F,u16 as D,u16be as xe,u24 as le,u24be as me,u32 as N,u32be as fe,u40 as be,u40be as ge,u48 as Le,u48be as he,u8 as Te,UInt as R,union as Se,Union as Be,unionLayoutDiscriminator as we,utf8 as _e}from"@solana/buffer-layout";var x=C,L=F;var h=R;var T=D;var S=N;var B=v;var l=A;var w=I;var m=class extends x{constructor(t,r,a){super(t,a);this.blob=l(t),this.signed=r}decode(t,r=0){let a=new _(this.blob.decode(t,r),10,"le");return this.signed?a.fromTwos(this.span*8).clone():a}encode(t,r,a=0){return typeof t=="number"&&(t=new _(t)),this.signed&&(t=t.toTwos(this.span*8)),this.blob.encode(t.toArrayLike(Buffer,"le",this.span),r,a)}};function s(u){return new h(1,u)}function e(u){return new m(8,!1,u)}var P=class extends x{constructor(t,r,a,p){super(t.span,p);this.layout=t,this.decoder=r,this.encoder=a}decode(t,r){return this.decoder(this.layout.decode(t,r))}encode(t,r,a){return this.layout.encode(this.encoder(t),r,a)}getSpan(t,r){return this.layout.getSpan(t,r)}};function n(u){return new P(l(32),o=>new E(o),o=>o.toBuffer(),u)}function k(u,o){let t=S("length"),r=c([t,i(u,w(t,-t.span),"values")]);return new P(r,({values:a})=>a,a=>({values:a}),o)}var f=class extends L{decode(o,t){return super.decode(o,t)}};function c(u,o,t){return new f(u,o,t)}function i(u,o,t){let r,a=typeof o=="number"?o:U(o)?o.toNumber():new Proxy(o,{get(p,d){if(!r){let y=Reflect.get(p,"count");r=U(y)?y.toNumber():y,Reflect.set(p,"count",r)}return Reflect.get(p,d)},set(p,d,y){return d==="count"&&(r=y),Reflect.set(p,d,y)}});return B(u,a,t)}var qe=c([e(),e("epoch"),s("curveType"),T("index"),e("migrateFee"),e("tradeFeeRate"),e("maxShareFeeRate"),e("minSupplyA"),e("maxLockRate"),e("minSellRateA"),e("minMigrateRateA"),e("minFundRaisingB"),n("mintB"),n("protocolFeeOwner"),n("migrateFeeOwner"),n("migrateToAmmWallet"),n("migrateToCpmmWallet"),i(e(),16)]),V=c([e("totalLockedAmount"),e("cliffPeriod"),e("unlockPeriod"),e("startTime"),e("totalAllocatedShare")]),Oe=c([e(),e("epoch"),s("bump"),s("status"),s("mintDecimalsA"),s("mintDecimalsB"),s("migrateType"),e("supply"),e("totalSellA"),e("virtualA"),e("virtualB"),e("realA"),e("realB"),e("totalFundRaisingB"),e("protocolFee"),e("platformFee"),e("migrateFee"),V.replicate("vestingSchedule"),n("configId"),n("platformId"),n("mintA"),n("mintB"),n("vaultA"),n("vaultB"),n("creator"),s("mintProgramFlag"),s("cpmmCreatorFeeOn"),e("platformVestingShare"),i(s(),54)]),Ge=c([e(),e("epoch"),n("poolId"),n("beneficiary"),e("claimedAmount"),e("tokenShareAmount"),i(e(),8)]),K=c([s("migrateType"),s("migrateCpmmFeeOn"),e("supply"),e("totalSellA"),e("totalFundRaisingB"),e("totalLockedAmount"),e("cliffPeriod"),e("unlockPeriod")]),q=c([e("epoch"),s("index"),n("configId"),K.replicate("bondingCurveParam"),i(e(),50)]),Me=c([e(),e("epoch"),n("platformClaimFeeWallet"),n("platformLockNftWallet"),e("platformScale"),e("creatorScale"),e("burnScale"),e("feeRate"),i(s(),64,"name"),i(s(),256,"web"),i(s(),256,"img"),n("cpConfigId"),e("creatorFeeRate"),n("transferFeeExtensionAuth"),n("platformVestingWallet"),e("platformVestingScale"),n("platformCpCreator"),i(s(),108),k(q,"platformCurve")]);export{K as BondingCurveParam,qe as LaunchpadConfig,Oe as LaunchpadPool,Ge as LaunchpadVesting,Me as PlatformConfig,q as PlatformCurveParam,V as VestingSchedule};
//# sourceMappingURL=layout.mjs.map