Documentation
¶
Index ¶
- func BuyToken(rpcClient *rpc.Client, wsClient *ws.Client, user solana.PrivateKey, ...) (string, error)
- func CreateToken(rpcClient *rpc.Client, wsClient *ws.Client, user solana.PrivateKey, ...) (string, error)
- func SellToken(rpcClient *rpc.Client, wsClient *ws.Client, user solana.PrivateKey, ...) (string, error)
- func SetDevnetMode()
- func SolToLamp(sol float64) uint64
- type BondingCurveData
- type BondingCurvePublicKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuyToken ¶
func BuyToken(rpcClient *rpc.Client, wsClient *ws.Client, user solana.PrivateKey, 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 CreateToken ¶
func SetDevnetMode ¶
func SetDevnetMode()
SetDevnetMode sets the pump.fun program addresses to the devnet addresses. It is important to call this function if you are using the devnet.
Types ¶
Click to show internal directories.
Click to hide internal directories.