pumpfun

package
v0.0.0-...-de01cea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProgramID            = solana.MustPublicKeyFromBase58("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P")
	MintAuthority        = solana.MustPublicKeyFromBase58("TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM")
	GlobalPumpFunAddress = solana.MustPublicKeyFromBase58("4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf")
	EventAuthority       = solana.MustPublicKeyFromBase58("Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1")
	PumpFunFeeRecipient  = solana.MustPublicKeyFromBase58("CebN5WGQ4jvEPvsVU4EoHEpgzq1VV7AbicfhtW4xC9iM")
)

Functions

func CreateToken

func CreateToken(ctx context.Context, request CreateTokenRequest) (*solana.Signature, error)

func DeriveBondingCurveAddresses

func DeriveBondingCurveAddresses(mint solana.PublicKey) (bondingCurve, associatedBondingCurve solana.PublicKey, err error)

Types

type CreateTokenInformation

type CreateTokenInformation struct {
	Name     string
	Symbol   string
	ImageURI string
}

type CreateTokenRequest

type CreateTokenRequest struct {
	RpcClient       *rpc.Client
	TokenInfo       CreateTokenInformation
	Mint            *solana.Wallet
	UserPrivateKey  solana.PrivateKey
	BuyAmount       float64
	SlippagePercent float64
}

type GlobalAccount

type GlobalAccount struct {
	Discriminator               uint64
	Initialized                 bool
	Authority                   solana.PublicKey
	FeeRecipient                solana.PublicKey
	InitialVirtualTokenReserves uint64
	InitialVirtualSolReserves   uint64
	InitialRealTokenReserves    uint64
	TokenTotalSupply            uint64
	FeeBasisPoints              uint64
}

GlobalAccount represents the global state of the pump.fun program

func GetGlobalAccount

func GetGlobalAccount(ctx context.Context, rpcClient *rpc.Client) (*GlobalAccount, error)

func (*GlobalAccount) FromBuffer

func (g *GlobalAccount) FromBuffer(data []byte) error

func (*GlobalAccount) GetInitialBuyPrice

func (g *GlobalAccount) GetInitialBuyPrice(solAmount uint64) (uint64, error)

type TokenInformation

type TokenInformation struct {
	Mint                   string  `json:"mint"`
	Name                   string  `json:"name"`
	Symbol                 string  `json:"symbol"`
	Description            string  `json:"description"`
	ImageURI               string  `json:"image_uri"`
	VideoURI               any     `json:"video_uri"`
	MetadataURI            string  `json:"metadata_uri"`
	Twitter                string  `json:"twitter"`
	Telegram               string  `json:"telegram"`
	BondingCurve           string  `json:"bonding_curve"`
	AssociatedBondingCurve string  `json:"associated_bonding_curve"`
	Creator                string  `json:"creator"`
	CreatedTimestamp       int64   `json:"created_timestamp"`
	RaydiumPool            string  `json:"raydium_pool"`
	Complete               bool    `json:"complete"`
	VirtualSolReserves     int64   `json:"virtual_sol_reserves"`
	VirtualTokenReserves   int64   `json:"virtual_token_reserves"`
	TotalSupply            int64   `json:"total_supply"`
	Website                string  `json:"website"`
	ShowName               bool    `json:"show_name"`
	KingOfTheHillTimestamp int64   `json:"king_of_the_hill_timestamp"`
	MarketCap              int     `json:"market_cap"`
	ReplyCount             int     `json:"reply_count"`
	LastReply              int64   `json:"last_reply"`
	Nsfw                   bool    `json:"nsfw"`
	MarketID               string  `json:"market_id"`
	Inverted               bool    `json:"inverted"`
	IsCurrentlyLive        bool    `json:"is_currently_live"`
	Username               any     `json:"username"`
	ProfileImage           any     `json:"profile_image"`
	UsdMarketCap           float64 `json:"usd_market_cap"`
}

func GetTokenInformation

func GetTokenInformation(ctx context.Context, tokenAddress string) (*TokenInformation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL