Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwapInstructions ¶
Types ¶
type AddLiqTxDataType ¶ added in v0.0.8
type AddLiqTxDataType struct { TxId string `json:"txid"` TokenAddress solana.PublicKey `json:"token_address"` InitSOLAmount string `json:"init_sol_amount"` InitTokenAmount string `json:"init_token_amount"` AMMAddress solana.PublicKey `json:"amm_address"` PoolCoinTokenAccount solana.PublicKey `json:"pool_coin_token_account"` PoolPcTokenAccount solana.PublicKey `json:"pool_pc_token_account"` FeeInfo *type_.FeeInfo `json:"fee_info"` }
func ParseAddLiqTx ¶ added in v0.0.8
func ParseAddLiqTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*AddLiqTxDataType, error)
type BondingCurveDataType ¶
type BondingCurveDataType struct { BondingCurveAddress string VirtualTokenReserves string VirtualSolReserves string RealTokenReserves string RealSolReserves string TokenTotalSupply string Complete bool }
func GetBondingCurveData ¶
type CreateTxDataType ¶
type CreateTxDataType struct { TxId string `json:"txid"` Name string `json:"name"` Symbol string `json:"symbol"` URI string `json:"uri"` UserAddress solana.PublicKey `json:"user_address"` BondingCurveAddress solana.PublicKey `json:"bonding_curve_address"` TokenAddress solana.PublicKey `json:"token_address"` FeeInfo *type_.FeeInfo `json:"fee_info"` }
func ParseCreateTx ¶
func ParseCreateTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*CreateTxDataType, error)
type ParseTxResult ¶
type ParseTxResult struct { SwapTxData *SwapTxDataType CreateTxData *CreateTxDataType RemoveLiqTxData *RemoveLiqTxDataType AddLiqTxData *AddLiqTxDataType }
func ParseTx ¶
func ParseTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*ParseTxResult, error)
type RemoveLiqTxDataType ¶
type RemoveLiqTxDataType struct { TxId string `json:"txid"` BondingCurveAddress solana.PublicKey `json:"bonding_curve_address"` TokenAddress solana.PublicKey `json:"token_address"` FeeInfo *type_.FeeInfo `json:"fee_info"` }
func ParseRemoveLiqTx ¶
func ParseRemoveLiqTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*RemoveLiqTxDataType, error)
上岸
type SwapDataType ¶
type SwapDataType struct { TokenAddress solana.PublicKey `json:"token_address"` SOLAmount string `json:"sol_amount"` TokenAmount string `json:"token_amount"` Type type_.SwapType `json:"type"` UserAddress solana.PublicKey `json:"user_address"` ReserveSOLAmount string `json:"reserve_sol_amount"` ReserveTokenAmount string `json:"reserve_token_amount"` UserTokenBalance string `json:"user_token_balance"` // 交易之后用户的余额 }
type SwapTxDataType ¶
type SwapTxDataType struct { Swaps []*SwapDataType FeeInfo *type_.FeeInfo TxId string }
func ParseSwapTx ¶
func ParseSwapTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*SwapTxDataType, error)
type TokenMetadata ¶
type TokenMetadata struct { Name string `json:"name"` Symbol string `json:"symbol"` Description string `json:"description"` Image string `json:"image"` ShowName bool `json:"showName"` CreatedOn string `json:"createdOn"` Twitter string `json:"twitter"` Telegram string `json:"telegram"` Website string `json:"website"` }
Click to show internal directories.
Click to hide internal directories.