Documentation
¶
Index ¶
- func SetDevnetMode()
- func SolToLamp(sol float64) uint64
- type BondingCurveData
- type BondingCurvePublicKeys
- type Client
- func (c *Client) BuyToken(mint solana.PublicKey, buyAmountSol float64, percentage float64) (string, error)
- func (c *Client) CreateToken(mint *solana.Wallet, name string, symbol string, uri string, ...) (string, error)
- func (c *Client) SellToken(mint solana.PublicKey, sellTokenAmount uint64, percentage float64, all bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDevnetMode ¶
func SetDevnetMode()
SetDevnetMode sets the pumpidl.fun program addresses to the devnet addresses. It is important to call this function if you are using the devnet.
Types ¶
type BondingCurveData ¶
type BondingCurveData struct { RealTokenReserves *big.Int VirtualTokenReserves *big.Int VirtualSolReserves *big.Int }
BondingCurveData holds the relevant information decoded from the on-chain data.
func (*BondingCurveData) String ¶
func (b *BondingCurveData) String() string
type BondingCurvePublicKeys ¶
type BondingCurvePublicKeys struct { BondingCurve solana.PublicKey AssociatedBondingCurve solana.PublicKey }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BuyToken ¶
func (c *Client) BuyToken(mint solana.PublicKey, buyAmountSol float64, percentage float64) (string, error)
BuyToken buys a token from the bonding curve. The amount is the amount of tokens to buy, and the sol is the amount of SOL to pay. The mintAddr is the address of the mint of the token. This function will send a transaction to the network to buy the token. This function will return an error if the transaction fails.
func (*Client) CreateToken ¶
Click to show internal directories.
Click to hide internal directories.