Documentation
ΒΆ
Index ΒΆ
- func ConvertYellowstoneTransaction(grpc *YellowstoneTransaction, slot uint64, blockTime int64) *adapter.SolanaTransaction
- type DexParser
- func (dp *DexParser) ParseAll(tx *adapter.SolanaTransaction, config *types.ParseConfig) *types.ParseResult
- func (dp *DexParser) ParseBatch(txs []*adapter.SolanaTransaction, config *types.ParseConfig, maxWorkers int) []*types.ParseResult
- func (dp *DexParser) ParseBatchWithCallback(txs []*adapter.SolanaTransaction, config *types.ParseConfig, maxWorkers int, ...) []*types.ParseResult
- func (dp *DexParser) ParseLiquidity(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.PoolEvent
- func (dp *DexParser) ParseTrades(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.TradeInfo
- func (dp *DexParser) ParseTransfers(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.TransferData
- func (dp *DexParser) RegisterLiquidityParser(programId string, factory LiquidityParserFactory)
- func (dp *DexParser) RegisterMemeEventParser(programId string, factory MemeEventParserFactory)
- func (dp *DexParser) RegisterTradeParser(programId string, factory TradeParserFactory)
- func (dp *DexParser) RegisterTransferParser(programId string, factory TransferParserFactory)
- type LiquidityParserFactory
- type MemeEventParserFactory
- type ParseCallback
- type PumpfunBuyData
- type PumpfunCreateData
- type PumpfunInstruction
- type PumpfunInstructionParser
- type PumpfunMigrateData
- type PumpfunSellData
- type PumpswapAddLiquidityData
- type PumpswapBuyInstructionData
- type PumpswapCreatePoolInstructionData
- type PumpswapInstruction
- type PumpswapInstructionParser
- type PumpswapRemoveLiquidityData
- type PumpswapSellInstructionData
- type ShredInstructionParser
- type ShredParser
- type TradeParserFactory
- type TransferParserFactory
- type YellowstoneAddressTableLookup
- type YellowstoneHeader
- type YellowstoneInnerInstructionSet
- type YellowstoneInstruction
- type YellowstoneLoadedAddresses
- type YellowstoneMessageData
- type YellowstoneReturnData
- type YellowstoneTokenAmount
- type YellowstoneTokenBalance
- type YellowstoneTransaction
- type YellowstoneTransactionData
- type YellowstoneTransactionMeta
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func ConvertYellowstoneTransaction ΒΆ added in v1.2.0
func ConvertYellowstoneTransaction(grpc *YellowstoneTransaction, slot uint64, blockTime int64) *adapter.SolanaTransaction
ConvertYellowstoneTransaction converts a Yellowstone gRPC transaction to SolanaTransaction format that can be used with DexParser.ParseAll() or ShredParser.ParseAll()
Types ΒΆ
type DexParser ΒΆ
type DexParser struct {
// contains filtered or unexported fields
}
DexParser is the main parser class for Solana DEX transactions
func (*DexParser) ParseAll ΒΆ
func (dp *DexParser) ParseAll(tx *adapter.SolanaTransaction, config *types.ParseConfig) *types.ParseResult
ParseAll parses all data from a transaction
func (*DexParser) ParseBatch ΒΆ added in v1.2.0
func (dp *DexParser) ParseBatch(txs []*adapter.SolanaTransaction, config *types.ParseConfig, maxWorkers int) []*types.ParseResult
ParseBatch parses multiple transactions concurrently maxWorkers: maximum number of concurrent workers, if <= 1, will use sequential processing
func (*DexParser) ParseBatchWithCallback ΒΆ added in v1.2.0
func (dp *DexParser) ParseBatchWithCallback( txs []*adapter.SolanaTransaction, config *types.ParseConfig, maxWorkers int, callback ParseCallback, ) []*types.ParseResult
ParseBatchWithCallback parses multiple transactions with callback support maxWorkers: maximum number of concurrent workers, if <= 1, will use sequential processing callback: optional callback function called for each completed transaction
func (*DexParser) ParseLiquidity ΒΆ
func (dp *DexParser) ParseLiquidity(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.PoolEvent
ParseLiquidity parses liquidity events from a transaction
func (*DexParser) ParseTrades ΒΆ
func (dp *DexParser) ParseTrades(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.TradeInfo
ParseTrades parses trades from a transaction
func (*DexParser) ParseTransfers ΒΆ
func (dp *DexParser) ParseTransfers(tx *adapter.SolanaTransaction, config *types.ParseConfig) []types.TransferData
ParseTransfers parses transfers from a transaction
func (*DexParser) RegisterLiquidityParser ΒΆ
func (dp *DexParser) RegisterLiquidityParser(programId string, factory LiquidityParserFactory)
RegisterLiquidityParser registers a liquidity parser for a program ID
func (*DexParser) RegisterMemeEventParser ΒΆ
func (dp *DexParser) RegisterMemeEventParser(programId string, factory MemeEventParserFactory)
RegisterMemeEventParser registers a meme event parser for a program ID
func (*DexParser) RegisterTradeParser ΒΆ
func (dp *DexParser) RegisterTradeParser(programId string, factory TradeParserFactory)
RegisterTradeParser registers a trade parser for a program ID
func (*DexParser) RegisterTransferParser ΒΆ
func (dp *DexParser) RegisterTransferParser(programId string, factory TransferParserFactory)
RegisterTransferParser registers a transfer parser for a program ID
type LiquidityParserFactory ΒΆ
type LiquidityParserFactory func( adapter *adapter.TransactionAdapter, transferActions map[string][]types.TransferData, classifiedInstructions []types.ClassifiedInstruction, ) parsers.LiquidityParser
LiquidityParserFactory creates a liquidity parser
type MemeEventParserFactory ΒΆ
type MemeEventParserFactory func( adapter *adapter.TransactionAdapter, transferActions map[string][]types.TransferData, ) parsers.EventParser
MemeEventParserFactory creates a meme event parser
type ParseCallback ΒΆ added in v1.2.0
type ParseCallback func(index int, tx *adapter.SolanaTransaction, result *types.ParseResult, err error) bool
ParseCallback defines the callback function type for batch parsing index: the index of the transaction in the batch tx: the transaction being parsed (may be nil) result: the parse result err: any error that occurred during parsing returns: true to continue processing, false to stop early
type PumpfunBuyData ΒΆ
type PumpfunBuyData struct {
Mint string `json:"mint"`
BondingCurve string `json:"bondingCurve"`
TokenAmount uint64 `json:"tokenAmount"`
SolAmount uint64 `json:"solAmount"`
User string `json:"user"`
}
PumpfunBuyData contains buy instruction data
type PumpfunCreateData ΒΆ
type PumpfunCreateData struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
URI string `json:"uri"`
Mint string `json:"mint"`
BondingCurve string `json:"bondingCurve"`
User string `json:"user"`
}
PumpfunCreateData contains create instruction data
type PumpfunInstruction ΒΆ
type PumpfunInstruction struct {
Type string `json:"type"`
Data interface{} `json:"data"`
Slot uint64 `json:"slot"`
Timestamp int64 `json:"timestamp"`
Signature string `json:"signature"`
Idx string `json:"idx"`
Signer []string `json:"signer"`
}
PumpfunInstruction represents a parsed Pumpfun instruction
type PumpfunInstructionParser ΒΆ
type PumpfunInstructionParser struct {
// contains filtered or unexported fields
}
PumpfunInstructionParser parses Pumpfun instructions
func NewPumpfunInstructionParser ΒΆ
func NewPumpfunInstructionParser(adapter *adapter.TransactionAdapter, classifier *classifier.InstructionClassifier) *PumpfunInstructionParser
NewPumpfunInstructionParser creates a new Pumpfun instruction parser
func (*PumpfunInstructionParser) ProcessInstructions ΒΆ
func (p *PumpfunInstructionParser) ProcessInstructions() []interface{}
ProcessInstructions processes all Pumpfun instructions
type PumpfunMigrateData ΒΆ
type PumpfunMigrateData struct {
Mint string `json:"mint"`
BondingCurve string `json:"bondingCurve"`
User string `json:"user"`
PoolMint string `json:"poolMint"`
QuoteMint string `json:"quoteMint"`
LpMint string `json:"lpMint"`
UserPoolTokenAccount string `json:"userPoolTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
}
PumpfunMigrateData contains migrate instruction data
type PumpfunSellData ΒΆ
type PumpfunSellData struct {
Mint string `json:"mint"`
BondingCurve string `json:"bondingCurve"`
TokenAmount uint64 `json:"tokenAmount"`
SolAmount uint64 `json:"solAmount"`
User string `json:"user"`
}
PumpfunSellData contains sell instruction data
type PumpswapAddLiquidityData ΒΆ
type PumpswapAddLiquidityData struct {
PoolMint string `json:"poolMint"`
User string `json:"user"`
BaseMint string `json:"baseMint"`
QuoteMint string `json:"quoteMint"`
LpMint string `json:"lpMint"`
UserBaseTokenAccount string `json:"userBaseTokenAccount"`
UserQuoteTokenAccount string `json:"userQuoteTokenAccount"`
UserPoolTokenAccount string `json:"userPoolTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
LpTokenAmountOut uint64 `json:"lpTokenAmountOut"`
MaxBaseAmountIn uint64 `json:"maxBaseAmountIn"`
MaxQuoteAmountIn uint64 `json:"maxQuoteAmountIn"`
}
PumpswapAddLiquidityData contains add liquidity instruction data
type PumpswapBuyInstructionData ΒΆ
type PumpswapBuyInstructionData struct {
PoolMint string `json:"poolMint"`
User string `json:"user"`
BaseMint string `json:"baseMint"`
QuoteMint string `json:"quoteMint"`
UserBaseTokenAccount string `json:"userBaseTokenAccount"`
UserQuoteTokenAccount string `json:"userQuoteTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
BaseAmountOut uint64 `json:"baseAmountOut"`
MaxQuoteAmountIn uint64 `json:"maxQuoteAmountIn"`
}
PumpswapBuyInstructionData contains buy instruction data
type PumpswapCreatePoolInstructionData ΒΆ
type PumpswapCreatePoolInstructionData struct {
PoolMint string `json:"poolMint"`
User string `json:"user"`
BaseMint string `json:"baseMint"`
QuoteMint string `json:"quoteMint"`
LpMint string `json:"lpMint"`
UserBaseTokenAccount string `json:"userBaseTokenAccount"`
UserQuoteTokenAccount string `json:"userQuoteTokenAccount"`
UserPoolTokenAccount string `json:"userPoolTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
BaseAmountIn uint64 `json:"baseAmountIn"`
QuoteAmountOut uint64 `json:"quoteAmountOut"`
}
PumpswapCreatePoolInstructionData contains create pool instruction data
type PumpswapInstruction ΒΆ
type PumpswapInstruction struct {
Type string `json:"type"`
Data interface{} `json:"data"`
Slot uint64 `json:"slot"`
Timestamp int64 `json:"timestamp"`
Signature string `json:"signature"`
Idx string `json:"idx"`
Signer []string `json:"signer"`
}
PumpswapInstruction represents a parsed Pumpswap instruction
type PumpswapInstructionParser ΒΆ
type PumpswapInstructionParser struct {
// contains filtered or unexported fields
}
PumpswapInstructionParser parses Pumpswap instructions
func NewPumpswapInstructionParser ΒΆ
func NewPumpswapInstructionParser(adapter *adapter.TransactionAdapter, classifier *classifier.InstructionClassifier) *PumpswapInstructionParser
NewPumpswapInstructionParser creates a new Pumpswap instruction parser
func (*PumpswapInstructionParser) ProcessInstructions ΒΆ
func (p *PumpswapInstructionParser) ProcessInstructions() []interface{}
ProcessInstructions processes all Pumpswap instructions
type PumpswapRemoveLiquidityData ΒΆ
type PumpswapRemoveLiquidityData struct {
PoolMint string `json:"poolMint"`
User string `json:"user"`
BaseMint string `json:"baseMint"`
QuoteMint string `json:"quoteMint"`
LpMint string `json:"lpMint"`
UserBaseTokenAccount string `json:"userBaseTokenAccount"`
UserQuoteTokenAccount string `json:"userQuoteTokenAccount"`
UserPoolTokenAccount string `json:"userPoolTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
LpTokenAmountIn uint64 `json:"lpTokenAmountIn"`
MinBaseAmountOut uint64 `json:"minBaseAmountOut"`
MinQuoteAmountOut uint64 `json:"minQuoteAmountOut"`
}
PumpswapRemoveLiquidityData contains remove liquidity instruction data
type PumpswapSellInstructionData ΒΆ
type PumpswapSellInstructionData struct {
PoolMint string `json:"poolMint"`
User string `json:"user"`
BaseMint string `json:"baseMint"`
QuoteMint string `json:"quoteMint"`
UserBaseTokenAccount string `json:"userBaseTokenAccount"`
UserQuoteTokenAccount string `json:"userQuoteTokenAccount"`
PoolBaseTokenAccount string `json:"poolBaseTokenAccount"`
PoolQuoteTokenAccount string `json:"poolQuoteTokenAccount"`
BaseAmountIn uint64 `json:"baseAmountIn"`
MinQuoteAmountOut uint64 `json:"minQuoteAmountOut"`
}
PumpswapSellInstructionData contains sell instruction data
type ShredInstructionParser ΒΆ
type ShredInstructionParser interface {
ProcessInstructions() []interface{}
}
ShredInstructionParser interface for instruction parsers
type ShredParser ΒΆ
type ShredParser struct {
}
ShredParser parses Solana Shred transactions (pre-execution instruction analysis)
func (*ShredParser) ParseAll ΒΆ
func (p *ShredParser) ParseAll(tx *adapter.SolanaTransaction, config *types.ParseConfig) *types.ParseShredResult
ParseAll parses both trades and liquidity events from transaction
type TradeParserFactory ΒΆ
type TradeParserFactory func( adapter *adapter.TransactionAdapter, dexInfo types.DexInfo, transferActions map[string][]types.TransferData, classifiedInstructions []types.ClassifiedInstruction, ) parsers.TradeParser
TradeParserFactory creates a trade parser
type TransferParserFactory ΒΆ
type TransferParserFactory func( adapter *adapter.TransactionAdapter, dexInfo types.DexInfo, transferActions map[string][]types.TransferData, classifiedInstructions []types.ClassifiedInstruction, ) parsers.TransferParser
TransferParserFactory creates a transfer parser
type YellowstoneAddressTableLookup ΒΆ added in v1.2.0
type YellowstoneAddressTableLookup struct {
AccountKey []byte
WritableIndexes []byte
ReadonlyIndexes []byte
}
YellowstoneAddressTableLookup represents address table lookup from gRPC
type YellowstoneHeader ΒΆ added in v1.2.0
type YellowstoneHeader struct {
NumRequiredSignatures int
NumReadonlySignedAccounts int
NumReadonlyUnsignedAccounts int
}
YellowstoneHeader represents the message header from gRPC
type YellowstoneInnerInstructionSet ΒΆ added in v1.2.0
type YellowstoneInnerInstructionSet struct {
Index int
Instructions []YellowstoneInstruction
}
YellowstoneInnerInstructionSet represents inner instructions from gRPC
type YellowstoneInstruction ΒΆ added in v1.2.0
YellowstoneInstruction represents an instruction from gRPC
type YellowstoneLoadedAddresses ΒΆ added in v1.2.0
YellowstoneLoadedAddresses represents loaded addresses from gRPC
type YellowstoneMessageData ΒΆ added in v1.2.0
type YellowstoneMessageData struct {
Header YellowstoneHeader
AccountKeys [][]byte
RecentBlockhash []byte
Instructions []YellowstoneInstruction
Versioned bool
AddressTableLookups []YellowstoneAddressTableLookup
}
YellowstoneMessageData represents the message data from gRPC
type YellowstoneReturnData ΒΆ added in v1.2.0
YellowstoneReturnData represents return data from gRPC
type YellowstoneTokenAmount ΒΆ added in v1.2.0
type YellowstoneTokenAmount struct {
Amount string
Decimals int
UiAmount *float64
UiAmountString string
}
YellowstoneTokenAmount represents token amount from gRPC
type YellowstoneTokenBalance ΒΆ added in v1.2.0
type YellowstoneTokenBalance struct {
AccountIndex int
Mint string
Owner string
UiTokenAmount YellowstoneTokenAmount
}
YellowstoneTokenBalance represents token balance from gRPC
type YellowstoneTransaction ΒΆ added in v1.2.0
type YellowstoneTransaction struct {
Signature []byte
IsVote bool
Transaction YellowstoneTransactionData
Meta YellowstoneTransactionMeta
}
YellowstoneTransaction represents a transaction from Yellowstone gRPC (Helius Laserstream/Triton)
type YellowstoneTransactionData ΒΆ added in v1.2.0
type YellowstoneTransactionData struct {
Signatures [][]byte
Message YellowstoneMessageData
}
YellowstoneTransactionData represents the transaction data from gRPC
type YellowstoneTransactionMeta ΒΆ added in v1.2.0
type YellowstoneTransactionMeta struct {
Err interface{}
Fee uint64
PreBalances []uint64
PostBalances []uint64
PreTokenBalances []YellowstoneTokenBalance
PostTokenBalances []YellowstoneTokenBalance
InnerInstructions []YellowstoneInnerInstructionSet
LogMessages []string
LoadedAddresses YellowstoneLoadedAddresses
ReturnData *YellowstoneReturnData
ComputeUnitsConsumed uint64
}
YellowstoneTransactionMeta represents the transaction metadata from gRPC