New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wen-moon-ser/moonshot-sdk

Package Overview
Dependencies
Maintainers
0
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wen-moon-ser/moonshot-sdk

## Initial spec

  • 0.0.1-alpha.5
  • npm
  • Socket score

Version published
Weekly downloads
3.1K
decreased by-18.65%
Maintainers
0
Weekly downloads
 
Created
Source

moonshot-sdk

Initial spec

const sdk = new MoonSDK({rpcUrl: string});
const token = sdk.Token(mintAddress);

token.getCollateralPrice(options?: {curvePosition?: string }); // optionally accepts curve position, if not given it will take current token curve position from chain
token.getCurvePosition(); // gets current curve position from chain

// again, if curve position is not provided we calculate it from chain
token.getTokenAmountByCollateral(options: {collateralAmount: string, tradeDirection: 'BUY' | 'SELL', curvePosition?: string});

token.getCollateralAmountByTokens(options: {tokenAmount: string, tradeDirection: 'BUY' | 'SELL', curvePosition?: string});

// for v0 alpha release
const partiallySignedTxSerialized = token.getTx(options: {tokenAmount: string, collateralAmount: string, slippage: number, creatorPK: string, tradeDirection: 'BUY' | 'SELL'});

// for beta release which will follow in a day or two, we add those options
const partiallySignedSerializedTx = token.getTx(options: {tokenAmount: string, collateralAmount: string, slippage: number, creatorPK: string, tradeDirection: 'BUY' | 'SELL', prioFeeMicroLamports: number, affiliateFeeWallet: string, affiliateFeeBps: number});

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc