From 3b3760f0eb164693be6bad149715a4ff2b6d3204 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 23 Oct 2025 08:40:03 -0400 Subject: [PATCH 01/21] initial proposal --- pkg/types/chains/solana/lp_types.go | 157 ++++++++++++++ pkg/types/chains/solana/solana.go | 320 +++++++++++++++++++++++++++- pkg/types/relayer.go | 24 +++ 3 files changed, 499 insertions(+), 2 deletions(-) create mode 100644 pkg/types/chains/solana/lp_types.go diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go new file mode 100644 index 0000000000..65698febad --- /dev/null +++ b/pkg/types/chains/solana/lp_types.go @@ -0,0 +1,157 @@ +package solana + +import "time" + +const EventSignatureLength = 8 + +type EventSignature [EventSignatureLength]byte + +type EventIdl EventIDLTypes + +type EventIDLTypes struct { + Event IdlEvent + Types IdlTypeDefSlice +} + +type IdlEvent struct { + Name string `json:"name"` + Fields []IdlEventField `json:"fields"` +} + +type IdlEventField struct { + Name string `json:"name"` + Type IdlType `json:"type"` + Index bool `json:"index"` +} + +type IdlTypeDefSlice []IdlTypeDef + +type IdlTypeDef struct { + Name string `json:"name"` + Type IdlTypeDefTy `json:"type"` +} + +type IdlTypeDefTy struct { + Kind IdlTypeDefTyKind `json:"kind"` + + Fields *IdlTypeDefStruct `json:"fields,omitempty"` + Variants IdlEnumVariantSlice `json:"variants,omitempty"` + Codec string `json:"codec,omitempty"` +} + +type IdlField struct { + Name string `json:"name"` + Docs []string `json:"docs"` // @custom + Type IdlType `json:"type"` +} + +type IdlEnumVariantSlice []IdlEnumVariant + +type IdlEnumVariant struct { + Name string `json:"name"` + Docs []string `json:"docs"` // @custom + Fields *IdlEnumFields `json:"fields,omitempty"` +} + +type IdlEnumFields struct { + IdlEnumFieldsNamed *IdlEnumFieldsNamed + IdlEnumFieldsTuple *IdlEnumFieldsTuple +} + +type IdlEnumFieldsNamed []IdlField + +type IdlEnumFieldsTuple []IdlType + +type IdlTypeDefStruct = []IdlField + +// Wrapper type: +type IdlType struct { + AsString IdlTypeAsString + AsIdlTypeVec *IdlTypeVec + asIdlTypeOption *IdlTypeOption + AsIdlTypeDefined *IdlTypeDefined + AsIdlTypeArray *IdlTypeArray +} +type IdlTypeAsString string + +const ( + IdlTypeBool IdlTypeAsString = "bool" + IdlTypeU8 IdlTypeAsString = "u8" + IdlTypeI8 IdlTypeAsString = "i8" + IdlTypeU16 IdlTypeAsString = "u16" + IdlTypeI16 IdlTypeAsString = "i16" + IdlTypeU32 IdlTypeAsString = "u32" + IdlTypeI32 IdlTypeAsString = "i32" + IdlTypeU64 IdlTypeAsString = "u64" + IdlTypeI64 IdlTypeAsString = "i64" + IdlTypeU128 IdlTypeAsString = "u128" + IdlTypeI128 IdlTypeAsString = "i128" + IdlTypeBytes IdlTypeAsString = "bytes" + IdlTypeString IdlTypeAsString = "string" + IdlTypePublicKey IdlTypeAsString = "publicKey" + + // Custom additions: + IdlTypeUnixTimestamp IdlTypeAsString = "unixTimestamp" + IdlTypeHash IdlTypeAsString = "hash" + IdlTypeDuration IdlTypeAsString = "duration" +) + +type IdlTypeVec struct { + Vec IdlType `json:"vec"` +} + +type IdlTypeOption struct { + Option IdlType `json:"option"` +} + +// User defined type. +type IdlTypeDefined struct { + Defined string `json:"defined"` +} + +// Wrapper type: +type IdlTypeArray struct { + Thing IdlType + Num int +} + +type IdlTypeDefTyKind string + +const ( + IdlTypeDefTyKindStruct IdlTypeDefTyKind = "struct" + IdlTypeDefTyKindEnum IdlTypeDefTyKind = "enum" + IdlTypeDefTyKindCustom IdlTypeDefTyKind = "custom" +) + +type SubKeyPaths [][]string + +// matches cache-filter +// this filter defines what logs should be cached +// cached logs can be retrieved with [types.SolanaService.QueryLogsFromCache] +type LPFilterQuery struct { + Name string + Address PublicKey + EventName string + EventSig EventSignature + StartingBlock int64 + EventIdl EventIdl + SubkeyPaths SubKeyPaths + Retention time.Duration + MaxLogsKept int64 + IncludeReverted bool +} + +// matches lp-parsed solana logs +type Log struct { + ChainID string + LogIndex int64 + BlockHash Hash + BlockNumber int64 + BlockTimestamp time.Time + Address PublicKey + EventSig EventSignature + TxHash Signature + Data []byte + SequenceNum int64 + Error *string +} diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index fd7b795a96..c955726534 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -1,14 +1,330 @@ package solana +import ( + "context" + "math/big" + + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" +) + const ( PublicKeyLength = 32 + SignatureLength = 64 ) -// represents solana-style AccountsMeta +// represents solana-go PublicKey +type PublicKey [PublicKeyLength]byte + +// represents solana-go Signature +type Signature [SignatureLength]byte + +// represents solana-go Hash +type Hash PublicKey + +// represents solana-go AccountsMeta type AccountMeta struct { - PublicKey [PublicKeyLength]byte + PublicKey PublicKey IsWritable bool IsSigner bool } +// represents solana-go AccountMetaSlice type AccountMetaSlice []*AccountMeta + +// represents solana-go EncodingType +type EncodingType string + +const ( + EncodingBase58 EncodingType = "base58" // limited to Account data of less than 129 bytes + EncodingBase64 EncodingType = "base64" // will return base64 encoded data for Account data of any size + EncodingBase64Zstd EncodingType = "base64+zstd" // compresses the Account data using Zstandard and base64-encodes the result + + // attempts to use program-specific state parsers to + // return more human-readable and explicit account state data. + // If "jsonParsed" is requested but a parser cannot be found, + // the field falls back to "base64" encoding, detectable when the data field is type . + // Cannot be used if specifying dataSlice parameters (offset, length). + EncodingJSONParsed EncodingType = "jsonParsed" + + EncodingJSON EncodingType = "json" // NOTE: you're probably looking for EncodingJSONParsed +) + +// represents solana-go DataSlice +type DataSlice struct { + Offset *uint64 + Length *uint64 +} + +// represents solana-go GetAccountInfoOpts +type GetAccountInfoOpts struct { + // Encoding for Account data. + // Either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". + // - "base58" is limited to Account data of less than 129 bytes. + // - "base64" will return base64 encoded data for Account data of any size. + // - "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. + // - "jsonParsed" encoding attempts to use program-specific state parsers to return more + // human-readable and explicit account state data. If "jsonParsed" is requested but a parser + // cannot be found, the field falls back to "base64" encoding, + // detectable when the data field is type . + // + // This parameter is optional. + Encoding EncodingType + + // Commitment requirement. + // + // This parameter is optional. Default value is Finalized + ConfidenceLevel primitives.ConfidenceLevel + + // dataSlice parameters for limiting returned account data: + // Limits the returned account data using the provided offset and length fields; + // only available for "base58", "base64" or "base64+zstd" encodings. + // + // This parameter is optional. + DataSlice *DataSlice + + // The minimum slot that the request can be evaluated at. + // This parameter is optional. + MinContextSlot *uint64 +} + +type Context struct { + Slot uint64 +} + +// represents solana-go RPCContext +type RPCContext struct { + Context Context +} + +// represents solana-go Account +type Account struct { + // Number of lamports assigned to this account + Lamports uint64 + + // Pubkey of the program this account has been assigned to + Owner PublicKey + + // Data associated with the account, either as encoded binary data or JSON format {: }, depending on encoding parameter + Data []byte // TODO + + // Boolean indicating if the account contains a program (and is strictly read-only) + Executable bool + + // The epoch at which this account will next owe rent + RentEpoch *big.Int + + // The amount of storage space required to store the token account + Space uint64 +} + +// represents solana-go TransactionDetailsType +type TransactionDetailsType string + +const ( + TransactionDetailsFull TransactionDetailsType = "full" + TransactionDetailsSignatures TransactionDetailsType = "signatures" + TransactionDetailsNone TransactionDetailsType = "none" + TransactionDetailsAccounts TransactionDetailsType = "accounts" +) + +type TransactionVersion int + +const ( + LegacyTransactionVersion TransactionVersion = -1 + legacyVersion = `"legacy"` +) + +type TransactionWithMeta struct { + // The slot this transaction was processed in. + Slot uint64 + + // Estimated production time, as Unix timestamp (seconds since the Unix epoch) + // of when the transaction was processed. + // Nil if not available. + BlockTime *UnixTimeSeconds + + Transaction *DataBytesOrJSON `json:"transaction"` + + // Transaction status metadata object + Meta *TransactionMeta `json:"meta,omitempty"` + Version TransactionVersion `json:"version"` +} + +// represents solana-go GetBlockOpts +type GetBlockOpts struct { + // Encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". + // If parameter not provided, the default encoding is "json". + // - "jsonParsed" encoding attempts to use program-specific instruction parsers to return + // more human-readable and explicit data in the transaction.message.instructions list. + // - If "jsonParsed" is requested but a parser cannot be found, the instruction falls back + // to regular JSON encoding (accounts, data, and programIdIndex fields). + // + // This parameter is optional. + Encoding EncodingType + + // Level of transaction detail to return. + // If parameter not provided, the default detail level is "full". + // + // This parameter is optional. + TransactionDetails TransactionDetailsType + + // Whether to populate the rewards array. + // If parameter not provided, the default includes rewards. + // + // This parameter is optional. + Rewards *bool + + // "processed" is not supported. + // If parameter not provided, the default is "finalized". + // + // This parameter is optional. + ConfidenceLevel primitives.ConfidenceLevel + + // Max transaction version to return in responses. + // If the requested block contains a transaction with a higher version, an error will be returned. + MaxSupportedTransactionVersion *uint64 +} + +var ( + MaxSupportedTransactionVersion0 uint64 = 0 + MaxSupportedTransactionVersion1 uint64 = 1 +) + +// UnixTimeSeconds represents a UNIX second-resolution timestamp. +type UnixTimeSeconds int64 + +type GetMultipleAccountsOpts GetAccountInfoOpts + +type GetAccountInfoRequest struct { + Account PublicKey + Opts *GetAccountInfoOpts +} + +type GetAccountInfoReply struct { + RPCContext + Value *Account +} + +type GetMultipleAccountsRequest struct { + Accounts []PublicKey + Opts *GetMultipleAccountsOpts +} + +type GetMultipleAccountsReply struct { + RPCContext + Value []*Account +} + +type GetBlockTimeRequest struct { + //TODO +} + +type GetBlockTimeReply struct { + //TODO +} + +type GetBalanceRequest struct { + Addr PublicKey + ConfidenceLevel primitives.ConfidenceLevel +} + +type GetBalanceReply struct { + // Balance in lamports + Value uint64 +} + +type GetBlockRequest struct { + Slot uint64 + Opts *GetBlockOpts +} + +type GetBlockReply struct { + // The blockhash of this block. + Blockhash Hash + + // The blockhash of this block's parent; + // if the parent block is not available due to ledger cleanup, + // this field will return "11111111111111111111111111111111". + PreviousBlockhash Hash + + // The slot index of this block's parent. + ParentSlot uint64 + + // Present if "full" transaction details are requested. + Transactions []TransactionWithMeta + + // Present if "signatures" are requested for transaction details; + // an array of signatures, corresponding to the transaction order in the block. + Signatures []Signature + + // Estimated production time, as Unix timestamp (seconds since the Unix epoch). + // Nil if not available. + BlockTime *int64 + + // The number of blocks beneath this block. + BlockHeight *UnixTimeSeconds +} + +type GetBlockHeightRequest struct { + // TODO +} + +type GetBlockHeightReply struct { + // TODO +} + +type GetTransactionRequest struct { + // TODO +} + +type GetTransactionReply struct { + //TODO +} + +type GetFeeForMessageRequest struct { + //TODO +} + +type GetFeeForMessageReply struct { + //TODO +} + +type GetLatestBlockhashRequest struct { + // TODO +} + +type GetLatestBlockhashReply struct { + // TODO +} + +type Client interface { + GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) + GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) + GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) + GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) + GetBlockHeight(ctx context.Context, req GetBlockRequest) (*GetBlockHeightReply, error) + GetBlockTime(ctx context.Context, req GetBlockTimeRequest) (*GetBlockTimeReply, error) + GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) + GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) + GetLatestBlockHash(ctx context.Context, req GetLatestBlockhashRequest) (*GetLatestBlockhashReply, error) +} + +type SubmitTransactionRequest struct { + Receiver PublicKey + + // base64 encoded transaction + Payload string +} + +// TransactionStatus is the result of the transaction sent to the chain +type TransactionStatus int + +const ( +// TODO define TransactionStatus enum +) + +type SubmitTransactionReply struct { + Signature Signature + IdempotencyKey string + Status TransactionStatus +} diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index f6112b948a..59aa8a1668 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -11,6 +11,7 @@ import ( "google.golang.org/grpc/status" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" @@ -224,6 +225,29 @@ type TONService interface { UnregisterFilter(ctx context.Context, name string) error } +type SolanaService interface { + solana.Client + + SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) + + // RegisterLogTracking registers a persistent log filter for tracking and caching logs + // based on the provided filter parameters. Once registered, matching logs will be collected + // over time and stored in a cache for future querying. + // noop guaranteed when filter.Name exists + RegisterLogTracking(ctx context.Context, req solana.LPFilterQuery) error + + // UnregisterLogTracking removes a previously registered log filter by its name. + // After removal, logs matching this filter will no longer be collected or cached. + // noop guaranteed when filterName doesn't exist + UnregisterLogTracking(ctx context.Context, filterName string) error + + // QueryTrackedLogs retrieves logs from the log storage based on the provided + // query expression, sorting, and confidence level. It only returns logs that were + // collected through previously registered log filters. + QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, + limitAndSort query.LimitAndSort, confidenceLevel primitives.ConfidenceLevel) ([]*solana.Log, error) +} + // Relayer extends ChainService with providers for each product. type Relayer interface { ChainService From 7bd93c6cd4d3174133cd1c98bbe8651fdec6c0eb Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Mon, 27 Oct 2025 07:11:15 -0400 Subject: [PATCH 02/21] define solana client types --- pkg/types/chains/solana/solana.go | 200 +++++++++++++++++++-------- pkg/types/chains/solana/txm_types.go | 31 +++++ pkg/types/relayer.go | 8 ++ 3 files changed, 185 insertions(+), 54 deletions(-) create mode 100644 pkg/types/chains/solana/txm_types.go diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index c955726534..ff2ff22b77 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -3,8 +3,6 @@ package solana import ( "context" "math/big" - - "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" ) const ( @@ -49,6 +47,25 @@ const ( EncodingJSON EncodingType = "json" // NOTE: you're probably looking for EncodingJSONParsed ) +// represents solana-go CommitmentType +type CommitmentType string + +const ( + // The node will query the most recent block confirmed by supermajority + // of the cluster as having reached maximum lockout, + // meaning the cluster has recognized this block as finalized. + CommitmentFinalized CommitmentType = "finalized" + + // The node will query the most recent block that has been voted on by supermajority of the cluster. + // - It incorporates votes from gossip and replay. + // - It does not count votes on descendants of a block, only direct votes on that block. + // - This confirmation level also upholds "optimistic confirmation" guarantees in release 1.3 and onwards. + CommitmentConfirmed CommitmentType = "confirmed" + + // The node will query its most recent block. Note that the block may still be skipped by the cluster. + CommitmentProcessed CommitmentType = "processed" +) + // represents solana-go DataSlice type DataSlice struct { Offset *uint64 @@ -73,7 +90,7 @@ type GetAccountInfoOpts struct { // Commitment requirement. // // This parameter is optional. Default value is Finalized - ConfidenceLevel primitives.ConfidenceLevel + Commitment CommitmentType // dataSlice parameters for limiting returned account data: // Limits the returned account data using the provided offset and length fields; @@ -105,7 +122,7 @@ type Account struct { Owner PublicKey // Data associated with the account, either as encoded binary data or JSON format {: }, depending on encoding parameter - Data []byte // TODO + Data *DataBytesOrJSON // Boolean indicating if the account contains a program (and is strictly read-only) Executable bool @@ -134,6 +151,14 @@ const ( legacyVersion = `"legacy"` ) +type ConfirmationStatusType string + +const ( + ConfirmationStatusProcessed ConfirmationStatusType = "processed" + ConfirmationStatusConfirmed ConfirmationStatusType = "confirmed" + ConfirmationStatusFinalized ConfirmationStatusType = "finalized" +) + type TransactionWithMeta struct { // The slot this transaction was processed in. Slot uint64 @@ -143,11 +168,12 @@ type TransactionWithMeta struct { // Nil if not available. BlockTime *UnixTimeSeconds - Transaction *DataBytesOrJSON `json:"transaction"` + // Encoded Transaction + Transaction *DataBytesOrJSON + // JSON encoded solana-go TransactionMeta + MetaJSON []byte - // Transaction status metadata object - Meta *TransactionMeta `json:"meta,omitempty"` - Version TransactionVersion `json:"version"` + Version TransactionVersion } // represents solana-go GetBlockOpts @@ -178,7 +204,7 @@ type GetBlockOpts struct { // If parameter not provided, the default is "finalized". // // This parameter is optional. - ConfidenceLevel primitives.ConfidenceLevel + Commitment CommitmentType // Max transaction version to return in responses. // If the requested block contains a transaction with a higher version, an error will be returned. @@ -195,6 +221,36 @@ type UnixTimeSeconds int64 type GetMultipleAccountsOpts GetAccountInfoOpts +type SimulateTransactionAccountsOpts struct { + // (optional) Encoding for returned Account data, + // either "base64" (default), "base64+zstd" or "jsonParsed". + // - "jsonParsed" encoding attempts to use program-specific state parsers + // to return more human-readable and explicit account state data. + // If "jsonParsed" is requested but a parser cannot be found, + // the field falls back to binary encoding, detectable when + // the data field is type . + Encoding EncodingType + + // An array of accounts to return. + Addresses []PublicKey +} + +type SimulateTXOpts struct { + // If true the transaction signatures will be verified + // (default: false, conflicts with ReplaceRecentBlockhash) + SigVerify bool + + // Commitment level to simulate the transaction at. + // (default: "finalized"). + Commitment CommitmentType + + // If true the transaction recent blockhash will be replaced with the most recent blockhash. + // (default: false, conflicts with SigVerify) + ReplaceRecentBlockhash bool + + Accounts *SimulateTransactionAccountsOpts +} + type GetAccountInfoRequest struct { Account PublicKey Opts *GetAccountInfoOpts @@ -215,17 +271,9 @@ type GetMultipleAccountsReply struct { Value []*Account } -type GetBlockTimeRequest struct { - //TODO -} - -type GetBlockTimeReply struct { - //TODO -} - type GetBalanceRequest struct { - Addr PublicKey - ConfidenceLevel primitives.ConfidenceLevel + Addr PublicKey + Commitment CommitmentType } type GetBalanceReply struct { @@ -238,6 +286,15 @@ type GetBlockRequest struct { Opts *GetBlockOpts } +// Will contain a AsJSON if the requested encoding is `solana.EncodingJSON` +// (which is also the default when the encoding is not specified), +// or a `AsDecodedBinary` in case of EncodingBase58, EncodingBase64. +type DataBytesOrJSON struct { + RawDataEncoding EncodingType + AsDecodedBinary []byte + AsJSON []byte +} + type GetBlockReply struct { // The blockhash of this block. Blockhash Hash @@ -259,72 +316,107 @@ type GetBlockReply struct { // Estimated production time, as Unix timestamp (seconds since the Unix epoch). // Nil if not available. - BlockTime *int64 + BlockTime *UnixTimeSeconds // The number of blocks beneath this block. - BlockHeight *UnixTimeSeconds + BlockHeight *uint64 } -type GetBlockHeightRequest struct { - // TODO +type GetSlotHeightRequest struct { + Commitment CommitmentType } -type GetBlockHeightReply struct { - // TODO +type GetSlotHeightReply struct { + Height uint64 } type GetTransactionRequest struct { - // TODO + Signature Signature } type GetTransactionReply struct { - //TODO + // Encoded TransactionResultEnvelope + Transaction []byte + + // JSON encoded TransactionMeta + Meta []byte } type GetFeeForMessageRequest struct { - //TODO + // base64 encoded message + Message string + Commitment CommitmentType } type GetFeeForMessageReply struct { - //TODO + // The amount in lamports the network will charge for a particular message + Fee uint64 } type GetLatestBlockhashRequest struct { - // TODO + Commitment CommitmentType } type GetLatestBlockhashReply struct { - // TODO + RPCContext + Hash Signature + LastValidBlockHeight uint64 } -type Client interface { - GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) - GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) - GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) - GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) - GetBlockHeight(ctx context.Context, req GetBlockRequest) (*GetBlockHeightReply, error) - GetBlockTime(ctx context.Context, req GetBlockTimeRequest) (*GetBlockTimeReply, error) - GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) - GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) - GetLatestBlockHash(ctx context.Context, req GetLatestBlockhashRequest) (*GetLatestBlockhashReply, error) +type SimulateTXRequest struct { + Receiver PublicKey + EncodedTransaction string + Opts *SimulateTXOpts } -type SubmitTransactionRequest struct { - Receiver PublicKey +type SimulateTXReply struct { + // Error if transaction failed, null if transaction succeeded. + Err *string + + // Array of log messages the transaction instructions output during execution, + // null if simulation failed before the transaction was able to execute + // (for example due to an invalid blockhash or signature verification failure) + Logs []string + + // Array of accounts with the same length as the accounts.addresses array in the request. + Accounts []*Account - // base64 encoded transaction - Payload string + // The number of compute budget units consumed during the processing of this transaction. + UnitsConsumed *uint64 } -// TransactionStatus is the result of the transaction sent to the chain -type TransactionStatus int +type GetSignatureStatusesRequest struct { + Sigs []Signature +} -const ( -// TODO define TransactionStatus enum -) +type GetSignatureStatusesResult struct { + // The slot the transaction was processed. + Slot uint64 `json:"slot"` -type SubmitTransactionReply struct { - Signature Signature - IdempotencyKey string - Status TransactionStatus + // Number of blocks since signature confirmation, + // null if rooted or finalized by a supermajority of the cluster. + Confirmations *uint64 `json:"confirmations"` + + // Error if transaction failed, null if transaction succeeded. + Err *string + + // The transaction's cluster confirmation status; either processed, confirmed, or finalized. + ConfirmationStatus ConfirmationStatusType `json:"confirmationStatus"` +} + +type GetSignatureStatusesReply struct { + Results []GetSignatureStatusesResult +} + +type Client interface { + GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) + GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) + GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) + GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) + GetSlotHeight(ctx context.Context, req GetSlotHeightRequest) (*GetSlotHeightReply, error) + GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) + GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) + GetLatestBlockhash(ctx context.Context, req GetLatestBlockhashRequest) (*GetLatestBlockhashReply, error) + GetSignatureStatuses(ctx context.Context, req GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) + SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) } diff --git a/pkg/types/chains/solana/txm_types.go b/pkg/types/chains/solana/txm_types.go new file mode 100644 index 0000000000..5426a8e08c --- /dev/null +++ b/pkg/types/chains/solana/txm_types.go @@ -0,0 +1,31 @@ +package solana + +type SubmitTransactionRequest struct { + Receiver PublicKey + EncodedTransaction string // base64 encoded transaction +} + +// TransactionStatus is the result of the transaction sent to the chain +type TransactionStatus int + +const ( + // Transaction processing failed due to a network issue, RPC issue, or other fatal error + TxFatal TransactionStatus = iota + // Transaction was sent successfully to the chain but the program execution was aborted + TxAborted + // Transaction was sent successfully to the chain, program was succesfully executed and mined into a block. + TxSuccess +) + +type ComputeConfig struct { + // Default to nil. If not specified the value configured in GasEstimator will be used + ComputeLimit *uint32 + // Default to nil. If not specified the value configured in GasEstimator will be used + ComputeMaxPrice *uint64 +} + +type SubmitTransactionReply struct { + Signature Signature + IdempotencyKey string + Status TransactionStatus +} diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index 59aa8a1668..7319217a38 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -228,6 +228,7 @@ type TONService interface { type SolanaService interface { solana.Client + // Submits a transaction to the chain. It will return once the transaction is finalized or an error occurs. SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) // RegisterLogTracking registers a persistent log filter for tracking and caching logs @@ -256,6 +257,9 @@ type Relayer interface { EVM() (EVMService, error) // TON returns TONService that provides access to TON specific functionalities TON() (TONService, error) + + Solana() (SolanaService, error) + // NewContractWriter returns a new ContractWriter. // The format of config depends on the implementation. NewContractWriter(ctx context.Context, config []byte) (ContractWriter, error) @@ -342,6 +346,10 @@ func (u *UnimplementedRelayer) TON() (TONService, error) { return nil, status.Errorf(codes.Unimplemented, "method TON not implemented") } +func (u *UnimplementedRelayer) Solana() (SolanaService, error) { + return nil, status.Errorf(codes.Unimplemented, "method TON not implemented") +} + func (u *UnimplementedRelayer) NewContractWriter(ctx context.Context, config []byte) (ContractWriter, error) { return nil, status.Errorf(codes.Unimplemented, "method NewContractWriter not implemented") } From 1e68f3cc53a1beca6c0ecea46675628245fba2f8 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 12 Nov 2025 09:20:13 -0500 Subject: [PATCH 03/21] adjust solana types --- pkg/types/chains/solana/lp_types.go | 2 +- pkg/types/chains/solana/solana.go | 7 ++++--- pkg/types/relayer.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index 65698febad..38e6304a15 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -134,7 +134,7 @@ type LPFilterQuery struct { EventName string EventSig EventSignature StartingBlock int64 - EventIdl EventIdl + EventIdlJSON []byte SubkeyPaths SubKeyPaths Retention time.Duration MaxLogsKept int64 diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index ff2ff22b77..f3f183391a 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -364,14 +364,15 @@ type GetLatestBlockhashReply struct { } type SimulateTXRequest struct { - Receiver PublicKey + Receiver PublicKey + // Encoded EncodedTransaction string Opts *SimulateTXOpts } type SimulateTXReply struct { - // Error if transaction failed, null if transaction succeeded. - Err *string + // Error if transaction failed, empty if transaction succeeded. + Err string // Array of log messages the transaction instructions output during execution, // null if simulation failed before the transaction was able to execute diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index 7319217a38..823c90c4d3 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -246,7 +246,7 @@ type SolanaService interface { // query expression, sorting, and confidence level. It only returns logs that were // collected through previously registered log filters. QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, - limitAndSort query.LimitAndSort, confidenceLevel primitives.ConfidenceLevel) ([]*solana.Log, error) + limitAndSort query.LimitAndSort) ([]*solana.Log, error) } // Relayer extends ChainService with providers for each product. From 93c2d9369b592474e9345bd1e8d2f0bbce5fd2a1 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Fri, 14 Nov 2025 08:15:31 -0500 Subject: [PATCH 04/21] adjust types --- pkg/types/chains/solana/solana.go | 16 ++++++++++------ pkg/types/chains/solana/txm_types.go | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index f3f183391a..278d8fa040 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -335,15 +335,20 @@ type GetTransactionRequest struct { } type GetTransactionReply struct { - // Encoded TransactionResultEnvelope - Transaction []byte + Slot uint64 + + BlockTime *UnixTimeSeconds + + Version TransactionVersion + // JSON Encoded TransactionResultEnvelope + TransactionEnvelope []byte // JSON encoded TransactionMeta Meta []byte } type GetFeeForMessageRequest struct { - // base64 encoded message + // base58 encoded message Message string Commitment CommitmentType } @@ -398,8 +403,8 @@ type GetSignatureStatusesResult struct { // null if rooted or finalized by a supermajority of the cluster. Confirmations *uint64 `json:"confirmations"` - // Error if transaction failed, null if transaction succeeded. - Err *string + // Error if transaction failed, empty if transaction succeeded. + Err string // The transaction's cluster confirmation status; either processed, confirmed, or finalized. ConfirmationStatus ConfirmationStatusType `json:"confirmationStatus"` @@ -417,7 +422,6 @@ type Client interface { GetSlotHeight(ctx context.Context, req GetSlotHeightRequest) (*GetSlotHeightReply, error) GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) - GetLatestBlockhash(ctx context.Context, req GetLatestBlockhashRequest) (*GetLatestBlockhashReply, error) GetSignatureStatuses(ctx context.Context, req GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) } diff --git a/pkg/types/chains/solana/txm_types.go b/pkg/types/chains/solana/txm_types.go index 5426a8e08c..d7f4004e76 100644 --- a/pkg/types/chains/solana/txm_types.go +++ b/pkg/types/chains/solana/txm_types.go @@ -1,6 +1,7 @@ package solana type SubmitTransactionRequest struct { + Cfg *ComputeConfig Receiver PublicKey EncodedTransaction string // base64 encoded transaction } From 6e9dc2101387561b514a225666e30f5e9dd3a963 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Mon, 17 Nov 2025 08:24:26 -0500 Subject: [PATCH 05/21] add primitives and generate protos --- pkg/chains/solana/generate.go | 2 + pkg/chains/solana/generate/main.go | 11 + pkg/chains/solana/solana.pb.go | 3249 +++++++++++++++++++ pkg/chains/solana/solana.proto | 298 ++ pkg/chains/solana/solana_grpc.pb.go | 577 ++++ pkg/types/chains/solana/lp_types.go | 3 + pkg/types/query/primitives/solana/solana.go | 72 + 7 files changed, 4212 insertions(+) create mode 100644 pkg/chains/solana/generate.go create mode 100644 pkg/chains/solana/generate/main.go create mode 100644 pkg/chains/solana/solana.pb.go create mode 100644 pkg/chains/solana/solana.proto create mode 100644 pkg/chains/solana/solana_grpc.pb.go create mode 100644 pkg/types/query/primitives/solana/solana.go diff --git a/pkg/chains/solana/generate.go b/pkg/chains/solana/generate.go new file mode 100644 index 0000000000..874e6fb974 --- /dev/null +++ b/pkg/chains/solana/generate.go @@ -0,0 +1,2 @@ +//go:generate go run ./generate +package solana diff --git a/pkg/chains/solana/generate/main.go b/pkg/chains/solana/generate/main.go new file mode 100644 index 0000000000..2eb8b5211c --- /dev/null +++ b/pkg/chains/solana/generate/main.go @@ -0,0 +1,11 @@ +package main + +import "github.com/smartcontractkit/chainlink-protos/cre/go/installer/pkg" + +func main() { + gen := &pkg.ProtocGen{Plugins: []pkg.Plugin{pkg.GoPlugin, {Name: "go-grpc"}}} + gen.AddSourceDirectories("../..", ".") + if err := gen.GenerateFile("solana.proto", "."); err != nil { + panic(err) + } +} diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go new file mode 100644 index 0000000000..b895f7d5d4 --- /dev/null +++ b/pkg/chains/solana/solana.pb.go @@ -0,0 +1,3249 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v5.29.3 +// source: solana.proto + +package solana + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Account struct { + state protoimpl.MessageState `protogen:"open.v1"` + Lamports uint64 `protobuf:"varint,1,opt,name=lamports,proto3" json:"lamports,omitempty"` + Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Data *DataBytesOrJSON `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"` + RentEpoch int64 `protobuf:"varint,5,opt,name=rent_epoch,json=rentEpoch,proto3" json:"rent_epoch,omitempty"` + Space uint64 `protobuf:"varint,6,opt,name=space,proto3" json:"space,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Account) Reset() { + *x = Account{} + mi := &file_solana_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{0} +} + +func (x *Account) GetLamports() uint64 { + if x != nil { + return x.Lamports + } + return 0 +} + +func (x *Account) GetOwner() []byte { + if x != nil { + return x.Owner + } + return nil +} + +func (x *Account) GetData() *DataBytesOrJSON { + if x != nil { + return x.Data + } + return nil +} + +func (x *Account) GetExecutable() bool { + if x != nil { + return x.Executable + } + return false +} + +func (x *Account) GetRentEpoch() int64 { + if x != nil { + return x.RentEpoch + } + return 0 +} + +func (x *Account) GetSpace() uint64 { + if x != nil { + return x.Space + } + return 0 +} + +type Address struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Address) Reset() { + *x = Address{} + mi := &file_solana_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Address) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Address) ProtoMessage() {} + +func (x *Address) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Address.ProtoReflect.Descriptor instead. +func (*Address) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{1} +} + +func (x *Address) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +type BoolExpression struct { + state protoimpl.MessageState `protogen:"open.v1"` + Expressions []*Expression `protobuf:"bytes,1,rep,name=expressions,proto3" json:"expressions,omitempty"` + BoolOperator int64 `protobuf:"varint,2,opt,name=bool_operator,json=boolOperator,proto3" json:"bool_operator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolExpression) Reset() { + *x = BoolExpression{} + mi := &file_solana_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolExpression) ProtoMessage() {} + +func (x *BoolExpression) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolExpression.ProtoReflect.Descriptor instead. +func (*BoolExpression) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{2} +} + +func (x *BoolExpression) GetExpressions() []*Expression { + if x != nil { + return x.Expressions + } + return nil +} + +func (x *BoolExpression) GetBoolOperator() int64 { + if x != nil { + return x.BoolOperator + } + return 0 +} + +type ComputeConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + ComputeLimit uint32 `protobuf:"varint,1,opt,name=compute_limit,json=computeLimit,proto3" json:"compute_limit,omitempty"` + ComputeMaxPrice uint64 `protobuf:"varint,2,opt,name=compute_max_price,json=computeMaxPrice,proto3" json:"compute_max_price,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ComputeConfig) Reset() { + *x = ComputeConfig{} + mi := &file_solana_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ComputeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputeConfig) ProtoMessage() {} + +func (x *ComputeConfig) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputeConfig.ProtoReflect.Descriptor instead. +func (*ComputeConfig) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{3} +} + +func (x *ComputeConfig) GetComputeLimit() uint32 { + if x != nil { + return x.ComputeLimit + } + return 0 +} + +func (x *ComputeConfig) GetComputeMaxPrice() uint64 { + if x != nil { + return x.ComputeMaxPrice + } + return 0 +} + +type Context struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Context) Reset() { + *x = Context{} + mi := &file_solana_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Context) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Context) ProtoMessage() {} + +func (x *Context) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Context.ProtoReflect.Descriptor instead. +func (*Context) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{4} +} + +func (x *Context) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +type DataBytesOrJSON struct { + state protoimpl.MessageState `protogen:"open.v1"` + RawDataEncoding string `protobuf:"bytes,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3" json:"raw_data_encoding,omitempty"` + AsDecodedBinary []byte `protobuf:"bytes,2,opt,name=as_decoded_binary,json=asDecodedBinary,proto3" json:"as_decoded_binary,omitempty"` + AsJson []byte `protobuf:"bytes,3,opt,name=as_json,json=asJson,proto3" json:"as_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataBytesOrJSON) Reset() { + *x = DataBytesOrJSON{} + mi := &file_solana_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataBytesOrJSON) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataBytesOrJSON) ProtoMessage() {} + +func (x *DataBytesOrJSON) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataBytesOrJSON.ProtoReflect.Descriptor instead. +func (*DataBytesOrJSON) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{5} +} + +func (x *DataBytesOrJSON) GetRawDataEncoding() string { + if x != nil { + return x.RawDataEncoding + } + return "" +} + +func (x *DataBytesOrJSON) GetAsDecodedBinary() []byte { + if x != nil { + return x.AsDecodedBinary + } + return nil +} + +func (x *DataBytesOrJSON) GetAsJson() []byte { + if x != nil { + return x.AsJson + } + return nil +} + +type DataSlice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataSlice) Reset() { + *x = DataSlice{} + mi := &file_solana_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataSlice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataSlice) ProtoMessage() {} + +func (x *DataSlice) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataSlice.ProtoReflect.Descriptor instead. +func (*DataSlice) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{6} +} + +func (x *DataSlice) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *DataSlice) GetLength() uint64 { + if x != nil { + return x.Length + } + return 0 +} + +type EventByTopic struct { + state protoimpl.MessageState `protogen:"open.v1"` + Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` + HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventByTopic) Reset() { + *x = EventByTopic{} + mi := &file_solana_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventByTopic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventByTopic) ProtoMessage() {} + +func (x *EventByTopic) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventByTopic.ProtoReflect.Descriptor instead. +func (*EventByTopic) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{7} +} + +func (x *EventByTopic) GetTopic() uint64 { + if x != nil { + return x.Topic + } + return 0 +} + +func (x *EventByTopic) GetHashedValueComparers() []*HashedValueComparator { + if x != nil { + return x.HashedValueComparers + } + return nil +} + +type Expression struct { + state protoimpl.MessageState `protogen:"open.v1"` + Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3" json:"primitive,omitempty"` + BoolExpression *BoolExpression `protobuf:"bytes,2,opt,name=bool_expression,json=boolExpression,proto3" json:"bool_expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Expression) Reset() { + *x = Expression{} + mi := &file_solana_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Expression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Expression) ProtoMessage() {} + +func (x *Expression) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Expression.ProtoReflect.Descriptor instead. +func (*Expression) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{8} +} + +func (x *Expression) GetPrimitive() *Primitive { + if x != nil { + return x.Primitive + } + return nil +} + +func (x *Expression) GetBoolExpression() *BoolExpression { + if x != nil { + return x.BoolExpression + } + return nil +} + +type GetAccountInfoOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountInfoOpts) Reset() { + *x = GetAccountInfoOpts{} + mi := &file_solana_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountInfoOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountInfoOpts) ProtoMessage() {} + +func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountInfoOpts.ProtoReflect.Descriptor instead. +func (*GetAccountInfoOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{9} +} + +func (x *GetAccountInfoOpts) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *GetAccountInfoOpts) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +func (x *GetAccountInfoOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil +} + +func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { + if x != nil { + return x.MinContextSlot + } + return 0 +} + +type GetAccountInfoWithOptsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` + Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountInfoWithOptsReply) Reset() { + *x = GetAccountInfoWithOptsReply{} + mi := &file_solana_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountInfoWithOptsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountInfoWithOptsReply) ProtoMessage() {} + +func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountInfoWithOptsReply.ProtoReflect.Descriptor instead. +func (*GetAccountInfoWithOptsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{10} +} + +func (x *GetAccountInfoWithOptsReply) GetRPCContext() *RPCContext { + if x != nil { + return x.RPCContext + } + return nil +} + +func (x *GetAccountInfoWithOptsReply) GetValue() *Account { + if x != nil { + return x.Value + } + return nil +} + +type GetAccountInfoWithOptsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Opts *GetAccountInfoOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountInfoWithOptsRequest) Reset() { + *x = GetAccountInfoWithOptsRequest{} + mi := &file_solana_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountInfoWithOptsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountInfoWithOptsRequest) ProtoMessage() {} + +func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountInfoWithOptsRequest.ProtoReflect.Descriptor instead. +func (*GetAccountInfoWithOptsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{11} +} + +func (x *GetAccountInfoWithOptsRequest) GetAccount() []byte { + if x != nil { + return x.Account + } + return nil +} + +func (x *GetAccountInfoWithOptsRequest) GetOpts() *GetAccountInfoOpts { + if x != nil { + return x.Opts + } + return nil +} + +type GetBalanceReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBalanceReply) Reset() { + *x = GetBalanceReply{} + mi := &file_solana_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBalanceReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBalanceReply) ProtoMessage() {} + +func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalanceReply.ProtoReflect.Descriptor instead. +func (*GetBalanceReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{12} +} + +func (x *GetBalanceReply) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +type GetBalanceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBalanceRequest) Reset() { + *x = GetBalanceRequest{} + mi := &file_solana_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBalanceRequest) ProtoMessage() {} + +func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead. +func (*GetBalanceRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{13} +} + +func (x *GetBalanceRequest) GetAddr() []byte { + if x != nil { + return x.Addr + } + return nil +} + +func (x *GetBalanceRequest) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +type GetBlockOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` + TransactionDetails string `protobuf:"bytes,2,opt,name=transaction_details,json=transactionDetails,proto3" json:"transaction_details,omitempty"` + Rewards bool `protobuf:"varint,3,opt,name=rewards,proto3" json:"rewards,omitempty"` + Commitment string `protobuf:"bytes,4,opt,name=commitment,proto3" json:"commitment,omitempty"` + MaxSupportedTransactionVersion uint64 `protobuf:"varint,5,opt,name=max_supported_transaction_version,json=maxSupportedTransactionVersion,proto3" json:"max_supported_transaction_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBlockOpts) Reset() { + *x = GetBlockOpts{} + mi := &file_solana_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockOpts) ProtoMessage() {} + +func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockOpts.ProtoReflect.Descriptor instead. +func (*GetBlockOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{14} +} + +func (x *GetBlockOpts) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *GetBlockOpts) GetTransactionDetails() string { + if x != nil { + return x.TransactionDetails + } + return "" +} + +func (x *GetBlockOpts) GetRewards() bool { + if x != nil { + return x.Rewards + } + return false +} + +func (x *GetBlockOpts) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +func (x *GetBlockOpts) GetMaxSupportedTransactionVersion() uint64 { + if x != nil { + return x.MaxSupportedTransactionVersion + } + return 0 +} + +type GetBlockReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` + PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` + ParentSlot uint64 `protobuf:"varint,3,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` + Transactions []*TransactionWithMeta `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty"` + Signatures [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` + BlockTime int64 `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBlockReply) Reset() { + *x = GetBlockReply{} + mi := &file_solana_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockReply) ProtoMessage() {} + +func (x *GetBlockReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockReply.ProtoReflect.Descriptor instead. +func (*GetBlockReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{15} +} + +func (x *GetBlockReply) GetBlockhash() []byte { + if x != nil { + return x.Blockhash + } + return nil +} + +func (x *GetBlockReply) GetPreviousBlockhash() []byte { + if x != nil { + return x.PreviousBlockhash + } + return nil +} + +func (x *GetBlockReply) GetParentSlot() uint64 { + if x != nil { + return x.ParentSlot + } + return 0 +} + +func (x *GetBlockReply) GetTransactions() []*TransactionWithMeta { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *GetBlockReply) GetSignatures() [][]byte { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *GetBlockReply) GetBlockTime() int64 { + if x != nil { + return x.BlockTime + } + return 0 +} + +func (x *GetBlockReply) GetBlockHeight() uint64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +type GetBlockRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + Opts *GetBlockOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBlockRequest) Reset() { + *x = GetBlockRequest{} + mi := &file_solana_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockRequest) ProtoMessage() {} + +func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead. +func (*GetBlockRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{16} +} + +func (x *GetBlockRequest) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *GetBlockRequest) GetOpts() *GetBlockOpts { + if x != nil { + return x.Opts + } + return nil +} + +type GetFeeForMessageReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Fee uint64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFeeForMessageReply) Reset() { + *x = GetFeeForMessageReply{} + mi := &file_solana_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFeeForMessageReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeeForMessageReply) ProtoMessage() {} + +func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFeeForMessageReply.ProtoReflect.Descriptor instead. +func (*GetFeeForMessageReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{17} +} + +func (x *GetFeeForMessageReply) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +type GetFeeForMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFeeForMessageRequest) Reset() { + *x = GetFeeForMessageRequest{} + mi := &file_solana_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFeeForMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeeForMessageRequest) ProtoMessage() {} + +func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFeeForMessageRequest.ProtoReflect.Descriptor instead. +func (*GetFeeForMessageRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{18} +} + +func (x *GetFeeForMessageRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *GetFeeForMessageRequest) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +type GetMultipleAccountsOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMultipleAccountsOpts) Reset() { + *x = GetMultipleAccountsOpts{} + mi := &file_solana_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMultipleAccountsOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMultipleAccountsOpts) ProtoMessage() {} + +func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMultipleAccountsOpts.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{19} +} + +func (x *GetMultipleAccountsOpts) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *GetMultipleAccountsOpts) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +func (x *GetMultipleAccountsOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil +} + +func (x *GetMultipleAccountsOpts) GetMinContextSlot() uint64 { + if x != nil { + return x.MinContextSlot + } + return 0 +} + +type GetMultipleAccountsWithOptsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` + Value []*Account `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMultipleAccountsWithOptsReply) Reset() { + *x = GetMultipleAccountsWithOptsReply{} + mi := &file_solana_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMultipleAccountsWithOptsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMultipleAccountsWithOptsReply) ProtoMessage() {} + +func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMultipleAccountsWithOptsReply.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsWithOptsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{20} +} + +func (x *GetMultipleAccountsWithOptsReply) GetRPCContext() *RPCContext { + if x != nil { + return x.RPCContext + } + return nil +} + +func (x *GetMultipleAccountsWithOptsReply) GetValue() []*Account { + if x != nil { + return x.Value + } + return nil +} + +type GetMultipleAccountsWithOptsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + Opts *GetMultipleAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMultipleAccountsWithOptsRequest) Reset() { + *x = GetMultipleAccountsWithOptsRequest{} + mi := &file_solana_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMultipleAccountsWithOptsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMultipleAccountsWithOptsRequest) ProtoMessage() {} + +func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMultipleAccountsWithOptsRequest.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsWithOptsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{21} +} + +func (x *GetMultipleAccountsWithOptsRequest) GetAccounts() [][]byte { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts { + if x != nil { + return x.Opts + } + return nil +} + +type GetSignatureStatusesReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*GetSignatureStatusesResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSignatureStatusesReply) Reset() { + *x = GetSignatureStatusesReply{} + mi := &file_solana_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSignatureStatusesReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSignatureStatusesReply) ProtoMessage() {} + +func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{22} +} + +func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { + if x != nil { + return x.Results + } + return nil +} + +type GetSignatureStatusesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSignatureStatusesRequest) Reset() { + *x = GetSignatureStatusesRequest{} + mi := &file_solana_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSignatureStatusesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSignatureStatusesRequest) ProtoMessage() {} + +func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{23} +} + +func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type GetSignatureStatusesResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"` + Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` + ConfirmationStatus string `protobuf:"bytes,4,opt,name=confirmation_status,json=confirmationStatus,proto3" json:"confirmation_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSignatureStatusesResult) Reset() { + *x = GetSignatureStatusesResult{} + mi := &file_solana_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSignatureStatusesResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSignatureStatusesResult) ProtoMessage() {} + +func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{24} +} + +func (x *GetSignatureStatusesResult) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *GetSignatureStatusesResult) GetConfirmations() uint64 { + if x != nil { + return x.Confirmations + } + return 0 +} + +func (x *GetSignatureStatusesResult) GetErr() string { + if x != nil { + return x.Err + } + return "" +} + +func (x *GetSignatureStatusesResult) GetConfirmationStatus() string { + if x != nil { + return x.ConfirmationStatus + } + return "" +} + +type GetSlotHeightReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSlotHeightReply) Reset() { + *x = GetSlotHeightReply{} + mi := &file_solana_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSlotHeightReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSlotHeightReply) ProtoMessage() {} + +func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. +func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{25} +} + +func (x *GetSlotHeightReply) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + +type GetSlotHeightRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Commitment string `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSlotHeightRequest) Reset() { + *x = GetSlotHeightRequest{} + mi := &file_solana_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSlotHeightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSlotHeightRequest) ProtoMessage() {} + +func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. +func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{26} +} + +func (x *GetSlotHeightRequest) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +type GetTransactionReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + TransactionEnvelope []byte `protobuf:"bytes,4,opt,name=transaction_envelope,json=transactionEnvelope,proto3" json:"transaction_envelope,omitempty"` + Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTransactionReply) Reset() { + *x = GetTransactionReply{} + mi := &file_solana_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTransactionReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionReply) ProtoMessage() {} + +func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. +func (*GetTransactionReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{27} +} + +func (x *GetTransactionReply) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *GetTransactionReply) GetBlockTime() int64 { + if x != nil { + return x.BlockTime + } + return 0 +} + +func (x *GetTransactionReply) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *GetTransactionReply) GetTransactionEnvelope() []byte { + if x != nil { + return x.TransactionEnvelope + } + return nil +} + +func (x *GetTransactionReply) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +type GetTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTransactionRequest) Reset() { + *x = GetTransactionRequest{} + mi := &file_solana_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionRequest) ProtoMessage() {} + +func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetTransactionRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{28} +} + +func (x *GetTransactionRequest) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type HashedValueComparator struct { + state protoimpl.MessageState `protogen:"open.v1"` + Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + Operator int64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HashedValueComparator) Reset() { + *x = HashedValueComparator{} + mi := &file_solana_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HashedValueComparator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashedValueComparator) ProtoMessage() {} + +func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashedValueComparator.ProtoReflect.Descriptor instead. +func (*HashedValueComparator) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{29} +} + +func (x *HashedValueComparator) GetValues() [][]byte { + if x != nil { + return x.Values + } + return nil +} + +func (x *HashedValueComparator) GetOperator() int64 { + if x != nil { + return x.Operator + } + return 0 +} + +type LPFilterQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + EventName string `protobuf:"bytes,3,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` + EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` + StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` + EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` + SubkeyPaths []string `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` + Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` + MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` + IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LPFilterQuery) Reset() { + *x = LPFilterQuery{} + mi := &file_solana_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LPFilterQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LPFilterQuery) ProtoMessage() {} + +func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead. +func (*LPFilterQuery) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{30} +} + +func (x *LPFilterQuery) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LPFilterQuery) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *LPFilterQuery) GetEventName() string { + if x != nil { + return x.EventName + } + return "" +} + +func (x *LPFilterQuery) GetEventSig() []byte { + if x != nil { + return x.EventSig + } + return nil +} + +func (x *LPFilterQuery) GetStartingBlock() int64 { + if x != nil { + return x.StartingBlock + } + return 0 +} + +func (x *LPFilterQuery) GetEventIdlJson() []byte { + if x != nil { + return x.EventIdlJson + } + return nil +} + +func (x *LPFilterQuery) GetSubkeyPaths() []string { + if x != nil { + return x.SubkeyPaths + } + return nil +} + +func (x *LPFilterQuery) GetRetention() int64 { + if x != nil { + return x.Retention + } + return 0 +} + +func (x *LPFilterQuery) GetMaxLogsKept() int64 { + if x != nil { + return x.MaxLogsKept + } + return 0 +} + +func (x *LPFilterQuery) GetIncludeReverted() bool { + if x != nil { + return x.IncludeReverted + } + return false +} + +type Limit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` + CursorDirection int32 `protobuf:"varint,2,opt,name=cursor_direction,json=cursorDirection,proto3" json:"cursor_direction,omitempty"` + Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Limit) Reset() { + *x = Limit{} + mi := &file_solana_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Limit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Limit) ProtoMessage() {} + +func (x *Limit) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Limit.ProtoReflect.Descriptor instead. +func (*Limit) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{31} +} + +func (x *Limit) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +func (x *Limit) GetCursorDirection() int32 { + if x != nil { + return x.CursorDirection + } + return 0 +} + +func (x *Limit) GetCount() uint64 { + if x != nil { + return x.Count + } + return 0 +} + +type LimitAndSort struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit *Limit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LimitAndSort) Reset() { + *x = LimitAndSort{} + mi := &file_solana_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LimitAndSort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LimitAndSort) ProtoMessage() {} + +func (x *LimitAndSort) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LimitAndSort.ProtoReflect.Descriptor instead. +func (*LimitAndSort) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{32} +} + +func (x *LimitAndSort) GetLimit() *Limit { + if x != nil { + return x.Limit + } + return nil +} + +type Log struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChainID string `protobuf:"bytes,1,opt,name=chain_i_d,json=chainID,proto3" json:"chain_i_d,omitempty"` + LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BlockTimestamp int64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` + Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` + EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` + TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` + SequenceNum int64 `protobuf:"varint,10,opt,name=sequence_num,json=sequenceNum,proto3" json:"sequence_num,omitempty"` + Error string `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Log) Reset() { + *x = Log{} + mi := &file_solana_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Log) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Log) ProtoMessage() {} + +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{33} +} + +func (x *Log) GetChainID() string { + if x != nil { + return x.ChainID + } + return "" +} + +func (x *Log) GetLogIndex() int64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *Log) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *Log) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Log) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *Log) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *Log) GetEventSig() []byte { + if x != nil { + return x.EventSig + } + return nil +} + +func (x *Log) GetTxHash() []byte { + if x != nil { + return x.TxHash + } + return nil +} + +func (x *Log) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *Log) GetSequenceNum() int64 { + if x != nil { + return x.SequenceNum + } + return 0 +} + +func (x *Log) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type RPCContext struct { + state protoimpl.MessageState `protogen:"open.v1"` + Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RPCContext) Reset() { + *x = RPCContext{} + mi := &file_solana_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCContext) ProtoMessage() {} + +func (x *RPCContext) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. +func (*RPCContext) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{34} +} + +func (x *RPCContext) GetContext() *Context { + if x != nil { + return x.Context + } + return nil +} + +type SimulateTXOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` + Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SimulateTXOpts) Reset() { + *x = SimulateTXOpts{} + mi := &file_solana_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SimulateTXOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateTXOpts) ProtoMessage() {} + +func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. +func (*SimulateTXOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{35} +} + +func (x *SimulateTXOpts) GetSigVerify() bool { + if x != nil { + return x.SigVerify + } + return false +} + +func (x *SimulateTXOpts) GetCommitment() string { + if x != nil { + return x.Commitment + } + return "" +} + +func (x *SimulateTXOpts) GetReplaceRecentBlockhash() bool { + if x != nil { + return x.ReplaceRecentBlockhash + } + return false +} + +func (x *SimulateTXOpts) GetAccounts() *SimulateTransactionAccountsOpts { + if x != nil { + return x.Accounts + } + return nil +} + +type SimulateTXReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` + Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` + Accounts []*Account `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` + UnitsConsumed uint64 `protobuf:"varint,4,opt,name=units_consumed,json=unitsConsumed,proto3" json:"units_consumed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SimulateTXReply) Reset() { + *x = SimulateTXReply{} + mi := &file_solana_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SimulateTXReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateTXReply) ProtoMessage() {} + +func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. +func (*SimulateTXReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{36} +} + +func (x *SimulateTXReply) GetErr() string { + if x != nil { + return x.Err + } + return "" +} + +func (x *SimulateTXReply) GetLogs() []string { + if x != nil { + return x.Logs + } + return nil +} + +func (x *SimulateTXReply) GetAccounts() []*Account { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *SimulateTXReply) GetUnitsConsumed() uint64 { + if x != nil { + return x.UnitsConsumed + } + return 0 +} + +type SimulateTXRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` + Opts *SimulateTXOpts `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SimulateTXRequest) Reset() { + *x = SimulateTXRequest{} + mi := &file_solana_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SimulateTXRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateTXRequest) ProtoMessage() {} + +func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. +func (*SimulateTXRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{37} +} + +func (x *SimulateTXRequest) GetReceiver() []byte { + if x != nil { + return x.Receiver + } + return nil +} + +func (x *SimulateTXRequest) GetEncodedTransaction() string { + if x != nil { + return x.EncodedTransaction + } + return "" +} + +func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { + if x != nil { + return x.Opts + } + return nil +} + +type SimulateTransactionAccountsOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` + Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SimulateTransactionAccountsOpts) Reset() { + *x = SimulateTransactionAccountsOpts{} + mi := &file_solana_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SimulateTransactionAccountsOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateTransactionAccountsOpts) ProtoMessage() {} + +func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. +func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{38} +} + +func (x *SimulateTransactionAccountsOpts) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *SimulateTransactionAccountsOpts) GetAddresses() [][]byte { + if x != nil { + return x.Addresses + } + return nil +} + +type SubmitTransactionReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` + Status int64 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitTransactionReply) Reset() { + *x = SubmitTransactionReply{} + mi := &file_solana_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitTransactionReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionReply) ProtoMessage() {} + +func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. +func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{39} +} + +func (x *SubmitTransactionReply) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SubmitTransactionReply) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" +} + +func (x *SubmitTransactionReply) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +type SubmitTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cfg *ComputeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"` + Receiver []byte `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + EncodedTransaction string `protobuf:"bytes,3,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitTransactionRequest) Reset() { + *x = SubmitTransactionRequest{} + mi := &file_solana_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionRequest) ProtoMessage() {} + +func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. +func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{40} +} + +func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { + if x != nil { + return x.Cfg + } + return nil +} + +func (x *SubmitTransactionRequest) GetReceiver() []byte { + if x != nil { + return x.Receiver + } + return nil +} + +func (x *SubmitTransactionRequest) GetEncodedTransaction() string { + if x != nil { + return x.EncodedTransaction + } + return "" +} + +type TransactionWithMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + Transaction *DataBytesOrJSON `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` + MetaJson []byte `protobuf:"bytes,4,opt,name=meta_json,json=metaJson,proto3" json:"meta_json,omitempty"` + Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionWithMeta) Reset() { + *x = TransactionWithMeta{} + mi := &file_solana_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionWithMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionWithMeta) ProtoMessage() {} + +func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionWithMeta.ProtoReflect.Descriptor instead. +func (*TransactionWithMeta) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{41} +} + +func (x *TransactionWithMeta) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *TransactionWithMeta) GetBlockTime() int64 { + if x != nil { + return x.BlockTime + } + return 0 +} + +func (x *TransactionWithMeta) GetTransaction() *DataBytesOrJSON { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *TransactionWithMeta) GetMetaJson() []byte { + if x != nil { + return x.MetaJson + } + return nil +} + +func (x *TransactionWithMeta) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type Primitive struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: + // + // *Primitive_Address + // *Primitive_EventByTopic + Kind isPrimitive_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Primitive) Reset() { + *x = Primitive{} + mi := &file_solana_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Primitive) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Primitive) ProtoMessage() {} + +func (x *Primitive) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Primitive.ProtoReflect.Descriptor instead. +func (*Primitive) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{42} +} + +func (x *Primitive) GetKind() isPrimitive_Kind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *Primitive) GetAddress() *Address { + if x != nil { + if x, ok := x.Kind.(*Primitive_Address); ok { + return x.Address + } + } + return nil +} + +func (x *Primitive) GetEventByTopic() *EventByTopic { + if x != nil { + if x, ok := x.Kind.(*Primitive_EventByTopic); ok { + return x.EventByTopic + } + } + return nil +} + +type isPrimitive_Kind interface { + isPrimitive_Kind() +} + +type Primitive_Address struct { + Address *Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` +} + +type Primitive_EventByTopic struct { + EventByTopic *EventByTopic `protobuf:"bytes,2,opt,name=eventByTopic,proto3,oneof"` +} + +func (*Primitive_Address) isPrimitive_Kind() {} + +func (*Primitive_EventByTopic) isPrimitive_Kind() {} + +type QueryTrackedLogsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FilterQuery []*Expression `protobuf:"bytes,1,rep,name=filterQuery,proto3" json:"filterQuery,omitempty"` + LimitAndSort *LimitAndSort `protobuf:"bytes,2,opt,name=limitAndSort,proto3" json:"limitAndSort,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryTrackedLogsRequest) Reset() { + *x = QueryTrackedLogsRequest{} + mi := &file_solana_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryTrackedLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTrackedLogsRequest) ProtoMessage() {} + +func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. +func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{43} +} + +func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { + if x != nil { + return x.FilterQuery + } + return nil +} + +func (x *QueryTrackedLogsRequest) GetLimitAndSort() *LimitAndSort { + if x != nil { + return x.LimitAndSort + } + return nil +} + +type QueryTrackedLogsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Result []*Log `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryTrackedLogsReply) Reset() { + *x = QueryTrackedLogsReply{} + mi := &file_solana_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryTrackedLogsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTrackedLogsReply) ProtoMessage() {} + +func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. +func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{44} +} + +func (x *QueryTrackedLogsReply) GetResult() []*Log { + if x != nil { + return x.Result + } + return nil +} + +type RegisterLogTrackingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filter *LPFilterQuery `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterLogTrackingRequest) Reset() { + *x = RegisterLogTrackingRequest{} + mi := &file_solana_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterLogTrackingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterLogTrackingRequest) ProtoMessage() {} + +func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. +func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{45} +} + +func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { + if x != nil { + return x.Filter + } + return nil +} + +type RegisterLogTrackingReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterLogTrackingReply) Reset() { + *x = RegisterLogTrackingReply{} + mi := &file_solana_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterLogTrackingReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterLogTrackingReply) ProtoMessage() {} + +func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. +func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{46} +} + +type UnregisterLogTrackingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FilterName string `protobuf:"bytes,1,opt,name=filterName,proto3" json:"filterName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnregisterLogTrackingRequest) Reset() { + *x = UnregisterLogTrackingRequest{} + mi := &file_solana_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnregisterLogTrackingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnregisterLogTrackingRequest) ProtoMessage() {} + +func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. +func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{47} +} + +func (x *UnregisterLogTrackingRequest) GetFilterName() string { + if x != nil { + return x.FilterName + } + return "" +} + +type UnregisterLogTrackingReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnregisterLogTrackingReply) Reset() { + *x = UnregisterLogTrackingReply{} + mi := &file_solana_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnregisterLogTrackingReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnregisterLogTrackingReply) ProtoMessage() {} + +func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. +func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{48} +} + +var File_solana_proto protoreflect.FileDescriptor + +const file_solana_proto_rawDesc = "" + + "\n" + + "\fsolana.proto\x12\vloop.solana\"\xc2\x01\n" + + "\aAccount\x12\x1a\n" + + "\blamports\x18\x01 \x01(\x04R\blamports\x12\x14\n" + + "\x05owner\x18\x02 \x01(\fR\x05owner\x120\n" + + "\x04data\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\x04data\x12\x1e\n" + + "\n" + + "executable\x18\x04 \x01(\bR\n" + + "executable\x12\x1d\n" + + "\n" + + "rent_epoch\x18\x05 \x01(\x03R\trentEpoch\x12\x14\n" + + "\x05space\x18\x06 \x01(\x04R\x05space\"#\n" + + "\aAddress\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\"p\n" + + "\x0eBoolExpression\x129\n" + + "\vexpressions\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vexpressions\x12#\n" + + "\rbool_operator\x18\x02 \x01(\x03R\fboolOperator\"`\n" + + "\rComputeConfig\x12#\n" + + "\rcompute_limit\x18\x01 \x01(\rR\fcomputeLimit\x12*\n" + + "\x11compute_max_price\x18\x02 \x01(\x04R\x0fcomputeMaxPrice\"\x1d\n" + + "\aContext\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\"\x82\x01\n" + + "\x0fDataBytesOrJSON\x12*\n" + + "\x11raw_data_encoding\x18\x01 \x01(\tR\x0frawDataEncoding\x12*\n" + + "\x11as_decoded_binary\x18\x02 \x01(\fR\x0fasDecodedBinary\x12\x17\n" + + "\aas_json\x18\x03 \x01(\fR\x06asJson\";\n" + + "\tDataSlice\x12\x16\n" + + "\x06offset\x18\x01 \x01(\x04R\x06offset\x12\x16\n" + + "\x06length\x18\x02 \x01(\x04R\x06length\"~\n" + + "\fEventByTopic\x12\x14\n" + + "\x05topic\x18\x01 \x01(\x04R\x05topic\x12X\n" + + "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"\x88\x01\n" + + "\n" + + "Expression\x124\n" + + "\tprimitive\x18\x01 \x01(\v2\x16.loop.solana.PrimitiveR\tprimitive\x12D\n" + + "\x0fbool_expression\x18\x02 \x01(\v2\x1b.loop.solana.BoolExpressionR\x0eboolExpression\"\xb1\x01\n" + + "\x12GetAccountInfoOpts\x12\x1a\n" + + "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1e\n" + + "\n" + + "commitment\x18\x02 \x01(\tR\n" + + "commitment\x125\n" + + "\n" + + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + + "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x85\x01\n" + + "\x1bGetAccountInfoWithOptsReply\x12:\n" + + "\rr_p_c_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + + "rPCContext\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.loop.solana.AccountR\x05value\"n\n" + + "\x1dGetAccountInfoWithOptsRequest\x12\x18\n" + + "\aaccount\x18\x01 \x01(\fR\aaccount\x123\n" + + "\x04opts\x18\x02 \x01(\v2\x1f.loop.solana.GetAccountInfoOptsR\x04opts\"'\n" + + "\x0fGetBalanceReply\x12\x14\n" + + "\x05value\x18\x01 \x01(\x04R\x05value\"G\n" + + "\x11GetBalanceRequest\x12\x12\n" + + "\x04addr\x18\x01 \x01(\fR\x04addr\x12\x1e\n" + + "\n" + + "commitment\x18\x02 \x01(\tR\n" + + "commitment\"\xe0\x01\n" + + "\fGetBlockOpts\x12\x1a\n" + + "\bencoding\x18\x01 \x01(\tR\bencoding\x12/\n" + + "\x13transaction_details\x18\x02 \x01(\tR\x12transactionDetails\x12\x18\n" + + "\arewards\x18\x03 \x01(\bR\arewards\x12\x1e\n" + + "\n" + + "commitment\x18\x04 \x01(\tR\n" + + "commitment\x12I\n" + + "!max_supported_transaction_version\x18\x05 \x01(\x04R\x1emaxSupportedTransactionVersion\"\xa5\x02\n" + + "\rGetBlockReply\x12\x1c\n" + + "\tblockhash\x18\x01 \x01(\fR\tblockhash\x12-\n" + + "\x12previous_blockhash\x18\x02 \x01(\fR\x11previousBlockhash\x12\x1f\n" + + "\vparent_slot\x18\x03 \x01(\x04R\n" + + "parentSlot\x12D\n" + + "\ftransactions\x18\x04 \x03(\v2 .loop.solana.TransactionWithMetaR\ftransactions\x12\x1e\n" + + "\n" + + "signatures\x18\x05 \x03(\fR\n" + + "signatures\x12\x1d\n" + + "\n" + + "block_time\x18\x06 \x01(\x03R\tblockTime\x12!\n" + + "\fblock_height\x18\a \x01(\x04R\vblockHeight\"T\n" + + "\x0fGetBlockRequest\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12-\n" + + "\x04opts\x18\x02 \x01(\v2\x19.loop.solana.GetBlockOptsR\x04opts\")\n" + + "\x15GetFeeForMessageReply\x12\x10\n" + + "\x03fee\x18\x01 \x01(\x04R\x03fee\"S\n" + + "\x17GetFeeForMessageRequest\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x1e\n" + + "\n" + + "commitment\x18\x02 \x01(\tR\n" + + "commitment\"\xb6\x01\n" + + "\x17GetMultipleAccountsOpts\x12\x1a\n" + + "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1e\n" + + "\n" + + "commitment\x18\x02 \x01(\tR\n" + + "commitment\x125\n" + + "\n" + + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + + "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x8a\x01\n" + + " GetMultipleAccountsWithOptsReply\x12:\n" + + "\rr_p_c_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + + "rPCContext\x12*\n" + + "\x05value\x18\x02 \x03(\v2\x14.loop.solana.AccountR\x05value\"z\n" + + "\"GetMultipleAccountsWithOptsRequest\x12\x1a\n" + + "\baccounts\x18\x01 \x03(\fR\baccounts\x128\n" + + "\x04opts\x18\x02 \x01(\v2$.loop.solana.GetMultipleAccountsOptsR\x04opts\"^\n" + + "\x19GetSignatureStatusesReply\x12A\n" + + "\aresults\x18\x01 \x03(\v2'.loop.solana.GetSignatureStatusesResultR\aresults\"1\n" + + "\x1bGetSignatureStatusesRequest\x12\x12\n" + + "\x04sigs\x18\x01 \x03(\fR\x04sigs\"\x99\x01\n" + + "\x1aGetSignatureStatusesResult\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12$\n" + + "\rconfirmations\x18\x02 \x01(\x04R\rconfirmations\x12\x10\n" + + "\x03err\x18\x03 \x01(\tR\x03err\x12/\n" + + "\x13confirmation_status\x18\x04 \x01(\tR\x12confirmationStatus\",\n" + + "\x12GetSlotHeightReply\x12\x16\n" + + "\x06height\x18\x01 \x01(\x04R\x06height\"6\n" + + "\x14GetSlotHeightRequest\x12\x1e\n" + + "\n" + + "commitment\x18\x01 \x01(\tR\n" + + "commitment\"\xa9\x01\n" + + "\x13GetTransactionReply\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + + "\n" + + "block_time\x18\x02 \x01(\x03R\tblockTime\x12\x18\n" + + "\aversion\x18\x03 \x01(\x03R\aversion\x121\n" + + "\x14transaction_envelope\x18\x04 \x01(\fR\x13transactionEnvelope\x12\x12\n" + + "\x04meta\x18\x05 \x01(\fR\x04meta\"5\n" + + "\x15GetTransactionRequest\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\"K\n" + + "\x15HashedValueComparator\x12\x16\n" + + "\x06values\x18\x01 \x03(\fR\x06values\x12\x1a\n" + + "\boperator\x18\x02 \x01(\x03R\boperator\"\xd6\x02\n" + + "\rLPFilterQuery\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aaddress\x18\x02 \x01(\fR\aaddress\x12\x1d\n" + + "\n" + + "event_name\x18\x03 \x01(\tR\teventName\x12\x1b\n" + + "\tevent_sig\x18\x04 \x01(\fR\beventSig\x12%\n" + + "\x0estarting_block\x18\x05 \x01(\x03R\rstartingBlock\x12$\n" + + "\x0eevent_idl_json\x18\x06 \x01(\fR\feventIdlJson\x12!\n" + + "\fsubkey_paths\x18\a \x03(\tR\vsubkeyPaths\x12\x1c\n" + + "\tretention\x18\b \x01(\x03R\tretention\x12\"\n" + + "\rmax_logs_kept\x18\t \x01(\x03R\vmaxLogsKept\x12)\n" + + "\x10include_reverted\x18\n" + + " \x01(\bR\x0fincludeReverted\"`\n" + + "\x05Limit\x12\x16\n" + + "\x06cursor\x18\x01 \x01(\tR\x06cursor\x12)\n" + + "\x10cursor_direction\x18\x02 \x01(\x05R\x0fcursorDirection\x12\x14\n" + + "\x05count\x18\x03 \x01(\x04R\x05count\"8\n" + + "\fLimitAndSort\x12(\n" + + "\x05limit\x18\x01 \x01(\v2\x12.loop.solana.LimitR\x05limit\"\xc6\x02\n" + + "\x03Log\x12\x1a\n" + + "\tchain_i_d\x18\x01 \x01(\tR\achainID\x12\x1b\n" + + "\tlog_index\x18\x02 \x01(\x03R\blogIndex\x12\x1d\n" + + "\n" + + "block_hash\x18\x03 \x01(\fR\tblockHash\x12!\n" + + "\fblock_number\x18\x04 \x01(\x03R\vblockNumber\x12'\n" + + "\x0fblock_timestamp\x18\x05 \x01(\x03R\x0eblockTimestamp\x12\x18\n" + + "\aaddress\x18\x06 \x01(\fR\aaddress\x12\x1b\n" + + "\tevent_sig\x18\a \x01(\fR\beventSig\x12\x17\n" + + "\atx_hash\x18\b \x01(\fR\x06txHash\x12\x12\n" + + "\x04data\x18\t \x01(\fR\x04data\x12!\n" + + "\fsequence_num\x18\n" + + " \x01(\x03R\vsequenceNum\x12\x14\n" + + "\x05error\x18\v \x01(\tR\x05error\"<\n" + + "\n" + + "RPCContext\x12.\n" + + "\acontext\x18\x01 \x01(\v2\x14.loop.solana.ContextR\acontext\"\xd3\x01\n" + + "\x0eSimulateTXOpts\x12\x1d\n" + + "\n" + + "sig_verify\x18\x01 \x01(\bR\tsigVerify\x12\x1e\n" + + "\n" + + "commitment\x18\x02 \x01(\tR\n" + + "commitment\x128\n" + + "\x18replace_recent_blockhash\x18\x03 \x01(\bR\x16replaceRecentBlockhash\x12H\n" + + "\baccounts\x18\x04 \x01(\v2,.loop.solana.SimulateTransactionAccountsOptsR\baccounts\"\x90\x01\n" + + "\x0fSimulateTXReply\x12\x10\n" + + "\x03err\x18\x01 \x01(\tR\x03err\x12\x12\n" + + "\x04logs\x18\x02 \x03(\tR\x04logs\x120\n" + + "\baccounts\x18\x03 \x03(\v2\x14.loop.solana.AccountR\baccounts\x12%\n" + + "\x0eunits_consumed\x18\x04 \x01(\x04R\runitsConsumed\"\x91\x01\n" + + "\x11SimulateTXRequest\x12\x1a\n" + + "\breceiver\x18\x01 \x01(\fR\breceiver\x12/\n" + + "\x13encoded_transaction\x18\x02 \x01(\tR\x12encodedTransaction\x12/\n" + + "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"[\n" + + "\x1fSimulateTransactionAccountsOpts\x12\x1a\n" + + "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1c\n" + + "\taddresses\x18\x02 \x03(\fR\taddresses\"w\n" + + "\x16SubmitTransactionReply\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12'\n" + + "\x0fidempotency_key\x18\x02 \x01(\tR\x0eidempotencyKey\x12\x16\n" + + "\x06status\x18\x03 \x01(\x03R\x06status\"\x95\x01\n" + + "\x18SubmitTransactionRequest\x12,\n" + + "\x03cfg\x18\x01 \x01(\v2\x1a.loop.solana.ComputeConfigR\x03cfg\x12\x1a\n" + + "\breceiver\x18\x02 \x01(\fR\breceiver\x12/\n" + + "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xbf\x01\n" + + "\x13TransactionWithMeta\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + + "\n" + + "block_time\x18\x02 \x01(\x03R\tblockTime\x12>\n" + + "\vtransaction\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\vtransaction\x12\x1b\n" + + "\tmeta_json\x18\x04 \x01(\fR\bmetaJson\x12\x18\n" + + "\aversion\x18\x05 \x01(\x03R\aversion\"\x86\x01\n" + + "\tPrimitive\x120\n" + + "\aaddress\x18\x01 \x01(\v2\x14.loop.solana.AddressH\x00R\aaddress\x12?\n" + + "\feventByTopic\x18\x02 \x01(\v2\x19.loop.solana.EventByTopicH\x00R\feventByTopicB\x06\n" + + "\x04kind\"\x93\x01\n" + + "\x17QueryTrackedLogsRequest\x129\n" + + "\vfilterQuery\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vfilterQuery\x12=\n" + + "\flimitAndSort\x18\x02 \x01(\v2\x19.loop.solana.LimitAndSortR\flimitAndSort\"A\n" + + "\x15QueryTrackedLogsReply\x12(\n" + + "\x06result\x18\x01 \x03(\v2\x10.loop.solana.LogR\x06result\"P\n" + + "\x1aRegisterLogTrackingRequest\x122\n" + + "\x06filter\x18\x01 \x01(\v2\x1a.loop.solana.LPFilterQueryR\x06filter\"\x1a\n" + + "\x18RegisterLogTrackingReply\">\n" + + "\x1cUnregisterLogTrackingRequest\x12\x1e\n" + + "\n" + + "filterName\x18\x01 \x01(\tR\n" + + "filterName\"\x1c\n" + + "\x1aUnregisterLogTrackingReply2\xe4\t\n" + + "\rSolanaService\x12n\n" + + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + + "\n" + + "GetBalance\x12\x1e.loop.solana.GetBalanceRequest\x1a\x1c.loop.solana.GetBalanceReply\x12D\n" + + "\bGetBlock\x12\x1c.loop.solana.GetBlockRequest\x1a\x1a.loop.solana.GetBlockReply\x12\\\n" + + "\x10GetFeeForMessage\x12$.loop.solana.GetFeeForMessageRequest\x1a\".loop.solana.GetFeeForMessageReply\x12}\n" + + "\x1bGetMultipleAccountsWithOpts\x12/.loop.solana.GetMultipleAccountsWithOptsRequest\x1a-.loop.solana.GetMultipleAccountsWithOptsReply\x12h\n" + + "\x14GetSignatureStatuses\x12(.loop.solana.GetSignatureStatusesRequest\x1a&.loop.solana.GetSignatureStatusesReply\x12S\n" + + "\rGetSlotHeight\x12!.loop.solana.GetSlotHeightRequest\x1a\x1f.loop.solana.GetSlotHeightReply\x12V\n" + + "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12\\\n" + + "\x10QueryTrackedLogs\x12$.loop.solana.QueryTrackedLogsRequest\x1a\".loop.solana.QueryTrackedLogsReply\x12e\n" + + "\x13RegisterLogTracking\x12'.loop.solana.RegisterLogTrackingRequest\x1a%.loop.solana.RegisterLogTrackingReply\x12J\n" + + "\n" + + "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12_\n" + + "\x11SubmitTransaction\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12k\n" + + "\x15UnregisterLogTracking\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" + +var ( + file_solana_proto_rawDescOnce sync.Once + file_solana_proto_rawDescData []byte +) + +func file_solana_proto_rawDescGZIP() []byte { + file_solana_proto_rawDescOnce.Do(func() { + file_solana_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc))) + }) + return file_solana_proto_rawDescData +} + +var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_solana_proto_goTypes = []any{ + (*Account)(nil), // 0: loop.solana.Account + (*Address)(nil), // 1: loop.solana.Address + (*BoolExpression)(nil), // 2: loop.solana.BoolExpression + (*ComputeConfig)(nil), // 3: loop.solana.ComputeConfig + (*Context)(nil), // 4: loop.solana.Context + (*DataBytesOrJSON)(nil), // 5: loop.solana.DataBytesOrJSON + (*DataSlice)(nil), // 6: loop.solana.DataSlice + (*EventByTopic)(nil), // 7: loop.solana.EventByTopic + (*Expression)(nil), // 8: loop.solana.Expression + (*GetAccountInfoOpts)(nil), // 9: loop.solana.GetAccountInfoOpts + (*GetAccountInfoWithOptsReply)(nil), // 10: loop.solana.GetAccountInfoWithOptsReply + (*GetAccountInfoWithOptsRequest)(nil), // 11: loop.solana.GetAccountInfoWithOptsRequest + (*GetBalanceReply)(nil), // 12: loop.solana.GetBalanceReply + (*GetBalanceRequest)(nil), // 13: loop.solana.GetBalanceRequest + (*GetBlockOpts)(nil), // 14: loop.solana.GetBlockOpts + (*GetBlockReply)(nil), // 15: loop.solana.GetBlockReply + (*GetBlockRequest)(nil), // 16: loop.solana.GetBlockRequest + (*GetFeeForMessageReply)(nil), // 17: loop.solana.GetFeeForMessageReply + (*GetFeeForMessageRequest)(nil), // 18: loop.solana.GetFeeForMessageRequest + (*GetMultipleAccountsOpts)(nil), // 19: loop.solana.GetMultipleAccountsOpts + (*GetMultipleAccountsWithOptsReply)(nil), // 20: loop.solana.GetMultipleAccountsWithOptsReply + (*GetMultipleAccountsWithOptsRequest)(nil), // 21: loop.solana.GetMultipleAccountsWithOptsRequest + (*GetSignatureStatusesReply)(nil), // 22: loop.solana.GetSignatureStatusesReply + (*GetSignatureStatusesRequest)(nil), // 23: loop.solana.GetSignatureStatusesRequest + (*GetSignatureStatusesResult)(nil), // 24: loop.solana.GetSignatureStatusesResult + (*GetSlotHeightReply)(nil), // 25: loop.solana.GetSlotHeightReply + (*GetSlotHeightRequest)(nil), // 26: loop.solana.GetSlotHeightRequest + (*GetTransactionReply)(nil), // 27: loop.solana.GetTransactionReply + (*GetTransactionRequest)(nil), // 28: loop.solana.GetTransactionRequest + (*HashedValueComparator)(nil), // 29: loop.solana.HashedValueComparator + (*LPFilterQuery)(nil), // 30: loop.solana.LPFilterQuery + (*Limit)(nil), // 31: loop.solana.Limit + (*LimitAndSort)(nil), // 32: loop.solana.LimitAndSort + (*Log)(nil), // 33: loop.solana.Log + (*RPCContext)(nil), // 34: loop.solana.RPCContext + (*SimulateTXOpts)(nil), // 35: loop.solana.SimulateTXOpts + (*SimulateTXReply)(nil), // 36: loop.solana.SimulateTXReply + (*SimulateTXRequest)(nil), // 37: loop.solana.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 38: loop.solana.SimulateTransactionAccountsOpts + (*SubmitTransactionReply)(nil), // 39: loop.solana.SubmitTransactionReply + (*SubmitTransactionRequest)(nil), // 40: loop.solana.SubmitTransactionRequest + (*TransactionWithMeta)(nil), // 41: loop.solana.TransactionWithMeta + (*Primitive)(nil), // 42: loop.solana.Primitive + (*QueryTrackedLogsRequest)(nil), // 43: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 44: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 45: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 46: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 47: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 48: loop.solana.UnregisterLogTrackingReply +} +var file_solana_proto_depIdxs = []int32{ + 5, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON + 8, // 1: loop.solana.BoolExpression.expressions:type_name -> loop.solana.Expression + 29, // 2: loop.solana.EventByTopic.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator + 42, // 3: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 2, // 4: loop.solana.Expression.bool_expression:type_name -> loop.solana.BoolExpression + 6, // 5: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice + 34, // 6: loop.solana.GetAccountInfoWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext + 0, // 7: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account + 9, // 8: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts + 41, // 9: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta + 14, // 10: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts + 6, // 11: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice + 34, // 12: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext + 0, // 13: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account + 19, // 14: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts + 24, // 15: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult + 31, // 16: loop.solana.LimitAndSort.limit:type_name -> loop.solana.Limit + 4, // 17: loop.solana.RPCContext.context:type_name -> loop.solana.Context + 38, // 18: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 0, // 19: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 35, // 20: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 3, // 21: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 5, // 22: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON + 1, // 23: loop.solana.Primitive.address:type_name -> loop.solana.Address + 7, // 24: loop.solana.Primitive.eventByTopic:type_name -> loop.solana.EventByTopic + 8, // 25: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 32, // 26: loop.solana.QueryTrackedLogsRequest.limitAndSort:type_name -> loop.solana.LimitAndSort + 33, // 27: loop.solana.QueryTrackedLogsReply.result:type_name -> loop.solana.Log + 30, // 28: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 11, // 29: loop.solana.SolanaService.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 13, // 30: loop.solana.SolanaService.GetBalance:input_type -> loop.solana.GetBalanceRequest + 16, // 31: loop.solana.SolanaService.GetBlock:input_type -> loop.solana.GetBlockRequest + 18, // 32: loop.solana.SolanaService.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 21, // 33: loop.solana.SolanaService.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 23, // 34: loop.solana.SolanaService.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 26, // 35: loop.solana.SolanaService.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 28, // 36: loop.solana.SolanaService.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 43, // 37: loop.solana.SolanaService.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest + 45, // 38: loop.solana.SolanaService.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest + 37, // 39: loop.solana.SolanaService.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 40, // 40: loop.solana.SolanaService.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest + 47, // 41: loop.solana.SolanaService.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest + 10, // 42: loop.solana.SolanaService.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 12, // 43: loop.solana.SolanaService.GetBalance:output_type -> loop.solana.GetBalanceReply + 15, // 44: loop.solana.SolanaService.GetBlock:output_type -> loop.solana.GetBlockReply + 17, // 45: loop.solana.SolanaService.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 20, // 46: loop.solana.SolanaService.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 22, // 47: loop.solana.SolanaService.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 25, // 48: loop.solana.SolanaService.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 27, // 49: loop.solana.SolanaService.GetTransaction:output_type -> loop.solana.GetTransactionReply + 44, // 50: loop.solana.SolanaService.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply + 46, // 51: loop.solana.SolanaService.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply + 36, // 52: loop.solana.SolanaService.SimulateTX:output_type -> loop.solana.SimulateTXReply + 39, // 53: loop.solana.SolanaService.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply + 48, // 54: loop.solana.SolanaService.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply + 42, // [42:55] is the sub-list for method output_type + 29, // [29:42] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_solana_proto_init() } +func file_solana_proto_init() { + if File_solana_proto != nil { + return + } + file_solana_proto_msgTypes[42].OneofWrappers = []any{ + (*Primitive_Address)(nil), + (*Primitive_EventByTopic)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc)), + NumEnums: 0, + NumMessages: 49, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_solana_proto_goTypes, + DependencyIndexes: file_solana_proto_depIdxs, + MessageInfos: file_solana_proto_msgTypes, + }.Build() + File_solana_proto = out.File + file_solana_proto_goTypes = nil + file_solana_proto_depIdxs = nil +} diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto new file mode 100644 index 0000000000..4c3d4517b5 --- /dev/null +++ b/pkg/chains/solana/solana.proto @@ -0,0 +1,298 @@ +syntax = "proto3"; +option go_package = "github.com/smartcontractkit/chainlink-common/pkg/chains/solana"; +package loop.solana; + +service SolanaService { + rpc GetAccountInfoWithOpts(GetAccountInfoWithOptsRequest) returns (GetAccountInfoWithOptsReply); + rpc GetBalance(GetBalanceRequest) returns (GetBalanceReply); + rpc GetBlock(GetBlockRequest) returns (GetBlockReply); + rpc GetFeeForMessage(GetFeeForMessageRequest) returns (GetFeeForMessageReply); + rpc GetMultipleAccountsWithOpts(GetMultipleAccountsWithOptsRequest) returns (GetMultipleAccountsWithOptsReply); + rpc GetSignatureStatuses(GetSignatureStatusesRequest) returns (GetSignatureStatusesReply); + rpc GetSlotHeight(GetSlotHeightRequest) returns (GetSlotHeightReply); + rpc GetTransaction(GetTransactionRequest) returns (GetTransactionReply); + rpc QueryTrackedLogs(QueryTrackedLogsRequest) returns (QueryTrackedLogsReply); + rpc RegisterLogTracking(RegisterLogTrackingRequest) returns (RegisterLogTrackingReply); + rpc SimulateTX(SimulateTXRequest) returns (SimulateTXReply); + rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); + rpc UnregisterLogTracking(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); +} + +message Account { + uint64 lamports = 1; + bytes owner = 2; + DataBytesOrJSON data = 3; + bool executable = 4; + int64 rent_epoch = 5; + uint64 space = 6; +} + +message Address { + bytes address = 1; +} + +message BoolExpression { + repeated Expression expressions = 1; + int64 bool_operator = 2; +} + +message ComputeConfig { + uint32 compute_limit = 1; + uint64 compute_max_price = 2; +} + +message Context { + uint64 slot = 1; +} + +message DataBytesOrJSON { + string raw_data_encoding = 1; + bytes as_decoded_binary = 2; + bytes as_json = 3; +} + +message DataSlice { + uint64 offset = 1; + uint64 length = 2; +} + +message EventByTopic { + uint64 topic = 1; + repeated HashedValueComparator hashed_value_comparers = 2; +} + +message Expression { + Primitive primitive = 1; + BoolExpression bool_expression = 2; +} + +message GetAccountInfoOpts { + string encoding = 1; + string commitment = 2; + DataSlice data_slice = 3; + uint64 min_context_slot = 4; +} + +message GetAccountInfoWithOptsReply { + RPCContext r_p_c_context = 1; + Account value = 2; +} + +message GetAccountInfoWithOptsRequest { + bytes account = 1; + GetAccountInfoOpts opts = 2; +} + +message GetBalanceReply { + uint64 value = 1; +} + +message GetBalanceRequest { + bytes addr = 1; + string commitment = 2; +} + +message GetBlockOpts { + string encoding = 1; + string transaction_details = 2; + bool rewards = 3; + string commitment = 4; + uint64 max_supported_transaction_version = 5; +} + +message GetBlockReply { + bytes blockhash = 1; + bytes previous_blockhash = 2; + uint64 parent_slot = 3; + repeated TransactionWithMeta transactions = 4; + repeated bytes signatures = 5; + int64 block_time = 6; + uint64 block_height = 7; +} + +message GetBlockRequest { + uint64 slot = 1; + GetBlockOpts opts = 2; +} + +message GetFeeForMessageReply { + uint64 fee = 1; +} + +message GetFeeForMessageRequest { + string message = 1; + string commitment = 2; +} + +message GetMultipleAccountsOpts { + string encoding = 1; + string commitment = 2; + DataSlice data_slice = 3; + uint64 min_context_slot = 4; +} + +message GetMultipleAccountsWithOptsReply { + RPCContext r_p_c_context = 1; + repeated Account value = 2; +} + +message GetMultipleAccountsWithOptsRequest { + repeated bytes accounts = 1; + GetMultipleAccountsOpts opts = 2; +} + +message GetSignatureStatusesReply { + repeated GetSignatureStatusesResult results = 1; +} + +message GetSignatureStatusesRequest { + repeated bytes sigs = 1; +} + +message GetSignatureStatusesResult { + uint64 slot = 1; + uint64 confirmations = 2; + string err = 3; + string confirmation_status = 4; +} + +message GetSlotHeightReply { + uint64 height = 1; +} + +message GetSlotHeightRequest { + string commitment = 1; +} + +message GetTransactionReply { + uint64 slot = 1; + int64 block_time = 2; + int64 version = 3; + bytes transaction_envelope = 4; + bytes meta = 5; +} + +message GetTransactionRequest { + bytes signature = 1; +} + +message HashedValueComparator { + repeated bytes values = 1; + int64 operator = 2; +} + +message LPFilterQuery { + string name = 1; + bytes address = 2; + string event_name = 3; + bytes event_sig = 4; + int64 starting_block = 5; + bytes event_idl_json = 6; + repeated string subkey_paths = 7; + int64 retention = 8; + int64 max_logs_kept = 9; + bool include_reverted = 10; +} + +message Limit { + string cursor = 1; + int32 cursor_direction = 2; + uint64 count = 3; +} + +message LimitAndSort { + Limit limit = 1; +} + +message Log { + string chain_i_d = 1; + int64 log_index = 2; + bytes block_hash = 3; + int64 block_number = 4; + int64 block_timestamp = 5; + bytes address = 6; + bytes event_sig = 7; + bytes tx_hash = 8; + bytes data = 9; + int64 sequence_num = 10; + string error = 11; +} + +message RPCContext { + Context context = 1; +} + +message SimulateTXOpts { + bool sig_verify = 1; + string commitment = 2; + bool replace_recent_blockhash = 3; + SimulateTransactionAccountsOpts accounts = 4; +} + +message SimulateTXReply { + string err = 1; + repeated string logs = 2; + repeated Account accounts = 3; + uint64 units_consumed = 4; +} + +message SimulateTXRequest { + bytes receiver = 1; + string encoded_transaction = 2; + SimulateTXOpts opts = 3; +} + +message SimulateTransactionAccountsOpts { + string encoding = 1; + repeated bytes addresses = 2; +} + +message SubmitTransactionReply { + bytes signature = 1; + string idempotency_key = 2; + int64 status = 3; +} + +message SubmitTransactionRequest { + ComputeConfig cfg = 1; + bytes receiver = 2; + string encoded_transaction = 3; +} + +message TransactionWithMeta { + uint64 slot = 1; + int64 block_time = 2; + DataBytesOrJSON transaction = 3; + bytes meta_json = 4; + int64 version = 5; +} + +message Primitive { + oneof kind { + Address address = 1; + EventByTopic eventByTopic = 2; + } +} + +message QueryTrackedLogsRequest { + repeated Expression filterQuery = 1; + LimitAndSort limitAndSort = 2; +} + +message QueryTrackedLogsReply { + repeated Log result = 1; +} + +message RegisterLogTrackingRequest { + LPFilterQuery filter = 1; +} + +message RegisterLogTrackingReply { +} + +message UnregisterLogTrackingRequest { + string filterName = 1; +} + +message UnregisterLogTrackingReply { +} diff --git a/pkg/chains/solana/solana_grpc.pb.go b/pkg/chains/solana/solana_grpc.pb.go new file mode 100644 index 0000000000..3cba34c95a --- /dev/null +++ b/pkg/chains/solana/solana_grpc.pb.go @@ -0,0 +1,577 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 +// source: solana.proto + +package solana + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + SolanaService_GetAccountInfoWithOpts_FullMethodName = "/loop.solana.SolanaService/GetAccountInfoWithOpts" + SolanaService_GetBalance_FullMethodName = "/loop.solana.SolanaService/GetBalance" + SolanaService_GetBlock_FullMethodName = "/loop.solana.SolanaService/GetBlock" + SolanaService_GetFeeForMessage_FullMethodName = "/loop.solana.SolanaService/GetFeeForMessage" + SolanaService_GetMultipleAccountsWithOpts_FullMethodName = "/loop.solana.SolanaService/GetMultipleAccountsWithOpts" + SolanaService_GetSignatureStatuses_FullMethodName = "/loop.solana.SolanaService/GetSignatureStatuses" + SolanaService_GetSlotHeight_FullMethodName = "/loop.solana.SolanaService/GetSlotHeight" + SolanaService_GetTransaction_FullMethodName = "/loop.solana.SolanaService/GetTransaction" + SolanaService_QueryTrackedLogs_FullMethodName = "/loop.solana.SolanaService/QueryTrackedLogs" + SolanaService_RegisterLogTracking_FullMethodName = "/loop.solana.SolanaService/RegisterLogTracking" + SolanaService_SimulateTX_FullMethodName = "/loop.solana.SolanaService/SimulateTX" + SolanaService_SubmitTransaction_FullMethodName = "/loop.solana.SolanaService/SubmitTransaction" + SolanaService_UnregisterLogTracking_FullMethodName = "/loop.solana.SolanaService/UnregisterLogTracking" +) + +// SolanaServiceClient is the client API for SolanaService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SolanaServiceClient interface { + GetAccountInfoWithOpts(ctx context.Context, in *GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*GetAccountInfoWithOptsReply, error) + GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceReply, error) + GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) + GetFeeForMessage(ctx context.Context, in *GetFeeForMessageRequest, opts ...grpc.CallOption) (*GetFeeForMessageReply, error) + GetMultipleAccountsWithOpts(ctx context.Context, in *GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*GetMultipleAccountsWithOptsReply, error) + GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) + GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) + GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) + QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) + RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) + SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) + SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) + UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) +} + +type solanaServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSolanaServiceClient(cc grpc.ClientConnInterface) SolanaServiceClient { + return &solanaServiceClient{cc} +} + +func (c *solanaServiceClient) GetAccountInfoWithOpts(ctx context.Context, in *GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*GetAccountInfoWithOptsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountInfoWithOptsReply) + err := c.cc.Invoke(ctx, SolanaService_GetAccountInfoWithOpts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBalanceReply) + err := c.cc.Invoke(ctx, SolanaService_GetBalance_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlockReply) + err := c.cc.Invoke(ctx, SolanaService_GetBlock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetFeeForMessage(ctx context.Context, in *GetFeeForMessageRequest, opts ...grpc.CallOption) (*GetFeeForMessageReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetFeeForMessageReply) + err := c.cc.Invoke(ctx, SolanaService_GetFeeForMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetMultipleAccountsWithOpts(ctx context.Context, in *GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*GetMultipleAccountsWithOptsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMultipleAccountsWithOptsReply) + err := c.cc.Invoke(ctx, SolanaService_GetMultipleAccountsWithOpts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSignatureStatusesReply) + err := c.cc.Invoke(ctx, SolanaService_GetSignatureStatuses_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSlotHeightReply) + err := c.cc.Invoke(ctx, SolanaService_GetSlotHeight_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTransactionReply) + err := c.cc.Invoke(ctx, SolanaService_GetTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryTrackedLogsReply) + err := c.cc.Invoke(ctx, SolanaService_QueryTrackedLogs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegisterLogTrackingReply) + err := c.cc.Invoke(ctx, SolanaService_RegisterLogTracking_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SimulateTXReply) + err := c.cc.Invoke(ctx, SolanaService_SimulateTX_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SubmitTransactionReply) + err := c.cc.Invoke(ctx, SolanaService_SubmitTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solanaServiceClient) UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnregisterLogTrackingReply) + err := c.cc.Invoke(ctx, SolanaService_UnregisterLogTracking_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SolanaServiceServer is the server API for SolanaService service. +// All implementations must embed UnimplementedSolanaServiceServer +// for forward compatibility. +type SolanaServiceServer interface { + GetAccountInfoWithOpts(context.Context, *GetAccountInfoWithOptsRequest) (*GetAccountInfoWithOptsReply, error) + GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceReply, error) + GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) + GetFeeForMessage(context.Context, *GetFeeForMessageRequest) (*GetFeeForMessageReply, error) + GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) + GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) + GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) + GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) + QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) + RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) + SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) + SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) + UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) + mustEmbedUnimplementedSolanaServiceServer() +} + +// UnimplementedSolanaServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSolanaServiceServer struct{} + +func (UnimplementedSolanaServiceServer) GetAccountInfoWithOpts(context.Context, *GetAccountInfoWithOptsRequest) (*GetAccountInfoWithOptsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfoWithOpts not implemented") +} +func (UnimplementedSolanaServiceServer) GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented") +} +func (UnimplementedSolanaServiceServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") +} +func (UnimplementedSolanaServiceServer) GetFeeForMessage(context.Context, *GetFeeForMessageRequest) (*GetFeeForMessageReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFeeForMessage not implemented") +} +func (UnimplementedSolanaServiceServer) GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMultipleAccountsWithOpts not implemented") +} +func (UnimplementedSolanaServiceServer) GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSignatureStatuses not implemented") +} +func (UnimplementedSolanaServiceServer) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSlotHeight not implemented") +} +func (UnimplementedSolanaServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") +} +func (UnimplementedSolanaServiceServer) QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogs not implemented") +} +func (UnimplementedSolanaServiceServer) RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterLogTracking not implemented") +} +func (UnimplementedSolanaServiceServer) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") +} +func (UnimplementedSolanaServiceServer) SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") +} +func (UnimplementedSolanaServiceServer) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") +} +func (UnimplementedSolanaServiceServer) mustEmbedUnimplementedSolanaServiceServer() {} +func (UnimplementedSolanaServiceServer) testEmbeddedByValue() {} + +// UnsafeSolanaServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SolanaServiceServer will +// result in compilation errors. +type UnsafeSolanaServiceServer interface { + mustEmbedUnimplementedSolanaServiceServer() +} + +func RegisterSolanaServiceServer(s grpc.ServiceRegistrar, srv SolanaServiceServer) { + // If the following call pancis, it indicates UnimplementedSolanaServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&SolanaService_ServiceDesc, srv) +} + +func _SolanaService_GetAccountInfoWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountInfoWithOptsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetAccountInfoWithOpts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetAccountInfoWithOpts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetAccountInfoWithOpts(ctx, req.(*GetAccountInfoWithOptsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetBalance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetBalance(ctx, req.(*GetBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetBlock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetBlock(ctx, req.(*GetBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetFeeForMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFeeForMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetFeeForMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetFeeForMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetFeeForMessage(ctx, req.(*GetFeeForMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetMultipleAccountsWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMultipleAccountsWithOptsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetMultipleAccountsWithOpts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetMultipleAccountsWithOpts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetMultipleAccountsWithOpts(ctx, req.(*GetMultipleAccountsWithOptsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetSignatureStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSignatureStatusesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetSignatureStatuses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetSignatureStatuses_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetSignatureStatuses(ctx, req.(*GetSignatureStatusesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetSlotHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSlotHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetSlotHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetSlotHeight_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetSlotHeight(ctx, req.(*GetSlotHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).GetTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_GetTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_QueryTrackedLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTrackedLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).QueryTrackedLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_QueryTrackedLogs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).QueryTrackedLogs(ctx, req.(*QueryTrackedLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_RegisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterLogTrackingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).RegisterLogTracking(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_RegisterLogTracking_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).RegisterLogTracking(ctx, req.(*RegisterLogTrackingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_SimulateTX_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimulateTXRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).SimulateTX(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_SimulateTX_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).SimulateTX(ctx, req.(*SimulateTXRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_SubmitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).SubmitTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_SubmitTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).SubmitTransaction(ctx, req.(*SubmitTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolanaService_UnregisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnregisterLogTrackingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServiceServer).UnregisterLogTracking(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolanaService_UnregisterLogTracking_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServiceServer).UnregisterLogTracking(ctx, req.(*UnregisterLogTrackingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SolanaService_ServiceDesc is the grpc.ServiceDesc for SolanaService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SolanaService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "loop.solana.SolanaService", + HandlerType: (*SolanaServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccountInfoWithOpts", + Handler: _SolanaService_GetAccountInfoWithOpts_Handler, + }, + { + MethodName: "GetBalance", + Handler: _SolanaService_GetBalance_Handler, + }, + { + MethodName: "GetBlock", + Handler: _SolanaService_GetBlock_Handler, + }, + { + MethodName: "GetFeeForMessage", + Handler: _SolanaService_GetFeeForMessage_Handler, + }, + { + MethodName: "GetMultipleAccountsWithOpts", + Handler: _SolanaService_GetMultipleAccountsWithOpts_Handler, + }, + { + MethodName: "GetSignatureStatuses", + Handler: _SolanaService_GetSignatureStatuses_Handler, + }, + { + MethodName: "GetSlotHeight", + Handler: _SolanaService_GetSlotHeight_Handler, + }, + { + MethodName: "GetTransaction", + Handler: _SolanaService_GetTransaction_Handler, + }, + { + MethodName: "QueryTrackedLogs", + Handler: _SolanaService_QueryTrackedLogs_Handler, + }, + { + MethodName: "RegisterLogTracking", + Handler: _SolanaService_RegisterLogTracking_Handler, + }, + { + MethodName: "SimulateTX", + Handler: _SolanaService_SimulateTX_Handler, + }, + { + MethodName: "SubmitTransaction", + Handler: _SolanaService_SubmitTransaction_Handler, + }, + { + MethodName: "UnregisterLogTracking", + Handler: _SolanaService_UnregisterLogTracking_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "solana.proto", +} diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index 38e6304a15..9b72f95305 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -115,6 +115,9 @@ type IdlTypeArray struct { Num int } +// matches solana lp-types IndexedValue +type IndexedValue []byte + type IdlTypeDefTyKind string const ( diff --git a/pkg/types/query/primitives/solana/solana.go b/pkg/types/query/primitives/solana/solana.go new file mode 100644 index 0000000000..c23fab049c --- /dev/null +++ b/pkg/types/query/primitives/solana/solana.go @@ -0,0 +1,72 @@ +package solana + +import ( + "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" +) + +type Visitor interface { + Address(primitive *Address) + EventSig(primitive *EventSig) + EventBySubkey(primitive *EventBySubkey) +} + +type Address struct { + PubKey solana.PublicKey +} + +func (a *Address) Accept(visitor primitives.Visitor) { + if v, ok := visitor.(Visitor); ok { + v.Address(a) + } +} + +func NewAddressFilter(address solana.PublicKey) query.Expression { + return query.Expression{ + Primitive: &Address{PubKey: address}, + } +} + +type EventSig struct { + Sig solana.EventSignature +} + +func (e *EventSig) Accept(visitor primitives.Visitor) { + if v, ok := visitor.(Visitor); ok { + v.EventSig(e) + } +} + +func NewEventSigFilter(e solana.EventSignature) query.Expression { + return query.Expression{ + Primitive: &EventSig{ + Sig: e, + }, + } +} + +type EventBySubkey struct { + SubKeyIndex uint64 + ValueComparers []IndexedValueComparator +} + +type IndexedValueComparator struct { + Value []solana.IndexedValue + Operator primitives.ComparisonOperator +} + +func (esk *EventBySubkey) Accept(visitor primitives.Visitor) { + if v, ok := visitor.(Visitor); ok { + v.EventBySubkey(esk) + } +} + +func NewEventBySubkeyFilter(subkeyIndex uint64, comparers []IndexedValueComparator) query.Expression { + return query.Expression{ + Primitive: &EventBySubkey{ + SubKeyIndex: subkeyIndex, + ValueComparers: comparers, + }, + } +} From 7905c40dca3c4cd0bfcae39d7b604cb6649e18f1 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 05:33:58 -0500 Subject: [PATCH 06/21] add proto converters & hook up solana service --- pkg/chains/solana/proto_helpers.go | 1712 +++++++++++++ pkg/chains/solana/proto_helpers_test.go | 403 ++++ pkg/chains/solana/solana.pb.go | 2669 ++++++++++++++++----- pkg/chains/solana/solana.proto | 238 +- pkg/chains/solana/solana_grpc.pb.go | 314 +-- pkg/loop/internal/example-relay/main.go | 4 + pkg/loop/internal/relayer/relayer.go | 13 +- pkg/loop/internal/relayer/solana.go | 394 +++ pkg/loop/internal/relayer/test/relayer.go | 4 + pkg/loop/internal/relayerset/client.go | 38 +- pkg/loop/internal/relayerset/relayer.go | 4 + pkg/loop/internal/relayerset/solana.go | 331 +++ pkg/loop/internal/types/types.go | 1 + pkg/loop/mocks/relayer.go | 57 + pkg/loop/relayer_service.go | 7 + pkg/types/chains/solana/lp_types.go | 2 +- pkg/types/chains/solana/solana.go | 201 +- pkg/types/core/mocks/relayer.go | 57 + pkg/types/core/relayerset.go | 2 + 19 files changed, 5605 insertions(+), 846 deletions(-) create mode 100644 pkg/chains/solana/proto_helpers.go create mode 100644 pkg/chains/solana/proto_helpers_test.go create mode 100644 pkg/loop/internal/relayer/solana.go create mode 100644 pkg/loop/internal/relayerset/solana.go diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go new file mode 100644 index 0000000000..6fd967dd6d --- /dev/null +++ b/pkg/chains/solana/proto_helpers.go @@ -0,0 +1,1712 @@ +package solana + +import ( + "errors" + "fmt" + "time" + + "github.com/mr-tron/base58" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + codecpb "github.com/smartcontractkit/chainlink-common/pkg/internal/codec" + chaincommonpb "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + typesolana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + solprimitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives/solana" + valuespb "github.com/smartcontractkit/chainlink-protos/cre/go/values/pb" +) + +func ConvertPublicKeysFromProto(pubKeys [][]byte) ([]typesolana.PublicKey, error) { + out := make([]typesolana.PublicKey, 0, len(pubKeys)) + var errs []error + for i, b := range pubKeys { + pk, err := ConvertPublicKeyFromProto(b) + if err != nil { + errs = append(errs, fmt.Errorf("public key[%d]: %w", i, err)) + continue + } + out = append(out, pk) + } + if len(errs) > 0 { + return nil, errors.Join(errs...) + } + return out, nil +} + +func ConvertPublicKeyFromProto(b []byte) (typesolana.PublicKey, error) { + if err := ValidatePublicKeyBytes(b); err != nil { + return typesolana.PublicKey{}, err + } + return typesolana.PublicKey(b), nil +} + +func ValidatePublicKeyBytes(b []byte) error { + if b == nil { + return fmt.Errorf("address can't be nil") + } + if len(b) != typesolana.PublicKeyLength { + return fmt.Errorf("invalid public key: got %d bytes, expected %d, value=%s", + len(b), typesolana.PublicKeyLength, base58.Encode(b)) + } + return nil +} + +func ConvertSignatureFromProto(b []byte) (typesolana.Signature, error) { + if err := ValidateSignatureBytes(b); err != nil { + return typesolana.Signature{}, err + } + var s typesolana.Signature + copy(s[:], b[:typesolana.SignatureLength]) + return s, nil +} + +func ConvertSignaturesFromProto(arr [][]byte) ([]typesolana.Signature, error) { + out := make([]typesolana.Signature, 0, len(arr)) + var errs []error + for i, b := range arr { + s, err := ConvertSignatureFromProto(b) + if err != nil { + errs = append(errs, fmt.Errorf("signature[%d]: %w", i, err)) + continue + } + out = append(out, s) + } + if len(errs) > 0 { + return nil, errors.Join(errs...) + } + return out, nil +} + +func ConvertSignaturesToProto(sigs []typesolana.Signature) [][]byte { + out := make([][]byte, 0, len(sigs)) + for _, s := range sigs { + out = append(out, s[:]) + } + return out +} + +func ValidateSignatureBytes(b []byte) error { + if b == nil { + return fmt.Errorf("signature can't be nil") + } + if len(b) != typesolana.SignatureLength { + return fmt.Errorf("invalid signature: got %d bytes, expected %d, value=%s", + len(b), typesolana.SignatureLength, base58.Encode(b)) + } + return nil +} + +func ConvertHashFromProto(b []byte) (typesolana.Hash, error) { + if b == nil { + return typesolana.Hash{}, fmt.Errorf("hash can't be nil") + } + + if len(b) != solana.HashLength { + return typesolana.Hash{}, fmt.Errorf("invalid hash: got %d bytes, expected %d, value=%s", + len(b), solana.HashLength, base58.Encode(b)) + } + return typesolana.Hash(typesolana.PublicKey(b)), nil +} + +func ConvertEventSigFromProto(b []byte) (typesolana.EventSignature, error) { + if b == nil { + return typesolana.EventSignature{}, fmt.Errorf("hash can't be nil") + } + + if len(b) != solana.EventSignatureLength { + return typesolana.EventSignature{}, fmt.Errorf("invalid event signature: got %d bytes, expected %d, value=%x", + len(b), solana.EventSignatureLength, b) + } + + return typesolana.EventSignature(b), nil + +} + +func ConvertEncodingTypeFromProto(e EncodingType) typesolana.EncodingType { + switch e { + case EncodingType_ENCODING_BASE58: + return typesolana.EncodingBase58 + case EncodingType_ENCODING_BASE64: + return typesolana.EncodingBase64 + case EncodingType_ENCODING_BASE64_ZST: + return typesolana.EncodingBase64Zstd + case EncodingType_ENCODING_JSON: + return typesolana.EncodingJSON + case EncodingType_ENCODING_JSON_PARSED: + return typesolana.EncodingJSONParsed + default: + return typesolana.EncodingType("") + } +} + +func ConvertEncodingTypeToProto(e typesolana.EncodingType) EncodingType { + switch e { + case typesolana.EncodingBase64: + return EncodingType_ENCODING_BASE64 + case typesolana.EncodingBase58: + return EncodingType_ENCODING_BASE58 + case typesolana.EncodingBase64Zstd: + return EncodingType_ENCODING_BASE64_ZST + case typesolana.EncodingJSONParsed: + return EncodingType_ENCODING_JSON_PARSED + case typesolana.EncodingJSON: + return EncodingType_ENCODING_JSON + default: + return EncodingType_ENCODING_NONE + } +} + +func ConvertCommitmentFromProto(c CommitmentType) typesolana.CommitmentType { + switch c { + case CommitmentType_COMMITMENT_CONFIRMED: + return typesolana.CommitmentConfirmed + case CommitmentType_COMMITMENT_FINALIZED: + return typesolana.CommitmentFinalized + case CommitmentType_COMMITMENT_PROCESSED: + return typesolana.CommitmentProcessed + default: + return typesolana.CommitmentType("") + } +} + +func ConvertCommitmentToProto(c typesolana.CommitmentType) CommitmentType { + switch c { + case typesolana.CommitmentFinalized: + return CommitmentType_COMMITMENT_FINALIZED + case typesolana.CommitmentConfirmed: + return CommitmentType_COMMITMENT_CONFIRMED + case typesolana.CommitmentProcessed: + return CommitmentType_COMMITMENT_PROCESSED + default: + return CommitmentType_COMMITMENT_NONE + } +} + +func ConvertConfirmationStatusToProto(c typesolana.ConfirmationStatusType) ConfirmationStatusType { + switch c { + case typesolana.ConfirmationStatusFinalized: + return ConfirmationStatusType_CONFIRMATION_FINALIZED + case typesolana.ConfirmationStatusConfirmed: + return ConfirmationStatusType_CONFIRMATION_CONFIRMED + case typesolana.ConfirmationStatusProcessed: + return ConfirmationStatusType_CONFIRMATION_PROCESSED + default: + return ConfirmationStatusType_CONFIRMATION_NONE + } +} + +func ConvertConfirmationStatusFromProto(c ConfirmationStatusType) typesolana.ConfirmationStatusType { + switch c { + case ConfirmationStatusType_CONFIRMATION_CONFIRMED: + return typesolana.ConfirmationStatusConfirmed + case ConfirmationStatusType_CONFIRMATION_FINALIZED: + return typesolana.ConfirmationStatusFinalized + case ConfirmationStatusType_CONFIRMATION_PROCESSED: + return typesolana.ConfirmationStatusProcessed + default: + return typesolana.ConfirmationStatusType("") + } +} + +func ConvertTransactionDetailsFromProto(s TransactionDetailsType) typesolana.TransactionDetailsType { + switch s { + case TransactionDetailsType_TRANSACTION_DETAILS_FULL: + return typesolana.TransactionDetailsFull + case TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS: + return typesolana.TransactionDetailsAccounts + case TransactionDetailsType_TRANSACTION_DETAILS_NONE: + return typesolana.TransactionDetailsNone + case TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES: + return typesolana.TransactionDetailsSignatures + default: + return typesolana.TransactionDetailsType("") + } +} + +func ConvertTransactionDetailsToProto(t typesolana.TransactionDetailsType) TransactionDetailsType { + switch t { + case typesolana.TransactionDetailsAccounts: + return TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS + case typesolana.TransactionDetailsNone: + return TransactionDetailsType_TRANSACTION_DETAILS_NONE + case typesolana.TransactionDetailsSignatures: + return TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES + case typesolana.TransactionDetailsFull: + return TransactionDetailsType_TRANSACTION_DETAILS_FULL + default: + return TransactionDetailsType_TRANSACTION_DETAILS_FULL + } +} + +func ConvertDataSliceFromProto(p *DataSlice) *typesolana.DataSlice { + if p == nil { + return nil + } + return &typesolana.DataSlice{ + Offset: ptrUint64(p.Offset), + Length: ptrUint64(p.Length), + } +} + +func ConvertDataSliceToProto(d *typesolana.DataSlice) *DataSlice { + if d == nil { + return nil + } + var off, ln uint64 + if d.Offset != nil { + off = *d.Offset + } + if d.Length != nil { + ln = *d.Length + } + return &DataSlice{ + Offset: off, + Length: ln, + } +} + +func ConvertUiTokenAmountFromProto(p *UiTokenAmount) *typesolana.UiTokenAmount { + if p == nil { + return nil + } + return &typesolana.UiTokenAmount{ + Amount: p.Amount, + Decimals: uint8(p.Decimals), + UiAmountString: p.UiAmountString, + } +} + +func ConvertUiTokenAmountToProto(u *typesolana.UiTokenAmount) *UiTokenAmount { + if u == nil { + return nil + } + return &UiTokenAmount{ + Amount: u.Amount, + Decimals: uint32(u.Decimals), + UiAmountString: u.UiAmountString, + } +} + +func ConvertAccountFromProto(p *Account) (*typesolana.Account, error) { + if p == nil { + return nil, nil + } + owner, err := ConvertPublicKeyFromProto(p.Owner) + if err != nil { + return nil, fmt.Errorf("owner: %w", err) + } + data, err := ConvertDataBytesOrJSONFromProto(p.Data) + if err != nil { + return nil, fmt.Errorf("data: %w", err) + } + return &typesolana.Account{ + Lamports: p.Lamports, + Owner: owner, + Data: data, + Executable: p.Executable, + RentEpoch: valuespb.NewIntFromBigInt(p.RentEpoch), + Space: p.Space, + }, nil +} + +func ConvertAccountToProto(a *typesolana.Account) *Account { + if a == nil { + return nil + } + return &Account{ + Lamports: a.Lamports, + Owner: a.Owner[:], + Data: ConvertDataBytesOrJSONToProto(a.Data), + Executable: a.Executable, + RentEpoch: valuespb.NewBigIntFromInt(a.RentEpoch), + Space: a.Space, + } +} + +func ConvertDataBytesOrJSONFromProto(p *DataBytesOrJSON) (*typesolana.DataBytesOrJSON, error) { + if p == nil { + return nil, nil + } + return &typesolana.DataBytesOrJSON{ + RawDataEncoding: ConvertEncodingTypeFromProto(p.RawDataEncoding), + AsDecodedBinary: p.AsDecodedBinary, + AsJSON: p.AsJson, + }, nil +} + +func ConvertDataBytesOrJSONToProto(d *typesolana.DataBytesOrJSON) *DataBytesOrJSON { + if d == nil { + return nil + } + return &DataBytesOrJSON{ + RawDataEncoding: ConvertEncodingTypeToProto(d.RawDataEncoding), + AsDecodedBinary: d.AsDecodedBinary, + AsJson: d.AsJSON, + } +} + +func ConvertGetAccountInfoOptsFromProto(p *GetAccountInfoOpts) *typesolana.GetAccountInfoOpts { + if p == nil { + return nil + } + return &typesolana.GetAccountInfoOpts{ + Encoding: ConvertEncodingTypeFromProto(p.Encoding), + Commitment: ConvertCommitmentFromProto(p.Commitment), + DataSlice: ConvertDataSliceFromProto(p.DataSlice), + MinContextSlot: ptrUint64(p.MinContextSlot), + } +} + +func ConvertGetAccountInfoOptsToProto(o *typesolana.GetAccountInfoOpts) *GetAccountInfoOpts { + if o == nil { + return nil + } + var min uint64 + if o.MinContextSlot != nil { + min = *o.MinContextSlot + } + return &GetAccountInfoOpts{ + Encoding: ConvertEncodingTypeToProto(o.Encoding), + Commitment: ConvertCommitmentToProto(o.Commitment), + DataSlice: ConvertDataSliceToProto(o.DataSlice), + MinContextSlot: min, + } +} + +func ConvertGetMultipleAccountsOptsFromProto(p *GetMultipleAccountsOpts) *typesolana.GetMultipleAccountsOpts { + if p == nil { + return nil + } + return &typesolana.GetMultipleAccountsOpts{ + Encoding: ConvertEncodingTypeFromProto(p.Encoding), + Commitment: ConvertCommitmentFromProto(p.Commitment), + DataSlice: ConvertDataSliceFromProto(p.DataSlice), + MinContextSlot: ptrUint64(p.MinContextSlot), + } +} + +func ConvertGetMultipleAccountsOptsToProto(o *typesolana.GetMultipleAccountsOpts) *GetMultipleAccountsOpts { + if o == nil { + return nil + } + var min uint64 + if o.MinContextSlot != nil { + min = *o.MinContextSlot + } + return &GetMultipleAccountsOpts{ + Encoding: ConvertEncodingTypeToProto(o.Encoding), + Commitment: ConvertCommitmentToProto(o.Commitment), + DataSlice: ConvertDataSliceToProto(o.DataSlice), + MinContextSlot: min, + } +} + +func ConvertGetBlockOptsFromProto(p *GetBlockOpts) *typesolana.GetBlockOpts { + if p == nil { + return nil + } + return &typesolana.GetBlockOpts{ + Encoding: ConvertEncodingTypeFromProto(p.Encoding), + TransactionDetails: ConvertTransactionDetailsFromProto(p.TransactionDetails), + Rewards: ptrBool(p.Rewards), + Commitment: ConvertCommitmentFromProto(p.Commitment), + MaxSupportedTransactionVersion: ptrUint64(p.MaxSupportedTransactionVersion), + } +} + +func ConvertGetBlockOptsToProto(o *typesolana.GetBlockOpts) *GetBlockOpts { + if o == nil { + return nil + } + var rewards bool + if o.Rewards != nil { + rewards = *o.Rewards + } + var maxv uint64 + if o.MaxSupportedTransactionVersion != nil { + maxv = *o.MaxSupportedTransactionVersion + } + return &GetBlockOpts{ + Encoding: ConvertEncodingTypeToProto(o.Encoding), + TransactionDetails: ConvertTransactionDetailsToProto(o.TransactionDetails), + Rewards: rewards, + Commitment: ConvertCommitmentToProto(o.Commitment), + MaxSupportedTransactionVersion: maxv, + } +} + +func ConvertMessageHeaderFromProto(p *MessageHeader) typesolana.MessageHeader { + if p == nil { + return typesolana.MessageHeader{} + } + return typesolana.MessageHeader{ + NumRequiredSignatures: uint8(p.NumRequiredSignatures), + NumReadonlySignedAccounts: uint8(p.NumReadonlySignedAccounts), + NumReadonlyUnsignedAccounts: uint8(p.NumReadonlyUnsignedAccounts), + } +} + +func ConvertMessageHeaderToProto(h typesolana.MessageHeader) *MessageHeader { + return &MessageHeader{ + NumRequiredSignatures: uint32(h.NumRequiredSignatures), + NumReadonlySignedAccounts: uint32(h.NumReadonlySignedAccounts), + NumReadonlyUnsignedAccounts: uint32(h.NumReadonlyUnsignedAccounts), + } +} + +func ConvertCompiledInstructionFromProto(p *CompiledInstruction) typesolana.CompiledInstruction { + if p == nil { + return typesolana.CompiledInstruction{} + } + accts := make([]uint16, len(p.Accounts)) + for i, a := range p.Accounts { + accts[i] = uint16(a) + } + return typesolana.CompiledInstruction{ + ProgramIDIndex: uint16(p.ProgramIdIndex), + Accounts: accts, + Data: p.Data, + StackHeight: uint16(p.StackHeight), + } +} + +func ConvertCompiledInstructionToProto(ci typesolana.CompiledInstruction) *CompiledInstruction { + accts := make([]uint32, len(ci.Accounts)) + for i, a := range ci.Accounts { + accts[i] = uint32(a) + } + return &CompiledInstruction{ + ProgramIdIndex: uint32(ci.ProgramIDIndex), + Accounts: accts, + Data: ci.Data, + StackHeight: uint32(ci.StackHeight), + } +} + +func ConvertInnerInstructionFromProto(p *InnerInstruction) typesolana.InnerInstruction { + if p == nil { + return typesolana.InnerInstruction{} + } + out := typesolana.InnerInstruction{ + Index: uint16(p.Index), + Instructions: make([]typesolana.CompiledInstruction, 0, len(p.Instructions)), + } + for _, in := range p.Instructions { + out.Instructions = append(out.Instructions, ConvertCompiledInstructionFromProto(in)) + } + return out +} + +func ConvertInnerInstructionToProto(ii typesolana.InnerInstruction) *InnerInstruction { + out := &InnerInstruction{ + Index: uint32(ii.Index), + Instructions: make([]*CompiledInstruction, 0, len(ii.Instructions)), + } + for _, in := range ii.Instructions { + out.Instructions = append(out.Instructions, ConvertCompiledInstructionToProto(in)) + } + return out +} + +func ConvertLoadedAddressesFromProto(p *LoadedAddresses) typesolana.LoadedAddresses { + if p == nil { + return typesolana.LoadedAddresses{} + } + ro, _ := ConvertPublicKeysFromProto(p.Readonly) + wr, _ := ConvertPublicKeysFromProto(p.Writable) + return typesolana.LoadedAddresses{ + ReadOnly: ro, + Writable: wr, + } +} + +func ConvertLoadedAddressesToProto(l typesolana.LoadedAddresses) *LoadedAddresses { + return &LoadedAddresses{ + Readonly: ConvertPublicKeysToProto(l.ReadOnly), + Writable: ConvertPublicKeysToProto(l.Writable), + } +} + +func ConvertPublicKeysToProto(keys []typesolana.PublicKey) [][]byte { + out := make([][]byte, 0, len(keys)) + for _, k := range keys { + out = append(out, k[:]) + } + return out +} + +func ConvertParsedMessageFromProto(p *ParsedMessage) (typesolana.Message, error) { + if p == nil { + return typesolana.Message{}, nil + } + rb, err := ConvertHashFromProto(p.RecentBlockhash) + if err != nil { + return typesolana.Message{}, fmt.Errorf("recent blockhash: %w", err) + } + keys, err := ConvertPublicKeysFromProto(p.AccountKeys) + if err != nil { + return typesolana.Message{}, fmt.Errorf("account keys: %w", err) + } + msg := typesolana.Message{ + AccountKeys: keys, + Header: ConvertMessageHeaderFromProto(p.Header), + RecentBlockhash: rb, + Instructions: make([]typesolana.CompiledInstruction, 0, len(p.Instructions)), + } + for _, ins := range p.Instructions { + msg.Instructions = append(msg.Instructions, ConvertCompiledInstructionFromProto(ins)) + } + return msg, nil +} + +func ConvertParsedMessageToProto(m typesolana.Message) *ParsedMessage { + out := &ParsedMessage{ + RecentBlockhash: m.RecentBlockhash[:], + AccountKeys: ConvertPublicKeysToProto(m.AccountKeys), + Header: ConvertMessageHeaderToProto(m.Header), + Instructions: make([]*CompiledInstruction, 0, len(m.Instructions)), + } + for _, ins := range m.Instructions { + out.Instructions = append(out.Instructions, ConvertCompiledInstructionToProto(ins)) + } + return out +} + +func ConvertParsedTransactionFromProto(p *ParsedTransaction) (typesolana.Transaction, error) { + if p == nil { + return typesolana.Transaction{}, nil + } + sigs, err := ConvertSignaturesFromProto(p.Signatures) + if err != nil { + return typesolana.Transaction{}, fmt.Errorf("signatures: %w", err) + } + msg, err := ConvertParsedMessageFromProto(p.Message) + if err != nil { + return typesolana.Transaction{}, fmt.Errorf("message: %w", err) + } + return typesolana.Transaction{ + Signatures: sigs, + Message: msg, + }, nil +} + +func ConvertParsedTransactionToProto(t typesolana.Transaction) *ParsedTransaction { + return &ParsedTransaction{ + Signatures: ConvertSignaturesToProto(t.Signatures), + Message: ConvertParsedMessageToProto(t.Message), + } +} + +func ConvertTokenBalanceFromProto(p *TokenBalance) (*typesolana.TokenBalance, error) { + if p == nil { + return nil, nil + } + mint, err := ConvertPublicKeyFromProto(p.Mint) + if err != nil { + return nil, fmt.Errorf("mint: %w", err) + } + var owner *typesolana.PublicKey + if len(p.Owner) > 0 { + o, err := ConvertPublicKeyFromProto(p.Owner) + if err != nil { + return nil, fmt.Errorf("owner: %w", err) + } + owner = &o + } + var program *typesolana.PublicKey + if len(p.ProgramId) > 0 { + prog, err := ConvertPublicKeyFromProto(p.ProgramId) + if err != nil { + return nil, fmt.Errorf("programId: %w", err) + } + program = &prog + } + return &typesolana.TokenBalance{ + AccountIndex: uint16(p.AccountIndex), + Owner: owner, + ProgramId: program, + Mint: mint, + UiTokenAmount: ConvertUiTokenAmountFromProto(p.Ui), + }, nil +} + +func ConvertTokenBalanceToProto(tb *typesolana.TokenBalance) *TokenBalance { + if tb == nil { + return nil + } + var owner, program []byte + if tb.Owner != nil { + tmp := *tb.Owner + owner = tmp[:] + } + if tb.ProgramId != nil { + tmp := *tb.ProgramId + program = tmp[:] + } + return &TokenBalance{ + AccountIndex: uint32(tb.AccountIndex), + Owner: owner, + ProgramId: program, + Mint: tb.Mint[:], + Ui: ConvertUiTokenAmountToProto(tb.UiTokenAmount), + } +} + +func ConvertReturnDataFromProto(p *ReturnData) (*typesolana.ReturnData, error) { + if p == nil { + return nil, nil + } + prog, err := ConvertPublicKeyFromProto(p.ProgramId) + if err != nil { + return nil, fmt.Errorf("programId: %w", err) + } + return &typesolana.ReturnData{ + ProgramId: prog, + Data: typesolana.Data{ + Content: p.Data.GetContent(), + Encoding: ConvertEncodingTypeFromProto(p.Data.GetEncoding()), + }, + }, nil +} + +func ConvertReturnDataToProto(r *typesolana.ReturnData) *ReturnData { + if r == nil { + return nil + } + + return &ReturnData{ + ProgramId: r.ProgramId[:], + Data: &Data{ + Content: r.Data.Content, + Encoding: ConvertEncodingTypeToProto(r.Data.Encoding), + }, + } +} + +func ConvertTransactionMetaFromProto(p *TransactionMeta) (*typesolana.TransactionMeta, error) { + if p == nil { + return nil, nil + } + preTB := make([]typesolana.TokenBalance, 0, len(p.PreTokenBalances)) + for _, x := range p.PreTokenBalances { + tb, err := ConvertTokenBalanceFromProto(x) + if err != nil { + return nil, fmt.Errorf("pre token balance: %w", err) + } + preTB = append(preTB, *tb) + } + postTB := make([]typesolana.TokenBalance, 0, len(p.PostTokenBalances)) + for _, x := range p.PostTokenBalances { + tb, err := ConvertTokenBalanceFromProto(x) + if err != nil { + return nil, fmt.Errorf("post token balance: %w", err) + } + postTB = append(postTB, *tb) + } + inner := make([]typesolana.InnerInstruction, 0, len(p.InnerInstructions)) + for _, in := range p.InnerInstructions { + inner = append(inner, ConvertInnerInstructionFromProto(in)) + } + ret, err := ConvertReturnDataFromProto(p.ReturnData) + if err != nil { + return nil, fmt.Errorf("return data: %w", err) + } + la := ConvertLoadedAddressesFromProto(p.LoadedAddresses) + + meta := &typesolana.TransactionMeta{ + Err: p.ErrJson, + Fee: p.Fee, + PreBalances: p.PreBalances, + PostBalances: p.PostBalances, + InnerInstructions: inner, + PreTokenBalances: preTB, + PostTokenBalances: postTB, + LogMessages: p.LogMessages, + LoadedAddresses: la, + ReturnData: *ret, + ComputeUnitsConsumed: ptrUint64(p.ComputeUnitsConsumed), + } + return meta, nil +} + +func ConvertTransactionMetaToProto(m *typesolana.TransactionMeta) *TransactionMeta { + if m == nil { + return nil + } + preTB := make([]*TokenBalance, 0, len(m.PreTokenBalances)) + for i := range m.PreTokenBalances { + preTB = append(preTB, ConvertTokenBalanceToProto(&m.PreTokenBalances[i])) + } + postTB := make([]*TokenBalance, 0, len(m.PostTokenBalances)) + for i := range m.PostTokenBalances { + postTB = append(postTB, ConvertTokenBalanceToProto(&m.PostTokenBalances[i])) + } + inner := make([]*InnerInstruction, 0, len(m.InnerInstructions)) + for _, in := range m.InnerInstructions { + inner = append(inner, ConvertInnerInstructionToProto(in)) + } + var cuc uint64 + if m.ComputeUnitsConsumed != nil { + cuc = *m.ComputeUnitsConsumed + } + return &TransactionMeta{ + ErrJson: m.Err, + Fee: m.Fee, + PreBalances: m.PreBalances, + PostBalances: m.PostBalances, + LogMessages: m.LogMessages, + PreTokenBalances: preTB, + PostTokenBalances: postTB, + InnerInstructions: inner, + LoadedAddresses: ConvertLoadedAddressesToProto(m.LoadedAddresses), + ReturnData: ConvertReturnDataToProto(&m.ReturnData), + ComputeUnitsConsumed: cuc, + } +} + +func ConvertTransactionEnvelopeFromProto(p *TransactionEnvelope) (typesolana.TransactionResultEnvelope, error) { + if p == nil { + return typesolana.TransactionResultEnvelope{}, nil + } + var out typesolana.TransactionResultEnvelope + switch t := p.GetTransaction().(type) { + case *TransactionEnvelope_Raw: + out.AsDecodedBinary = typesolana.Data{ + Content: t.Raw, + Encoding: typesolana.EncodingBase64, + } + case *TransactionEnvelope_Parsed: + ptx, err := ConvertParsedTransactionFromProto(t.Parsed) + if err != nil { + return typesolana.TransactionResultEnvelope{}, err + } + out.AsParsedTransaction = &ptx + default: + } + return out, nil +} + +func ConvertTransactionEnvelopeToProto(e typesolana.TransactionResultEnvelope) *TransactionEnvelope { + switch { + case e.AsParsedTransaction != nil: + return &TransactionEnvelope{ + Transaction: &TransactionEnvelope_Parsed{ + Parsed: ConvertParsedTransactionToProto(*e.AsParsedTransaction), + }, + } + case len(e.AsDecodedBinary.Content) > 0: + return &TransactionEnvelope{ + Transaction: &TransactionEnvelope_Raw{ + Raw: e.AsDecodedBinary.Content, + }, + } + default: + return &TransactionEnvelope{} + } +} + +func ConvertTransactionWithMetaFromProto(p *TransactionWithMeta) (*typesolana.TransactionWithMeta, error) { + if p == nil { + return nil, nil + } + env, err := ConvertDataBytesOrJSONFromProto(p.Transaction) + if err != nil { + return nil, fmt.Errorf("transaction bytes/json: %w", err) + } + meta, err := ConvertTransactionMetaFromProto(p.Meta) + if err != nil { + return nil, fmt.Errorf("meta: %w", err) + } + t := typesolana.UnixTimeSeconds(p.BlockTime) + + return &typesolana.TransactionWithMeta{ + Slot: p.Slot, + BlockTime: &t, + Transaction: env, + Meta: meta, + Version: typesolana.TransactionVersion(p.Version), + }, nil +} + +func ConvertTransactionWithMetaToProto(t *typesolana.TransactionWithMeta) *TransactionWithMeta { + if t == nil { + return nil + } + var bt int64 + if t.BlockTime != nil { + bt = int64(*t.BlockTime) + } + + return &TransactionWithMeta{ + Slot: t.Slot, + BlockTime: bt, + Transaction: ConvertDataBytesOrJSONToProto(t.Transaction), + Meta: ConvertTransactionMetaToProto(t.Meta), + Version: int64(t.Version), + } +} + +func ConvertGetTransactionReplyFromProto(p *GetTransactionReply) (*typesolana.GetTransactionReply, error) { + if p == nil { + return nil, nil + } + env, err := ConvertTransactionEnvelopeFromProto(p.Transaction) + if err != nil { + return nil, err + } + meta, err := ConvertTransactionMetaFromProto(p.Meta) + if err != nil { + return nil, err + } + var bt *typesolana.UnixTimeSeconds + if p.BlockTime != 0 { + bt = ptrUnix(typesolana.UnixTimeSeconds(p.BlockTime)) + } + + return &typesolana.GetTransactionReply{ + Slot: p.Slot, + BlockTime: bt, + Transaction: &env, + Meta: meta, + }, nil +} + +func ConvertGetTransactionReplyToProto(r *typesolana.GetTransactionReply) *GetTransactionReply { + if r == nil { + return nil + } + var bt int64 + if r.BlockTime != nil { + bt = int64(*r.BlockTime) + } + return &GetTransactionReply{ + Slot: r.Slot, + BlockTime: bt, + Transaction: ConvertTransactionEnvelopeToProto(*r.Transaction), + Meta: ConvertTransactionMetaToProto(r.Meta), + } +} + +func ConvertGetTransactionRequestFromProto(p *GetTransactionRequest) (typesolana.GetTransactionRequest, error) { + sig, err := ConvertSignatureFromProto(p.Signature) + if err != nil { + return typesolana.GetTransactionRequest{}, err + } + return typesolana.GetTransactionRequest{Signature: sig}, nil +} + +func ConvertGetTransactionRequestToProto(r typesolana.GetTransactionRequest) *GetTransactionRequest { + return &GetTransactionRequest{Signature: r.Signature[:]} +} + +func ConvertGetBalanceReplyFromProto(p *GetBalanceReply) *typesolana.GetBalanceReply { + if p == nil { + return nil + } + return &typesolana.GetBalanceReply{Value: p.Value} +} + +func ConvertGetBalanceReplyToProto(r *typesolana.GetBalanceReply) *GetBalanceReply { + if r == nil { + return nil + } + return &GetBalanceReply{Value: r.Value} +} + +func ConvertGetBalanceRequestFromProto(p *GetBalanceRequest) (typesolana.GetBalanceRequest, error) { + pk, err := ConvertPublicKeyFromProto(p.Addr) + if err != nil { + return typesolana.GetBalanceRequest{}, err + } + return typesolana.GetBalanceRequest{ + Addr: pk, + Commitment: ConvertCommitmentFromProto(p.Commitment), + }, nil +} + +func ConvertGetBalanceRequestToProto(r typesolana.GetBalanceRequest) *GetBalanceRequest { + return &GetBalanceRequest{ + Addr: r.Addr[:], + Commitment: ConvertCommitmentToProto(r.Commitment), + } +} + +func ConvertGetSlotHeightReplyFromProto(p *GetSlotHeightReply) *typesolana.GetSlotHeightReply { + if p == nil { + return nil + } + return &typesolana.GetSlotHeightReply{Height: p.Height} +} + +func ConvertGetSlotHeightReplyToProto(r *typesolana.GetSlotHeightReply) *GetSlotHeightReply { + if r == nil { + return nil + } + return &GetSlotHeightReply{Height: r.Height} +} + +func ConvertGetSlotHeightRequestFromProto(p *GetSlotHeightRequest) typesolana.GetSlotHeightRequest { + return typesolana.GetSlotHeightRequest{Commitment: ConvertCommitmentFromProto(p.Commitment)} +} + +func ConvertGetSlotHeightRequestToProto(r typesolana.GetSlotHeightRequest) *GetSlotHeightRequest { + return &GetSlotHeightRequest{Commitment: ConvertCommitmentToProto(r.Commitment)} +} + +func ConvertGetBlockOptsReplyFromProto(p *GetBlockReply) (*typesolana.GetBlockReply, error) { + if p == nil { + return nil, nil + } + hash, err := ConvertHashFromProto(p.Blockhash) + if err != nil { + return nil, fmt.Errorf("blockhash: %w", err) + } + prev, err := ConvertHashFromProto(p.PreviousBlockhash) + if err != nil { + return nil, fmt.Errorf("previous blockhash: %w", err) + } + txs := make([]typesolana.TransactionWithMeta, 0, len(p.Transactions)) + for _, tx := range p.Transactions { + twm, err := ConvertTransactionWithMetaFromProto(tx) + if err != nil { + return nil, err + } + txs = append(txs, *twm) + } + var sigs []typesolana.Signature + for _, s := range p.Signatures { + ss, err := ConvertSignatureFromProto(s) + if err != nil { + return nil, err + } + sigs = append(sigs, ss) + } + var bt *solana.UnixTimeSeconds + if p.BlockTime != 0 { + bt = ptrUnix(typesolana.UnixTimeSeconds(p.BlockTime)) + } + return &typesolana.GetBlockReply{ + Blockhash: hash, + PreviousBlockhash: prev, + ParentSlot: p.ParentSlot, + Transactions: txs, + Signatures: sigs, + BlockTime: bt, + BlockHeight: ptrUint64(p.BlockHeight), + }, nil +} + +func ConvertGetBlockReplyToProto(r *typesolana.GetBlockReply) *GetBlockReply { + if r == nil { + return nil + } + var bt int64 + if r.BlockTime != nil { + bt = int64(*r.BlockTime) + } + var bh uint64 + if r.BlockHeight != nil { + bh = *r.BlockHeight + } + txs := make([]*TransactionWithMeta, 0, len(r.Transactions)) + for i := range r.Transactions { + txs = append(txs, ConvertTransactionWithMetaToProto(&r.Transactions[i])) + } + sigs := ConvertSignaturesToProto(r.Signatures) + return &GetBlockReply{ + Blockhash: r.Blockhash[:], + PreviousBlockhash: r.PreviousBlockhash[:], + ParentSlot: r.ParentSlot, + Transactions: txs, + Signatures: sigs, + BlockTime: bt, + BlockHeight: bh, + } +} + +func ConvertGetBlockRequestFromProto(p *GetBlockRequest) *typesolana.GetBlockRequest { + if p == nil { + return nil + } + return &typesolana.GetBlockRequest{ + Slot: p.Slot, + Opts: ConvertGetBlockOptsFromProto(p.Opts), + } +} + +func ConvertGetBlockRequestToProto(r *typesolana.GetBlockRequest) *GetBlockRequest { + if r == nil { + return nil + } + return &GetBlockRequest{ + Slot: r.Slot, + Opts: ConvertGetBlockOptsToProto(r.Opts), + } +} + +func ConvertGetFeeForMessageRequestFromProto(p *GetFeeForMessageRequest) *typesolana.GetFeeForMessageRequest { + if p == nil { + return nil + } + return &typesolana.GetFeeForMessageRequest{ + Message: p.Message, + Commitment: ConvertCommitmentFromProto(p.Commitment), + } +} + +func ConvertGetFeeForMessageRequestToProto(r *typesolana.GetFeeForMessageRequest) *GetFeeForMessageRequest { + if r == nil { + return nil + } + return &GetFeeForMessageRequest{ + Message: r.Message, + Commitment: ConvertCommitmentToProto(r.Commitment), + } +} + +func ConvertGetFeeForMessageReplyFromProto(p *GetFeeForMessageReply) *typesolana.GetFeeForMessageReply { + if p == nil { + return nil + } + return &typesolana.GetFeeForMessageReply{Fee: p.Fee} +} + +func ConvertGetFeeForMessageReplyToProto(r *typesolana.GetFeeForMessageReply) *GetFeeForMessageReply { + if r == nil { + return nil + } + return &GetFeeForMessageReply{Fee: r.Fee} +} + +func ConvertGetMultipleAccountsRequestFromProto(p *GetMultipleAccountsWithOptsRequest) *typesolana.GetMultipleAccountsRequest { + if p == nil { + return nil + } + accts, _ := ConvertPublicKeysFromProto(p.Accounts) + return &typesolana.GetMultipleAccountsRequest{ + Accounts: accts, + Opts: ConvertGetMultipleAccountsOptsFromProto(p.Opts), + } +} + +func ConvertGetMultipleAccountsRequestToProto(r *typesolana.GetMultipleAccountsRequest) *GetMultipleAccountsWithOptsRequest { + if r == nil { + return nil + } + return &GetMultipleAccountsWithOptsRequest{ + Accounts: ConvertPublicKeysToProto(r.Accounts), + Opts: ConvertGetMultipleAccountsOptsToProto(r.Opts), + } +} + +func ConvertGetMultipleAccountsReplyFromProto(p *GetMultipleAccountsWithOptsReply) (*typesolana.GetMultipleAccountsReply, error) { + if p == nil { + return nil, nil + } + val := make([]*typesolana.Account, 0, len(p.Value)) + for _, a := range p.Value { + acc, err := ConvertAccountFromProto(a) + if err != nil { + return nil, err + } + val = append(val, acc) + } + return &typesolana.GetMultipleAccountsReply{ + Value: val, + }, nil +} + +func ConvertGetMultipleAccountsReplyToProto(r *typesolana.GetMultipleAccountsReply) *GetMultipleAccountsWithOptsReply { + if r == nil { + return nil + } + val := make([]*Account, 0, len(r.Value)) + for _, a := range r.Value { + val = append(val, ConvertAccountToProto(a)) + } + return &GetMultipleAccountsWithOptsReply{ + Value: val, + } +} + +func ConvertGetSignatureStatusesRequestFromProto(p *GetSignatureStatusesRequest) (*typesolana.GetSignatureStatusesRequest, error) { + if p == nil { + return nil, nil + } + sigs, err := ConvertSignaturesFromProto(p.Sigs) + if err != nil { + return nil, err + } + return &typesolana.GetSignatureStatusesRequest{Sigs: sigs}, nil +} + +func ConvertGetSignatureStatusesRequestToProto(r *typesolana.GetSignatureStatusesRequest) *GetSignatureStatusesRequest { + if r == nil { + return nil + } + return &GetSignatureStatusesRequest{Sigs: ConvertSignaturesToProto(r.Sigs)} +} + +func ConvertGetSignatureStatusesReplyFromProto(p *GetSignatureStatusesReply) *typesolana.GetSignatureStatusesReply { + if p == nil { + return nil + } + out := &typesolana.GetSignatureStatusesReply{Results: make([]typesolana.GetSignatureStatusesResult, 0, len(p.Results))} + for _, r := range p.Results { + out.Results = append(out.Results, typesolana.GetSignatureStatusesResult{ + Slot: r.Slot, + Confirmations: ptrUint64(r.Confirmations), + Err: r.Err, + ConfirmationStatus: ConvertConfirmationStatusFromProto(r.ConfirmationStatus), + }) + } + return out +} + +func ConvertGetSignatureStatusesReplyToProto(r *typesolana.GetSignatureStatusesReply) *GetSignatureStatusesReply { + if r == nil { + return nil + } + out := &GetSignatureStatusesReply{Results: make([]*GetSignatureStatusesResult, 0, len(r.Results))} + for i := range r.Results { + var conf uint64 + if r.Results[i].Confirmations != nil { + conf = *r.Results[i].Confirmations + } + out.Results = append(out.Results, &GetSignatureStatusesResult{ + Slot: r.Results[i].Slot, + Confirmations: conf, + Err: r.Results[i].Err, + ConfirmationStatus: ConvertConfirmationStatusToProto(r.Results[i].ConfirmationStatus), + }) + } + return out +} + +func ConvertSimulateTransactionAccountsOptsFromProto(p *SimulateTransactionAccountsOpts) *typesolana.SimulateTransactionAccountsOpts { + if p == nil { + return nil + } + addrs, _ := ConvertPublicKeysFromProto(p.Addresses) + return &typesolana.SimulateTransactionAccountsOpts{ + Encoding: ConvertEncodingTypeFromProto(p.Encoding), + Addresses: addrs, + } +} + +func ConvertSimulateTransactionAccountsOptsToProto(o *typesolana.SimulateTransactionAccountsOpts) *SimulateTransactionAccountsOpts { + if o == nil { + return nil + } + return &SimulateTransactionAccountsOpts{ + Encoding: ConvertEncodingTypeToProto(o.Encoding), + Addresses: ConvertPublicKeysToProto(o.Addresses), + } +} + +func ConvertSimulateTXOptsFromProto(p *SimulateTXOpts) *typesolana.SimulateTXOpts { + if p == nil { + return nil + } + return &typesolana.SimulateTXOpts{ + SigVerify: p.SigVerify, + Commitment: ConvertCommitmentFromProto(p.Commitment), + ReplaceRecentBlockhash: p.ReplaceRecentBlockhash, + Accounts: ConvertSimulateTransactionAccountsOptsFromProto(p.Accounts), + } +} + +func ConvertSimulateTXOptsToProto(o *typesolana.SimulateTXOpts) *SimulateTXOpts { + if o == nil { + return nil + } + return &SimulateTXOpts{ + SigVerify: o.SigVerify, + Commitment: ConvertCommitmentToProto(o.Commitment), + ReplaceRecentBlockhash: o.ReplaceRecentBlockhash, + Accounts: ConvertSimulateTransactionAccountsOptsToProto(o.Accounts), + } +} + +func ConvertSimulateTXRequestFromProto(p *SimulateTXRequest) (typesolana.SimulateTXRequest, error) { + recv, err := ConvertPublicKeyFromProto(p.Receiver) + if err != nil { + return typesolana.SimulateTXRequest{}, fmt.Errorf("receiver: %w", err) + } + return typesolana.SimulateTXRequest{ + Receiver: recv, + EncodedTransaction: p.EncodedTransaction, + Opts: ConvertSimulateTXOptsFromProto(p.Opts), + }, nil +} + +func ConvertSimulateTXRequestToProto(r typesolana.SimulateTXRequest) *SimulateTXRequest { + return &SimulateTXRequest{ + Receiver: r.Receiver[:], + EncodedTransaction: r.EncodedTransaction, + Opts: ConvertSimulateTXOptsToProto(r.Opts), + } +} + +func ConvertSimulateTXReplyFromProto(p *SimulateTXReply) (*typesolana.SimulateTXReply, error) { + if p == nil { + return nil, nil + } + accs := make([]*typesolana.Account, 0, len(p.Accounts)) + for _, a := range p.Accounts { + acc, err := ConvertAccountFromProto(a) + if err != nil { + return nil, err + } + accs = append(accs, acc) + } + return &typesolana.SimulateTXReply{ + Err: p.Err, + Logs: p.Logs, + Accounts: accs, + UnitsConsumed: ptrUint64(p.UnitsConsumed), + }, nil +} + +func ConvertSimulateTXReplyToProto(r *typesolana.SimulateTXReply) *SimulateTXReply { + if r == nil { + return nil + } + var units uint64 + if r.UnitsConsumed != nil { + units = *r.UnitsConsumed + } + out := &SimulateTXReply{ + Err: r.Err, + Logs: r.Logs, + UnitsConsumed: units, + } + for _, a := range r.Accounts { + out.Accounts = append(out.Accounts, ConvertAccountToProto(a)) + } + return out +} + +func ConvertComputeConfigFromProto(p *ComputeConfig) *typesolana.ComputeConfig { + if p == nil { + return nil + } + return &typesolana.ComputeConfig{ + ComputeLimit: &p.ComputeLimit, + ComputeMaxPrice: &p.ComputeMaxPrice, + } +} + +func ConvertComputeConfigToProto(c *typesolana.ComputeConfig) *ComputeConfig { + if c == nil { + return nil + } + + var cl uint32 + if c.ComputeLimit != nil { + cl = *c.ComputeLimit + } + var cmp uint64 + if c.ComputeMaxPrice != nil { + cmp = *c.ComputeMaxPrice + } + return &ComputeConfig{ + ComputeLimit: cl, + ComputeMaxPrice: cmp, + } +} + +func ConvertSubmitTransactionRequestFromProto(p *SubmitTransactionRequest) (typesolana.SubmitTransactionRequest, error) { + if p == nil { + return typesolana.SubmitTransactionRequest{}, nil + } + rcv, err := ConvertPublicKeyFromProto(p.Receiver) + if err != nil { + return typesolana.SubmitTransactionRequest{}, fmt.Errorf("receiver: %w", err) + } + return typesolana.SubmitTransactionRequest{ + Cfg: ConvertComputeConfigFromProto(p.Cfg), + Receiver: rcv, + EncodedTransaction: p.EncodedTransaction, + }, nil +} + +func ConvertSubmitTransactionRequestToProto(r typesolana.SubmitTransactionRequest) *SubmitTransactionRequest { + return &SubmitTransactionRequest{ + Cfg: ConvertComputeConfigToProto(r.Cfg), + Receiver: r.Receiver[:], + EncodedTransaction: r.EncodedTransaction, + } +} + +func ConvertSubmitTransactionReplyFromProto(p *SubmitTransactionReply) (*typesolana.SubmitTransactionReply, error) { + if p == nil { + return nil, nil + } + sig, err := ConvertSignatureFromProto(p.Signature) + if err != nil { + return nil, err + } + return &typesolana.SubmitTransactionReply{ + Signature: sig, + IdempotencyKey: p.IdempotencyKey, + Status: typesolana.TransactionStatus(p.Status), + }, nil +} + +func ConvertSubmitTransactionReplyToProto(r *typesolana.SubmitTransactionReply) *SubmitTransactionReply { + if r == nil { + return nil + } + return &SubmitTransactionReply{ + Signature: r.Signature[:], + IdempotencyKey: r.IdempotencyKey, + Status: TransactionStatus(r.Status), + } +} + +func ConvertContextFromProto(p *Context) typesolana.Context { + if p == nil { + return typesolana.Context{} + } + return typesolana.Context{Slot: p.Slot} +} + +func ConvertContextToProto(c typesolana.Context) *Context { + return &Context{Slot: c.Slot} +} + +func ConvertRPCContextFromProto(p *RPCContext) typesolana.RPCContext { + if p == nil { + return typesolana.RPCContext{} + } + return typesolana.RPCContext{Context: ConvertContextFromProto(p.Context)} +} + +func ConvertRPCContextToProto(r typesolana.RPCContext) *RPCContext { + return &RPCContext{Context: ConvertContextToProto(r.Context)} +} + +func ConvertLogFromProto(p *Log) (*typesolana.Log, error) { + if p == nil { + return nil, nil + } + addr, err := ConvertPublicKeyFromProto(p.Address) + if err != nil && len(p.Address) > 0 { // address optional + return nil, fmt.Errorf("address: %w", err) + } + ev, _ := ConvertEventSigFromProto(p.EventSig) + tx, err := ConvertSignatureFromProto(p.TxHash) + if err != nil && len(p.TxHash) > 0 { + return nil, fmt.Errorf("txHash: %w", err) + } + bh, _ := ConvertHashFromProto(p.BlockHash) + var lErr *string + if p.Error != "" { + lErr = &p.Error + } + + return &typesolana.Log{ + ChainID: p.ChainId, + LogIndex: p.LogIndex, + BlockHash: bh, + BlockNumber: p.BlockNumber, + BlockTimestamp: uint64(p.BlockTimestamp), + Address: addr, + EventSig: ev, + TxHash: tx, + Data: p.Data, + SequenceNum: p.SequenceNum, + Error: lErr, + }, nil +} + +func ConvertLogToProto(l *typesolana.Log) *Log { + if l == nil { + return nil + } + return &Log{ + ChainId: l.ChainID, + LogIndex: l.LogIndex, + BlockHash: l.BlockHash[:], + BlockNumber: l.BlockNumber, + BlockTimestamp: l.BlockTimestamp, + Address: l.Address[:], + EventSig: l.EventSig[:], + TxHash: l.TxHash[:], + Data: l.Data, + SequenceNum: l.SequenceNum, + Error: *l.Error, + } +} + +func ConvertExpressionsToProto(expressions []query.Expression) ([]*Expression, error) { + protoExpressions := make([]*Expression, 0, len(expressions)) + for _, expr := range expressions { + protoExpression, err := convertExpressionToProto(expr) + if err != nil { + return nil, err + } + protoExpressions = append(protoExpressions, protoExpression) + } + return protoExpressions, nil +} + +func convertExpressionToProto(expression query.Expression) (*Expression, error) { + pbExpression := &Expression{} + if expression.IsPrimitive() { + ep := &Primitive{} + switch primitive := expression.Primitive.(type) { + case *solprimitives.Address: + ep.Primitive = &Primitive_Address{Address: primitive.PubKey[:]} + + putPrimitive(pbExpression, ep) + case *solprimitives.EventSig: + ep.Primitive = &Primitive_EventSig{EventSig: primitive.Sig[:]} + + putPrimitive(pbExpression, ep) + case *solprimitives.EventBySubkey: + ep.Primitive = &Primitive_EventBySubkey{ + EventBySubkey: &EventBySubkey{ + //nolint: gosec // G115 + SubkeyIndex: primitive.SubKeyIndex, + ValueComparers: ConvertValueComparatorsToProto(primitive.ValueComparers), + }, + } + + putPrimitive(pbExpression, ep) + default: + generalPrimitive, err := chaincommonpb.ConvertPrimitiveToProto(primitive, func(value any) (*codecpb.VersionedBytes, error) { + return nil, fmt.Errorf("unsupported primitive type: %T", value) + }) + if err != nil { + return nil, err + } + putGeneralPrimitive(pbExpression, generalPrimitive) + } + return pbExpression, nil + } + + pbExpression.Evaluator = &Expression_BooleanExpression{BooleanExpression: &BooleanExpression{}} + expressions := make([]*Expression, 0) + for _, expr := range expression.BoolExpression.Expressions { + pbExpr, err := convertExpressionToProto(expr) + if err != nil { + return nil, err + } + expressions = append(expressions, pbExpr) + } + pbExpression.Evaluator = &Expression_BooleanExpression{ + BooleanExpression: &BooleanExpression{ + //nolint: gosec // G115 + BooleanOperator: chaincommonpb.BooleanOperator(expression.BoolExpression.BoolOperator), + Expression: expressions, + }} + + return pbExpression, nil +} + +func ConvertValueComparatorsToProto(comparators []solprimitives.IndexedValueComparator) []*IndexedValueComparator { + if len(comparators) == 0 { + return nil + } + + out := make([]*IndexedValueComparator, len(comparators)) + for _, c := range comparators { + value := make([][]byte, 0, len(c.Value)) + for _, v := range c.Value { + value = append(value, v) + } + out = append(out, &IndexedValueComparator{ + Value: value, + Operator: chaincommonpb.ComparisonOperator(c.Operator), + }) + } + + return nil +} + +func ConvertValueCompraratorsFromProto(comparators []*IndexedValueComparator) []solprimitives.IndexedValueComparator { + if len(comparators) == 0 { + return nil + } + + out := make([]solprimitives.IndexedValueComparator, 0, len(comparators)) + for _, c := range comparators { + value := make([]solana.IndexedValue, 0, len(c.Value)) + for _, v := range c.Value { + value = append(value, v) + } + out = append(out, solprimitives.IndexedValueComparator{ + Value: value, + Operator: primitives.ComparisonOperator(c.Operator), + }) + } + return out +} + +func putGeneralPrimitive(exp *Expression, p *chaincommonpb.Primitive) { + exp.Evaluator = &Expression_Primitive{Primitive: &Primitive{Primitive: &Primitive_GeneralPrimitive{GeneralPrimitive: p}}} +} + +func ConvertExpressionsFromProto(protoExpressions []*Expression) ([]query.Expression, error) { + expressions := make([]query.Expression, 0, len(protoExpressions)) + if len(protoExpressions) == 0 { + return nil, nil + } + for idx, protoExpression := range protoExpressions { + expr, err := convertExpressionFromProto(protoExpression) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "err to convert expr idx %d err: %s", idx, err.Error()) + } + + expressions = append(expressions, expr) + } + return expressions, nil +} + +func convertExpressionFromProto(protoExpression *Expression) (query.Expression, error) { + if protoExpression == nil { + return query.Expression{}, errors.New("expression can not be nil") + } + + switch protoEvaluatedExpr := protoExpression.GetEvaluator().(type) { + case *Expression_BooleanExpression: + var expressions []query.Expression + for idx, expression := range protoEvaluatedExpr.BooleanExpression.GetExpression() { + convertedExpression, err := convertExpressionFromProto(expression) + if err != nil { + return query.Expression{}, fmt.Errorf("failed to convert sub-expression %d: %w", idx, err) + } + expressions = append(expressions, convertedExpression) + } + if protoEvaluatedExpr.BooleanExpression.GetBooleanOperator() == chaincommonpb.BooleanOperator_AND { + return query.And(expressions...), nil + } + return query.Or(expressions...), nil + + case *Expression_Primitive: + switch primitive := protoEvaluatedExpr.Primitive.GetPrimitive().(type) { + case *Primitive_GeneralPrimitive: + return chaincommonpb.ConvertPrimitiveFromProto(primitive.GeneralPrimitive, func(_ string, _ bool) (any, error) { + return nil, fmt.Errorf("unsupported primitive type: %T", primitive) + }) + default: + return convertSolPrimitiveFromProto(protoEvaluatedExpr.Primitive) + } + default: + return query.Expression{}, fmt.Errorf("unknown expression type: %T", protoExpression.GetEvaluator()) + } +} + +func convertSolPrimitiveFromProto(protoPrimitive *Primitive) (query.Expression, error) { + switch primitive := protoPrimitive.GetPrimitive().(type) { + case *Primitive_Address: + publicKey, err := ConvertPublicKeyFromProto(primitive.Address) + if err != nil { + return query.Expression{}, fmt.Errorf("convert expr err: %w", err) + } + return solprimitives.NewAddressFilter(publicKey), nil + case *Primitive_EventSig: + sig, err := ConvertEventSigFromProto(primitive.EventSig) + if err != nil { + return query.Expression{}, fmt.Errorf("failed to convert event sig: %w", err) + } + return solprimitives.NewEventSigFilter(sig), nil + case *Primitive_EventBySubkey: + return solprimitives.NewEventBySubkeyFilter(primitive.EventBySubkey.SubkeyIndex, ConvertValueCompraratorsFromProto(primitive.EventBySubkey.ValueComparers)), nil + default: + return query.Expression{}, fmt.Errorf("unknown primitive type: %T", primitive) + } +} + +func ConvertLPFilterQueryFromProto(p *LPFilterQuery) (*typesolana.LPFilterQuery, error) { + if p == nil { + return nil, nil + } + var addr typesolana.PublicKey + var err error + if len(p.Address) > 0 { + addr, err = ConvertPublicKeyFromProto(p.Address) + if err != nil { + return nil, fmt.Errorf("filter.address: %w", err) + } + } + var err2 error + var eventSig typesolana.EventSignature + if len(p.EventSig) > 0 { + eventSig, err2 = ConvertEventSigFromProto(p.EventSig) + if err != nil { + return nil, fmt.Errorf("filter.event_sig: %w", err2) + } + } + + return &typesolana.LPFilterQuery{ + Name: p.Name, + Address: addr, + EventName: p.EventName, + EventSig: eventSig, + StartingBlock: p.StartingBlock, + EventIdlJSON: p.EventIdlJson, + SubkeyPaths: ConvertSubkeyPathsFromProto(p.SubkeyPaths), + Retention: time.Duration(p.Retention), + MaxLogsKept: p.MaxLogsKept, + IncludeReverted: p.IncludeReverted, + }, nil +} + +func ConvertSubkeyPathsFromProto(skeys []*Subkeys) [][]string { + if len(skeys) == 0 { + return nil + } + out := make([][]string, 0, len(skeys)) + for _, k := range skeys { + out = append(out, k.Subkeys) + } + + return out +} + +func ConvertSubkeyPathsToProto(keys [][]string) []*Subkeys { + if len(keys) == 0 { + return nil + } + out := make([]*Subkeys, 0, len(keys)) + for _, k := range keys { + out = append(out, &Subkeys{ + Subkeys: k, + }) + } + + return out +} + +func ConvertLPFilterQueryToProto(f *typesolana.LPFilterQuery) *LPFilterQuery { + if f == nil { + return nil + } + + return &LPFilterQuery{ + Name: f.Name, + Address: f.Address[:], + EventName: f.EventName, + EventSig: f.EventSig[:], + StartingBlock: f.StartingBlock, + EventIdlJson: f.EventIdlJSON, + SubkeyPaths: ConvertSubkeyPathsToProto(f.SubkeyPaths), + Retention: int64(f.Retention), + MaxLogsKept: f.MaxLogsKept, + IncludeReverted: f.IncludeReverted, + } +} + +func putPrimitive(exp *Expression, p *Primitive) { + exp.Evaluator = &Expression_Primitive{Primitive: &Primitive{Primitive: p.Primitive}} +} + +func ptrUint64(v uint64) *uint64 { return &v } +func ptrBool(v bool) *bool { return &v } +func ptrUnix(v typesolana.UnixTimeSeconds) *typesolana.UnixTimeSeconds { return &v } diff --git a/pkg/chains/solana/proto_helpers_test.go b/pkg/chains/solana/proto_helpers_test.go new file mode 100644 index 0000000000..2462ab7d3c --- /dev/null +++ b/pkg/chains/solana/proto_helpers_test.go @@ -0,0 +1,403 @@ +package solana_test + +import ( + "bytes" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/require" + + conv "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" + chain_common "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + typesolana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" + solprimitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives/solana" +) + +func mkBytes(n int, fill byte) []byte { + b := make([]byte, n) + for i := range b { + b[i] = fill + } + return b +} + +func TestPublicKeyConverters(t *testing.T) { + t.Run("ConvertPublicKeyFromProto", func(t *testing.T) { + cases := []struct { + name string + in []byte + wantErrParts []string + wantEqualsInput bool + }{ + {"accepts 32-byte public key", mkBytes(typesolana.PublicKeyLength, 0xAB), nil, true}, + {"rejects nil public key", nil, []string{"address can't be nil"}, false}, + {"rejects wrong length and shows base58", mkBytes(typesolana.PublicKeyLength-1, 0x01), []string{"invalid public key", "expected", "value="}, false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got, err := conv.ConvertPublicKeyFromProto(tc.in) + if tc.wantErrParts != nil { + require.Error(t, err, "expected error") + for _, p := range tc.wantErrParts { + require.Contains(t, err.Error(), p) + } + return + } + require.NoError(t, err) + if tc.wantEqualsInput && !bytes.Equal(got[:], tc.in) { + t.Fatalf("mismatch: got=%x want=%x", got[:], tc.in) + } + }) + } + }) + + t.Run("Roundtrip slice", func(t *testing.T) { + keys := [][]byte{ + mkBytes(typesolana.PublicKeyLength, 0x11), + mkBytes(typesolana.PublicKeyLength, 0x22), + } + dom, err := conv.ConvertPublicKeysFromProto(keys) + require.NoError(t, err) + require.Len(t, dom, 2) + back := conv.ConvertPublicKeysToProto(dom) + require.Len(t, back, 2) + require.True(t, bytes.Equal(back[0], keys[0]) && bytes.Equal(back[1], keys[1])) + }) + + t.Run("AggregatesErrors", func(t *testing.T) { + in := [][]byte{ + mkBytes(typesolana.PublicKeyLength, 0x01), + mkBytes(typesolana.PublicKeyLength-1, 0x02), + nil, + } + got, err := conv.ConvertPublicKeysFromProto(in) + require.Nil(t, got) + require.Error(t, err) + msg := err.Error() + require.Contains(t, msg, "public key[1]") + require.Contains(t, msg, "public key[2]") + }) +} + +func TestSignatureConverters(t *testing.T) { + t.Run("ConvertSignatureFromProto", func(t *testing.T) { + ok := mkBytes(typesolana.SignatureLength, 0xCD) + got, err := conv.ConvertSignatureFromProto(ok) + require.NoError(t, err) + require.True(t, bytes.Equal(ok, got[:])) + + _, err = conv.ConvertSignatureFromProto(nil) + require.ErrorContains(t, err, "signature can't be nil") + + _, err = conv.ConvertSignatureFromProto(mkBytes(typesolana.SignatureLength+1, 0x01)) + require.ErrorContains(t, err, "invalid signature") + require.ErrorContains(t, err, "expected") + require.ErrorContains(t, err, "value=") + }) + + t.Run("Batch/roundtrip", func(t *testing.T) { + s1 := mkBytes(typesolana.SignatureLength, 0xAA) + s2 := mkBytes(typesolana.SignatureLength, 0xBB) + dom, err := conv.ConvertSignaturesFromProto([][]byte{s1, s2}) + require.NoError(t, err) + back := conv.ConvertSignaturesToProto(dom) + require.True(t, bytes.Equal(s1, back[0]) && bytes.Equal(s2, back[1])) + }) + + t.Run("AggregatesErrors", func(t *testing.T) { + _, err := conv.ConvertSignaturesFromProto([][]byte{ + mkBytes(typesolana.SignatureLength-1, 0x01), + nil, + }) + require.Error(t, err) + require.Contains(t, err.Error(), "signature[0]") + require.Contains(t, err.Error(), "signature[1]") + }) +} + +func TestHashConverters(t *testing.T) { + t.Run("ConvertHashFromProto", func(t *testing.T) { + ok := mkBytes(typesolana.HashLength, 0xEF) + got, err := conv.ConvertHashFromProto(ok) + require.NoError(t, err) + require.True(t, bytes.Equal(ok, got[:])) + + _, err = conv.ConvertHashFromProto(nil) + require.ErrorContains(t, err, "hash can't be nil") + + _, err = conv.ConvertHashFromProto(mkBytes(typesolana.HashLength-2, 0x01)) + require.ErrorContains(t, err, "invalid hash") + require.ErrorContains(t, err, "expected") + require.ErrorContains(t, err, "value=") // base58 string + }) +} + +func TestEventSignatureConverters(t *testing.T) { + t.Run("ConvertEventSigFromProto", func(t *testing.T) { + ok := mkBytes(typesolana.EventSignatureLength, 0xAA) + got, err := conv.ConvertEventSigFromProto(ok) + require.NoError(t, err) + require.True(t, bytes.Equal(ok, got[:])) + + _, err = conv.ConvertEventSigFromProto(nil) + require.ErrorContains(t, err, "hash can't be nil") // matches current message + + _, err = conv.ConvertEventSigFromProto(mkBytes(typesolana.EventSignatureLength-1, 0x01)) + require.ErrorContains(t, err, "invalid event signature") + }) +} + +func TestConvertExpressionsFromProto_Errors(t *testing.T) { + testCases := []struct { + Name string + In []*conv.Expression + ExpectedErr string + ExpectedFinal []query.Expression + }{ + { + Name: "empty", + }, + { + Name: "Empty evaluator", + In: []*conv.Expression{{}}, + ExpectedErr: "rpc error: code = InvalidArgument desc = err to convert expr idx 0 err: " + + "unknown expression type: ", + }, + { + Name: "Empty Expression_Primitive", + In: []*conv.Expression{{Evaluator: &conv.Expression_Primitive{}}}, + ExpectedErr: "rpc error: code = InvalidArgument desc = err to convert expr idx 0 err: " + + "unknown primitive type: ", + }, + { + Name: "Empty Expression_BooleanExpression", + In: []*conv.Expression{{Evaluator: &conv.Expression_BooleanExpression{}}}, + ExpectedFinal: []query.Expression{ + {BoolExpression: query.BoolExpression{}}, + }, + }, + { + Name: "Nested empty Expression", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_BooleanExpression{ + BooleanExpression: &conv.BooleanExpression{ + Expression: []*conv.Expression{{}}, + }, + }, + }}, + ExpectedErr: "err to convert expr idx 0 err: failed to convert sub-expression 0: unknown expression type: ", + }, + { + Name: "Empty Evaluator.Primitive.Primitive", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{}, + }, + }}, + ExpectedErr: "rpc error: code = InvalidArgument desc = err to convert expr idx 0 err: unknown primitive type: ", + }, + { + Name: "Empty Evaluator.Primitive.GeneralPrimitive", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{ + Primitive: &conv.Primitive_GeneralPrimitive{}, + }, + }, + }}, + ExpectedErr: "rpc error: code = InvalidArgument desc = err to convert expr idx 0 err: rpc error: code = InvalidArgument desc = primitive can not be nil", + }, + { + Name: "Empty Evaluator.Primitive.GeneralPrimitive.Primitive", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{ + Primitive: &conv.Primitive_GeneralPrimitive{ + GeneralPrimitive: &chain_common.Primitive{}, + }, + }, + }, + }}, + ExpectedErr: "rpc error: code = InvalidArgument desc = err to convert expr idx 0 err: rpc error: code = InvalidArgument desc = unknown primitive type: ", + }, + { + Name: "Empty Comparator in GeneralPrimitive", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{ + Primitive: &conv.Primitive_GeneralPrimitive{ + GeneralPrimitive: &chain_common.Primitive{ + Primitive: &chain_common.Primitive_Comparator{}, + }, + }, + }, + }, + }}, + ExpectedErr: "comparator can not be nil", + }, + { + Name: "Invalid Solana Address primitive (nil bytes)", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{ + Primitive: &conv.Primitive_Address{Address: nil}, + }, + }, + }}, + ExpectedErr: "convert expr err: address can't be nil", + }, + { + Name: "Invalid Solana EventSig primitive (bad len)", + In: []*conv.Expression{{ + Evaluator: &conv.Expression_Primitive{ + Primitive: &conv.Primitive{ + Primitive: &conv.Primitive_EventSig{EventSig: mkBytes(typesolana.EventSignatureLength-1, 0x01)}, + }, + }, + }}, + ExpectedErr: "failed to convert event sig: invalid event signature", + }, + } + + for _, tc := range testCases { + t.Run(tc.Name, func(t *testing.T) { + got, err := conv.ConvertExpressionsFromProto(tc.In) + if tc.ExpectedErr != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.ExpectedErr) + return + } + require.NoError(t, err) + require.Equal(t, tc.ExpectedFinal, got) + }) + } +} + +func TestExpressions_Roundtrip_SolanaPrimitives(t *testing.T) { + // Build (Address AND EventSig) OR EventBySubkey + addrBytes := mkBytes(typesolana.PublicKeyLength, 0x01) + evBytes := mkBytes(typesolana.EventSignatureLength, 0x02) + + addr, err := conv.ConvertPublicKeyFromProto(addrBytes) + require.NoError(t, err) + ev, err := conv.ConvertEventSigFromProto(evBytes) + require.NoError(t, err) + + a := solprimitives.NewAddressFilter(addr) + e := solprimitives.NewEventSigFilter(ev) + evBy := solprimitives.NewEventBySubkeyFilter(1, []solprimitives.IndexedValueComparator{ + {Value: []typesolana.IndexedValue{[]byte("abc")}, Operator: 0}, + }) + + root := query.Or(query.And(a, e), evBy) + + // to proto + pb, err := conv.ConvertExpressionsToProto([]query.Expression{root}) + require.NoError(t, err) + require.Len(t, pb, 1) + + // from proto + round, err := conv.ConvertExpressionsFromProto(pb) + require.NoError(t, err) + require.Len(t, round, 1) +} + +func TestLPFilterAndSubkeysConverters(t *testing.T) { + f := &conv.LPFilterQuery{ + Name: "test", + Address: mkBytes(typesolana.PublicKeyLength, 0xAA), + EventName: "Evt", + EventSig: mkBytes(typesolana.EventSignatureLength, 0xBB), + StartingBlock: 10, + EventIdlJson: []byte(`{"idl":1}`), + SubkeyPaths: []*conv.Subkeys{{Subkeys: []string{"a", "b"}}, {Subkeys: []string{"c"}}}, + Retention: int64(time.Hour), + MaxLogsKept: 100, + IncludeReverted: true, + } + df, err := conv.ConvertLPFilterQueryFromProto(f) + require.NoError(t, err) + require.Equal(t, "test", df.Name) + require.Equal(t, 2, len(df.SubkeyPaths)) + + back := conv.ConvertLPFilterQueryToProto(df) + require.Equal(t, f.Name, back.Name) + require.Equal(t, f.MaxLogsKept, back.MaxLogsKept) + + // Also exercise subkey helpers alone; ensure shape preserved. + keys := [][]string{{"x", "y"}, {"z"}} + ps := conv.ConvertSubkeyPathsToProto(keys) + got := conv.ConvertSubkeyPathsFromProto(ps) + require.Equal(t, keys, got) +} + +func TestGettersAndSmallStructs_Smoke(t *testing.T) { + // A few quick "does not panic / round-trips" on small structs + + // DataSlice + ds := &conv.DataSlice{Offset: 5, Length: 7} + dd := conv.ConvertDataSliceFromProto(ds) + require.NotNil(t, dd) + require.EqualValues(t, 5, *dd.Offset) + require.EqualValues(t, 7, *dd.Length) + ds2 := conv.ConvertDataSliceToProto(dd) + require.EqualValues(t, 5, ds2.Offset) + require.EqualValues(t, 7, ds2.Length) + + // UiTokenAmount + ui := &conv.UiTokenAmount{Amount: "42", Decimals: 6, UiAmountString: "0.000042"} + du := conv.ConvertUiTokenAmountFromProto(ui) + require.NotNil(t, du) + require.Equal(t, uint8(6), du.Decimals) + ui2 := conv.ConvertUiTokenAmountToProto(du) + require.EqualValues(t, 6, ui2.Decimals) + + // Commitment/Encoding enums (spot) + require.Equal(t, conv.EncodingType_ENCODING_BASE64, conv.ConvertEncodingTypeToProto(typesolana.EncodingBase64)) + require.Equal(t, typesolana.EncodingJSON, conv.ConvertEncodingTypeFromProto(conv.EncodingType_ENCODING_JSON)) + require.Equal(t, conv.CommitmentType_COMMITMENT_FINALIZED, conv.ConvertCommitmentToProto(typesolana.CommitmentFinalized)) + require.Equal(t, typesolana.CommitmentProcessed, conv.ConvertCommitmentFromProto(conv.CommitmentType_COMMITMENT_PROCESSED)) +} + +func TestGetSignatureStatusesConverters(t *testing.T) { + req := &conv.GetSignatureStatusesRequest{Sigs: [][]byte{mkBytes(typesolana.SignatureLength, 0xAA)}} + dr, err := conv.ConvertGetSignatureStatusesRequestFromProto(req) + require.NoError(t, err) + req2 := conv.ConvertGetSignatureStatusesRequestToProto(dr) + require.Len(t, req2.Sigs, 1) + require.True(t, bytes.Equal(req.Sigs[0], req2.Sigs[0])) + + rep := &conv.GetSignatureStatusesReply{ + Results: []*conv.GetSignatureStatusesResult{{ + Slot: 1, + Confirmations: 2, + Err: "", + ConfirmationStatus: conv.ConfirmationStatusType_CONFIRMATION_CONFIRMED, + }}, + } + drep := conv.ConvertGetSignatureStatusesReplyFromProto(rep) + require.EqualValues(t, 1, drep.Results[0].Slot) + require.NotNil(t, drep.Results[0].Confirmations) + require.EqualValues(t, 2, *drep.Results[0].Confirmations) + + rep2 := conv.ConvertGetSignatureStatusesReplyToProto(drep) + require.EqualValues(t, 2, rep2.Results[0].Confirmations) + require.Equal(t, conv.ConfirmationStatusType_CONFIRMATION_CONFIRMED, rep2.Results[0].ConfirmationStatus) +} + +func TestErrorJoinBehavior_PublicKeys(t *testing.T) { + in := [][]byte{ + mkBytes(typesolana.PublicKeyLength-1, 0x01), + nil, + } + _, err := conv.ConvertPublicKeysFromProto(in) + require.Error(t, err) + // Error should mention both indices + require.Contains(t, err.Error(), "public key[0]") + require.Contains(t, err.Error(), "public key[1]") + + // Ensure errors.Is behaves reasonably (not super strict here) + require.True(t, errors.Is(err, err)) +} diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index b895f7d5d4..fcf80d6bd9 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -1,12 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 +// protoc-gen-go v1.36.8 // protoc v5.29.3 // source: solana.proto package solana import ( + chain_common "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + pb "github.com/smartcontractkit/chainlink-protos/cre/go/values/pb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,13 +23,281 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type TransactionStatus int32 + +const ( + TransactionStatus_TX_FATAL TransactionStatus = 0 + TransactionStatus_TX_ABORTED TransactionStatus = 1 + TransactionStatus_TX_SUCCESS TransactionStatus = 2 +) + +// Enum value maps for TransactionStatus. +var ( + TransactionStatus_name = map[int32]string{ + 0: "TX_FATAL", + 1: "TX_ABORTED", + 2: "TX_SUCCESS", + } + TransactionStatus_value = map[string]int32{ + "TX_FATAL": 0, + "TX_ABORTED": 1, + "TX_SUCCESS": 2, + } +) + +func (x TransactionStatus) Enum() *TransactionStatus { + p := new(TransactionStatus) + *p = x + return p +} + +func (x TransactionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[0].Descriptor() +} + +func (TransactionStatus) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[0] +} + +func (x TransactionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionStatus.Descriptor instead. +func (TransactionStatus) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{0} +} + +type TransactionDetailsType int32 + +const ( + TransactionDetailsType_TRANSACTION_DETAILS_FULL TransactionDetailsType = 0 + TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES TransactionDetailsType = 1 + TransactionDetailsType_TRANSACTION_DETAILS_NONE TransactionDetailsType = 2 + TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS TransactionDetailsType = 3 +) + +// Enum value maps for TransactionDetailsType. +var ( + TransactionDetailsType_name = map[int32]string{ + 0: "TRANSACTION_DETAILS_FULL", + 1: "TRANSCTION_DETAILS_SIGNATURES", + 2: "TRANSACTION_DETAILS_NONE", + 3: "TRANSACTION_DETAILS_ACCOUNTS", + } + TransactionDetailsType_value = map[string]int32{ + "TRANSACTION_DETAILS_FULL": 0, + "TRANSCTION_DETAILS_SIGNATURES": 1, + "TRANSACTION_DETAILS_NONE": 2, + "TRANSACTION_DETAILS_ACCOUNTS": 3, + } +) + +func (x TransactionDetailsType) Enum() *TransactionDetailsType { + p := new(TransactionDetailsType) + *p = x + return p +} + +func (x TransactionDetailsType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionDetailsType) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[1].Descriptor() +} + +func (TransactionDetailsType) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[1] +} + +func (x TransactionDetailsType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionDetailsType.Descriptor instead. +func (TransactionDetailsType) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{1} +} + +type EncodingType int32 + +const ( + EncodingType_ENCODING_NONE EncodingType = 0 + EncodingType_ENCODING_BASE58 EncodingType = 1 // limited to Account data of less than 129 bytes + EncodingType_ENCODING_BASE64 EncodingType = 2 // will return base64 encoded data for Account data of any size + EncodingType_ENCODING_BASE64_ZST EncodingType = 3 // compresses the Account data using Zstandard and base64-encodes the result + // attempts to use program-specific state parsers to + // return more human-readable and explicit account state data. + // If "jsonParsed" is requested but a parser cannot be found, + // the field falls back to "base64" encoding, detectable when the data field is type . + // Cannot be used if specifying dataSlice parameters (offset, length). + EncodingType_ENCODING_JSON_PARSED EncodingType = 4 + EncodingType_ENCODING_JSON EncodingType = 5 // NOTE: you're probably looking for EncodingJSONParsed +) + +// Enum value maps for EncodingType. +var ( + EncodingType_name = map[int32]string{ + 0: "ENCODING_NONE", + 1: "ENCODING_BASE58", + 2: "ENCODING_BASE64", + 3: "ENCODING_BASE64_ZST", + 4: "ENCODING_JSON_PARSED", + 5: "ENCODING_JSON", + } + EncodingType_value = map[string]int32{ + "ENCODING_NONE": 0, + "ENCODING_BASE58": 1, + "ENCODING_BASE64": 2, + "ENCODING_BASE64_ZST": 3, + "ENCODING_JSON_PARSED": 4, + "ENCODING_JSON": 5, + } +) + +func (x EncodingType) Enum() *EncodingType { + p := new(EncodingType) + *p = x + return p +} + +func (x EncodingType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EncodingType) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[2].Descriptor() +} + +func (EncodingType) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[2] +} + +func (x EncodingType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EncodingType.Descriptor instead. +func (EncodingType) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{2} +} + +type CommitmentType int32 + +const ( + CommitmentType_COMMITMENT_NONE CommitmentType = 0 + CommitmentType_COMMITMENT_FINALIZED CommitmentType = 1 + CommitmentType_COMMITMENT_CONFIRMED CommitmentType = 2 + CommitmentType_COMMITMENT_PROCESSED CommitmentType = 3 +) + +// Enum value maps for CommitmentType. +var ( + CommitmentType_name = map[int32]string{ + 0: "COMMITMENT_NONE", + 1: "COMMITMENT_FINALIZED", + 2: "COMMITMENT_CONFIRMED", + 3: "COMMITMENT_PROCESSED", + } + CommitmentType_value = map[string]int32{ + "COMMITMENT_NONE": 0, + "COMMITMENT_FINALIZED": 1, + "COMMITMENT_CONFIRMED": 2, + "COMMITMENT_PROCESSED": 3, + } +) + +func (x CommitmentType) Enum() *CommitmentType { + p := new(CommitmentType) + *p = x + return p +} + +func (x CommitmentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommitmentType) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[3].Descriptor() +} + +func (CommitmentType) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[3] +} + +func (x CommitmentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommitmentType.Descriptor instead. +func (CommitmentType) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{3} +} + +type ConfirmationStatusType int32 + +const ( + ConfirmationStatusType_CONFIRMATION_NONE ConfirmationStatusType = 0 + ConfirmationStatusType_CONFIRMATION_PROCESSED ConfirmationStatusType = 1 + ConfirmationStatusType_CONFIRMATION_CONFIRMED ConfirmationStatusType = 2 + ConfirmationStatusType_CONFIRMATION_FINALIZED ConfirmationStatusType = 3 +) + +// Enum value maps for ConfirmationStatusType. +var ( + ConfirmationStatusType_name = map[int32]string{ + 0: "CONFIRMATION_NONE", + 1: "CONFIRMATION_PROCESSED", + 2: "CONFIRMATION_CONFIRMED", + 3: "CONFIRMATION_FINALIZED", + } + ConfirmationStatusType_value = map[string]int32{ + "CONFIRMATION_NONE": 0, + "CONFIRMATION_PROCESSED": 1, + "CONFIRMATION_CONFIRMED": 2, + "CONFIRMATION_FINALIZED": 3, + } +) + +func (x ConfirmationStatusType) Enum() *ConfirmationStatusType { + p := new(ConfirmationStatusType) + *p = x + return p +} + +func (x ConfirmationStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConfirmationStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[4].Descriptor() +} + +func (ConfirmationStatusType) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[4] +} + +func (x ConfirmationStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConfirmationStatusType.Descriptor instead. +func (ConfirmationStatusType) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{4} +} + type Account struct { state protoimpl.MessageState `protogen:"open.v1"` Lamports uint64 `protobuf:"varint,1,opt,name=lamports,proto3" json:"lamports,omitempty"` Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` Data *DataBytesOrJSON `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"` - RentEpoch int64 `protobuf:"varint,5,opt,name=rent_epoch,json=rentEpoch,proto3" json:"rent_epoch,omitempty"` + RentEpoch *pb.BigInt `protobuf:"bytes,5,opt,name=rent_epoch,json=rentEpoch,proto3" json:"rent_epoch,omitempty"` Space uint64 `protobuf:"varint,6,opt,name=space,proto3" json:"space,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -91,11 +361,11 @@ func (x *Account) GetExecutable() bool { return false } -func (x *Account) GetRentEpoch() int64 { +func (x *Account) GetRentEpoch() *pb.BigInt { if x != nil { return x.RentEpoch } - return 0 + return nil } func (x *Account) GetSpace() uint64 { @@ -149,58 +419,6 @@ func (x *Address) GetAddress() []byte { return nil } -type BoolExpression struct { - state protoimpl.MessageState `protogen:"open.v1"` - Expressions []*Expression `protobuf:"bytes,1,rep,name=expressions,proto3" json:"expressions,omitempty"` - BoolOperator int64 `protobuf:"varint,2,opt,name=bool_operator,json=boolOperator,proto3" json:"bool_operator,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BoolExpression) Reset() { - *x = BoolExpression{} - mi := &file_solana_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BoolExpression) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoolExpression) ProtoMessage() {} - -func (x *BoolExpression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BoolExpression.ProtoReflect.Descriptor instead. -func (*BoolExpression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{2} -} - -func (x *BoolExpression) GetExpressions() []*Expression { - if x != nil { - return x.Expressions - } - return nil -} - -func (x *BoolExpression) GetBoolOperator() int64 { - if x != nil { - return x.BoolOperator - } - return 0 -} - type ComputeConfig struct { state protoimpl.MessageState `protogen:"open.v1"` ComputeLimit uint32 `protobuf:"varint,1,opt,name=compute_limit,json=computeLimit,proto3" json:"compute_limit,omitempty"` @@ -211,7 +429,7 @@ type ComputeConfig struct { func (x *ComputeConfig) Reset() { *x = ComputeConfig{} - mi := &file_solana_proto_msgTypes[3] + mi := &file_solana_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -223,7 +441,7 @@ func (x *ComputeConfig) String() string { func (*ComputeConfig) ProtoMessage() {} func (x *ComputeConfig) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[3] + mi := &file_solana_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -236,7 +454,7 @@ func (x *ComputeConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ComputeConfig.ProtoReflect.Descriptor instead. func (*ComputeConfig) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{3} + return file_solana_proto_rawDescGZIP(), []int{2} } func (x *ComputeConfig) GetComputeLimit() uint32 { @@ -262,7 +480,7 @@ type Context struct { func (x *Context) Reset() { *x = Context{} - mi := &file_solana_proto_msgTypes[4] + mi := &file_solana_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -274,7 +492,7 @@ func (x *Context) String() string { func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[4] + mi := &file_solana_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -287,7 +505,7 @@ func (x *Context) ProtoReflect() protoreflect.Message { // Deprecated: Use Context.ProtoReflect.Descriptor instead. func (*Context) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{4} + return file_solana_proto_rawDescGZIP(), []int{3} } func (x *Context) GetSlot() uint64 { @@ -299,7 +517,7 @@ func (x *Context) GetSlot() uint64 { type DataBytesOrJSON struct { state protoimpl.MessageState `protogen:"open.v1"` - RawDataEncoding string `protobuf:"bytes,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3" json:"raw_data_encoding,omitempty"` + RawDataEncoding EncodingType `protobuf:"varint,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3,enum=loop.solana.EncodingType" json:"raw_data_encoding,omitempty"` AsDecodedBinary []byte `protobuf:"bytes,2,opt,name=as_decoded_binary,json=asDecodedBinary,proto3" json:"as_decoded_binary,omitempty"` AsJson []byte `protobuf:"bytes,3,opt,name=as_json,json=asJson,proto3" json:"as_json,omitempty"` unknownFields protoimpl.UnknownFields @@ -308,7 +526,7 @@ type DataBytesOrJSON struct { func (x *DataBytesOrJSON) Reset() { *x = DataBytesOrJSON{} - mi := &file_solana_proto_msgTypes[5] + mi := &file_solana_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -320,7 +538,7 @@ func (x *DataBytesOrJSON) String() string { func (*DataBytesOrJSON) ProtoMessage() {} func (x *DataBytesOrJSON) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[5] + mi := &file_solana_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -333,14 +551,14 @@ func (x *DataBytesOrJSON) ProtoReflect() protoreflect.Message { // Deprecated: Use DataBytesOrJSON.ProtoReflect.Descriptor instead. func (*DataBytesOrJSON) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{5} + return file_solana_proto_rawDescGZIP(), []int{4} } -func (x *DataBytesOrJSON) GetRawDataEncoding() string { +func (x *DataBytesOrJSON) GetRawDataEncoding() EncodingType { if x != nil { return x.RawDataEncoding } - return "" + return EncodingType_ENCODING_NONE } func (x *DataBytesOrJSON) GetAsDecodedBinary() []byte { @@ -367,7 +585,7 @@ type DataSlice struct { func (x *DataSlice) Reset() { *x = DataSlice{} - mi := &file_solana_proto_msgTypes[6] + mi := &file_solana_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -379,7 +597,7 @@ func (x *DataSlice) String() string { func (*DataSlice) ProtoMessage() {} func (x *DataSlice) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[6] + mi := &file_solana_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -392,7 +610,7 @@ func (x *DataSlice) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSlice.ProtoReflect.Descriptor instead. func (*DataSlice) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{6} + return file_solana_proto_rawDescGZIP(), []int{5} } func (x *DataSlice) GetOffset() uint64 { @@ -409,7 +627,7 @@ func (x *DataSlice) GetLength() uint64 { return 0 } -type EventByTopic struct { +type EventSig struct { state protoimpl.MessageState `protogen:"open.v1"` Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` @@ -417,21 +635,21 @@ type EventByTopic struct { sizeCache protoimpl.SizeCache } -func (x *EventByTopic) Reset() { - *x = EventByTopic{} - mi := &file_solana_proto_msgTypes[7] +func (x *EventSig) Reset() { + *x = EventSig{} + mi := &file_solana_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *EventByTopic) String() string { +func (x *EventSig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventByTopic) ProtoMessage() {} +func (*EventSig) ProtoMessage() {} -func (x *EventByTopic) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[7] +func (x *EventSig) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -442,48 +660,48 @@ func (x *EventByTopic) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventByTopic.ProtoReflect.Descriptor instead. -func (*EventByTopic) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{7} +// Deprecated: Use EventSig.ProtoReflect.Descriptor instead. +func (*EventSig) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{6} } -func (x *EventByTopic) GetTopic() uint64 { +func (x *EventSig) GetTopic() uint64 { if x != nil { return x.Topic } return 0 } -func (x *EventByTopic) GetHashedValueComparers() []*HashedValueComparator { +func (x *EventSig) GetHashedValueComparers() []*HashedValueComparator { if x != nil { return x.HashedValueComparers } return nil } -type Expression struct { - state protoimpl.MessageState `protogen:"open.v1"` - Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3" json:"primitive,omitempty"` - BoolExpression *BoolExpression `protobuf:"bytes,2,opt,name=bool_expression,json=boolExpression,proto3" json:"bool_expression,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type IndexedValueComparator struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value [][]byte `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *Expression) Reset() { - *x = Expression{} - mi := &file_solana_proto_msgTypes[8] +func (x *IndexedValueComparator) Reset() { + *x = IndexedValueComparator{} + mi := &file_solana_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Expression) String() string { +func (x *IndexedValueComparator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Expression) ProtoMessage() {} +func (*IndexedValueComparator) ProtoMessage() {} -func (x *Expression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[8] +func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -494,50 +712,48 @@ func (x *Expression) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Expression.ProtoReflect.Descriptor instead. -func (*Expression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{8} +// Deprecated: Use IndexedValueComparator.ProtoReflect.Descriptor instead. +func (*IndexedValueComparator) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{7} } -func (x *Expression) GetPrimitive() *Primitive { +func (x *IndexedValueComparator) GetValue() [][]byte { if x != nil { - return x.Primitive + return x.Value } return nil } -func (x *Expression) GetBoolExpression() *BoolExpression { +func (x *IndexedValueComparator) GetOperator() chain_common.ComparisonOperator { if x != nil { - return x.BoolExpression + return x.Operator } - return nil + return chain_common.ComparisonOperator(0) } -type GetAccountInfoOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` - Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` - DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` - MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` +type EventBySubkey struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubkeyIndex uint64 `protobuf:"varint,1,opt,name=subkey_index,json=subkeyIndex,proto3" json:"subkey_index,omitempty"` + ValueComparers []*IndexedValueComparator `protobuf:"bytes,2,rep,name=value_comparers,json=valueComparers,proto3" json:"value_comparers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetAccountInfoOpts) Reset() { - *x = GetAccountInfoOpts{} - mi := &file_solana_proto_msgTypes[9] +func (x *EventBySubkey) Reset() { + *x = EventBySubkey{} + mi := &file_solana_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAccountInfoOpts) String() string { +func (x *EventBySubkey) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAccountInfoOpts) ProtoMessage() {} +func (*EventBySubkey) ProtoMessage() {} -func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[9] +func (x *EventBySubkey) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,63 +764,251 @@ func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAccountInfoOpts.ProtoReflect.Descriptor instead. -func (*GetAccountInfoOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{9} -} - -func (x *GetAccountInfoOpts) GetEncoding() string { - if x != nil { - return x.Encoding - } - return "" +// Deprecated: Use EventBySubkey.ProtoReflect.Descriptor instead. +func (*EventBySubkey) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{8} } -func (x *GetAccountInfoOpts) GetCommitment() string { +func (x *EventBySubkey) GetSubkeyIndex() uint64 { if x != nil { - return x.Commitment + return x.SubkeyIndex } - return "" + return 0 } -func (x *GetAccountInfoOpts) GetDataSlice() *DataSlice { +func (x *EventBySubkey) GetValueComparers() []*IndexedValueComparator { if x != nil { - return x.DataSlice + return x.ValueComparers } return nil } -func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { - if x != nil { - return x.MinContextSlot - } - return 0 -} - -type GetAccountInfoWithOptsReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` - Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +type Expression struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Evaluator: + // + // *Expression_Primitive + // *Expression_BooleanExpression + Evaluator isExpression_Evaluator `protobuf_oneof:"evaluator"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetAccountInfoWithOptsReply) Reset() { - *x = GetAccountInfoWithOptsReply{} - mi := &file_solana_proto_msgTypes[10] +func (x *Expression) Reset() { + *x = Expression{} + mi := &file_solana_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAccountInfoWithOptsReply) String() string { +func (x *Expression) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAccountInfoWithOptsReply) ProtoMessage() {} +func (*Expression) ProtoMessage() {} -func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[10] - if x != nil { +func (x *Expression) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Expression.ProtoReflect.Descriptor instead. +func (*Expression) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{9} +} + +func (x *Expression) GetEvaluator() isExpression_Evaluator { + if x != nil { + return x.Evaluator + } + return nil +} + +func (x *Expression) GetPrimitive() *Primitive { + if x != nil { + if x, ok := x.Evaluator.(*Expression_Primitive); ok { + return x.Primitive + } + } + return nil +} + +func (x *Expression) GetBooleanExpression() *BooleanExpression { + if x != nil { + if x, ok := x.Evaluator.(*Expression_BooleanExpression); ok { + return x.BooleanExpression + } + } + return nil +} + +type isExpression_Evaluator interface { + isExpression_Evaluator() +} + +type Expression_Primitive struct { + Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3,oneof"` +} + +type Expression_BooleanExpression struct { + BooleanExpression *BooleanExpression `protobuf:"bytes,2,opt,name=boolean_expression,json=booleanExpression,proto3,oneof"` +} + +func (*Expression_Primitive) isExpression_Evaluator() {} + +func (*Expression_BooleanExpression) isExpression_Evaluator() {} + +type BooleanExpression struct { + state protoimpl.MessageState `protogen:"open.v1"` + BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` + Expression []*Expression `protobuf:"bytes,2,rep,name=expression,proto3" json:"expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BooleanExpression) Reset() { + *x = BooleanExpression{} + mi := &file_solana_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BooleanExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BooleanExpression) ProtoMessage() {} + +func (x *BooleanExpression) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. +func (*BooleanExpression) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{10} +} + +func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { + if x != nil { + return x.BooleanOperator + } + return chain_common.BooleanOperator(0) +} + +func (x *BooleanExpression) GetExpression() []*Expression { + if x != nil { + return x.Expression + } + return nil +} + +type GetAccountInfoOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountInfoOpts) Reset() { + *x = GetAccountInfoOpts{} + mi := &file_solana_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountInfoOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountInfoOpts) ProtoMessage() {} + +func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountInfoOpts.ProtoReflect.Descriptor instead. +func (*GetAccountInfoOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{11} +} + +func (x *GetAccountInfoOpts) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_NONE +} + +func (x *GetAccountInfoOpts) GetCommitment() CommitmentType { + if x != nil { + return x.Commitment + } + return CommitmentType_COMMITMENT_NONE +} + +func (x *GetAccountInfoOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil +} + +func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { + if x != nil { + return x.MinContextSlot + } + return 0 +} + +type GetAccountInfoWithOptsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` + Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountInfoWithOptsReply) Reset() { + *x = GetAccountInfoWithOptsReply{} + mi := &file_solana_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountInfoWithOptsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountInfoWithOptsReply) ProtoMessage() {} + +func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[12] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,12 +1020,12 @@ func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountInfoWithOptsReply.ProtoReflect.Descriptor instead. func (*GetAccountInfoWithOptsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{10} + return file_solana_proto_rawDescGZIP(), []int{12} } -func (x *GetAccountInfoWithOptsReply) GetRPCContext() *RPCContext { +func (x *GetAccountInfoWithOptsReply) GetRpcContext() *RPCContext { if x != nil { - return x.RPCContext + return x.RpcContext } return nil } @@ -643,7 +1047,7 @@ type GetAccountInfoWithOptsRequest struct { func (x *GetAccountInfoWithOptsRequest) Reset() { *x = GetAccountInfoWithOptsRequest{} - mi := &file_solana_proto_msgTypes[11] + mi := &file_solana_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -655,7 +1059,7 @@ func (x *GetAccountInfoWithOptsRequest) String() string { func (*GetAccountInfoWithOptsRequest) ProtoMessage() {} func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[11] + mi := &file_solana_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -668,7 +1072,7 @@ func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountInfoWithOptsRequest.ProtoReflect.Descriptor instead. func (*GetAccountInfoWithOptsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{11} + return file_solana_proto_rawDescGZIP(), []int{13} } func (x *GetAccountInfoWithOptsRequest) GetAccount() []byte { @@ -694,7 +1098,7 @@ type GetBalanceReply struct { func (x *GetBalanceReply) Reset() { *x = GetBalanceReply{} - mi := &file_solana_proto_msgTypes[12] + mi := &file_solana_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -706,7 +1110,7 @@ func (x *GetBalanceReply) String() string { func (*GetBalanceReply) ProtoMessage() {} func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[12] + mi := &file_solana_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -719,7 +1123,7 @@ func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBalanceReply.ProtoReflect.Descriptor instead. func (*GetBalanceReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{12} + return file_solana_proto_rawDescGZIP(), []int{14} } func (x *GetBalanceReply) GetValue() uint64 { @@ -732,14 +1136,14 @@ func (x *GetBalanceReply) GetValue() uint64 { type GetBalanceRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetBalanceRequest) Reset() { *x = GetBalanceRequest{} - mi := &file_solana_proto_msgTypes[13] + mi := &file_solana_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -751,7 +1155,7 @@ func (x *GetBalanceRequest) String() string { func (*GetBalanceRequest) ProtoMessage() {} func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[13] + mi := &file_solana_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -764,7 +1168,7 @@ func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead. func (*GetBalanceRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{13} + return file_solana_proto_rawDescGZIP(), []int{15} } func (x *GetBalanceRequest) GetAddr() []byte { @@ -774,19 +1178,19 @@ func (x *GetBalanceRequest) GetAddr() []byte { return nil } -func (x *GetBalanceRequest) GetCommitment() string { +func (x *GetBalanceRequest) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return "" + return CommitmentType_COMMITMENT_NONE } type GetBlockOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` - TransactionDetails string `protobuf:"bytes,2,opt,name=transaction_details,json=transactionDetails,proto3" json:"transaction_details,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + TransactionDetails TransactionDetailsType `protobuf:"varint,2,opt,name=transaction_details,json=transactionDetails,proto3,enum=loop.solana.TransactionDetailsType" json:"transaction_details,omitempty"` Rewards bool `protobuf:"varint,3,opt,name=rewards,proto3" json:"rewards,omitempty"` - Commitment string `protobuf:"bytes,4,opt,name=commitment,proto3" json:"commitment,omitempty"` + Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` MaxSupportedTransactionVersion uint64 `protobuf:"varint,5,opt,name=max_supported_transaction_version,json=maxSupportedTransactionVersion,proto3" json:"max_supported_transaction_version,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -794,7 +1198,7 @@ type GetBlockOpts struct { func (x *GetBlockOpts) Reset() { *x = GetBlockOpts{} - mi := &file_solana_proto_msgTypes[14] + mi := &file_solana_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -806,7 +1210,7 @@ func (x *GetBlockOpts) String() string { func (*GetBlockOpts) ProtoMessage() {} func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[14] + mi := &file_solana_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -819,21 +1223,21 @@ func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockOpts.ProtoReflect.Descriptor instead. func (*GetBlockOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{14} + return file_solana_proto_rawDescGZIP(), []int{16} } -func (x *GetBlockOpts) GetEncoding() string { +func (x *GetBlockOpts) GetEncoding() EncodingType { if x != nil { return x.Encoding } - return "" + return EncodingType_ENCODING_NONE } -func (x *GetBlockOpts) GetTransactionDetails() string { +func (x *GetBlockOpts) GetTransactionDetails() TransactionDetailsType { if x != nil { return x.TransactionDetails } - return "" + return TransactionDetailsType_TRANSACTION_DETAILS_FULL } func (x *GetBlockOpts) GetRewards() bool { @@ -843,11 +1247,11 @@ func (x *GetBlockOpts) GetRewards() bool { return false } -func (x *GetBlockOpts) GetCommitment() string { +func (x *GetBlockOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return "" + return CommitmentType_COMMITMENT_NONE } func (x *GetBlockOpts) GetMaxSupportedTransactionVersion() uint64 { @@ -872,7 +1276,7 @@ type GetBlockReply struct { func (x *GetBlockReply) Reset() { *x = GetBlockReply{} - mi := &file_solana_proto_msgTypes[15] + mi := &file_solana_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -884,7 +1288,7 @@ func (x *GetBlockReply) String() string { func (*GetBlockReply) ProtoMessage() {} func (x *GetBlockReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[15] + mi := &file_solana_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -897,7 +1301,7 @@ func (x *GetBlockReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockReply.ProtoReflect.Descriptor instead. func (*GetBlockReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{15} + return file_solana_proto_rawDescGZIP(), []int{17} } func (x *GetBlockReply) GetBlockhash() []byte { @@ -959,7 +1363,7 @@ type GetBlockRequest struct { func (x *GetBlockRequest) Reset() { *x = GetBlockRequest{} - mi := &file_solana_proto_msgTypes[16] + mi := &file_solana_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -971,7 +1375,7 @@ func (x *GetBlockRequest) String() string { func (*GetBlockRequest) ProtoMessage() {} func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[16] + mi := &file_solana_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -984,7 +1388,7 @@ func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead. func (*GetBlockRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{16} + return file_solana_proto_rawDescGZIP(), []int{18} } func (x *GetBlockRequest) GetSlot() uint64 { @@ -1010,7 +1414,7 @@ type GetFeeForMessageReply struct { func (x *GetFeeForMessageReply) Reset() { *x = GetFeeForMessageReply{} - mi := &file_solana_proto_msgTypes[17] + mi := &file_solana_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1022,7 +1426,7 @@ func (x *GetFeeForMessageReply) String() string { func (*GetFeeForMessageReply) ProtoMessage() {} func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[17] + mi := &file_solana_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1035,7 +1439,7 @@ func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFeeForMessageReply.ProtoReflect.Descriptor instead. func (*GetFeeForMessageReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{17} + return file_solana_proto_rawDescGZIP(), []int{19} } func (x *GetFeeForMessageReply) GetFee() uint64 { @@ -1048,14 +1452,14 @@ func (x *GetFeeForMessageReply) GetFee() uint64 { type GetFeeForMessageRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetFeeForMessageRequest) Reset() { *x = GetFeeForMessageRequest{} - mi := &file_solana_proto_msgTypes[18] + mi := &file_solana_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1067,7 +1471,7 @@ func (x *GetFeeForMessageRequest) String() string { func (*GetFeeForMessageRequest) ProtoMessage() {} func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[18] + mi := &file_solana_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1080,7 +1484,7 @@ func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFeeForMessageRequest.ProtoReflect.Descriptor instead. func (*GetFeeForMessageRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{18} + return file_solana_proto_rawDescGZIP(), []int{20} } func (x *GetFeeForMessageRequest) GetMessage() string { @@ -1090,17 +1494,17 @@ func (x *GetFeeForMessageRequest) GetMessage() string { return "" } -func (x *GetFeeForMessageRequest) GetCommitment() string { +func (x *GetFeeForMessageRequest) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return "" + return CommitmentType_COMMITMENT_NONE } type GetMultipleAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` - Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` unknownFields protoimpl.UnknownFields @@ -1109,7 +1513,7 @@ type GetMultipleAccountsOpts struct { func (x *GetMultipleAccountsOpts) Reset() { *x = GetMultipleAccountsOpts{} - mi := &file_solana_proto_msgTypes[19] + mi := &file_solana_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1121,7 +1525,7 @@ func (x *GetMultipleAccountsOpts) String() string { func (*GetMultipleAccountsOpts) ProtoMessage() {} func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[19] + mi := &file_solana_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1134,21 +1538,21 @@ func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMultipleAccountsOpts.ProtoReflect.Descriptor instead. func (*GetMultipleAccountsOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{19} + return file_solana_proto_rawDescGZIP(), []int{21} } -func (x *GetMultipleAccountsOpts) GetEncoding() string { +func (x *GetMultipleAccountsOpts) GetEncoding() EncodingType { if x != nil { return x.Encoding } - return "" + return EncodingType_ENCODING_NONE } -func (x *GetMultipleAccountsOpts) GetCommitment() string { +func (x *GetMultipleAccountsOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return "" + return CommitmentType_COMMITMENT_NONE } func (x *GetMultipleAccountsOpts) GetDataSlice() *DataSlice { @@ -1175,7 +1579,7 @@ type GetMultipleAccountsWithOptsReply struct { func (x *GetMultipleAccountsWithOptsReply) Reset() { *x = GetMultipleAccountsWithOptsReply{} - mi := &file_solana_proto_msgTypes[20] + mi := &file_solana_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1591,7 @@ func (x *GetMultipleAccountsWithOptsReply) String() string { func (*GetMultipleAccountsWithOptsReply) ProtoMessage() {} func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[20] + mi := &file_solana_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1604,7 @@ func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMultipleAccountsWithOptsReply.ProtoReflect.Descriptor instead. func (*GetMultipleAccountsWithOptsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{20} + return file_solana_proto_rawDescGZIP(), []int{22} } func (x *GetMultipleAccountsWithOptsReply) GetRPCContext() *RPCContext { @@ -1227,7 +1631,7 @@ type GetMultipleAccountsWithOptsRequest struct { func (x *GetMultipleAccountsWithOptsRequest) Reset() { *x = GetMultipleAccountsWithOptsRequest{} - mi := &file_solana_proto_msgTypes[21] + mi := &file_solana_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1239,7 +1643,7 @@ func (x *GetMultipleAccountsWithOptsRequest) String() string { func (*GetMultipleAccountsWithOptsRequest) ProtoMessage() {} func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[21] + mi := &file_solana_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1252,7 +1656,7 @@ func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetMultipleAccountsWithOptsRequest.ProtoReflect.Descriptor instead. func (*GetMultipleAccountsWithOptsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{21} + return file_solana_proto_rawDescGZIP(), []int{23} } func (x *GetMultipleAccountsWithOptsRequest) GetAccounts() [][]byte { @@ -1278,7 +1682,7 @@ type GetSignatureStatusesReply struct { func (x *GetSignatureStatusesReply) Reset() { *x = GetSignatureStatusesReply{} - mi := &file_solana_proto_msgTypes[22] + mi := &file_solana_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1290,7 +1694,7 @@ func (x *GetSignatureStatusesReply) String() string { func (*GetSignatureStatusesReply) ProtoMessage() {} func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[22] + mi := &file_solana_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1303,7 +1707,7 @@ func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{22} + return file_solana_proto_rawDescGZIP(), []int{24} } func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { @@ -1322,7 +1726,7 @@ type GetSignatureStatusesRequest struct { func (x *GetSignatureStatusesRequest) Reset() { *x = GetSignatureStatusesRequest{} - mi := &file_solana_proto_msgTypes[23] + mi := &file_solana_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1334,7 +1738,7 @@ func (x *GetSignatureStatusesRequest) String() string { func (*GetSignatureStatusesRequest) ProtoMessage() {} func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[23] + mi := &file_solana_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1347,7 +1751,7 @@ func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{23} + return file_solana_proto_rawDescGZIP(), []int{25} } func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { @@ -1362,14 +1766,14 @@ type GetSignatureStatusesResult struct { Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"` Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` - ConfirmationStatus string `protobuf:"bytes,4,opt,name=confirmation_status,json=confirmationStatus,proto3" json:"confirmation_status,omitempty"` + ConfirmationStatus ConfirmationStatusType `protobuf:"varint,4,opt,name=confirmation_status,json=confirmationStatus,proto3,enum=loop.solana.ConfirmationStatusType" json:"confirmation_status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetSignatureStatusesResult) Reset() { *x = GetSignatureStatusesResult{} - mi := &file_solana_proto_msgTypes[24] + mi := &file_solana_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1381,7 +1785,7 @@ func (x *GetSignatureStatusesResult) String() string { func (*GetSignatureStatusesResult) ProtoMessage() {} func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[24] + mi := &file_solana_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1389,64 +1793,874 @@ func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { } return ms } - return mi.MessageOf(x) + return mi.MessageOf(x) +} + +// Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{26} +} + +func (x *GetSignatureStatusesResult) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *GetSignatureStatusesResult) GetConfirmations() uint64 { + if x != nil { + return x.Confirmations + } + return 0 +} + +func (x *GetSignatureStatusesResult) GetErr() string { + if x != nil { + return x.Err + } + return "" +} + +func (x *GetSignatureStatusesResult) GetConfirmationStatus() ConfirmationStatusType { + if x != nil { + return x.ConfirmationStatus + } + return ConfirmationStatusType_CONFIRMATION_NONE +} + +type GetSlotHeightReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSlotHeightReply) Reset() { + *x = GetSlotHeightReply{} + mi := &file_solana_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSlotHeightReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSlotHeightReply) ProtoMessage() {} + +func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. +func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{27} +} + +func (x *GetSlotHeightReply) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + +type GetSlotHeightRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Commitment CommitmentType `protobuf:"varint,1,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSlotHeightRequest) Reset() { + *x = GetSlotHeightRequest{} + mi := &file_solana_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSlotHeightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSlotHeightRequest) ProtoMessage() {} + +func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. +func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{28} +} + +func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { + if x != nil { + return x.Commitment + } + return CommitmentType_COMMITMENT_NONE +} + +type MessageHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` + NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` + NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageHeader) Reset() { + *x = MessageHeader{} + mi := &file_solana_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHeader) ProtoMessage() {} + +func (x *MessageHeader) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead. +func (*MessageHeader) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{29} +} + +func (x *MessageHeader) GetNumRequiredSignatures() uint32 { + if x != nil { + return x.NumRequiredSignatures + } + return 0 +} + +func (x *MessageHeader) GetNumReadonlySignedAccounts() uint32 { + if x != nil { + return x.NumReadonlySignedAccounts + } + return 0 +} + +func (x *MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 { + if x != nil { + return x.NumReadonlyUnsignedAccounts + } + return 0 +} + +type ParsedMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RecentBlockhash []byte `protobuf:"bytes,1,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` // 32 bytes solana Hash + AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` // list of 32 bytes account keys + Header *MessageHeader `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + Instructions []*CompiledInstruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParsedMessage) Reset() { + *x = ParsedMessage{} + mi := &file_solana_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParsedMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedMessage) ProtoMessage() {} + +func (x *ParsedMessage) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParsedMessage.ProtoReflect.Descriptor instead. +func (*ParsedMessage) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{30} +} + +func (x *ParsedMessage) GetRecentBlockhash() []byte { + if x != nil { + return x.RecentBlockhash + } + return nil +} + +func (x *ParsedMessage) GetAccountKeys() [][]byte { + if x != nil { + return x.AccountKeys + } + return nil +} + +func (x *ParsedMessage) GetHeader() *MessageHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *ParsedMessage) GetInstructions() []*CompiledInstruction { + if x != nil { + return x.Instructions + } + return nil +} + +type ParsedTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` // 64 bytes solana Signature each + Message *ParsedMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParsedTransaction) Reset() { + *x = ParsedTransaction{} + mi := &file_solana_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParsedTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedTransaction) ProtoMessage() {} + +func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParsedTransaction.ProtoReflect.Descriptor instead. +func (*ParsedTransaction) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{31} +} + +func (x *ParsedTransaction) GetSignatures() [][]byte { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *ParsedTransaction) GetMessage() *ParsedMessage { + if x != nil { + return x.Message + } + return nil +} + +type UiTokenAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // raw integer as string + Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` + UiAmountString string `protobuf:"bytes,4,opt,name=ui_amount_string,json=uiAmountString,proto3" json:"ui_amount_string,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UiTokenAmount) Reset() { + *x = UiTokenAmount{} + mi := &file_solana_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UiTokenAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UiTokenAmount) ProtoMessage() {} + +func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UiTokenAmount.ProtoReflect.Descriptor instead. +func (*UiTokenAmount) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{32} +} + +func (x *UiTokenAmount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *UiTokenAmount) GetDecimals() uint32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *UiTokenAmount) GetUiAmountString() string { + if x != nil { + return x.UiAmountString + } + return "" +} + +type TokenBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountIndex uint32 `protobuf:"varint,1,opt,name=account_index,json=accountIndex,proto3" json:"account_index,omitempty"` + Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // 32 bytes solana PublicKey + ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32 bytes solana PublicKey + Mint []byte `protobuf:"bytes,4,opt,name=mint,proto3" json:"mint,omitempty"` // 32 bytes solana PublicKey + Ui *UiTokenAmount `protobuf:"bytes,5,opt,name=ui,proto3" json:"ui,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenBalance) Reset() { + *x = TokenBalance{} + mi := &file_solana_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenBalance) ProtoMessage() {} + +func (x *TokenBalance) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenBalance.ProtoReflect.Descriptor instead. +func (*TokenBalance) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{33} +} + +func (x *TokenBalance) GetAccountIndex() uint32 { + if x != nil { + return x.AccountIndex + } + return 0 +} + +func (x *TokenBalance) GetOwner() []byte { + if x != nil { + return x.Owner + } + return nil +} + +func (x *TokenBalance) GetProgramId() []byte { + if x != nil { + return x.ProgramId + } + return nil +} + +func (x *TokenBalance) GetMint() []byte { + if x != nil { + return x.Mint + } + return nil +} + +func (x *TokenBalance) GetUi() *UiTokenAmount { + if x != nil { + return x.Ui + } + return nil +} + +type InnerInstruction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Instructions []*CompiledInstruction `protobuf:"bytes,2,rep,name=instructions,proto3" json:"instructions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InnerInstruction) Reset() { + *x = InnerInstruction{} + mi := &file_solana_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InnerInstruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerInstruction) ProtoMessage() {} + +func (x *InnerInstruction) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InnerInstruction.ProtoReflect.Descriptor instead. +func (*InnerInstruction) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{34} +} + +func (x *InnerInstruction) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *InnerInstruction) GetInstructions() []*CompiledInstruction { + if x != nil { + return x.Instructions + } + return nil +} + +type LoadedAddresses struct { + state protoimpl.MessageState `protogen:"open.v1"` + Readonly [][]byte `protobuf:"bytes,1,rep,name=readonly,proto3" json:"readonly,omitempty"` // 32 bytes solana PublicKey + Writable [][]byte `protobuf:"bytes,2,rep,name=writable,proto3" json:"writable,omitempty"` // 32 bytes solana PublicKey + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadedAddresses) Reset() { + *x = LoadedAddresses{} + mi := &file_solana_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadedAddresses) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadedAddresses) ProtoMessage() {} + +func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadedAddresses.ProtoReflect.Descriptor instead. +func (*LoadedAddresses) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{35} +} + +func (x *LoadedAddresses) GetReadonly() [][]byte { + if x != nil { + return x.Readonly + } + return nil +} + +func (x *LoadedAddresses) GetWritable() [][]byte { + if x != nil { + return x.Writable + } + return nil +} + +type CompiledInstruction struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"` + Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + StackHeight uint32 `protobuf:"varint,4,opt,name=stack_height,json=stackHeight,proto3" json:"stack_height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CompiledInstruction) Reset() { + *x = CompiledInstruction{} + mi := &file_solana_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CompiledInstruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompiledInstruction) ProtoMessage() {} + +func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead. +func (*CompiledInstruction) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{36} +} + +func (x *CompiledInstruction) GetProgramIdIndex() uint32 { + if x != nil { + return x.ProgramIdIndex + } + return 0 +} + +func (x *CompiledInstruction) GetAccounts() []uint32 { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *CompiledInstruction) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *CompiledInstruction) GetStackHeight() uint32 { + if x != nil { + return x.StackHeight + } + return 0 +} + +type Data struct { + state protoimpl.MessageState `protogen:"open.v1"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + Encoding EncodingType `protobuf:"varint,2,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Data) Reset() { + *x = Data{} + mi := &file_solana_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{37} +} + +func (x *Data) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +func (x *Data) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_NONE +} + +type ReturnData struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProgramId []byte `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32 bytes solana publicKey + Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw program return bytes + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReturnData) Reset() { + *x = ReturnData{} + mi := &file_solana_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReturnData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReturnData) ProtoMessage() {} + +func (x *ReturnData) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReturnData.ProtoReflect.Descriptor instead. +func (*ReturnData) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{38} +} + +func (x *ReturnData) GetProgramId() []byte { + if x != nil { + return x.ProgramId + } + return nil +} + +func (x *ReturnData) GetData() *Data { + if x != nil { + return x.Data + } + return nil +} + +type TransactionMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + ErrJson string `protobuf:"bytes,1,opt,name=err_json,json=errJson,proto3" json:"err_json,omitempty"` + Fee uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` + PreBalances []uint64 `protobuf:"varint,3,rep,packed,name=pre_balances,json=preBalances,proto3" json:"pre_balances,omitempty"` + PostBalances []uint64 `protobuf:"varint,4,rep,packed,name=post_balances,json=postBalances,proto3" json:"post_balances,omitempty"` + LogMessages []string `protobuf:"bytes,5,rep,name=log_messages,json=logMessages,proto3" json:"log_messages,omitempty"` + PreTokenBalances []*TokenBalance `protobuf:"bytes,6,rep,name=pre_token_balances,json=preTokenBalances,proto3" json:"pre_token_balances,omitempty"` + PostTokenBalances []*TokenBalance `protobuf:"bytes,7,rep,name=post_token_balances,json=postTokenBalances,proto3" json:"post_token_balances,omitempty"` + InnerInstructions []*InnerInstruction `protobuf:"bytes,8,rep,name=inner_instructions,json=innerInstructions,proto3" json:"inner_instructions,omitempty"` + LoadedAddresses *LoadedAddresses `protobuf:"bytes,9,opt,name=loaded_addresses,json=loadedAddresses,proto3" json:"loaded_addresses,omitempty"` + ReturnData *ReturnData `protobuf:"bytes,10,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"` + ComputeUnitsConsumed uint64 `protobuf:"varint,11,opt,name=compute_units_consumed,json=computeUnitsConsumed,proto3" json:"compute_units_consumed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionMeta) Reset() { + *x = TransactionMeta{} + mi := &file_solana_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionMeta) ProtoMessage() {} + +func (x *TransactionMeta) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionMeta.ProtoReflect.Descriptor instead. +func (*TransactionMeta) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{39} +} + +func (x *TransactionMeta) GetErrJson() string { + if x != nil { + return x.ErrJson + } + return "" +} + +func (x *TransactionMeta) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionMeta) GetPreBalances() []uint64 { + if x != nil { + return x.PreBalances + } + return nil +} + +func (x *TransactionMeta) GetPostBalances() []uint64 { + if x != nil { + return x.PostBalances + } + return nil +} + +func (x *TransactionMeta) GetLogMessages() []string { + if x != nil { + return x.LogMessages + } + return nil +} + +func (x *TransactionMeta) GetPreTokenBalances() []*TokenBalance { + if x != nil { + return x.PreTokenBalances + } + return nil } -// Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. -func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{24} +func (x *TransactionMeta) GetPostTokenBalances() []*TokenBalance { + if x != nil { + return x.PostTokenBalances + } + return nil } -func (x *GetSignatureStatusesResult) GetSlot() uint64 { +func (x *TransactionMeta) GetInnerInstructions() []*InnerInstruction { if x != nil { - return x.Slot + return x.InnerInstructions } - return 0 + return nil } -func (x *GetSignatureStatusesResult) GetConfirmations() uint64 { +func (x *TransactionMeta) GetLoadedAddresses() *LoadedAddresses { if x != nil { - return x.Confirmations + return x.LoadedAddresses } - return 0 + return nil } -func (x *GetSignatureStatusesResult) GetErr() string { +func (x *TransactionMeta) GetReturnData() *ReturnData { if x != nil { - return x.Err + return x.ReturnData } - return "" + return nil } -func (x *GetSignatureStatusesResult) GetConfirmationStatus() string { +func (x *TransactionMeta) GetComputeUnitsConsumed() uint64 { if x != nil { - return x.ConfirmationStatus + return x.ComputeUnitsConsumed } - return "" + return 0 } -type GetSlotHeightReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +type TransactionEnvelope struct { + state protoimpl.MessageState `protogen:"open.v1"` + // - For RAW encoding, "transaction" contains tx bytes; for PARSED, structured fields. + // + // Types that are valid to be assigned to Transaction: + // + // *TransactionEnvelope_Raw + // *TransactionEnvelope_Parsed + Transaction isTransactionEnvelope_Transaction `protobuf_oneof:"transaction"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetSlotHeightReply) Reset() { - *x = GetSlotHeightReply{} - mi := &file_solana_proto_msgTypes[25] +func (x *TransactionEnvelope) Reset() { + *x = TransactionEnvelope{} + mi := &file_solana_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSlotHeightReply) String() string { +func (x *TransactionEnvelope) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSlotHeightReply) ProtoMessage() {} +func (*TransactionEnvelope) ProtoMessage() {} -func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[25] +func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1457,76 +2671,65 @@ func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. -func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{25} +// Deprecated: Use TransactionEnvelope.ProtoReflect.Descriptor instead. +func (*TransactionEnvelope) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{40} } -func (x *GetSlotHeightReply) GetHeight() uint64 { +func (x *TransactionEnvelope) GetTransaction() isTransactionEnvelope_Transaction { if x != nil { - return x.Height + return x.Transaction } - return 0 -} - -type GetSlotHeightRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Commitment string `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSlotHeightRequest) Reset() { - *x = GetSlotHeightRequest{} - mi := &file_solana_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + return nil } -func (x *GetSlotHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *TransactionEnvelope) GetRaw() []byte { + if x != nil { + if x, ok := x.Transaction.(*TransactionEnvelope_Raw); ok { + return x.Raw + } + } + return nil } -func (*GetSlotHeightRequest) ProtoMessage() {} - -func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[26] +func (x *TransactionEnvelope) GetParsed() *ParsedTransaction { if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + if x, ok := x.Transaction.(*TransactionEnvelope_Parsed); ok { + return x.Parsed } - return ms } - return mi.MessageOf(x) + return nil } -// Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. -func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{26} +type isTransactionEnvelope_Transaction interface { + isTransactionEnvelope_Transaction() } -func (x *GetSlotHeightRequest) GetCommitment() string { - if x != nil { - return x.Commitment - } - return "" +type TransactionEnvelope_Raw struct { + Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` } +type TransactionEnvelope_Parsed struct { + Parsed *ParsedTransaction `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` +} + +func (*TransactionEnvelope_Raw) isTransactionEnvelope_Transaction() {} + +func (*TransactionEnvelope_Parsed) isTransactionEnvelope_Transaction() {} + type GetTransactionReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - TransactionEnvelope []byte `protobuf:"bytes,4,opt,name=transaction_envelope,json=transactionEnvelope,proto3" json:"transaction_envelope,omitempty"` - Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + Transaction *TransactionEnvelope `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` + Meta *TransactionMeta `protobuf:"bytes,12,opt,name=meta,proto3" json:"meta,omitempty"` // - "meta" may be omitted by the node/config. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetTransactionReply) Reset() { *x = GetTransactionReply{} - mi := &file_solana_proto_msgTypes[27] + mi := &file_solana_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1538,7 +2741,7 @@ func (x *GetTransactionReply) String() string { func (*GetTransactionReply) ProtoMessage() {} func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[27] + mi := &file_solana_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1551,7 +2754,7 @@ func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. func (*GetTransactionReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{27} + return file_solana_proto_rawDescGZIP(), []int{41} } func (x *GetTransactionReply) GetSlot() uint64 { @@ -1568,21 +2771,14 @@ func (x *GetTransactionReply) GetBlockTime() int64 { return 0 } -func (x *GetTransactionReply) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *GetTransactionReply) GetTransactionEnvelope() []byte { +func (x *GetTransactionReply) GetTransaction() *TransactionEnvelope { if x != nil { - return x.TransactionEnvelope + return x.Transaction } return nil } -func (x *GetTransactionReply) GetMeta() []byte { +func (x *GetTransactionReply) GetMeta() *TransactionMeta { if x != nil { return x.Meta } @@ -1591,14 +2787,14 @@ func (x *GetTransactionReply) GetMeta() []byte { type GetTransactionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64 bytes signature unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetTransactionRequest) Reset() { *x = GetTransactionRequest{} - mi := &file_solana_proto_msgTypes[28] + mi := &file_solana_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1610,7 +2806,7 @@ func (x *GetTransactionRequest) String() string { func (*GetTransactionRequest) ProtoMessage() {} func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[28] + mi := &file_solana_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1623,7 +2819,7 @@ func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. func (*GetTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{28} + return file_solana_proto_rawDescGZIP(), []int{42} } func (x *GetTransactionRequest) GetSignature() []byte { @@ -1643,7 +2839,7 @@ type HashedValueComparator struct { func (x *HashedValueComparator) Reset() { *x = HashedValueComparator{} - mi := &file_solana_proto_msgTypes[29] + mi := &file_solana_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1655,7 +2851,7 @@ func (x *HashedValueComparator) String() string { func (*HashedValueComparator) ProtoMessage() {} func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[29] + mi := &file_solana_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1668,7 +2864,7 @@ func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use HashedValueComparator.ProtoReflect.Descriptor instead. func (*HashedValueComparator) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{29} + return file_solana_proto_rawDescGZIP(), []int{43} } func (x *HashedValueComparator) GetValues() [][]byte { @@ -1685,6 +2881,50 @@ func (x *HashedValueComparator) GetOperator() int64 { return 0 } +type Subkeys struct { + state protoimpl.MessageState `protogen:"open.v1"` + Subkeys []string `protobuf:"bytes,1,rep,name=subkeys,proto3" json:"subkeys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Subkeys) Reset() { + *x = Subkeys{} + mi := &file_solana_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Subkeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subkeys) ProtoMessage() {} + +func (x *Subkeys) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subkeys.ProtoReflect.Descriptor instead. +func (*Subkeys) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{44} +} + +func (x *Subkeys) GetSubkeys() []string { + if x != nil { + return x.Subkeys + } + return nil +} + type LPFilterQuery struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1693,7 +2933,7 @@ type LPFilterQuery struct { EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` - SubkeyPaths []string `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` + SubkeyPaths []*Subkeys `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` @@ -1703,7 +2943,7 @@ type LPFilterQuery struct { func (x *LPFilterQuery) Reset() { *x = LPFilterQuery{} - mi := &file_solana_proto_msgTypes[30] + mi := &file_solana_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1715,7 +2955,7 @@ func (x *LPFilterQuery) String() string { func (*LPFilterQuery) ProtoMessage() {} func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[30] + mi := &file_solana_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1728,7 +2968,7 @@ func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead. func (*LPFilterQuery) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{30} + return file_solana_proto_rawDescGZIP(), []int{45} } func (x *LPFilterQuery) GetName() string { @@ -1773,7 +3013,7 @@ func (x *LPFilterQuery) GetEventIdlJson() []byte { return nil } -func (x *LPFilterQuery) GetSubkeyPaths() []string { +func (x *LPFilterQuery) GetSubkeyPaths() []*Subkeys { if x != nil { return x.SubkeyPaths } @@ -1812,7 +3052,7 @@ type Limit struct { func (x *Limit) Reset() { *x = Limit{} - mi := &file_solana_proto_msgTypes[31] + mi := &file_solana_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1824,7 +3064,7 @@ func (x *Limit) String() string { func (*Limit) ProtoMessage() {} func (x *Limit) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[31] + mi := &file_solana_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1837,7 +3077,7 @@ func (x *Limit) ProtoReflect() protoreflect.Message { // Deprecated: Use Limit.ProtoReflect.Descriptor instead. func (*Limit) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{31} + return file_solana_proto_rawDescGZIP(), []int{46} } func (x *Limit) GetCursor() string { @@ -1870,7 +3110,7 @@ type LimitAndSort struct { func (x *LimitAndSort) Reset() { *x = LimitAndSort{} - mi := &file_solana_proto_msgTypes[32] + mi := &file_solana_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1882,7 +3122,7 @@ func (x *LimitAndSort) String() string { func (*LimitAndSort) ProtoMessage() {} func (x *LimitAndSort) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[32] + mi := &file_solana_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1895,7 +3135,7 @@ func (x *LimitAndSort) ProtoReflect() protoreflect.Message { // Deprecated: Use LimitAndSort.ProtoReflect.Descriptor instead. func (*LimitAndSort) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{32} + return file_solana_proto_rawDescGZIP(), []int{47} } func (x *LimitAndSort) GetLimit() *Limit { @@ -1907,11 +3147,11 @@ func (x *LimitAndSort) GetLimit() *Limit { type Log struct { state protoimpl.MessageState `protogen:"open.v1"` - ChainID string `protobuf:"bytes,1,opt,name=chain_i_d,json=chainID,proto3" json:"chain_i_d,omitempty"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BlockTimestamp int64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` + BlockTimestamp uint64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` @@ -1924,7 +3164,7 @@ type Log struct { func (x *Log) Reset() { *x = Log{} - mi := &file_solana_proto_msgTypes[33] + mi := &file_solana_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1936,7 +3176,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[33] + mi := &file_solana_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1949,12 +3189,12 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{33} + return file_solana_proto_rawDescGZIP(), []int{48} } -func (x *Log) GetChainID() string { +func (x *Log) GetChainId() string { if x != nil { - return x.ChainID + return x.ChainId } return "" } @@ -1980,7 +3220,7 @@ func (x *Log) GetBlockNumber() int64 { return 0 } -func (x *Log) GetBlockTimestamp() int64 { +func (x *Log) GetBlockTimestamp() uint64 { if x != nil { return x.BlockTimestamp } @@ -2038,7 +3278,7 @@ type RPCContext struct { func (x *RPCContext) Reset() { *x = RPCContext{} - mi := &file_solana_proto_msgTypes[34] + mi := &file_solana_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2050,7 +3290,7 @@ func (x *RPCContext) String() string { func (*RPCContext) ProtoMessage() {} func (x *RPCContext) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[34] + mi := &file_solana_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2063,7 +3303,7 @@ func (x *RPCContext) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. func (*RPCContext) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{34} + return file_solana_proto_rawDescGZIP(), []int{49} } func (x *RPCContext) GetContext() *Context { @@ -2076,7 +3316,7 @@ func (x *RPCContext) GetContext() *Context { type SimulateTXOpts struct { state protoimpl.MessageState `protogen:"open.v1"` SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` - Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` unknownFields protoimpl.UnknownFields @@ -2085,7 +3325,7 @@ type SimulateTXOpts struct { func (x *SimulateTXOpts) Reset() { *x = SimulateTXOpts{} - mi := &file_solana_proto_msgTypes[35] + mi := &file_solana_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2097,7 +3337,7 @@ func (x *SimulateTXOpts) String() string { func (*SimulateTXOpts) ProtoMessage() {} func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[35] + mi := &file_solana_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2110,7 +3350,7 @@ func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. func (*SimulateTXOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{35} + return file_solana_proto_rawDescGZIP(), []int{50} } func (x *SimulateTXOpts) GetSigVerify() bool { @@ -2120,11 +3360,11 @@ func (x *SimulateTXOpts) GetSigVerify() bool { return false } -func (x *SimulateTXOpts) GetCommitment() string { +func (x *SimulateTXOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return "" + return CommitmentType_COMMITMENT_NONE } func (x *SimulateTXOpts) GetReplaceRecentBlockhash() bool { @@ -2153,7 +3393,7 @@ type SimulateTXReply struct { func (x *SimulateTXReply) Reset() { *x = SimulateTXReply{} - mi := &file_solana_proto_msgTypes[36] + mi := &file_solana_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2165,7 +3405,7 @@ func (x *SimulateTXReply) String() string { func (*SimulateTXReply) ProtoMessage() {} func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[36] + mi := &file_solana_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2178,7 +3418,7 @@ func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. func (*SimulateTXReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{36} + return file_solana_proto_rawDescGZIP(), []int{51} } func (x *SimulateTXReply) GetErr() string { @@ -2220,7 +3460,7 @@ type SimulateTXRequest struct { func (x *SimulateTXRequest) Reset() { *x = SimulateTXRequest{} - mi := &file_solana_proto_msgTypes[37] + mi := &file_solana_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2232,7 +3472,7 @@ func (x *SimulateTXRequest) String() string { func (*SimulateTXRequest) ProtoMessage() {} func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[37] + mi := &file_solana_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2245,7 +3485,7 @@ func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. func (*SimulateTXRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{37} + return file_solana_proto_rawDescGZIP(), []int{52} } func (x *SimulateTXRequest) GetReceiver() []byte { @@ -2271,7 +3511,7 @@ func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { type SimulateTransactionAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding string `protobuf:"bytes,1,opt,name=encoding,proto3" json:"encoding,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2279,7 +3519,7 @@ type SimulateTransactionAccountsOpts struct { func (x *SimulateTransactionAccountsOpts) Reset() { *x = SimulateTransactionAccountsOpts{} - mi := &file_solana_proto_msgTypes[38] + mi := &file_solana_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2291,7 +3531,7 @@ func (x *SimulateTransactionAccountsOpts) String() string { func (*SimulateTransactionAccountsOpts) ProtoMessage() {} func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[38] + mi := &file_solana_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2304,14 +3544,14 @@ func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{38} + return file_solana_proto_rawDescGZIP(), []int{53} } -func (x *SimulateTransactionAccountsOpts) GetEncoding() string { +func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { if x != nil { return x.Encoding } - return "" + return EncodingType_ENCODING_NONE } func (x *SimulateTransactionAccountsOpts) GetAddresses() [][]byte { @@ -2325,14 +3565,14 @@ type SubmitTransactionReply struct { state protoimpl.MessageState `protogen:"open.v1"` Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` - Status int64 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` + Status TransactionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=loop.solana.TransactionStatus" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SubmitTransactionReply) Reset() { *x = SubmitTransactionReply{} - mi := &file_solana_proto_msgTypes[39] + mi := &file_solana_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2344,7 +3584,7 @@ func (x *SubmitTransactionReply) String() string { func (*SubmitTransactionReply) ProtoMessage() {} func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[39] + mi := &file_solana_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2357,7 +3597,7 @@ func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{39} + return file_solana_proto_rawDescGZIP(), []int{54} } func (x *SubmitTransactionReply) GetSignature() []byte { @@ -2374,11 +3614,11 @@ func (x *SubmitTransactionReply) GetIdempotencyKey() string { return "" } -func (x *SubmitTransactionReply) GetStatus() int64 { +func (x *SubmitTransactionReply) GetStatus() TransactionStatus { if x != nil { return x.Status } - return 0 + return TransactionStatus_TX_FATAL } type SubmitTransactionRequest struct { @@ -2392,7 +3632,7 @@ type SubmitTransactionRequest struct { func (x *SubmitTransactionRequest) Reset() { *x = SubmitTransactionRequest{} - mi := &file_solana_proto_msgTypes[40] + mi := &file_solana_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2404,7 +3644,7 @@ func (x *SubmitTransactionRequest) String() string { func (*SubmitTransactionRequest) ProtoMessage() {} func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[40] + mi := &file_solana_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2417,7 +3657,7 @@ func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{40} + return file_solana_proto_rawDescGZIP(), []int{55} } func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { @@ -2446,7 +3686,7 @@ type TransactionWithMeta struct { Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` Transaction *DataBytesOrJSON `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` - MetaJson []byte `protobuf:"bytes,4,opt,name=meta_json,json=metaJson,proto3" json:"meta_json,omitempty"` + Meta *TransactionMeta `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2454,7 +3694,7 @@ type TransactionWithMeta struct { func (x *TransactionWithMeta) Reset() { *x = TransactionWithMeta{} - mi := &file_solana_proto_msgTypes[41] + mi := &file_solana_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2466,7 +3706,7 @@ func (x *TransactionWithMeta) String() string { func (*TransactionWithMeta) ProtoMessage() {} func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[41] + mi := &file_solana_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2479,7 +3719,7 @@ func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionWithMeta.ProtoReflect.Descriptor instead. func (*TransactionWithMeta) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{41} + return file_solana_proto_rawDescGZIP(), []int{56} } func (x *TransactionWithMeta) GetSlot() uint64 { @@ -2503,9 +3743,9 @@ func (x *TransactionWithMeta) GetTransaction() *DataBytesOrJSON { return nil } -func (x *TransactionWithMeta) GetMetaJson() []byte { +func (x *TransactionWithMeta) GetMeta() *TransactionMeta { if x != nil { - return x.MetaJson + return x.Meta } return nil } @@ -2519,18 +3759,20 @@ func (x *TransactionWithMeta) GetVersion() int64 { type Primitive struct { state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Kind: + // Types that are valid to be assigned to Primitive: // + // *Primitive_GeneralPrimitive // *Primitive_Address - // *Primitive_EventByTopic - Kind isPrimitive_Kind `protobuf_oneof:"kind"` + // *Primitive_EventSig + // *Primitive_EventBySubkey + Primitive isPrimitive_Primitive `protobuf_oneof:"primitive"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_solana_proto_msgTypes[42] + mi := &file_solana_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2542,7 +3784,7 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[42] + mi := &file_solana_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2555,61 +3797,91 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{42} + return file_solana_proto_rawDescGZIP(), []int{57} +} + +func (x *Primitive) GetPrimitive() isPrimitive_Primitive { + if x != nil { + return x.Primitive + } + return nil } -func (x *Primitive) GetKind() isPrimitive_Kind { +func (x *Primitive) GetGeneralPrimitive() *chain_common.Primitive { if x != nil { - return x.Kind + if x, ok := x.Primitive.(*Primitive_GeneralPrimitive); ok { + return x.GeneralPrimitive + } } return nil } -func (x *Primitive) GetAddress() *Address { +func (x *Primitive) GetAddress() []byte { if x != nil { - if x, ok := x.Kind.(*Primitive_Address); ok { + if x, ok := x.Primitive.(*Primitive_Address); ok { return x.Address } } return nil } -func (x *Primitive) GetEventByTopic() *EventByTopic { +func (x *Primitive) GetEventSig() []byte { + if x != nil { + if x, ok := x.Primitive.(*Primitive_EventSig); ok { + return x.EventSig + } + } + return nil +} + +func (x *Primitive) GetEventBySubkey() *EventBySubkey { if x != nil { - if x, ok := x.Kind.(*Primitive_EventByTopic); ok { - return x.EventByTopic + if x, ok := x.Primitive.(*Primitive_EventBySubkey); ok { + return x.EventBySubkey } } return nil } -type isPrimitive_Kind interface { - isPrimitive_Kind() +type isPrimitive_Primitive interface { + isPrimitive_Primitive() +} + +type Primitive_GeneralPrimitive struct { + GeneralPrimitive *chain_common.Primitive `protobuf:"bytes,1,opt,name=general_primitive,json=generalPrimitive,proto3,oneof"` } type Primitive_Address struct { - Address *Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3,oneof"` // filter event by program public key 32 bytes +} + +type Primitive_EventSig struct { + EventSig []byte `protobuf:"bytes,3,opt,name=event_sig,json=eventSig,proto3,oneof"` // filter event by event signature 8 bytes length } -type Primitive_EventByTopic struct { - EventByTopic *EventByTopic `protobuf:"bytes,2,opt,name=eventByTopic,proto3,oneof"` +type Primitive_EventBySubkey struct { + EventBySubkey *EventBySubkey `protobuf:"bytes,4,opt,name=event_by_subkey,json=eventBySubkey,proto3,oneof"` // filter event by subkey } -func (*Primitive_Address) isPrimitive_Kind() {} +func (*Primitive_GeneralPrimitive) isPrimitive_Primitive() {} + +func (*Primitive_Address) isPrimitive_Primitive() {} -func (*Primitive_EventByTopic) isPrimitive_Kind() {} +func (*Primitive_EventSig) isPrimitive_Primitive() {} + +func (*Primitive_EventBySubkey) isPrimitive_Primitive() {} type QueryTrackedLogsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - FilterQuery []*Expression `protobuf:"bytes,1,rep,name=filterQuery,proto3" json:"filterQuery,omitempty"` - LimitAndSort *LimitAndSort `protobuf:"bytes,2,opt,name=limitAndSort,proto3" json:"limitAndSort,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FilterQuery []*Expression `protobuf:"bytes,1,rep,name=filterQuery,proto3" json:"filterQuery,omitempty"` + LimitAndSort *chain_common.LimitAndSort `protobuf:"bytes,2,opt,name=limit_and_sort,json=limitAndSort,proto3" json:"limit_and_sort,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_solana_proto_msgTypes[43] + mi := &file_solana_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2621,7 +3893,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[43] + mi := &file_solana_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2634,7 +3906,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{43} + return file_solana_proto_rawDescGZIP(), []int{58} } func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { @@ -2644,7 +3916,7 @@ func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { return nil } -func (x *QueryTrackedLogsRequest) GetLimitAndSort() *LimitAndSort { +func (x *QueryTrackedLogsRequest) GetLimitAndSort() *chain_common.LimitAndSort { if x != nil { return x.LimitAndSort } @@ -2653,14 +3925,14 @@ func (x *QueryTrackedLogsRequest) GetLimitAndSort() *LimitAndSort { type QueryTrackedLogsReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Result []*Log `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` + Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_solana_proto_msgTypes[44] + mi := &file_solana_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2672,7 +3944,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[44] + mi := &file_solana_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2685,12 +3957,12 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{44} + return file_solana_proto_rawDescGZIP(), []int{59} } -func (x *QueryTrackedLogsReply) GetResult() []*Log { +func (x *QueryTrackedLogsReply) GetLogs() []*Log { if x != nil { - return x.Result + return x.Logs } return nil } @@ -2704,7 +3976,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[45] + mi := &file_solana_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2716,7 +3988,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[45] + mi := &file_solana_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2729,7 +4001,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{45} + return file_solana_proto_rawDescGZIP(), []int{60} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { @@ -2747,7 +4019,7 @@ type RegisterLogTrackingReply struct { func (x *RegisterLogTrackingReply) Reset() { *x = RegisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[46] + mi := &file_solana_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2759,7 +4031,7 @@ func (x *RegisterLogTrackingReply) String() string { func (*RegisterLogTrackingReply) ProtoMessage() {} func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[46] + mi := &file_solana_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2772,7 +4044,7 @@ func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{46} + return file_solana_proto_rawDescGZIP(), []int{61} } type UnregisterLogTrackingRequest struct { @@ -2784,7 +4056,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[47] + mi := &file_solana_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2796,7 +4068,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[47] + mi := &file_solana_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2809,7 +4081,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{47} + return file_solana_proto_rawDescGZIP(), []int{62} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -2827,7 +4099,7 @@ type UnregisterLogTrackingReply struct { func (x *UnregisterLogTrackingReply) Reset() { *x = UnregisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2839,7 +4111,7 @@ func (x *UnregisterLogTrackingReply) String() string { func (*UnregisterLogTrackingReply) ProtoMessage() {} func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2852,76 +4124,85 @@ func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{48} + return file_solana_proto_rawDescGZIP(), []int{63} } var File_solana_proto protoreflect.FileDescriptor const file_solana_proto_rawDesc = "" + "\n" + - "\fsolana.proto\x12\vloop.solana\"\xc2\x01\n" + + "\fsolana.proto\x12\vloop.solana\x1a\x1dloop/chain-common/query.proto\x1a\x16values/v1/values.proto\"\xd5\x01\n" + "\aAccount\x12\x1a\n" + "\blamports\x18\x01 \x01(\x04R\blamports\x12\x14\n" + "\x05owner\x18\x02 \x01(\fR\x05owner\x120\n" + "\x04data\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\x04data\x12\x1e\n" + "\n" + "executable\x18\x04 \x01(\bR\n" + - "executable\x12\x1d\n" + + "executable\x120\n" + "\n" + - "rent_epoch\x18\x05 \x01(\x03R\trentEpoch\x12\x14\n" + + "rent_epoch\x18\x05 \x01(\v2\x11.values.v1.BigIntR\trentEpoch\x12\x14\n" + "\x05space\x18\x06 \x01(\x04R\x05space\"#\n" + "\aAddress\x12\x18\n" + - "\aaddress\x18\x01 \x01(\fR\aaddress\"p\n" + - "\x0eBoolExpression\x129\n" + - "\vexpressions\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vexpressions\x12#\n" + - "\rbool_operator\x18\x02 \x01(\x03R\fboolOperator\"`\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\"`\n" + "\rComputeConfig\x12#\n" + "\rcompute_limit\x18\x01 \x01(\rR\fcomputeLimit\x12*\n" + "\x11compute_max_price\x18\x02 \x01(\x04R\x0fcomputeMaxPrice\"\x1d\n" + "\aContext\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\"\x82\x01\n" + - "\x0fDataBytesOrJSON\x12*\n" + - "\x11raw_data_encoding\x18\x01 \x01(\tR\x0frawDataEncoding\x12*\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\"\x9d\x01\n" + + "\x0fDataBytesOrJSON\x12E\n" + + "\x11raw_data_encoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\x0frawDataEncoding\x12*\n" + "\x11as_decoded_binary\x18\x02 \x01(\fR\x0fasDecodedBinary\x12\x17\n" + "\aas_json\x18\x03 \x01(\fR\x06asJson\";\n" + "\tDataSlice\x12\x16\n" + "\x06offset\x18\x01 \x01(\x04R\x06offset\x12\x16\n" + - "\x06length\x18\x02 \x01(\x04R\x06length\"~\n" + - "\fEventByTopic\x12\x14\n" + + "\x06length\x18\x02 \x01(\x04R\x06length\"z\n" + + "\bEventSig\x12\x14\n" + "\x05topic\x18\x01 \x01(\x04R\x05topic\x12X\n" + - "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"\x88\x01\n" + + "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"q\n" + + "\x16IndexedValueComparator\x12\x14\n" + + "\x05value\x18\x01 \x03(\fR\x05value\x12A\n" + + "\boperator\x18\x02 \x01(\x0e2%.loop.chain.common.ComparisonOperatorR\boperator\"\x80\x01\n" + + "\rEventBySubkey\x12!\n" + + "\fsubkey_index\x18\x01 \x01(\x04R\vsubkeyIndex\x12L\n" + + "\x0fvalue_comparers\x18\x02 \x03(\v2#.loop.solana.IndexedValueComparatorR\x0evalueComparers\"\xa2\x01\n" + + "\n" + + "Expression\x126\n" + + "\tprimitive\x18\x01 \x01(\v2\x16.loop.solana.PrimitiveH\x00R\tprimitive\x12O\n" + + "\x12boolean_expression\x18\x02 \x01(\v2\x1e.loop.solana.BooleanExpressionH\x00R\x11booleanExpressionB\v\n" + + "\tevaluator\"\x9b\x01\n" + + "\x11BooleanExpression\x12M\n" + + "\x10boolean_operator\x18\x01 \x01(\x0e2\".loop.chain.common.BooleanOperatorR\x0fbooleanOperator\x127\n" + "\n" + - "Expression\x124\n" + - "\tprimitive\x18\x01 \x01(\v2\x16.loop.solana.PrimitiveR\tprimitive\x12D\n" + - "\x0fbool_expression\x18\x02 \x01(\v2\x1b.loop.solana.BoolExpressionR\x0eboolExpression\"\xb1\x01\n" + - "\x12GetAccountInfoOpts\x12\x1a\n" + - "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1e\n" + + "expression\x18\x02 \x03(\v2\x17.loop.solana.ExpressionR\n" + + "expression\"\xe9\x01\n" + + "\x12GetAccountInfoOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12;\n" + "\n" + - "commitment\x18\x02 \x01(\tR\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + "commitment\x125\n" + "\n" + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + - "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x85\x01\n" + - "\x1bGetAccountInfoWithOptsReply\x12:\n" + - "\rr_p_c_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + - "rPCContext\x12*\n" + + "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x83\x01\n" + + "\x1bGetAccountInfoWithOptsReply\x128\n" + + "\vrpc_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + + "rpcContext\x12*\n" + "\x05value\x18\x02 \x01(\v2\x14.loop.solana.AccountR\x05value\"n\n" + "\x1dGetAccountInfoWithOptsRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\fR\aaccount\x123\n" + "\x04opts\x18\x02 \x01(\v2\x1f.loop.solana.GetAccountInfoOptsR\x04opts\"'\n" + "\x0fGetBalanceReply\x12\x14\n" + - "\x05value\x18\x01 \x01(\x04R\x05value\"G\n" + + "\x05value\x18\x01 \x01(\x04R\x05value\"d\n" + "\x11GetBalanceRequest\x12\x12\n" + - "\x04addr\x18\x01 \x01(\fR\x04addr\x12\x1e\n" + + "\x04addr\x18\x01 \x01(\fR\x04addr\x12;\n" + "\n" + - "commitment\x18\x02 \x01(\tR\n" + - "commitment\"\xe0\x01\n" + - "\fGetBlockOpts\x12\x1a\n" + - "\bencoding\x18\x01 \x01(\tR\bencoding\x12/\n" + - "\x13transaction_details\x18\x02 \x01(\tR\x12transactionDetails\x12\x18\n" + - "\arewards\x18\x03 \x01(\bR\arewards\x12\x1e\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + + "commitment\"\xbd\x02\n" + + "\fGetBlockOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12T\n" + + "\x13transaction_details\x18\x02 \x01(\x0e2#.loop.solana.TransactionDetailsTypeR\x12transactionDetails\x12\x18\n" + + "\arewards\x18\x03 \x01(\bR\arewards\x12;\n" + "\n" + - "commitment\x18\x04 \x01(\tR\n" + + "commitment\x18\x04 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + "commitment\x12I\n" + "!max_supported_transaction_version\x18\x05 \x01(\x04R\x1emaxSupportedTransactionVersion\"\xa5\x02\n" + "\rGetBlockReply\x12\x1c\n" + @@ -2940,16 +4221,16 @@ const file_solana_proto_rawDesc = "" + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12-\n" + "\x04opts\x18\x02 \x01(\v2\x19.loop.solana.GetBlockOptsR\x04opts\")\n" + "\x15GetFeeForMessageReply\x12\x10\n" + - "\x03fee\x18\x01 \x01(\x04R\x03fee\"S\n" + + "\x03fee\x18\x01 \x01(\x04R\x03fee\"p\n" + "\x17GetFeeForMessageRequest\x12\x18\n" + - "\amessage\x18\x01 \x01(\tR\amessage\x12\x1e\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12;\n" + "\n" + - "commitment\x18\x02 \x01(\tR\n" + - "commitment\"\xb6\x01\n" + - "\x17GetMultipleAccountsOpts\x12\x1a\n" + - "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1e\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + + "commitment\"\xee\x01\n" + + "\x17GetMultipleAccountsOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12;\n" + "\n" + - "commitment\x18\x02 \x01(\tR\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + "commitment\x125\n" + "\n" + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + @@ -2964,30 +4245,93 @@ const file_solana_proto_rawDesc = "" + "\x19GetSignatureStatusesReply\x12A\n" + "\aresults\x18\x01 \x03(\v2'.loop.solana.GetSignatureStatusesResultR\aresults\"1\n" + "\x1bGetSignatureStatusesRequest\x12\x12\n" + - "\x04sigs\x18\x01 \x03(\fR\x04sigs\"\x99\x01\n" + + "\x04sigs\x18\x01 \x03(\fR\x04sigs\"\xbe\x01\n" + "\x1aGetSignatureStatusesResult\x12\x12\n" + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12$\n" + "\rconfirmations\x18\x02 \x01(\x04R\rconfirmations\x12\x10\n" + - "\x03err\x18\x03 \x01(\tR\x03err\x12/\n" + - "\x13confirmation_status\x18\x04 \x01(\tR\x12confirmationStatus\",\n" + + "\x03err\x18\x03 \x01(\tR\x03err\x12T\n" + + "\x13confirmation_status\x18\x04 \x01(\x0e2#.loop.solana.ConfirmationStatusTypeR\x12confirmationStatus\",\n" + "\x12GetSlotHeightReply\x12\x16\n" + - "\x06height\x18\x01 \x01(\x04R\x06height\"6\n" + - "\x14GetSlotHeightRequest\x12\x1e\n" + + "\x06height\x18\x01 \x01(\x04R\x06height\"S\n" + + "\x14GetSlotHeightRequest\x12;\n" + "\n" + - "commitment\x18\x01 \x01(\tR\n" + - "commitment\"\xa9\x01\n" + + "commitment\x18\x01 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + + "commitment\"\xcd\x01\n" + + "\rMessageHeader\x126\n" + + "\x17num_required_signatures\x18\x01 \x01(\rR\x15numRequiredSignatures\x12?\n" + + "\x1cnum_readonly_signed_accounts\x18\x02 \x01(\rR\x19numReadonlySignedAccounts\x12C\n" + + "\x1enum_readonly_unsigned_accounts\x18\x03 \x01(\rR\x1bnumReadonlyUnsignedAccounts\"\xd7\x01\n" + + "\rParsedMessage\x12)\n" + + "\x10recent_blockhash\x18\x01 \x01(\fR\x0frecentBlockhash\x12!\n" + + "\faccount_keys\x18\x02 \x03(\fR\vaccountKeys\x122\n" + + "\x06header\x18\x03 \x01(\v2\x1a.loop.solana.MessageHeaderR\x06header\x12D\n" + + "\finstructions\x18\x04 \x03(\v2 .loop.solana.CompiledInstructionR\finstructions\"i\n" + + "\x11ParsedTransaction\x12\x1e\n" + + "\n" + + "signatures\x18\x01 \x03(\fR\n" + + "signatures\x124\n" + + "\amessage\x18\x02 \x01(\v2\x1a.loop.solana.ParsedMessageR\amessage\"m\n" + + "\rUiTokenAmount\x12\x16\n" + + "\x06amount\x18\x01 \x01(\tR\x06amount\x12\x1a\n" + + "\bdecimals\x18\x02 \x01(\rR\bdecimals\x12(\n" + + "\x10ui_amount_string\x18\x04 \x01(\tR\x0euiAmountString\"\xa8\x01\n" + + "\fTokenBalance\x12#\n" + + "\raccount_index\x18\x01 \x01(\rR\faccountIndex\x12\x14\n" + + "\x05owner\x18\x02 \x01(\fR\x05owner\x12\x1d\n" + + "\n" + + "program_id\x18\x03 \x01(\fR\tprogramId\x12\x12\n" + + "\x04mint\x18\x04 \x01(\fR\x04mint\x12*\n" + + "\x02ui\x18\x05 \x01(\v2\x1a.loop.solana.UiTokenAmountR\x02ui\"n\n" + + "\x10InnerInstruction\x12\x14\n" + + "\x05index\x18\x01 \x01(\rR\x05index\x12D\n" + + "\finstructions\x18\x02 \x03(\v2 .loop.solana.CompiledInstructionR\finstructions\"I\n" + + "\x0fLoadedAddresses\x12\x1a\n" + + "\breadonly\x18\x01 \x03(\fR\breadonly\x12\x1a\n" + + "\bwritable\x18\x02 \x03(\fR\bwritable\"\x92\x01\n" + + "\x13CompiledInstruction\x12(\n" + + "\x10program_id_index\x18\x01 \x01(\rR\x0eprogramIdIndex\x12\x1a\n" + + "\baccounts\x18\x02 \x03(\rR\baccounts\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04data\x12!\n" + + "\fstack_height\x18\x04 \x01(\rR\vstackHeight\"W\n" + + "\x04Data\x12\x18\n" + + "\acontent\x18\x01 \x01(\fR\acontent\x125\n" + + "\bencoding\x18\x02 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\"R\n" + + "\n" + + "ReturnData\x12\x1d\n" + + "\n" + + "program_id\x18\x01 \x01(\fR\tprogramId\x12%\n" + + "\x04data\x18\x02 \x01(\v2\x11.loop.solana.DataR\x04data\"\xc4\x04\n" + + "\x0fTransactionMeta\x12\x19\n" + + "\berr_json\x18\x01 \x01(\tR\aerrJson\x12\x10\n" + + "\x03fee\x18\x02 \x01(\x04R\x03fee\x12!\n" + + "\fpre_balances\x18\x03 \x03(\x04R\vpreBalances\x12#\n" + + "\rpost_balances\x18\x04 \x03(\x04R\fpostBalances\x12!\n" + + "\flog_messages\x18\x05 \x03(\tR\vlogMessages\x12G\n" + + "\x12pre_token_balances\x18\x06 \x03(\v2\x19.loop.solana.TokenBalanceR\x10preTokenBalances\x12I\n" + + "\x13post_token_balances\x18\a \x03(\v2\x19.loop.solana.TokenBalanceR\x11postTokenBalances\x12L\n" + + "\x12inner_instructions\x18\b \x03(\v2\x1d.loop.solana.InnerInstructionR\x11innerInstructions\x12G\n" + + "\x10loaded_addresses\x18\t \x01(\v2\x1c.loop.solana.LoadedAddressesR\x0floadedAddresses\x128\n" + + "\vreturn_data\x18\n" + + " \x01(\v2\x17.loop.solana.ReturnDataR\n" + + "returnData\x124\n" + + "\x16compute_units_consumed\x18\v \x01(\x04R\x14computeUnitsConsumed\"r\n" + + "\x13TransactionEnvelope\x12\x12\n" + + "\x03raw\x18\x01 \x01(\fH\x00R\x03raw\x128\n" + + "\x06parsed\x18\x02 \x01(\v2\x1e.loop.solana.ParsedTransactionH\x00R\x06parsedB\r\n" + + "\vtransaction\"\xbe\x01\n" + "\x13GetTransactionReply\x12\x12\n" + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + "\n" + - "block_time\x18\x02 \x01(\x03R\tblockTime\x12\x18\n" + - "\aversion\x18\x03 \x01(\x03R\aversion\x121\n" + - "\x14transaction_envelope\x18\x04 \x01(\fR\x13transactionEnvelope\x12\x12\n" + - "\x04meta\x18\x05 \x01(\fR\x04meta\"5\n" + + "block_time\x18\x02 \x01(\x03R\tblockTime\x12B\n" + + "\vtransaction\x18\x03 \x01(\v2 .loop.solana.TransactionEnvelopeR\vtransaction\x120\n" + + "\x04meta\x18\f \x01(\v2\x1c.loop.solana.TransactionMetaR\x04meta\"5\n" + "\x15GetTransactionRequest\x12\x1c\n" + "\tsignature\x18\x01 \x01(\fR\tsignature\"K\n" + "\x15HashedValueComparator\x12\x16\n" + "\x06values\x18\x01 \x03(\fR\x06values\x12\x1a\n" + - "\boperator\x18\x02 \x01(\x03R\boperator\"\xd6\x02\n" + + "\boperator\x18\x02 \x01(\x03R\boperator\"#\n" + + "\aSubkeys\x12\x18\n" + + "\asubkeys\x18\x01 \x03(\tR\asubkeys\"\xec\x02\n" + "\rLPFilterQuery\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + "\aaddress\x18\x02 \x01(\fR\aaddress\x12\x1d\n" + @@ -2995,8 +4339,8 @@ const file_solana_proto_rawDesc = "" + "event_name\x18\x03 \x01(\tR\teventName\x12\x1b\n" + "\tevent_sig\x18\x04 \x01(\fR\beventSig\x12%\n" + "\x0estarting_block\x18\x05 \x01(\x03R\rstartingBlock\x12$\n" + - "\x0eevent_idl_json\x18\x06 \x01(\fR\feventIdlJson\x12!\n" + - "\fsubkey_paths\x18\a \x03(\tR\vsubkeyPaths\x12\x1c\n" + + "\x0eevent_idl_json\x18\x06 \x01(\fR\feventIdlJson\x127\n" + + "\fsubkey_paths\x18\a \x03(\v2\x14.loop.solana.SubkeysR\vsubkeyPaths\x12\x1c\n" + "\tretention\x18\b \x01(\x03R\tretention\x12\"\n" + "\rmax_logs_kept\x18\t \x01(\x03R\vmaxLogsKept\x12)\n" + "\x10include_reverted\x18\n" + @@ -3006,14 +4350,14 @@ const file_solana_proto_rawDesc = "" + "\x10cursor_direction\x18\x02 \x01(\x05R\x0fcursorDirection\x12\x14\n" + "\x05count\x18\x03 \x01(\x04R\x05count\"8\n" + "\fLimitAndSort\x12(\n" + - "\x05limit\x18\x01 \x01(\v2\x12.loop.solana.LimitR\x05limit\"\xc6\x02\n" + - "\x03Log\x12\x1a\n" + - "\tchain_i_d\x18\x01 \x01(\tR\achainID\x12\x1b\n" + + "\x05limit\x18\x01 \x01(\v2\x12.loop.solana.LimitR\x05limit\"\xc5\x02\n" + + "\x03Log\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\tR\achainId\x12\x1b\n" + "\tlog_index\x18\x02 \x01(\x03R\blogIndex\x12\x1d\n" + "\n" + "block_hash\x18\x03 \x01(\fR\tblockHash\x12!\n" + "\fblock_number\x18\x04 \x01(\x03R\vblockNumber\x12'\n" + - "\x0fblock_timestamp\x18\x05 \x01(\x03R\x0eblockTimestamp\x12\x18\n" + + "\x0fblock_timestamp\x18\x05 \x01(\x04R\x0eblockTimestamp\x12\x18\n" + "\aaddress\x18\x06 \x01(\fR\aaddress\x12\x1b\n" + "\tevent_sig\x18\a \x01(\fR\beventSig\x12\x17\n" + "\atx_hash\x18\b \x01(\fR\x06txHash\x12\x12\n" + @@ -3023,12 +4367,12 @@ const file_solana_proto_rawDesc = "" + "\x05error\x18\v \x01(\tR\x05error\"<\n" + "\n" + "RPCContext\x12.\n" + - "\acontext\x18\x01 \x01(\v2\x14.loop.solana.ContextR\acontext\"\xd3\x01\n" + + "\acontext\x18\x01 \x01(\v2\x14.loop.solana.ContextR\acontext\"\xf0\x01\n" + "\x0eSimulateTXOpts\x12\x1d\n" + "\n" + - "sig_verify\x18\x01 \x01(\bR\tsigVerify\x12\x1e\n" + + "sig_verify\x18\x01 \x01(\bR\tsigVerify\x12;\n" + "\n" + - "commitment\x18\x02 \x01(\tR\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + "commitment\x128\n" + "\x18replace_recent_blockhash\x18\x03 \x01(\bR\x16replaceRecentBlockhash\x12H\n" + "\baccounts\x18\x04 \x01(\v2,.loop.solana.SimulateTransactionAccountsOptsR\baccounts\"\x90\x01\n" + @@ -3040,34 +4384,36 @@ const file_solana_proto_rawDesc = "" + "\x11SimulateTXRequest\x12\x1a\n" + "\breceiver\x18\x01 \x01(\fR\breceiver\x12/\n" + "\x13encoded_transaction\x18\x02 \x01(\tR\x12encodedTransaction\x12/\n" + - "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"[\n" + - "\x1fSimulateTransactionAccountsOpts\x12\x1a\n" + - "\bencoding\x18\x01 \x01(\tR\bencoding\x12\x1c\n" + - "\taddresses\x18\x02 \x03(\fR\taddresses\"w\n" + + "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"v\n" + + "\x1fSimulateTransactionAccountsOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12\x1c\n" + + "\taddresses\x18\x02 \x03(\fR\taddresses\"\x97\x01\n" + "\x16SubmitTransactionReply\x12\x1c\n" + "\tsignature\x18\x01 \x01(\fR\tsignature\x12'\n" + - "\x0fidempotency_key\x18\x02 \x01(\tR\x0eidempotencyKey\x12\x16\n" + - "\x06status\x18\x03 \x01(\x03R\x06status\"\x95\x01\n" + + "\x0fidempotency_key\x18\x02 \x01(\tR\x0eidempotencyKey\x126\n" + + "\x06status\x18\x03 \x01(\x0e2\x1e.loop.solana.TransactionStatusR\x06status\"\x95\x01\n" + "\x18SubmitTransactionRequest\x12,\n" + "\x03cfg\x18\x01 \x01(\v2\x1a.loop.solana.ComputeConfigR\x03cfg\x12\x1a\n" + "\breceiver\x18\x02 \x01(\fR\breceiver\x12/\n" + - "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xbf\x01\n" + + "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xd4\x01\n" + "\x13TransactionWithMeta\x12\x12\n" + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + "\n" + "block_time\x18\x02 \x01(\x03R\tblockTime\x12>\n" + - "\vtransaction\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\vtransaction\x12\x1b\n" + - "\tmeta_json\x18\x04 \x01(\fR\bmetaJson\x12\x18\n" + - "\aversion\x18\x05 \x01(\x03R\aversion\"\x86\x01\n" + - "\tPrimitive\x120\n" + - "\aaddress\x18\x01 \x01(\v2\x14.loop.solana.AddressH\x00R\aaddress\x12?\n" + - "\feventByTopic\x18\x02 \x01(\v2\x19.loop.solana.EventByTopicH\x00R\feventByTopicB\x06\n" + - "\x04kind\"\x93\x01\n" + + "\vtransaction\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\vtransaction\x120\n" + + "\x04meta\x18\x04 \x01(\v2\x1c.loop.solana.TransactionMetaR\x04meta\x12\x18\n" + + "\aversion\x18\x05 \x01(\x03R\aversion\"\xe6\x01\n" + + "\tPrimitive\x12K\n" + + "\x11general_primitive\x18\x01 \x01(\v2\x1c.loop.chain.common.PrimitiveH\x00R\x10generalPrimitive\x12\x1a\n" + + "\aaddress\x18\x02 \x01(\fH\x00R\aaddress\x12\x1d\n" + + "\tevent_sig\x18\x03 \x01(\fH\x00R\beventSig\x12D\n" + + "\x0fevent_by_subkey\x18\x04 \x01(\v2\x1a.loop.solana.EventBySubkeyH\x00R\reventBySubkeyB\v\n" + + "\tprimitive\"\x9b\x01\n" + "\x17QueryTrackedLogsRequest\x129\n" + - "\vfilterQuery\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vfilterQuery\x12=\n" + - "\flimitAndSort\x18\x02 \x01(\v2\x19.loop.solana.LimitAndSortR\flimitAndSort\"A\n" + - "\x15QueryTrackedLogsReply\x12(\n" + - "\x06result\x18\x01 \x03(\v2\x10.loop.solana.LogR\x06result\"P\n" + + "\vfilterQuery\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vfilterQuery\x12E\n" + + "\x0elimit_and_sort\x18\x02 \x01(\v2\x1f.loop.chain.common.LimitAndSortR\flimitAndSort\"=\n" + + "\x15QueryTrackedLogsReply\x12$\n" + + "\x04logs\x18\x01 \x03(\v2\x10.loop.solana.LogR\x04logs\"P\n" + "\x1aRegisterLogTrackingRequest\x122\n" + "\x06filter\x18\x01 \x01(\v2\x1a.loop.solana.LPFilterQueryR\x06filter\"\x1a\n" + "\x18RegisterLogTrackingReply\">\n" + @@ -3075,8 +4421,36 @@ const file_solana_proto_rawDesc = "" + "\n" + "filterName\x18\x01 \x01(\tR\n" + "filterName\"\x1c\n" + - "\x1aUnregisterLogTrackingReply2\xe4\t\n" + - "\rSolanaService\x12n\n" + + "\x1aUnregisterLogTrackingReply*A\n" + + "\x11TransactionStatus\x12\f\n" + + "\bTX_FATAL\x10\x00\x12\x0e\n" + + "\n" + + "TX_ABORTED\x10\x01\x12\x0e\n" + + "\n" + + "TX_SUCCESS\x10\x02*\x99\x01\n" + + "\x16TransactionDetailsType\x12\x1c\n" + + "\x18TRANSACTION_DETAILS_FULL\x10\x00\x12!\n" + + "\x1dTRANSCTION_DETAILS_SIGNATURES\x10\x01\x12\x1c\n" + + "\x18TRANSACTION_DETAILS_NONE\x10\x02\x12 \n" + + "\x1cTRANSACTION_DETAILS_ACCOUNTS\x10\x03*\x91\x01\n" + + "\fEncodingType\x12\x11\n" + + "\rENCODING_NONE\x10\x00\x12\x13\n" + + "\x0fENCODING_BASE58\x10\x01\x12\x13\n" + + "\x0fENCODING_BASE64\x10\x02\x12\x17\n" + + "\x13ENCODING_BASE64_ZST\x10\x03\x12\x18\n" + + "\x14ENCODING_JSON_PARSED\x10\x04\x12\x11\n" + + "\rENCODING_JSON\x10\x05*s\n" + + "\x0eCommitmentType\x12\x13\n" + + "\x0fCOMMITMENT_NONE\x10\x00\x12\x18\n" + + "\x14COMMITMENT_FINALIZED\x10\x01\x12\x18\n" + + "\x14COMMITMENT_CONFIRMED\x10\x02\x12\x18\n" + + "\x14COMMITMENT_PROCESSED\x10\x03*\x83\x01\n" + + "\x16ConfirmationStatusType\x12\x15\n" + + "\x11CONFIRMATION_NONE\x10\x00\x12\x1a\n" + + "\x16CONFIRMATION_PROCESSED\x10\x01\x12\x1a\n" + + "\x16CONFIRMATION_CONFIRMED\x10\x02\x12\x1a\n" + + "\x16CONFIRMATION_FINALIZED\x10\x032\xe9\t\n" + + "\x06Solana\x12n\n" + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + "\n" + "GetBalance\x12\x1e.loop.solana.GetBalanceRequest\x1a\x1c.loop.solana.GetBalanceReply\x12D\n" + @@ -3085,13 +4459,13 @@ const file_solana_proto_rawDesc = "" + "\x1bGetMultipleAccountsWithOpts\x12/.loop.solana.GetMultipleAccountsWithOptsRequest\x1a-.loop.solana.GetMultipleAccountsWithOptsReply\x12h\n" + "\x14GetSignatureStatuses\x12(.loop.solana.GetSignatureStatusesRequest\x1a&.loop.solana.GetSignatureStatusesReply\x12S\n" + "\rGetSlotHeight\x12!.loop.solana.GetSlotHeightRequest\x1a\x1f.loop.solana.GetSlotHeightReply\x12V\n" + - "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12\\\n" + - "\x10QueryTrackedLogs\x12$.loop.solana.QueryTrackedLogsRequest\x1a\".loop.solana.QueryTrackedLogsReply\x12e\n" + - "\x13RegisterLogTracking\x12'.loop.solana.RegisterLogTrackingRequest\x1a%.loop.solana.RegisterLogTrackingReply\x12J\n" + + "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12_\n" + + "\x13QueryTrackedLogsSol\x12$.loop.solana.QueryTrackedLogsRequest\x1a\".loop.solana.QueryTrackedLogsReply\x12h\n" + + "\x16RegisterLogTrackingSol\x12'.loop.solana.RegisterLogTrackingRequest\x1a%.loop.solana.RegisterLogTrackingReply\x12J\n" + "\n" + - "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12_\n" + - "\x11SubmitTransaction\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12k\n" + - "\x15UnregisterLogTracking\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" + "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12b\n" + + "\x14SubmitTransactionSol\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12n\n" + + "\x18UnregisterLogTrackingSol\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" var ( file_solana_proto_rawDescOnce sync.Once @@ -3105,119 +4479,181 @@ func file_solana_proto_rawDescGZIP() []byte { return file_solana_proto_rawDescData } -var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 64) var file_solana_proto_goTypes = []any{ - (*Account)(nil), // 0: loop.solana.Account - (*Address)(nil), // 1: loop.solana.Address - (*BoolExpression)(nil), // 2: loop.solana.BoolExpression - (*ComputeConfig)(nil), // 3: loop.solana.ComputeConfig - (*Context)(nil), // 4: loop.solana.Context - (*DataBytesOrJSON)(nil), // 5: loop.solana.DataBytesOrJSON - (*DataSlice)(nil), // 6: loop.solana.DataSlice - (*EventByTopic)(nil), // 7: loop.solana.EventByTopic - (*Expression)(nil), // 8: loop.solana.Expression - (*GetAccountInfoOpts)(nil), // 9: loop.solana.GetAccountInfoOpts - (*GetAccountInfoWithOptsReply)(nil), // 10: loop.solana.GetAccountInfoWithOptsReply - (*GetAccountInfoWithOptsRequest)(nil), // 11: loop.solana.GetAccountInfoWithOptsRequest - (*GetBalanceReply)(nil), // 12: loop.solana.GetBalanceReply - (*GetBalanceRequest)(nil), // 13: loop.solana.GetBalanceRequest - (*GetBlockOpts)(nil), // 14: loop.solana.GetBlockOpts - (*GetBlockReply)(nil), // 15: loop.solana.GetBlockReply - (*GetBlockRequest)(nil), // 16: loop.solana.GetBlockRequest - (*GetFeeForMessageReply)(nil), // 17: loop.solana.GetFeeForMessageReply - (*GetFeeForMessageRequest)(nil), // 18: loop.solana.GetFeeForMessageRequest - (*GetMultipleAccountsOpts)(nil), // 19: loop.solana.GetMultipleAccountsOpts - (*GetMultipleAccountsWithOptsReply)(nil), // 20: loop.solana.GetMultipleAccountsWithOptsReply - (*GetMultipleAccountsWithOptsRequest)(nil), // 21: loop.solana.GetMultipleAccountsWithOptsRequest - (*GetSignatureStatusesReply)(nil), // 22: loop.solana.GetSignatureStatusesReply - (*GetSignatureStatusesRequest)(nil), // 23: loop.solana.GetSignatureStatusesRequest - (*GetSignatureStatusesResult)(nil), // 24: loop.solana.GetSignatureStatusesResult - (*GetSlotHeightReply)(nil), // 25: loop.solana.GetSlotHeightReply - (*GetSlotHeightRequest)(nil), // 26: loop.solana.GetSlotHeightRequest - (*GetTransactionReply)(nil), // 27: loop.solana.GetTransactionReply - (*GetTransactionRequest)(nil), // 28: loop.solana.GetTransactionRequest - (*HashedValueComparator)(nil), // 29: loop.solana.HashedValueComparator - (*LPFilterQuery)(nil), // 30: loop.solana.LPFilterQuery - (*Limit)(nil), // 31: loop.solana.Limit - (*LimitAndSort)(nil), // 32: loop.solana.LimitAndSort - (*Log)(nil), // 33: loop.solana.Log - (*RPCContext)(nil), // 34: loop.solana.RPCContext - (*SimulateTXOpts)(nil), // 35: loop.solana.SimulateTXOpts - (*SimulateTXReply)(nil), // 36: loop.solana.SimulateTXReply - (*SimulateTXRequest)(nil), // 37: loop.solana.SimulateTXRequest - (*SimulateTransactionAccountsOpts)(nil), // 38: loop.solana.SimulateTransactionAccountsOpts - (*SubmitTransactionReply)(nil), // 39: loop.solana.SubmitTransactionReply - (*SubmitTransactionRequest)(nil), // 40: loop.solana.SubmitTransactionRequest - (*TransactionWithMeta)(nil), // 41: loop.solana.TransactionWithMeta - (*Primitive)(nil), // 42: loop.solana.Primitive - (*QueryTrackedLogsRequest)(nil), // 43: loop.solana.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 44: loop.solana.QueryTrackedLogsReply - (*RegisterLogTrackingRequest)(nil), // 45: loop.solana.RegisterLogTrackingRequest - (*RegisterLogTrackingReply)(nil), // 46: loop.solana.RegisterLogTrackingReply - (*UnregisterLogTrackingRequest)(nil), // 47: loop.solana.UnregisterLogTrackingRequest - (*UnregisterLogTrackingReply)(nil), // 48: loop.solana.UnregisterLogTrackingReply + (TransactionStatus)(0), // 0: loop.solana.TransactionStatus + (TransactionDetailsType)(0), // 1: loop.solana.TransactionDetailsType + (EncodingType)(0), // 2: loop.solana.EncodingType + (CommitmentType)(0), // 3: loop.solana.CommitmentType + (ConfirmationStatusType)(0), // 4: loop.solana.ConfirmationStatusType + (*Account)(nil), // 5: loop.solana.Account + (*Address)(nil), // 6: loop.solana.Address + (*ComputeConfig)(nil), // 7: loop.solana.ComputeConfig + (*Context)(nil), // 8: loop.solana.Context + (*DataBytesOrJSON)(nil), // 9: loop.solana.DataBytesOrJSON + (*DataSlice)(nil), // 10: loop.solana.DataSlice + (*EventSig)(nil), // 11: loop.solana.EventSig + (*IndexedValueComparator)(nil), // 12: loop.solana.IndexedValueComparator + (*EventBySubkey)(nil), // 13: loop.solana.EventBySubkey + (*Expression)(nil), // 14: loop.solana.Expression + (*BooleanExpression)(nil), // 15: loop.solana.BooleanExpression + (*GetAccountInfoOpts)(nil), // 16: loop.solana.GetAccountInfoOpts + (*GetAccountInfoWithOptsReply)(nil), // 17: loop.solana.GetAccountInfoWithOptsReply + (*GetAccountInfoWithOptsRequest)(nil), // 18: loop.solana.GetAccountInfoWithOptsRequest + (*GetBalanceReply)(nil), // 19: loop.solana.GetBalanceReply + (*GetBalanceRequest)(nil), // 20: loop.solana.GetBalanceRequest + (*GetBlockOpts)(nil), // 21: loop.solana.GetBlockOpts + (*GetBlockReply)(nil), // 22: loop.solana.GetBlockReply + (*GetBlockRequest)(nil), // 23: loop.solana.GetBlockRequest + (*GetFeeForMessageReply)(nil), // 24: loop.solana.GetFeeForMessageReply + (*GetFeeForMessageRequest)(nil), // 25: loop.solana.GetFeeForMessageRequest + (*GetMultipleAccountsOpts)(nil), // 26: loop.solana.GetMultipleAccountsOpts + (*GetMultipleAccountsWithOptsReply)(nil), // 27: loop.solana.GetMultipleAccountsWithOptsReply + (*GetMultipleAccountsWithOptsRequest)(nil), // 28: loop.solana.GetMultipleAccountsWithOptsRequest + (*GetSignatureStatusesReply)(nil), // 29: loop.solana.GetSignatureStatusesReply + (*GetSignatureStatusesRequest)(nil), // 30: loop.solana.GetSignatureStatusesRequest + (*GetSignatureStatusesResult)(nil), // 31: loop.solana.GetSignatureStatusesResult + (*GetSlotHeightReply)(nil), // 32: loop.solana.GetSlotHeightReply + (*GetSlotHeightRequest)(nil), // 33: loop.solana.GetSlotHeightRequest + (*MessageHeader)(nil), // 34: loop.solana.MessageHeader + (*ParsedMessage)(nil), // 35: loop.solana.ParsedMessage + (*ParsedTransaction)(nil), // 36: loop.solana.ParsedTransaction + (*UiTokenAmount)(nil), // 37: loop.solana.UiTokenAmount + (*TokenBalance)(nil), // 38: loop.solana.TokenBalance + (*InnerInstruction)(nil), // 39: loop.solana.InnerInstruction + (*LoadedAddresses)(nil), // 40: loop.solana.LoadedAddresses + (*CompiledInstruction)(nil), // 41: loop.solana.CompiledInstruction + (*Data)(nil), // 42: loop.solana.Data + (*ReturnData)(nil), // 43: loop.solana.ReturnData + (*TransactionMeta)(nil), // 44: loop.solana.TransactionMeta + (*TransactionEnvelope)(nil), // 45: loop.solana.TransactionEnvelope + (*GetTransactionReply)(nil), // 46: loop.solana.GetTransactionReply + (*GetTransactionRequest)(nil), // 47: loop.solana.GetTransactionRequest + (*HashedValueComparator)(nil), // 48: loop.solana.HashedValueComparator + (*Subkeys)(nil), // 49: loop.solana.Subkeys + (*LPFilterQuery)(nil), // 50: loop.solana.LPFilterQuery + (*Limit)(nil), // 51: loop.solana.Limit + (*LimitAndSort)(nil), // 52: loop.solana.LimitAndSort + (*Log)(nil), // 53: loop.solana.Log + (*RPCContext)(nil), // 54: loop.solana.RPCContext + (*SimulateTXOpts)(nil), // 55: loop.solana.SimulateTXOpts + (*SimulateTXReply)(nil), // 56: loop.solana.SimulateTXReply + (*SimulateTXRequest)(nil), // 57: loop.solana.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 58: loop.solana.SimulateTransactionAccountsOpts + (*SubmitTransactionReply)(nil), // 59: loop.solana.SubmitTransactionReply + (*SubmitTransactionRequest)(nil), // 60: loop.solana.SubmitTransactionRequest + (*TransactionWithMeta)(nil), // 61: loop.solana.TransactionWithMeta + (*Primitive)(nil), // 62: loop.solana.Primitive + (*QueryTrackedLogsRequest)(nil), // 63: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 64: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 65: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 66: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 67: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 68: loop.solana.UnregisterLogTrackingReply + (*pb.BigInt)(nil), // 69: values.v1.BigInt + (chain_common.ComparisonOperator)(0), // 70: loop.chain.common.ComparisonOperator + (chain_common.BooleanOperator)(0), // 71: loop.chain.common.BooleanOperator + (*chain_common.Primitive)(nil), // 72: loop.chain.common.Primitive + (*chain_common.LimitAndSort)(nil), // 73: loop.chain.common.LimitAndSort } var file_solana_proto_depIdxs = []int32{ - 5, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON - 8, // 1: loop.solana.BoolExpression.expressions:type_name -> loop.solana.Expression - 29, // 2: loop.solana.EventByTopic.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator - 42, // 3: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive - 2, // 4: loop.solana.Expression.bool_expression:type_name -> loop.solana.BoolExpression - 6, // 5: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice - 34, // 6: loop.solana.GetAccountInfoWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext - 0, // 7: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account - 9, // 8: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts - 41, // 9: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta - 14, // 10: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts - 6, // 11: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice - 34, // 12: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext - 0, // 13: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account - 19, // 14: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts - 24, // 15: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult - 31, // 16: loop.solana.LimitAndSort.limit:type_name -> loop.solana.Limit - 4, // 17: loop.solana.RPCContext.context:type_name -> loop.solana.Context - 38, // 18: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts - 0, // 19: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account - 35, // 20: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts - 3, // 21: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig - 5, // 22: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON - 1, // 23: loop.solana.Primitive.address:type_name -> loop.solana.Address - 7, // 24: loop.solana.Primitive.eventByTopic:type_name -> loop.solana.EventByTopic - 8, // 25: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression - 32, // 26: loop.solana.QueryTrackedLogsRequest.limitAndSort:type_name -> loop.solana.LimitAndSort - 33, // 27: loop.solana.QueryTrackedLogsReply.result:type_name -> loop.solana.Log - 30, // 28: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery - 11, // 29: loop.solana.SolanaService.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest - 13, // 30: loop.solana.SolanaService.GetBalance:input_type -> loop.solana.GetBalanceRequest - 16, // 31: loop.solana.SolanaService.GetBlock:input_type -> loop.solana.GetBlockRequest - 18, // 32: loop.solana.SolanaService.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest - 21, // 33: loop.solana.SolanaService.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest - 23, // 34: loop.solana.SolanaService.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest - 26, // 35: loop.solana.SolanaService.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest - 28, // 36: loop.solana.SolanaService.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 43, // 37: loop.solana.SolanaService.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest - 45, // 38: loop.solana.SolanaService.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest - 37, // 39: loop.solana.SolanaService.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 40, // 40: loop.solana.SolanaService.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest - 47, // 41: loop.solana.SolanaService.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest - 10, // 42: loop.solana.SolanaService.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply - 12, // 43: loop.solana.SolanaService.GetBalance:output_type -> loop.solana.GetBalanceReply - 15, // 44: loop.solana.SolanaService.GetBlock:output_type -> loop.solana.GetBlockReply - 17, // 45: loop.solana.SolanaService.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply - 20, // 46: loop.solana.SolanaService.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply - 22, // 47: loop.solana.SolanaService.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply - 25, // 48: loop.solana.SolanaService.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply - 27, // 49: loop.solana.SolanaService.GetTransaction:output_type -> loop.solana.GetTransactionReply - 44, // 50: loop.solana.SolanaService.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply - 46, // 51: loop.solana.SolanaService.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply - 36, // 52: loop.solana.SolanaService.SimulateTX:output_type -> loop.solana.SimulateTXReply - 39, // 53: loop.solana.SolanaService.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply - 48, // 54: loop.solana.SolanaService.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply - 42, // [42:55] is the sub-list for method output_type - 29, // [29:42] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 9, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON + 69, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt + 2, // 2: loop.solana.DataBytesOrJSON.raw_data_encoding:type_name -> loop.solana.EncodingType + 48, // 3: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator + 70, // 4: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 12, // 5: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator + 62, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 15, // 7: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression + 71, // 8: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 14, // 9: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression + 2, // 10: loop.solana.GetAccountInfoOpts.encoding:type_name -> loop.solana.EncodingType + 3, // 11: loop.solana.GetAccountInfoOpts.commitment:type_name -> loop.solana.CommitmentType + 10, // 12: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice + 54, // 13: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 5, // 14: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account + 16, // 15: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts + 3, // 16: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType + 2, // 17: loop.solana.GetBlockOpts.encoding:type_name -> loop.solana.EncodingType + 1, // 18: loop.solana.GetBlockOpts.transaction_details:type_name -> loop.solana.TransactionDetailsType + 3, // 19: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType + 61, // 20: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta + 21, // 21: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts + 3, // 22: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType + 2, // 23: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 3, // 24: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType + 10, // 25: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice + 54, // 26: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext + 5, // 27: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account + 26, // 28: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts + 31, // 29: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult + 4, // 30: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType + 3, // 31: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType + 34, // 32: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader + 41, // 33: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction + 35, // 34: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage + 37, // 35: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount + 41, // 36: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction + 2, // 37: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType + 42, // 38: loop.solana.ReturnData.data:type_name -> loop.solana.Data + 38, // 39: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance + 38, // 40: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance + 39, // 41: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction + 40, // 42: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses + 43, // 43: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData + 36, // 44: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction + 45, // 45: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope + 44, // 46: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta + 49, // 47: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys + 51, // 48: loop.solana.LimitAndSort.limit:type_name -> loop.solana.Limit + 8, // 49: loop.solana.RPCContext.context:type_name -> loop.solana.Context + 3, // 50: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType + 58, // 51: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 5, // 52: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 55, // 53: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 2, // 54: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 0, // 55: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus + 7, // 56: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 9, // 57: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON + 44, // 58: loop.solana.TransactionWithMeta.meta:type_name -> loop.solana.TransactionMeta + 72, // 59: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 13, // 60: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey + 14, // 61: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 73, // 62: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 53, // 63: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log + 50, // 64: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 18, // 65: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 20, // 66: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest + 23, // 67: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest + 25, // 68: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 28, // 69: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 30, // 70: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 33, // 71: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 47, // 72: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 63, // 73: loop.solana.Solana.QueryTrackedLogsSol:input_type -> loop.solana.QueryTrackedLogsRequest + 65, // 74: loop.solana.Solana.RegisterLogTrackingSol:input_type -> loop.solana.RegisterLogTrackingRequest + 57, // 75: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 60, // 76: loop.solana.Solana.SubmitTransactionSol:input_type -> loop.solana.SubmitTransactionRequest + 67, // 77: loop.solana.Solana.UnregisterLogTrackingSol:input_type -> loop.solana.UnregisterLogTrackingRequest + 17, // 78: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 19, // 79: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply + 22, // 80: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply + 24, // 81: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 27, // 82: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 29, // 83: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 32, // 84: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 46, // 85: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply + 64, // 86: loop.solana.Solana.QueryTrackedLogsSol:output_type -> loop.solana.QueryTrackedLogsReply + 66, // 87: loop.solana.Solana.RegisterLogTrackingSol:output_type -> loop.solana.RegisterLogTrackingReply + 56, // 88: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply + 59, // 89: loop.solana.Solana.SubmitTransactionSol:output_type -> loop.solana.SubmitTransactionReply + 68, // 90: loop.solana.Solana.UnregisterLogTrackingSol:output_type -> loop.solana.UnregisterLogTrackingReply + 78, // [78:91] is the sub-list for method output_type + 65, // [65:78] is the sub-list for method input_type + 65, // [65:65] is the sub-list for extension type_name + 65, // [65:65] is the sub-list for extension extendee + 0, // [0:65] is the sub-list for field type_name } func init() { file_solana_proto_init() } @@ -3225,22 +4661,33 @@ func file_solana_proto_init() { if File_solana_proto != nil { return } - file_solana_proto_msgTypes[42].OneofWrappers = []any{ + file_solana_proto_msgTypes[9].OneofWrappers = []any{ + (*Expression_Primitive)(nil), + (*Expression_BooleanExpression)(nil), + } + file_solana_proto_msgTypes[40].OneofWrappers = []any{ + (*TransactionEnvelope_Raw)(nil), + (*TransactionEnvelope_Parsed)(nil), + } + file_solana_proto_msgTypes[57].OneofWrappers = []any{ + (*Primitive_GeneralPrimitive)(nil), (*Primitive_Address)(nil), - (*Primitive_EventByTopic)(nil), + (*Primitive_EventSig)(nil), + (*Primitive_EventBySubkey)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc)), - NumEnums: 0, - NumMessages: 49, + NumEnums: 5, + NumMessages: 64, NumExtensions: 0, NumServices: 1, }, GoTypes: file_solana_proto_goTypes, DependencyIndexes: file_solana_proto_depIdxs, + EnumInfos: file_solana_proto_enumTypes, MessageInfos: file_solana_proto_msgTypes, }.Build() File_solana_proto = out.File diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 4c3d4517b5..96bbddeeff 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -1,8 +1,12 @@ syntax = "proto3"; option go_package = "github.com/smartcontractkit/chainlink-common/pkg/chains/solana"; + +import "loop/chain-common/query.proto"; +import "values/v1/values.proto"; + package loop.solana; -service SolanaService { +service Solana { rpc GetAccountInfoWithOpts(GetAccountInfoWithOptsRequest) returns (GetAccountInfoWithOptsReply); rpc GetBalance(GetBalanceRequest) returns (GetBalanceReply); rpc GetBlock(GetBlockRequest) returns (GetBlockReply); @@ -11,11 +15,53 @@ service SolanaService { rpc GetSignatureStatuses(GetSignatureStatusesRequest) returns (GetSignatureStatusesReply); rpc GetSlotHeight(GetSlotHeightRequest) returns (GetSlotHeightReply); rpc GetTransaction(GetTransactionRequest) returns (GetTransactionReply); - rpc QueryTrackedLogs(QueryTrackedLogsRequest) returns (QueryTrackedLogsReply); - rpc RegisterLogTracking(RegisterLogTrackingRequest) returns (RegisterLogTrackingReply); + rpc QueryTrackedLogsSol(QueryTrackedLogsRequest) returns (QueryTrackedLogsReply); + rpc RegisterLogTrackingSol(RegisterLogTrackingRequest) returns (RegisterLogTrackingReply); rpc SimulateTX(SimulateTXRequest) returns (SimulateTXReply); - rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); - rpc UnregisterLogTracking(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); + rpc SubmitTransactionSol(SubmitTransactionRequest) returns (SubmitTransactionReply); + rpc UnregisterLogTrackingSol(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); +} + +enum TransactionStatus { + TX_FATAL = 0; + TX_ABORTED = 1; + TX_SUCCESS = 2; +} + +enum TransactionDetailsType { + TRANSACTION_DETAILS_FULL = 0; + TRANSCTION_DETAILS_SIGNATURES = 1; + TRANSACTION_DETAILS_NONE = 2; + TRANSACTION_DETAILS_ACCOUNTS = 3; +} + +enum EncodingType { + ENCODING_NONE = 0; + ENCODING_BASE58 = 1; // limited to Account data of less than 129 bytes + ENCODING_BASE64 = 2; // will return base64 encoded data for Account data of any size + ENCODING_BASE64_ZST = 3; // compresses the Account data using Zstandard and base64-encodes the result + // attempts to use program-specific state parsers to + // return more human-readable and explicit account state data. + // If "jsonParsed" is requested but a parser cannot be found, + // the field falls back to "base64" encoding, detectable when the data field is type . + // Cannot be used if specifying dataSlice parameters (offset, length). + ENCODING_JSON_PARSED = 4; + + ENCODING_JSON = 5; // NOTE: you're probably looking for EncodingJSONParsed +} + +enum CommitmentType { + COMMITMENT_NONE = 0; + COMMITMENT_FINALIZED = 1; + COMMITMENT_CONFIRMED = 2; + COMMITMENT_PROCESSED = 3; +} + +enum ConfirmationStatusType { + CONFIRMATION_NONE = 0; + CONFIRMATION_PROCESSED = 1; + CONFIRMATION_CONFIRMED = 2; + CONFIRMATION_FINALIZED = 3; } message Account { @@ -23,7 +69,7 @@ message Account { bytes owner = 2; DataBytesOrJSON data = 3; bool executable = 4; - int64 rent_epoch = 5; + values.v1.BigInt rent_epoch = 5; uint64 space = 6; } @@ -31,11 +77,6 @@ message Address { bytes address = 1; } -message BoolExpression { - repeated Expression expressions = 1; - int64 bool_operator = 2; -} - message ComputeConfig { uint32 compute_limit = 1; uint64 compute_max_price = 2; @@ -46,7 +87,7 @@ message Context { } message DataBytesOrJSON { - string raw_data_encoding = 1; + EncodingType raw_data_encoding = 1; bytes as_decoded_binary = 2; bytes as_json = 3; } @@ -56,25 +97,42 @@ message DataSlice { uint64 length = 2; } -message EventByTopic { +message EventSig { uint64 topic = 1; repeated HashedValueComparator hashed_value_comparers = 2; } +message IndexedValueComparator { + repeated bytes value = 1; + loop.chain.common.ComparisonOperator operator = 2; +} + +message EventBySubkey { + uint64 subkey_index = 1; + repeated IndexedValueComparator value_comparers = 2; +} + message Expression { - Primitive primitive = 1; - BoolExpression bool_expression = 2; + oneof evaluator { + Primitive primitive = 1; + BooleanExpression boolean_expression = 2; + } +} + +message BooleanExpression { + loop.chain.common.BooleanOperator boolean_operator = 1; + repeated Expression expression = 2; } message GetAccountInfoOpts { - string encoding = 1; - string commitment = 2; + EncodingType encoding = 1; + CommitmentType commitment = 2; DataSlice data_slice = 3; uint64 min_context_slot = 4; } message GetAccountInfoWithOptsReply { - RPCContext r_p_c_context = 1; + RPCContext rpc_context = 1; Account value = 2; } @@ -89,14 +147,14 @@ message GetBalanceReply { message GetBalanceRequest { bytes addr = 1; - string commitment = 2; + CommitmentType commitment = 2; } message GetBlockOpts { - string encoding = 1; - string transaction_details = 2; + EncodingType encoding = 1; + TransactionDetailsType transaction_details = 2; bool rewards = 3; - string commitment = 4; + CommitmentType commitment = 4; uint64 max_supported_transaction_version = 5; } @@ -121,12 +179,12 @@ message GetFeeForMessageReply { message GetFeeForMessageRequest { string message = 1; - string commitment = 2; + CommitmentType commitment = 2; } message GetMultipleAccountsOpts { - string encoding = 1; - string commitment = 2; + EncodingType encoding = 1; + CommitmentType commitment = 2; DataSlice data_slice = 3; uint64 min_context_slot = 4; } @@ -153,7 +211,7 @@ message GetSignatureStatusesResult { uint64 slot = 1; uint64 confirmations = 2; string err = 3; - string confirmation_status = 4; + ConfirmationStatusType confirmation_status = 4; } message GetSlotHeightReply { @@ -161,19 +219,107 @@ message GetSlotHeightReply { } message GetSlotHeightRequest { - string commitment = 1; + CommitmentType commitment = 1; +} + +message MessageHeader { + uint32 num_required_signatures = 1; + uint32 num_readonly_signed_accounts = 2; + uint32 num_readonly_unsigned_accounts = 3; +} + +message ParsedMessage { + bytes recent_blockhash = 1; // 32 bytes solana Hash + repeated bytes account_keys = 2; // list of 32 bytes account keys + MessageHeader header = 3; + repeated CompiledInstruction instructions = 4; +} + +message ParsedTransaction { + repeated bytes signatures = 1; // 64 bytes solana Signature each + ParsedMessage message = 2; +} + +message UiTokenAmount { + string amount = 1; // raw integer as string + uint32 decimals = 2; + string ui_amount_string = 4; +} + +message TokenBalance { + uint32 account_index = 1; + bytes owner = 2; // 32 bytes solana PublicKey + bytes program_id = 3; // 32 bytes solana PublicKey + bytes mint = 4; // 32 bytes solana PublicKey + UiTokenAmount ui = 5; +} + +message InnerInstruction { + uint32 index = 1; + repeated CompiledInstruction instructions = 2; +} + +message LoadedAddresses { + repeated bytes readonly = 1; // 32 bytes solana PublicKey + repeated bytes writable = 2; // 32 bytes solana PublicKey +} + +message CompiledInstruction { + uint32 program_id_index = 1; + repeated uint32 accounts = 2; + bytes data = 3; + uint32 stack_height = 4; +} + +message Data { + bytes content = 1; + EncodingType encoding = 2; +} + +message ReturnData { + bytes program_id = 1; // 32 bytes solana publicKey + Data data = 2; // raw program return bytes +} + +message TransactionMeta { + string err_json = 1; + + uint64 fee = 2; + repeated uint64 pre_balances = 3; + repeated uint64 post_balances = 4; + + repeated string log_messages = 5; + + repeated TokenBalance pre_token_balances = 6; + repeated TokenBalance post_token_balances = 7; + + repeated InnerInstruction inner_instructions = 8; + + LoadedAddresses loaded_addresses = 9; + + ReturnData return_data = 10; + + uint64 compute_units_consumed = 11; +} + +message TransactionEnvelope { +// - For RAW encoding, "transaction" contains tx bytes; for PARSED, structured fields. + oneof transaction{ + bytes raw = 1; + ParsedTransaction parsed = 2; + } } message GetTransactionReply { uint64 slot = 1; int64 block_time = 2; - int64 version = 3; - bytes transaction_envelope = 4; - bytes meta = 5; + + TransactionEnvelope transaction = 3; + TransactionMeta meta = 12; // - "meta" may be omitted by the node/config. } message GetTransactionRequest { - bytes signature = 1; + bytes signature = 1; // 64 bytes signature } message HashedValueComparator { @@ -181,6 +327,10 @@ message HashedValueComparator { int64 operator = 2; } +message Subkeys { + repeated string subkeys = 1; +} + message LPFilterQuery { string name = 1; bytes address = 2; @@ -188,7 +338,7 @@ message LPFilterQuery { bytes event_sig = 4; int64 starting_block = 5; bytes event_idl_json = 6; - repeated string subkey_paths = 7; + repeated Subkeys subkey_paths = 7; int64 retention = 8; int64 max_logs_kept = 9; bool include_reverted = 10; @@ -205,11 +355,11 @@ message LimitAndSort { } message Log { - string chain_i_d = 1; + string chain_id = 1; int64 log_index = 2; bytes block_hash = 3; int64 block_number = 4; - int64 block_timestamp = 5; + uint64 block_timestamp = 5; bytes address = 6; bytes event_sig = 7; bytes tx_hash = 8; @@ -224,7 +374,7 @@ message RPCContext { message SimulateTXOpts { bool sig_verify = 1; - string commitment = 2; + CommitmentType commitment = 2; bool replace_recent_blockhash = 3; SimulateTransactionAccountsOpts accounts = 4; } @@ -243,14 +393,14 @@ message SimulateTXRequest { } message SimulateTransactionAccountsOpts { - string encoding = 1; + EncodingType encoding = 1; repeated bytes addresses = 2; } message SubmitTransactionReply { bytes signature = 1; string idempotency_key = 2; - int64 status = 3; + TransactionStatus status = 3; } message SubmitTransactionRequest { @@ -263,24 +413,26 @@ message TransactionWithMeta { uint64 slot = 1; int64 block_time = 2; DataBytesOrJSON transaction = 3; - bytes meta_json = 4; + TransactionMeta meta = 4; int64 version = 5; } message Primitive { - oneof kind { - Address address = 1; - EventByTopic eventByTopic = 2; + oneof primitive { + loop.chain.common.Primitive general_primitive = 1; + bytes address = 2; // filter event by program public key 32 bytes + bytes event_sig = 3; // filter event by event signature 8 bytes length + EventBySubkey event_by_subkey = 4; // filter event by subkey } } message QueryTrackedLogsRequest { repeated Expression filterQuery = 1; - LimitAndSort limitAndSort = 2; + loop.chain.common.LimitAndSort limit_and_sort = 2; } message QueryTrackedLogsReply { - repeated Log result = 1; + repeated Log logs = 1; } message RegisterLogTrackingRequest { diff --git a/pkg/chains/solana/solana_grpc.pb.go b/pkg/chains/solana/solana_grpc.pb.go index 3cba34c95a..85124c63e9 100644 --- a/pkg/chains/solana/solana_grpc.pb.go +++ b/pkg/chains/solana/solana_grpc.pb.go @@ -19,25 +19,25 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - SolanaService_GetAccountInfoWithOpts_FullMethodName = "/loop.solana.SolanaService/GetAccountInfoWithOpts" - SolanaService_GetBalance_FullMethodName = "/loop.solana.SolanaService/GetBalance" - SolanaService_GetBlock_FullMethodName = "/loop.solana.SolanaService/GetBlock" - SolanaService_GetFeeForMessage_FullMethodName = "/loop.solana.SolanaService/GetFeeForMessage" - SolanaService_GetMultipleAccountsWithOpts_FullMethodName = "/loop.solana.SolanaService/GetMultipleAccountsWithOpts" - SolanaService_GetSignatureStatuses_FullMethodName = "/loop.solana.SolanaService/GetSignatureStatuses" - SolanaService_GetSlotHeight_FullMethodName = "/loop.solana.SolanaService/GetSlotHeight" - SolanaService_GetTransaction_FullMethodName = "/loop.solana.SolanaService/GetTransaction" - SolanaService_QueryTrackedLogs_FullMethodName = "/loop.solana.SolanaService/QueryTrackedLogs" - SolanaService_RegisterLogTracking_FullMethodName = "/loop.solana.SolanaService/RegisterLogTracking" - SolanaService_SimulateTX_FullMethodName = "/loop.solana.SolanaService/SimulateTX" - SolanaService_SubmitTransaction_FullMethodName = "/loop.solana.SolanaService/SubmitTransaction" - SolanaService_UnregisterLogTracking_FullMethodName = "/loop.solana.SolanaService/UnregisterLogTracking" + Solana_GetAccountInfoWithOpts_FullMethodName = "/loop.solana.Solana/GetAccountInfoWithOpts" + Solana_GetBalance_FullMethodName = "/loop.solana.Solana/GetBalance" + Solana_GetBlock_FullMethodName = "/loop.solana.Solana/GetBlock" + Solana_GetFeeForMessage_FullMethodName = "/loop.solana.Solana/GetFeeForMessage" + Solana_GetMultipleAccountsWithOpts_FullMethodName = "/loop.solana.Solana/GetMultipleAccountsWithOpts" + Solana_GetSignatureStatuses_FullMethodName = "/loop.solana.Solana/GetSignatureStatuses" + Solana_GetSlotHeight_FullMethodName = "/loop.solana.Solana/GetSlotHeight" + Solana_GetTransaction_FullMethodName = "/loop.solana.Solana/GetTransaction" + Solana_QueryTrackedLogsSol_FullMethodName = "/loop.solana.Solana/QueryTrackedLogsSol" + Solana_RegisterLogTrackingSol_FullMethodName = "/loop.solana.Solana/RegisterLogTrackingSol" + Solana_SimulateTX_FullMethodName = "/loop.solana.Solana/SimulateTX" + Solana_SubmitTransactionSol_FullMethodName = "/loop.solana.Solana/SubmitTransactionSol" + Solana_UnregisterLogTrackingSol_FullMethodName = "/loop.solana.Solana/UnregisterLogTrackingSol" ) -// SolanaServiceClient is the client API for SolanaService service. +// SolanaClient is the client API for Solana service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type SolanaServiceClient interface { +type SolanaClient interface { GetAccountInfoWithOpts(ctx context.Context, in *GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*GetAccountInfoWithOptsReply, error) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceReply, error) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) @@ -46,155 +46,155 @@ type SolanaServiceClient interface { GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) - QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) - RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) + QueryTrackedLogsSol(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) + RegisterLogTrackingSol(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) - SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) - UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) + SubmitTransactionSol(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) + UnregisterLogTrackingSol(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) } -type solanaServiceClient struct { +type solanaClient struct { cc grpc.ClientConnInterface } -func NewSolanaServiceClient(cc grpc.ClientConnInterface) SolanaServiceClient { - return &solanaServiceClient{cc} +func NewSolanaClient(cc grpc.ClientConnInterface) SolanaClient { + return &solanaClient{cc} } -func (c *solanaServiceClient) GetAccountInfoWithOpts(ctx context.Context, in *GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*GetAccountInfoWithOptsReply, error) { +func (c *solanaClient) GetAccountInfoWithOpts(ctx context.Context, in *GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*GetAccountInfoWithOptsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountInfoWithOptsReply) - err := c.cc.Invoke(ctx, SolanaService_GetAccountInfoWithOpts_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetAccountInfoWithOpts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceReply, error) { +func (c *solanaClient) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBalanceReply) - err := c.cc.Invoke(ctx, SolanaService_GetBalance_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetBalance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) { +func (c *solanaClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBlockReply) - err := c.cc.Invoke(ctx, SolanaService_GetBlock_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetBlock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetFeeForMessage(ctx context.Context, in *GetFeeForMessageRequest, opts ...grpc.CallOption) (*GetFeeForMessageReply, error) { +func (c *solanaClient) GetFeeForMessage(ctx context.Context, in *GetFeeForMessageRequest, opts ...grpc.CallOption) (*GetFeeForMessageReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFeeForMessageReply) - err := c.cc.Invoke(ctx, SolanaService_GetFeeForMessage_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetFeeForMessage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetMultipleAccountsWithOpts(ctx context.Context, in *GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*GetMultipleAccountsWithOptsReply, error) { +func (c *solanaClient) GetMultipleAccountsWithOpts(ctx context.Context, in *GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*GetMultipleAccountsWithOptsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMultipleAccountsWithOptsReply) - err := c.cc.Invoke(ctx, SolanaService_GetMultipleAccountsWithOpts_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetMultipleAccountsWithOpts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) { +func (c *solanaClient) GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSignatureStatusesReply) - err := c.cc.Invoke(ctx, SolanaService_GetSignatureStatuses_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetSignatureStatuses_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) { +func (c *solanaClient) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSlotHeightReply) - err := c.cc.Invoke(ctx, SolanaService_GetSlotHeight_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetSlotHeight_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) { +func (c *solanaClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTransactionReply) - err := c.cc.Invoke(ctx, SolanaService_GetTransaction_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_GetTransaction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) { +func (c *solanaClient) QueryTrackedLogsSol(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryTrackedLogsReply) - err := c.cc.Invoke(ctx, SolanaService_QueryTrackedLogs_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_QueryTrackedLogsSol_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) { +func (c *solanaClient) RegisterLogTrackingSol(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RegisterLogTrackingReply) - err := c.cc.Invoke(ctx, SolanaService_RegisterLogTracking_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_RegisterLogTrackingSol_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) { +func (c *solanaClient) SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateTXReply) - err := c.cc.Invoke(ctx, SolanaService_SimulateTX_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_SimulateTX_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) { +func (c *solanaClient) SubmitTransactionSol(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitTransactionReply) - err := c.cc.Invoke(ctx, SolanaService_SubmitTransaction_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_SubmitTransactionSol_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaServiceClient) UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) { +func (c *solanaClient) UnregisterLogTrackingSol(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnregisterLogTrackingReply) - err := c.cc.Invoke(ctx, SolanaService_UnregisterLogTracking_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_UnregisterLogTrackingSol_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -// SolanaServiceServer is the server API for SolanaService service. -// All implementations must embed UnimplementedSolanaServiceServer +// SolanaServer is the server API for Solana service. +// All implementations must embed UnimplementedSolanaServer // for forward compatibility. -type SolanaServiceServer interface { +type SolanaServer interface { GetAccountInfoWithOpts(context.Context, *GetAccountInfoWithOptsRequest) (*GetAccountInfoWithOptsReply, error) GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceReply, error) GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) @@ -203,373 +203,373 @@ type SolanaServiceServer interface { GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) - QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) - RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) + QueryTrackedLogsSol(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) + RegisterLogTrackingSol(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) - SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) - UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) - mustEmbedUnimplementedSolanaServiceServer() + SubmitTransactionSol(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) + UnregisterLogTrackingSol(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) + mustEmbedUnimplementedSolanaServer() } -// UnimplementedSolanaServiceServer must be embedded to have +// UnimplementedSolanaServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. -type UnimplementedSolanaServiceServer struct{} +type UnimplementedSolanaServer struct{} -func (UnimplementedSolanaServiceServer) GetAccountInfoWithOpts(context.Context, *GetAccountInfoWithOptsRequest) (*GetAccountInfoWithOptsReply, error) { +func (UnimplementedSolanaServer) GetAccountInfoWithOpts(context.Context, *GetAccountInfoWithOptsRequest) (*GetAccountInfoWithOptsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfoWithOpts not implemented") } -func (UnimplementedSolanaServiceServer) GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceReply, error) { +func (UnimplementedSolanaServer) GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented") } -func (UnimplementedSolanaServiceServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) { +func (UnimplementedSolanaServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } -func (UnimplementedSolanaServiceServer) GetFeeForMessage(context.Context, *GetFeeForMessageRequest) (*GetFeeForMessageReply, error) { +func (UnimplementedSolanaServer) GetFeeForMessage(context.Context, *GetFeeForMessageRequest) (*GetFeeForMessageReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFeeForMessage not implemented") } -func (UnimplementedSolanaServiceServer) GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) { +func (UnimplementedSolanaServer) GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMultipleAccountsWithOpts not implemented") } -func (UnimplementedSolanaServiceServer) GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) { +func (UnimplementedSolanaServer) GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSignatureStatuses not implemented") } -func (UnimplementedSolanaServiceServer) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) { +func (UnimplementedSolanaServer) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSlotHeight not implemented") } -func (UnimplementedSolanaServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) { +func (UnimplementedSolanaServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") } -func (UnimplementedSolanaServiceServer) QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogs not implemented") +func (UnimplementedSolanaServer) QueryTrackedLogsSol(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogsSol not implemented") } -func (UnimplementedSolanaServiceServer) RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterLogTracking not implemented") +func (UnimplementedSolanaServer) RegisterLogTrackingSol(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterLogTrackingSol not implemented") } -func (UnimplementedSolanaServiceServer) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) { +func (UnimplementedSolanaServer) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") } -func (UnimplementedSolanaServiceServer) SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") +func (UnimplementedSolanaServer) SubmitTransactionSol(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTransactionSol not implemented") } -func (UnimplementedSolanaServiceServer) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") +func (UnimplementedSolanaServer) UnregisterLogTrackingSol(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTrackingSol not implemented") } -func (UnimplementedSolanaServiceServer) mustEmbedUnimplementedSolanaServiceServer() {} -func (UnimplementedSolanaServiceServer) testEmbeddedByValue() {} +func (UnimplementedSolanaServer) mustEmbedUnimplementedSolanaServer() {} +func (UnimplementedSolanaServer) testEmbeddedByValue() {} -// UnsafeSolanaServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SolanaServiceServer will +// UnsafeSolanaServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SolanaServer will // result in compilation errors. -type UnsafeSolanaServiceServer interface { - mustEmbedUnimplementedSolanaServiceServer() +type UnsafeSolanaServer interface { + mustEmbedUnimplementedSolanaServer() } -func RegisterSolanaServiceServer(s grpc.ServiceRegistrar, srv SolanaServiceServer) { - // If the following call pancis, it indicates UnimplementedSolanaServiceServer was +func RegisterSolanaServer(s grpc.ServiceRegistrar, srv SolanaServer) { + // If the following call pancis, it indicates UnimplementedSolanaServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } - s.RegisterService(&SolanaService_ServiceDesc, srv) + s.RegisterService(&Solana_ServiceDesc, srv) } -func _SolanaService_GetAccountInfoWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetAccountInfoWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAccountInfoWithOptsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetAccountInfoWithOpts(ctx, in) + return srv.(SolanaServer).GetAccountInfoWithOpts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetAccountInfoWithOpts_FullMethodName, + FullMethod: Solana_GetAccountInfoWithOpts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetAccountInfoWithOpts(ctx, req.(*GetAccountInfoWithOptsRequest)) + return srv.(SolanaServer).GetAccountInfoWithOpts(ctx, req.(*GetAccountInfoWithOptsRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetBalanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetBalance(ctx, in) + return srv.(SolanaServer).GetBalance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetBalance_FullMethodName, + FullMethod: Solana_GetBalance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetBalance(ctx, req.(*GetBalanceRequest)) + return srv.(SolanaServer).GetBalance(ctx, req.(*GetBalanceRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetBlockRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetBlock(ctx, in) + return srv.(SolanaServer).GetBlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetBlock_FullMethodName, + FullMethod: Solana_GetBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetBlock(ctx, req.(*GetBlockRequest)) + return srv.(SolanaServer).GetBlock(ctx, req.(*GetBlockRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetFeeForMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetFeeForMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFeeForMessageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetFeeForMessage(ctx, in) + return srv.(SolanaServer).GetFeeForMessage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetFeeForMessage_FullMethodName, + FullMethod: Solana_GetFeeForMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetFeeForMessage(ctx, req.(*GetFeeForMessageRequest)) + return srv.(SolanaServer).GetFeeForMessage(ctx, req.(*GetFeeForMessageRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetMultipleAccountsWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetMultipleAccountsWithOpts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetMultipleAccountsWithOptsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetMultipleAccountsWithOpts(ctx, in) + return srv.(SolanaServer).GetMultipleAccountsWithOpts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetMultipleAccountsWithOpts_FullMethodName, + FullMethod: Solana_GetMultipleAccountsWithOpts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetMultipleAccountsWithOpts(ctx, req.(*GetMultipleAccountsWithOptsRequest)) + return srv.(SolanaServer).GetMultipleAccountsWithOpts(ctx, req.(*GetMultipleAccountsWithOptsRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetSignatureStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetSignatureStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSignatureStatusesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetSignatureStatuses(ctx, in) + return srv.(SolanaServer).GetSignatureStatuses(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetSignatureStatuses_FullMethodName, + FullMethod: Solana_GetSignatureStatuses_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetSignatureStatuses(ctx, req.(*GetSignatureStatusesRequest)) + return srv.(SolanaServer).GetSignatureStatuses(ctx, req.(*GetSignatureStatusesRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetSlotHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetSlotHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSlotHeightRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetSlotHeight(ctx, in) + return srv.(SolanaServer).GetSlotHeight(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetSlotHeight_FullMethodName, + FullMethod: Solana_GetSlotHeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetSlotHeight(ctx, req.(*GetSlotHeightRequest)) + return srv.(SolanaServer).GetSlotHeight(ctx, req.(*GetSlotHeightRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetTransactionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).GetTransaction(ctx, in) + return srv.(SolanaServer).GetTransaction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_GetTransaction_FullMethodName, + FullMethod: Solana_GetTransaction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest)) + return srv.(SolanaServer).GetTransaction(ctx, req.(*GetTransactionRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_QueryTrackedLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_QueryTrackedLogsSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryTrackedLogsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).QueryTrackedLogs(ctx, in) + return srv.(SolanaServer).QueryTrackedLogsSol(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_QueryTrackedLogs_FullMethodName, + FullMethod: Solana_QueryTrackedLogsSol_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).QueryTrackedLogs(ctx, req.(*QueryTrackedLogsRequest)) + return srv.(SolanaServer).QueryTrackedLogsSol(ctx, req.(*QueryTrackedLogsRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_RegisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_RegisterLogTrackingSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RegisterLogTrackingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).RegisterLogTracking(ctx, in) + return srv.(SolanaServer).RegisterLogTrackingSol(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_RegisterLogTracking_FullMethodName, + FullMethod: Solana_RegisterLogTrackingSol_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).RegisterLogTracking(ctx, req.(*RegisterLogTrackingRequest)) + return srv.(SolanaServer).RegisterLogTrackingSol(ctx, req.(*RegisterLogTrackingRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_SimulateTX_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_SimulateTX_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SimulateTXRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).SimulateTX(ctx, in) + return srv.(SolanaServer).SimulateTX(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_SimulateTX_FullMethodName, + FullMethod: Solana_SimulateTX_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).SimulateTX(ctx, req.(*SimulateTXRequest)) + return srv.(SolanaServer).SimulateTX(ctx, req.(*SimulateTXRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_SubmitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_SubmitTransactionSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SubmitTransactionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).SubmitTransaction(ctx, in) + return srv.(SolanaServer).SubmitTransactionSol(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_SubmitTransaction_FullMethodName, + FullMethod: Solana_SubmitTransactionSol_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).SubmitTransaction(ctx, req.(*SubmitTransactionRequest)) + return srv.(SolanaServer).SubmitTransactionSol(ctx, req.(*SubmitTransactionRequest)) } return interceptor(ctx, in, info, handler) } -func _SolanaService_UnregisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_UnregisterLogTrackingSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnregisterLogTrackingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServiceServer).UnregisterLogTracking(ctx, in) + return srv.(SolanaServer).UnregisterLogTrackingSol(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SolanaService_UnregisterLogTracking_FullMethodName, + FullMethod: Solana_UnregisterLogTrackingSol_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServiceServer).UnregisterLogTracking(ctx, req.(*UnregisterLogTrackingRequest)) + return srv.(SolanaServer).UnregisterLogTrackingSol(ctx, req.(*UnregisterLogTrackingRequest)) } return interceptor(ctx, in, info, handler) } -// SolanaService_ServiceDesc is the grpc.ServiceDesc for SolanaService service. +// Solana_ServiceDesc is the grpc.ServiceDesc for Solana service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var SolanaService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "loop.solana.SolanaService", - HandlerType: (*SolanaServiceServer)(nil), +var Solana_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "loop.solana.Solana", + HandlerType: (*SolanaServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAccountInfoWithOpts", - Handler: _SolanaService_GetAccountInfoWithOpts_Handler, + Handler: _Solana_GetAccountInfoWithOpts_Handler, }, { MethodName: "GetBalance", - Handler: _SolanaService_GetBalance_Handler, + Handler: _Solana_GetBalance_Handler, }, { MethodName: "GetBlock", - Handler: _SolanaService_GetBlock_Handler, + Handler: _Solana_GetBlock_Handler, }, { MethodName: "GetFeeForMessage", - Handler: _SolanaService_GetFeeForMessage_Handler, + Handler: _Solana_GetFeeForMessage_Handler, }, { MethodName: "GetMultipleAccountsWithOpts", - Handler: _SolanaService_GetMultipleAccountsWithOpts_Handler, + Handler: _Solana_GetMultipleAccountsWithOpts_Handler, }, { MethodName: "GetSignatureStatuses", - Handler: _SolanaService_GetSignatureStatuses_Handler, + Handler: _Solana_GetSignatureStatuses_Handler, }, { MethodName: "GetSlotHeight", - Handler: _SolanaService_GetSlotHeight_Handler, + Handler: _Solana_GetSlotHeight_Handler, }, { MethodName: "GetTransaction", - Handler: _SolanaService_GetTransaction_Handler, + Handler: _Solana_GetTransaction_Handler, }, { - MethodName: "QueryTrackedLogs", - Handler: _SolanaService_QueryTrackedLogs_Handler, + MethodName: "QueryTrackedLogsSol", + Handler: _Solana_QueryTrackedLogsSol_Handler, }, { - MethodName: "RegisterLogTracking", - Handler: _SolanaService_RegisterLogTracking_Handler, + MethodName: "RegisterLogTrackingSol", + Handler: _Solana_RegisterLogTrackingSol_Handler, }, { MethodName: "SimulateTX", - Handler: _SolanaService_SimulateTX_Handler, + Handler: _Solana_SimulateTX_Handler, }, { - MethodName: "SubmitTransaction", - Handler: _SolanaService_SubmitTransaction_Handler, + MethodName: "SubmitTransactionSol", + Handler: _Solana_SubmitTransactionSol_Handler, }, { - MethodName: "UnregisterLogTracking", - Handler: _SolanaService_UnregisterLogTracking_Handler, + MethodName: "UnregisterLogTrackingSol", + Handler: _Solana_UnregisterLogTrackingSol_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/loop/internal/example-relay/main.go b/pkg/loop/internal/example-relay/main.go index b61fd86d1b..69a6213145 100644 --- a/pkg/loop/internal/example-relay/main.go +++ b/pkg/loop/internal/example-relay/main.go @@ -82,6 +82,10 @@ func (r *relayer) TON() (types.TONService, error) { return nil, nil } +func (r *relayer) Solana() (types.SolanaService, error) { + return nil, nil +} + func (r *relayer) Start(ctx context.Context) error { var names []string // Test database connection with dummy query diff --git a/pkg/loop/internal/relayer/relayer.go b/pkg/loop/internal/relayer/relayer.go index 79b505f189..c0309c5db2 100644 --- a/pkg/loop/internal/relayer/relayer.go +++ b/pkg/loop/internal/relayer/relayer.go @@ -14,6 +14,7 @@ import ( "google.golang.org/protobuf/types/known/structpb" evmpb "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + solpb "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" tonpb "github.com/smartcontractkit/chainlink-common/pkg/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/core/services/capability" @@ -156,6 +157,9 @@ func (p *pluginRelayerServer) NewRelayer(ctx context.Context, request *pb.NewRel if tonService, ok := r.(types.TONService); ok { tonpb.RegisterTONServer(s, newTONServer(tonService, p.BrokerExt)) } + if solService, ok := r.(types.SolanaService); ok { + solpb.RegisterSolanaServer(s, newSolServer(solService, p.BrokerExt)) + } }, rRes, ksRes, ksCSARes, crRes) if err != nil { return nil, err @@ -172,11 +176,12 @@ type relayerClient struct { relayer pb.RelayerClient evmClient evmpb.EVMClient tonClient tonpb.TONClient + solClient solpb.SolanaClient } func newRelayerClient(b *net.BrokerExt, conn grpc.ClientConnInterface) *relayerClient { b = b.WithName("RelayerClient") - return &relayerClient{b, goplugin.NewServiceClient(b, conn), pb.NewRelayerClient(conn), evmpb.NewEVMClient(conn), tonpb.NewTONClient(conn)} + return &relayerClient{b, goplugin.NewServiceClient(b, conn), pb.NewRelayerClient(conn), evmpb.NewEVMClient(conn), tonpb.NewTONClient(conn), solpb.NewSolanaClient(conn)} } func (r *relayerClient) NewContractWriter(_ context.Context, contractWriterConfig []byte) (types.ContractWriter, error) { @@ -426,6 +431,12 @@ func (r *relayerClient) TON() (types.TONService, error) { }, nil } +func (r *relayerClient) Solana() (types.SolanaService, error) { + return &SolClient{ + r.solClient, + }, nil +} + var _ pb.RelayerServer = (*relayerServer)(nil) // relayerServer exposes [Relayer] as a GRPC [pb.RelayerServer]. diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go new file mode 100644 index 0000000000..57b6bdccf5 --- /dev/null +++ b/pkg/loop/internal/relayer/solana.go @@ -0,0 +1,394 @@ +package relayer + +import ( + "context" + "fmt" + + solpb "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" + chaincommonpb "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/net" + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" +) + +var _ types.SolanaService = (*SolClient)(nil) + +type SolClient struct { + grpcClient solpb.SolanaClient +} + +func NewSolanaClient(client solpb.SolanaClient) *SolClient { + return &SolClient{ + grpcClient: client, + } +} + +func (sc *SolClient) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { + pReq := solpb.ConvertSubmitTransactionRequestToProto(req) + + pResp, err := sc.grpcClient.SubmitTransactionSol(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solpb.ConvertSubmitTransactionReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return dResp, nil +} + +func (sc *SolClient) RegisterLogTracking(ctx context.Context, req solana.LPFilterQuery) error { + filter := solpb.ConvertLPFilterQueryToProto(&req) + _, err := sc.grpcClient.RegisterLogTrackingSol(ctx, &solpb.RegisterLogTrackingRequest{ + Filter: filter, + }) + return net.WrapRPCErr(err) +} + +func (sc *SolClient) UnregisterLogTracking(ctx context.Context, filterName string) error { + _, err := sc.grpcClient.UnregisterLogTrackingSol(ctx, &solpb.UnregisterLogTrackingRequest{FilterName: filterName}) + return net.WrapRPCErr(err) +} + +func (sc *SolClient) QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort) ([]*solana.Log, error) { + pExprs, err := solpb.ConvertExpressionsToProto(filterQuery) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + protoLimitAndSort, err := chaincommonpb.ConvertLimitAndSortToProto(limitAndSort) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + pReq := &solpb.QueryTrackedLogsRequest{ + FilterQuery: pExprs, + LimitAndSort: protoLimitAndSort, + } + + pResp, err := sc.grpcClient.QueryTrackedLogsSol(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + out := make([]*solana.Log, 0, len(pResp.Logs)) + for _, pl := range pResp.Logs { + dl, err := solpb.ConvertLogFromProto(pl) + if err != nil { + return nil, net.WrapRPCErr(err) + } + out = append(out, dl) + } + + return out, nil +} + +func (sc *SolClient) GetBalance(ctx context.Context, req solana.GetBalanceRequest) (*solana.GetBalanceReply, error) { + pReq := solpb.ConvertGetBalanceRequestToProto(req) + pResp, err := sc.grpcClient.GetBalance(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetBalanceReplyFromProto(pResp), nil +} + +func (sc *SolClient) GetAccountInfoWithOpts(ctx context.Context, req solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error) { + pReq := &solpb.GetAccountInfoWithOptsRequest{ + Account: req.Account[:], + Opts: solpb.ConvertGetAccountInfoOptsToProto(req.Opts), + } + pResp, err := sc.grpcClient.GetAccountInfoWithOpts(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + acc, err := solpb.ConvertAccountFromProto(pResp.Value) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + reply := &solana.GetAccountInfoReply{ + RPCContext: solpb.ConvertRPCContextFromProto(pResp.RpcContext), + Value: acc, + } + + return reply, nil +} + +func (sc *SolClient) GetMultipleAccountsWithOpts(ctx context.Context, req solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error) { + pReq := solpb.ConvertGetMultipleAccountsRequestToProto(&req) + pResp, err := sc.grpcClient.GetMultipleAccountsWithOpts(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + reply, err := solpb.ConvertGetMultipleAccountsReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return reply, nil +} + +func (sc *SolClient) GetBlock(ctx context.Context, req solana.GetBlockRequest) (*solana.GetBlockReply, error) { + pReq := solpb.ConvertGetBlockRequestToProto(&req) + pResp, err := sc.grpcClient.GetBlock(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + reply, err := solpb.ConvertGetBlockOptsReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return reply, nil +} + +func (sc *SolClient) GetSlotHeight(ctx context.Context, req solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error) { + pReq := solpb.ConvertGetSlotHeightRequestToProto(req) + pResp, err := sc.grpcClient.GetSlotHeight(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetSlotHeightReplyFromProto(pResp), nil +} + +func (sc *SolClient) GetTransaction(ctx context.Context, req solana.GetTransactionRequest) (*solana.GetTransactionReply, error) { + pReq := solpb.ConvertGetTransactionRequestToProto(req) + pResp, err := sc.grpcClient.GetTransaction(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + reply, err := solpb.ConvertGetTransactionReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return reply, nil +} + +func (sc *SolClient) GetFeeForMessage(ctx context.Context, req solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error) { + pReq := solpb.ConvertGetFeeForMessageRequestToProto(&req) + pResp, err := sc.grpcClient.GetFeeForMessage(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetFeeForMessageReplyFromProto(pResp), nil +} + +func (sc *SolClient) GetSignatureStatuses(ctx context.Context, req solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error) { + pReq := solpb.ConvertGetSignatureStatusesRequestToProto(&req) + pResp, err := sc.grpcClient.GetSignatureStatuses(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetSignatureStatusesReplyFromProto(pResp), nil +} + +func (sc *SolClient) SimulateTX(ctx context.Context, req solana.SimulateTXRequest) (*solana.SimulateTXReply, error) { + pReq := solpb.ConvertSimulateTXRequestToProto(req) + pResp, err := sc.grpcClient.SimulateTX(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + reply, err := solpb.ConvertSimulateTXReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return reply, nil +} + +type solServer struct { + solpb.UnimplementedSolanaServer + + *net.BrokerExt + + impl types.SolanaService +} + +var _ solpb.SolanaServer = (*solServer)(nil) + +func newSolServer(impl types.SolanaService, b *net.BrokerExt) *solServer { + return &solServer{impl: impl, BrokerExt: b.WithName("SolanaServer")} +} + +func (s *solServer) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { + dReq, err := solpb.ConvertSubmitTransactionRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := s.impl.SubmitTransaction(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + pResp := solpb.ConvertSubmitTransactionReplyToProto(dResp) + return pResp, nil +} + +func (s *solServer) RegisterLogTrackingSol(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { + if req.Filter == nil { + return nil, net.WrapRPCErr(fmt.Errorf("missing filter")) + } + + filter, err := solpb.ConvertLPFilterQueryFromProto(req.Filter) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + if err := s.impl.RegisterLogTracking(ctx, *filter); err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solpb.RegisterLogTrackingReply{}, nil +} + +func (s *solServer) UnregisterLogTrackingSol(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { + if err := s.impl.UnregisterLogTracking(ctx, req.GetFilterName()); err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solpb.UnregisterLogTrackingReply{}, nil +} + +func (s *solServer) QueryTrackedLogsSol(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { + dExprs, err := solpb.ConvertExpressionsFromProto(req.GetFilterQuery()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + ls, err := chaincommonpb.ConvertLimitAndSortFromProto(req.GetLimitAndSort()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + logs, err := s.impl.QueryTrackedLogs(ctx, dExprs, ls) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + out := make([]*solpb.Log, 0, len(logs)) + for _, l := range logs { + out = append(out, solpb.ConvertLogToProto(l)) + } + + return &solpb.QueryTrackedLogsReply{Logs: out}, nil +} + +func (s *solServer) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest) (*solpb.GetBalanceReply, error) { + dReq, err := solpb.ConvertGetBalanceRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := s.impl.GetBalance(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetBalanceReplyToProto(dResp), nil +} + +func (s *solServer) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccountInfoWithOptsRequest) (*solpb.GetAccountInfoWithOptsReply, error) { + addr, err := solpb.ConvertPublicKeyFromProto(req.GetAccount()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + opts := solpb.ConvertGetAccountInfoOptsFromProto(req.GetOpts()) + + dReq := solana.GetAccountInfoRequest{Account: addr, Opts: opts} + dResp, err := s.impl.GetAccountInfoWithOpts(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solpb.GetAccountInfoWithOptsReply{ + RpcContext: solpb.ConvertRPCContextToProto(dResp.RPCContext), + Value: solpb.ConvertAccountToProto(dResp.Value), + }, nil +} + +func (s *solServer) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb.GetMultipleAccountsWithOptsRequest) (*solpb.GetMultipleAccountsWithOptsReply, error) { + dReq := solpb.ConvertGetMultipleAccountsRequestFromProto(req) + dResp, err := s.impl.GetMultipleAccountsWithOpts(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetMultipleAccountsReplyToProto(dResp), nil +} + +func (s *solServer) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { + dReq := solpb.ConvertGetBlockRequestFromProto(req) + dResp, err := s.impl.GetBlock(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetBlockReplyToProto(dResp), nil +} + +func (s *solServer) GetSlotHeight(ctx context.Context, req *solpb.GetSlotHeightRequest) (*solpb.GetSlotHeightReply, error) { + dReq := solpb.ConvertGetSlotHeightRequestFromProto(req) + dResp, err := s.impl.GetSlotHeight(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetSlotHeightReplyToProto(dResp), nil +} + +func (s *solServer) GetTransaction(ctx context.Context, req *solpb.GetTransactionRequest) (*solpb.GetTransactionReply, error) { + dReq, err := solpb.ConvertGetTransactionRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := s.impl.GetTransaction(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetTransactionReplyToProto(dResp), nil +} + +func (s *solServer) GetFeeForMessage(ctx context.Context, req *solpb.GetFeeForMessageRequest) (*solpb.GetFeeForMessageReply, error) { + dReq := solpb.ConvertGetFeeForMessageRequestFromProto(req) + dResp, err := s.impl.GetFeeForMessage(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetFeeForMessageReplyToProto(dResp), nil +} + +func (s *solServer) GetSignatureStatuses(ctx context.Context, req *solpb.GetSignatureStatusesRequest) (*solpb.GetSignatureStatusesReply, error) { + dReq, err := solpb.ConvertGetSignatureStatusesRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := s.impl.GetSignatureStatuses(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetSignatureStatusesReplyToProto(dResp), nil +} + +func (s *solServer) SimulateTX(ctx context.Context, req *solpb.SimulateTXRequest) (*solpb.SimulateTXReply, error) { + dReq, err := solpb.ConvertSimulateTXRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := s.impl.SimulateTX(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertSimulateTXReplyToProto(dResp), nil +} diff --git a/pkg/loop/internal/relayer/test/relayer.go b/pkg/loop/internal/relayer/test/relayer.go index f0bfb030b2..b745472a3a 100644 --- a/pkg/loop/internal/relayer/test/relayer.go +++ b/pkg/loop/internal/relayer/test/relayer.go @@ -245,6 +245,10 @@ func (s staticRelayer) TON() (types.TONService, error) { return nil, nil } +func (s staticRelayer) Solana() (types.SolanaService, error) { + return nil, nil +} + func (s staticRelayer) NewContractReader(_ context.Context, contractReaderConfig []byte) (types.ContractReader, error) { if s.StaticChecks && !(bytes.Equal(s.contractReaderConfig, contractReaderConfig)) { return nil, fmt.Errorf("expected contractReaderConfig:\n\t%v\nbut got:\n\t%v", string(s.contractReaderConfig), string(contractReaderConfig)) diff --git a/pkg/loop/internal/relayerset/client.go b/pkg/loop/internal/relayerset/client.go index bc37e0fbce..bb1677e65a 100644 --- a/pkg/loop/internal/relayerset/client.go +++ b/pkg/loop/internal/relayerset/client.go @@ -8,6 +8,7 @@ import ( "google.golang.org/grpc" "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" "github.com/smartcontractkit/chainlink-common/pkg/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/goplugin" @@ -26,22 +27,24 @@ type Client struct { log logger.Logger - relayerSetClient relayerset.RelayerSetClient - contractReaderClient pb.ContractReaderClient - evmRelayerSetClient evm.EVMClient - tonRelayerSetClient ton.TONClient + relayerSetClient relayerset.RelayerSetClient + contractReaderClient pb.ContractReaderClient + evmRelayerSetClient evm.EVMClient + tonRelayerSetClient ton.TONClient + solanaRelayerSetClient solana.SolanaClient } func NewRelayerSetClient(log logger.Logger, b *net.BrokerExt, conn grpc.ClientConnInterface) *Client { b = b.WithName("ChainRelayerClient") return &Client{ - log: log, - BrokerExt: b, - ServiceClient: goplugin.NewServiceClient(b, conn), - relayerSetClient: relayerset.NewRelayerSetClient(conn), - evmRelayerSetClient: evm.NewEVMClient(conn), - tonRelayerSetClient: ton.NewTONClient(conn), - contractReaderClient: pb.NewContractReaderClient(conn)} + log: log, + BrokerExt: b, + ServiceClient: goplugin.NewServiceClient(b, conn), + relayerSetClient: relayerset.NewRelayerSetClient(conn), + evmRelayerSetClient: evm.NewEVMClient(conn), + tonRelayerSetClient: ton.NewTONClient(conn), + solanaRelayerSetClient: solana.NewSolanaClient(conn), + contractReaderClient: pb.NewContractReaderClient(conn)} } func (k *Client) Get(ctx context.Context, relayID types.RelayID) (core.Relayer, error) { @@ -167,6 +170,19 @@ func (k *Client) TON(relayID types.RelayID) (types.TONService, error) { }), nil } +func (k *Client) Solana(relayID types.RelayID) (types.SolanaService, error) { + if k.solanaRelayerSetClient == nil { + return nil, errors.New("solanaRelayerSetClient can't be nil") + } + + return rel.NewSolanaClient( + &solClient{ + relayID: relayID, + client: k.solanaRelayerSetClient, + }, + ), nil +} + func (k *Client) NewPluginProvider(ctx context.Context, relayID types.RelayID, relayArgs core.RelayArgs, pluginArgs core.PluginArgs) (uint32, error) { // TODO at a later phase these credentials should be set as part of the relay config and not as a separate field var mercuryCredentials *relayerset.MercuryCredentials diff --git a/pkg/loop/internal/relayerset/relayer.go b/pkg/loop/internal/relayerset/relayer.go index 55ef1e8901..00dadd948e 100644 --- a/pkg/loop/internal/relayerset/relayer.go +++ b/pkg/loop/internal/relayerset/relayer.go @@ -43,6 +43,10 @@ func (r *relayer) TON() (types.TONService, error) { return r.relayerSetClient.TON(r.relayerID) } +func (r *relayer) Solana() (types.SolanaService, error) { + return r.relayerSetClient.Solana(r.relayerID) +} + func (r *relayer) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error) { return r.relayerSetClient.NewContractReader(ctx, r.relayerID, contractReaderConfig) } diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go new file mode 100644 index 0000000000..0da3b9983c --- /dev/null +++ b/pkg/loop/internal/relayerset/solana.go @@ -0,0 +1,331 @@ +package relayerset + +import ( + "context" + "fmt" + + solpb "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" + chaincommonpb "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/net" + "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/pb/relayerset" + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" + "google.golang.org/grpc" +) + +// solClient wraps the SolanaRelayerSetClient by attaching a RelayerID to SolClient requests. +// The attached RelayerID is stored in the context metadata. +type solClient struct { + relayID types.RelayID + client solpb.SolanaClient +} + +var _ solpb.SolanaClient = (*solClient)(nil) + +func (sc *solClient) GetAccountInfoWithOpts(ctx context.Context, in *solpb.GetAccountInfoWithOptsRequest, opts ...grpc.CallOption) (*solpb.GetAccountInfoWithOptsReply, error) { + return sc.client.GetAccountInfoWithOpts(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetBalance(ctx context.Context, in *solpb.GetBalanceRequest, opts ...grpc.CallOption) (*solpb.GetBalanceReply, error) { + return sc.client.GetBalance(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetBlock(ctx context.Context, in *solpb.GetBlockRequest, opts ...grpc.CallOption) (*solpb.GetBlockReply, error) { + return sc.client.GetBlock(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetFeeForMessage(ctx context.Context, in *solpb.GetFeeForMessageRequest, opts ...grpc.CallOption) (*solpb.GetFeeForMessageReply, error) { + return sc.client.GetFeeForMessage(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetMultipleAccountsWithOpts(ctx context.Context, in *solpb.GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*solpb.GetMultipleAccountsWithOptsReply, error) { + return sc.client.GetMultipleAccountsWithOpts(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetSignatureStatuses(ctx context.Context, in *solpb.GetSignatureStatusesRequest, opts ...grpc.CallOption) (*solpb.GetSignatureStatusesReply, error) { + return sc.client.GetSignatureStatuses(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetSlotHeight(ctx context.Context, in *solpb.GetSlotHeightRequest, opts ...grpc.CallOption) (*solpb.GetSlotHeightReply, error) { + return sc.client.GetSlotHeight(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) GetTransaction(ctx context.Context, in *solpb.GetTransactionRequest, opts ...grpc.CallOption) (*solpb.GetTransactionReply, error) { + return sc.client.GetTransaction(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) QueryTrackedLogsSol(ctx context.Context, in *solpb.QueryTrackedLogsRequest, opts ...grpc.CallOption) (*solpb.QueryTrackedLogsReply, error) { + return sc.client.QueryTrackedLogsSol(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) RegisterLogTrackingSol(ctx context.Context, in *solpb.RegisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.RegisterLogTrackingReply, error) { + return sc.client.RegisterLogTrackingSol(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) SimulateTX(ctx context.Context, in *solpb.SimulateTXRequest, opts ...grpc.CallOption) (*solpb.SimulateTXReply, error) { + return sc.client.SimulateTX(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) SubmitTransactionSol(ctx context.Context, in *solpb.SubmitTransactionRequest, opts ...grpc.CallOption) (*solpb.SubmitTransactionReply, error) { + return sc.client.SubmitTransactionSol(appendRelayID(ctx, sc.relayID), in, opts...) +} + +func (sc *solClient) UnregisterLogTrackingSol(ctx context.Context, in *solpb.UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.UnregisterLogTrackingReply, error) { + return sc.client.UnregisterLogTrackingSol(appendRelayID(ctx, sc.relayID), in, opts...) +} + +// Server handlers +func (s *Server) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertSubmitTransactionRequestFromProto(req) + if err != nil { + return nil, err + } + + dResp, err := solService.SubmitTransaction(ctx, dReq) + if err != nil { + return nil, err + } + + pResp := solpb.ConvertSubmitTransactionReplyToProto(dResp) + return pResp, nil +} + +func (s *Server) RegisterLogTrackingSol(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + if req.Filter == nil { + return nil, fmt.Errorf("missing filter") + } + + filter, err := solpb.ConvertLPFilterQueryFromProto(req.Filter) + if err != nil { + return nil, err + } + + if err := solService.RegisterLogTracking(ctx, *filter); err != nil { + return nil, err + } + + return &solpb.RegisterLogTrackingReply{}, nil +} + +func (s *Server) UnregisterLogTrackingSol(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + if err := solService.UnregisterLogTracking(ctx, req.GetFilterName()); err != nil { + return nil, err + } + + return &solpb.UnregisterLogTrackingReply{}, nil +} + +func (s *Server) QueryTrackedLogsSol(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dExprs, err := solpb.ConvertExpressionsFromProto(req.GetFilterQuery()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + ls, err := chaincommonpb.ConvertLimitAndSortFromProto(req.GetLimitAndSort()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + logs, err := solService.QueryTrackedLogs(ctx, dExprs, ls) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + out := make([]*solpb.Log, 0, len(logs)) + for _, l := range logs { + out = append(out, solpb.ConvertLogToProto(l)) + } + + return &solpb.QueryTrackedLogsReply{Logs: out}, nil +} + +func (s *Server) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest) (*solpb.GetBalanceReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertGetBalanceRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solService.GetBalance(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetBalanceReplyToProto(dResp), nil +} + +func (s *Server) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccountInfoWithOptsRequest) (*solpb.GetAccountInfoWithOptsReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + addr, err := solpb.ConvertPublicKeyFromProto(req.GetAccount()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + opts := solpb.ConvertGetAccountInfoOptsFromProto(req.GetOpts()) + + dReq := solana.GetAccountInfoRequest{Account: addr, Opts: opts} + dResp, err := solService.GetAccountInfoWithOpts(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solpb.GetAccountInfoWithOptsReply{ + RpcContext: solpb.ConvertRPCContextToProto(dResp.RPCContext), + Value: solpb.ConvertAccountToProto(dResp.Value), + }, nil +} + +func (s *Server) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb.GetMultipleAccountsWithOptsRequest) (*solpb.GetMultipleAccountsWithOptsReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq := solpb.ConvertGetMultipleAccountsRequestFromProto(req) + dResp, err := solService.GetMultipleAccountsWithOpts(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetMultipleAccountsReplyToProto(dResp), nil +} + +func (s *Server) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq := solpb.ConvertGetBlockRequestFromProto(req) + dResp, err := solService.GetBlock(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetBlockReplyToProto(dResp), nil +} + +func (s *Server) GetSlotHeight(ctx context.Context, req *solpb.GetSlotHeightRequest) (*solpb.GetSlotHeightReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq := solpb.ConvertGetSlotHeightRequestFromProto(req) + dResp, err := solService.GetSlotHeight(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetSlotHeightReplyToProto(dResp), nil +} + +func (s *Server) GetTransaction(ctx context.Context, req *solpb.GetTransactionRequest) (*solpb.GetTransactionReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertGetTransactionRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solService.GetTransaction(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetTransactionReplyToProto(dResp), nil +} + +func (s *Server) GetFeeForMessage(ctx context.Context, req *solpb.GetFeeForMessageRequest) (*solpb.GetFeeForMessageReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq := solpb.ConvertGetFeeForMessageRequestFromProto(req) + dResp, err := solService.GetFeeForMessage(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetFeeForMessageReplyToProto(dResp), nil +} + +func (s *Server) GetSignatureStatuses(ctx context.Context, req *solpb.GetSignatureStatusesRequest) (*solpb.GetSignatureStatusesReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertGetSignatureStatusesRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solService.GetSignatureStatuses(ctx, *dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetSignatureStatusesReplyToProto(dResp), nil +} + +func (s *Server) SimulateTX(ctx context.Context, req *solpb.SimulateTXRequest) (*solpb.SimulateTXReply, error) { + solService, err := s.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertSimulateTXRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solService.SimulateTX(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertSimulateTXReplyToProto(dResp), nil +} + +func (s *Server) getSolService(ctx context.Context) (types.SolanaService, error) { + id, err := readRelayID(ctx) + if err != nil { + return nil, err + } + idT := relayerset.RelayerId{Network: id.Network, ChainId: id.ChainID} + r, err := s.getRelayer(ctx, &idT) + if err != nil { + return nil, err + } + + return r.Solana() +} diff --git a/pkg/loop/internal/types/types.go b/pkg/loop/internal/types/types.go index 0ffb588c8c..078f5eae26 100644 --- a/pkg/loop/internal/types/types.go +++ b/pkg/loop/internal/types/types.go @@ -48,6 +48,7 @@ type Relayer interface { EVM() (types.EVMService, error) TON() (types.TONService, error) + Solana() (types.SolanaService, error) // NewContractWriter returns a new ContractWriter. // The format of config depends on the implementation. NewContractWriter(ctx context.Context, contractWriterConfig []byte) (types.ContractWriter, error) diff --git a/pkg/loop/mocks/relayer.go b/pkg/loop/mocks/relayer.go index 7f0d29d563..9bf27f1901 100644 --- a/pkg/loop/mocks/relayer.go +++ b/pkg/loop/mocks/relayer.go @@ -909,6 +909,63 @@ func (_c *Relayer_Replay_Call) RunAndReturn(run func(context.Context, string, ma return _c } +// Solana provides a mock function with no fields +func (_m *Relayer) Solana() (types.SolanaService, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Solana") + } + + var r0 types.SolanaService + var r1 error + if rf, ok := ret.Get(0).(func() (types.SolanaService, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() types.SolanaService); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.SolanaService) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Relayer_Solana_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Solana' +type Relayer_Solana_Call struct { + *mock.Call +} + +// Solana is a helper method to define mock.On call +func (_e *Relayer_Expecter) Solana() *Relayer_Solana_Call { + return &Relayer_Solana_Call{Call: _e.mock.On("Solana")} +} + +func (_c *Relayer_Solana_Call) Run(run func()) *Relayer_Solana_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Relayer_Solana_Call) Return(_a0 types.SolanaService, _a1 error) *Relayer_Solana_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Relayer_Solana_Call) RunAndReturn(run func() (types.SolanaService, error)) *Relayer_Solana_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Relayer) Start(_a0 context.Context) error { ret := _m.Called(_a0) diff --git a/pkg/loop/relayer_service.go b/pkg/loop/relayer_service.go index 07edd5dc7c..76ab5ed741 100644 --- a/pkg/loop/relayer_service.go +++ b/pkg/loop/relayer_service.go @@ -56,6 +56,13 @@ func (r *RelayerService) TON() (types.TONService, error) { return r.Service.TON() } +func (r *RelayerService) Solana() (types.SolanaService, error) { + if err := r.Wait(); err != nil { + return nil, err + } + return r.Service.Solana() +} + func (r *RelayerService) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error) { if err := r.WaitCtx(ctx); err != nil { return nil, err diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index 9b72f95305..ea2607916e 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -150,7 +150,7 @@ type Log struct { LogIndex int64 BlockHash Hash BlockNumber int64 - BlockTimestamp time.Time + BlockTimestamp uint64 Address PublicKey EventSig EventSignature TxHash Signature diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index 278d8fa040..bb1b5c4edb 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -7,12 +7,16 @@ import ( const ( PublicKeyLength = 32 + HashLength = PublicKeyLength SignatureLength = 64 ) // represents solana-go PublicKey type PublicKey [PublicKeyLength]byte +// represents solana-go PublicKeySlice +type PublicKeySlice []PublicKey + // represents solana-go Signature type Signature [SignatureLength]byte @@ -66,6 +70,18 @@ const ( CommitmentProcessed CommitmentType = "processed" ) +type Client interface { + GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) + GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) + GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) + GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) + GetSlotHeight(ctx context.Context, req GetSlotHeightRequest) (*GetSlotHeightReply, error) + GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) + GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) + GetSignatureStatuses(ctx context.Context, req GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) + SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) +} + // represents solana-go DataSlice type DataSlice struct { Offset *uint64 @@ -159,6 +175,103 @@ const ( ConfirmationStatusFinalized ConfirmationStatusType = "finalized" ) +type UiTokenAmount struct { + // Raw amount of tokens as a string, ignoring decimals. + Amount string + + // Number of decimals configured for token's mint. + Decimals uint8 + + // Token amount as a string, accounting for decimals. + UiAmountString string +} + +type TokenBalance struct { + // Index of the account in which the token balance is provided for. + AccountIndex uint16 + + // Pubkey of token balance's owner. + Owner *PublicKey + // Pubkey of token program. + ProgramId *PublicKey + + // Pubkey of the token's mint. + Mint PublicKey + UiTokenAmount *UiTokenAmount +} + +type LoadedAddresses struct { + ReadOnly PublicKeySlice + Writable PublicKeySlice +} + +type Data struct { + Content []byte + Encoding EncodingType +} + +type ReturnData struct { + ProgramId PublicKey + Data Data +} + +type TransactionMeta struct { + // Error if transaction failed, empty if transaction succeeded. + Err string + // Fee this transaction was charged + Fee uint64 + + // Array of u64 account balances from before the transaction was processed + PreBalances []uint64 + + // Array of u64 account balances after the transaction was processed + PostBalances []uint64 + + // List of inner instructions or omitted if inner instruction recording + // was not yet enabled during this transaction + InnerInstructions []InnerInstruction + + // List of token balances from before the transaction was processed + // or omitted if token balance recording was not yet enabled during this transaction + PreTokenBalances []TokenBalance + + // List of token balances from after the transaction was processed + // or omitted if token balance recording was not yet enabled during this transaction + PostTokenBalances []TokenBalance + + // Array of string log messages or omitted if log message + // recording was not yet enabled during this transaction + LogMessages []string + + LoadedAddresses LoadedAddresses + + // Data returned by transaction (if any + ReturnData ReturnData + + // Total compute units consumed by transaction execution + ComputeUnitsConsumed *uint64 +} + +type InnerInstruction struct { + Index uint16 + + // Ordered list of inner program instructions that were invoked during a single transaction instruction. + Instructions []CompiledInstruction +} + +type CompiledInstruction struct { + // Index into the message.accountKeys array indicating the program account that executes this instruction. + ProgramIDIndex uint16 + + // List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program. + Accounts []uint16 + + // The program input data encoded in a base-58 string. + Data []byte + + StackHeight uint16 +} + type TransactionWithMeta struct { // The slot this transaction was processed in. Slot uint64 @@ -170,8 +283,8 @@ type TransactionWithMeta struct { // Encoded Transaction Transaction *DataBytesOrJSON - // JSON encoded solana-go TransactionMeta - MetaJSON []byte + + Meta *TransactionMeta Version TransactionVersion } @@ -330,21 +443,77 @@ type GetSlotHeightReply struct { Height uint64 } +type MessageHeader struct { + // The total number of signatures required to make the transaction valid. + // The signatures must match the first `numRequiredSignatures` of `message.account_keys`. + NumRequiredSignatures uint8 + + // The last numReadonlySignedAccounts of the signed keys are read-only accounts. + // Programs may process multiple transactions that load read-only accounts within + // a single PoH entry, but are not permitted to credit or debit lamports or modify + // account data. + // Transactions targeting the same read-write account are evaluated sequentially. + NumReadonlySignedAccounts uint8 + + // The last `numReadonlyUnsignedAccounts` of the unsigned keys are read-only accounts. + NumReadonlyUnsignedAccounts uint8 +} + +type MessageAddressTableLookupSlice []MessageAddressTableLookup + +type MessageAddressTableLookup struct { + AccountKey PublicKey // The account key of the address table. + WritableIndexes []uint8 + ReadonlyIndexes []uint8 +} + +type Message struct { + // List of base-58 encoded public keys used by the transaction, + // including by the instructions and for signatures. + // The first `message.header.numRequiredSignatures` public keys must sign the transaction. + AccountKeys PublicKeySlice + + // Details the account types and signatures required by the transaction. + Header MessageHeader + + // A base-58 encoded hash of a recent block in the ledger used to + // prevent transaction duplication and to give transactions lifetimes. + RecentBlockhash Hash + + // List of program instructions that will be executed in sequence + // and committed in one atomic transaction if all succeed. + Instructions []CompiledInstruction + + // List of address table lookups used to load additional accounts for this transaction. + AddressTableLookups MessageAddressTableLookupSlice +} + +type Transaction struct { + Signatures []Signature + Message Message +} + +type TransactionResultEnvelope struct { + AsParsedTransaction *Transaction + AsDecodedBinary Data +} + +// arguments for solana-rpc GetTransaction call type GetTransactionRequest struct { Signature Signature } +// result of solana-rpc GetTransaction call type GetTransactionReply struct { Slot uint64 BlockTime *UnixTimeSeconds Version TransactionVersion - // JSON Encoded TransactionResultEnvelope - TransactionEnvelope []byte - // JSON encoded TransactionMeta - Meta []byte + Transaction *TransactionResultEnvelope + + Meta *TransactionMeta } type GetFeeForMessageRequest struct { @@ -364,7 +533,7 @@ type GetLatestBlockhashRequest struct { type GetLatestBlockhashReply struct { RPCContext - Hash Signature + Hash Hash LastValidBlockHeight uint64 } @@ -397,31 +566,19 @@ type GetSignatureStatusesRequest struct { type GetSignatureStatusesResult struct { // The slot the transaction was processed. - Slot uint64 `json:"slot"` + Slot uint64 // Number of blocks since signature confirmation, // null if rooted or finalized by a supermajority of the cluster. - Confirmations *uint64 `json:"confirmations"` + Confirmations *uint64 // Error if transaction failed, empty if transaction succeeded. Err string // The transaction's cluster confirmation status; either processed, confirmed, or finalized. - ConfirmationStatus ConfirmationStatusType `json:"confirmationStatus"` + ConfirmationStatus ConfirmationStatusType } type GetSignatureStatusesReply struct { Results []GetSignatureStatusesResult } - -type Client interface { - GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) - GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) - GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) - GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) - GetSlotHeight(ctx context.Context, req GetSlotHeightRequest) (*GetSlotHeightReply, error) - GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) - GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) - GetSignatureStatuses(ctx context.Context, req GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) - SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) -} diff --git a/pkg/types/core/mocks/relayer.go b/pkg/types/core/mocks/relayer.go index 3ee0982c0a..3e077a6c16 100644 --- a/pkg/types/core/mocks/relayer.go +++ b/pkg/types/core/mocks/relayer.go @@ -553,6 +553,63 @@ func (_c *Relayer_Ready_Call) RunAndReturn(run func() error) *Relayer_Ready_Call return _c } +// Solana provides a mock function with no fields +func (_m *Relayer) Solana() (types.SolanaService, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Solana") + } + + var r0 types.SolanaService + var r1 error + if rf, ok := ret.Get(0).(func() (types.SolanaService, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() types.SolanaService); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.SolanaService) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Relayer_Solana_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Solana' +type Relayer_Solana_Call struct { + *mock.Call +} + +// Solana is a helper method to define mock.On call +func (_e *Relayer_Expecter) Solana() *Relayer_Solana_Call { + return &Relayer_Solana_Call{Call: _e.mock.On("Solana")} +} + +func (_c *Relayer_Solana_Call) Run(run func()) *Relayer_Solana_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Relayer_Solana_Call) Return(_a0 types.SolanaService, _a1 error) *Relayer_Solana_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Relayer_Solana_Call) RunAndReturn(run func() (types.SolanaService, error)) *Relayer_Solana_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Relayer) Start(_a0 context.Context) error { ret := _m.Called(_a0) diff --git a/pkg/types/core/relayerset.go b/pkg/types/core/relayerset.go index 0f2b81fdc4..e1357b8bb2 100644 --- a/pkg/types/core/relayerset.go +++ b/pkg/types/core/relayerset.go @@ -33,6 +33,8 @@ type Relayer interface { EVM() (types.EVMService, error) // TON returns TONService that provides access to TON specific functionalities TON() (types.TONService, error) + // Solana returns SolanaService that provides access to Solana specific functionalities + Solana() (types.SolanaService, error) NewPluginProvider(context.Context, RelayArgs, PluginArgs) (PluginProvider, error) NewContractReader(_ context.Context, contractReaderConfig []byte) (types.ContractReader, error) NewContractWriter(_ context.Context, contractWriterConfig []byte) (types.ContractWriter, error) From 1630490eeebc4174ebe68b301c319e0c2d60d088 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 05:43:25 -0500 Subject: [PATCH 07/21] run tidy --- go.mod | 2 +- pkg/types/relayer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index ffd413ac3a..3d12317dd0 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,7 @@ require ( github.com/kylelemons/godebug v1.1.0 github.com/lib/pq v1.10.9 github.com/marcboeker/go-duckdb v1.8.5 + github.com/mr-tron/base58 v1.2.0 github.com/pelletier/go-toml v1.9.5 github.com/pelletier/go-toml/v2 v2.2.4 github.com/prometheus/client_golang v1.22.0 @@ -125,7 +126,6 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/run v1.2.0 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index 96dbe1ba84..35e80b08cf 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -350,7 +350,7 @@ func (u *UnimplementedRelayer) TON() (TONService, error) { } func (u *UnimplementedRelayer) Solana() (SolanaService, error) { - return nil, status.Errorf(codes.Unimplemented, "method TON not implemented") + return nil, status.Errorf(codes.Unimplemented, "method Solana not implemented") } func (u *UnimplementedRelayer) NewContractWriter(ctx context.Context, config []byte) (ContractWriter, error) { From c6ee9745ceb4862aaa0a066d27eb7c61c155e6af Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 06:48:22 -0500 Subject: [PATCH 08/21] add relayerset_test --- .mockery.yaml | 1 + pkg/chains/solana/proto_helpers.go | 20 +- pkg/loop/internal/pb/relayerset/helper.go | 5 + .../internal/relayerset/relayerset_test.go | 347 ++++++++ pkg/loop/internal/relayerset/server.go | 3 + pkg/types/mocks/solana_service.go | 783 ++++++++++++++++++ 6 files changed, 1156 insertions(+), 3 deletions(-) create mode 100644 pkg/types/mocks/solana_service.go diff --git a/.mockery.yaml b/.mockery.yaml index e2bd813314..47256b2092 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -22,6 +22,7 @@ packages: ContractReader: EVMService: TONService: + SolanaService: github.com/smartcontractkit/chainlink-common/pkg/types/core: interfaces: CapabilitiesRegistry: diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index 6fd967dd6d..d4ebe0cc92 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -882,10 +882,14 @@ func ConvertGetTransactionReplyToProto(r *typesolana.GetTransactionReply) *GetTr if r.BlockTime != nil { bt = int64(*r.BlockTime) } + var tx *TransactionEnvelope + if r.Transaction != nil { + tx = ConvertTransactionEnvelopeToProto(*r.Transaction) + } return &GetTransactionReply{ Slot: r.Slot, BlockTime: bt, - Transaction: ConvertTransactionEnvelopeToProto(*r.Transaction), + Transaction: tx, Meta: ConvertTransactionMetaToProto(r.Meta), } } @@ -1428,6 +1432,10 @@ func ConvertLogToProto(l *typesolana.Log) *Log { if l == nil { return nil } + var err string + if l.Error != nil { + err = *l.Error + } return &Log{ ChainId: l.ChainID, LogIndex: l.LogIndex, @@ -1439,7 +1447,7 @@ func ConvertLogToProto(l *typesolana.Log) *Log { TxHash: l.TxHash[:], Data: l.Data, SequenceNum: l.SequenceNum, - Error: *l.Error, + Error: err, } } @@ -1707,6 +1715,12 @@ func putPrimitive(exp *Expression, p *Primitive) { exp.Evaluator = &Expression_Primitive{Primitive: &Primitive{Primitive: p.Primitive}} } -func ptrUint64(v uint64) *uint64 { return &v } +func ptrUint64(v uint64) *uint64 { + if v == 0 { + return nil + } + return &v + +} func ptrBool(v bool) *bool { return &v } func ptrUnix(v typesolana.UnixTimeSeconds) *typesolana.UnixTimeSeconds { return &v } diff --git a/pkg/loop/internal/pb/relayerset/helper.go b/pkg/loop/internal/pb/relayerset/helper.go index 5003010a5e..6f10a4a3eb 100644 --- a/pkg/loop/internal/pb/relayerset/helper.go +++ b/pkg/loop/internal/pb/relayerset/helper.go @@ -4,6 +4,7 @@ import ( "google.golang.org/grpc" "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" "github.com/smartcontractkit/chainlink-common/pkg/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/pb" ) @@ -20,6 +21,10 @@ func RegisterRelayerSetServerWithDependants(s grpc.ServiceRegistrar, srv Relayer ton.RegisterTONServer(s, eSrv) } switch eSrv := srv.(type) { + case solana.SolanaServer: + solana.RegisterSolanaServer(s, eSrv) + } + switch eSrv := srv.(type) { case pb.ContractReaderServer: pb.RegisterContractReaderServer(s, eSrv) } diff --git a/pkg/loop/internal/relayerset/relayerset_test.go b/pkg/loop/internal/relayerset/relayerset_test.go index db3db9ec42..5256b17b78 100644 --- a/pkg/loop/internal/relayerset/relayerset_test.go +++ b/pkg/loop/internal/relayerset/relayerset_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/pb/relayerset" "github.com/smartcontractkit/chainlink-common/pkg/types" evmtypes "github.com/smartcontractkit/chainlink-common/pkg/types/chains/evm" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/ton" tontypes "github.com/smartcontractkit/chainlink-common/pkg/types/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/types/core" @@ -27,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" evmprimitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives/evm" + solprimitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives/solana" ) func Test_RelayerSet(t *testing.T) { @@ -575,6 +577,351 @@ func Test_RelayerSet_EVMService(t *testing.T) { } } +func Test_RelayerSet_SolanaService(t *testing.T) { + ctx := t.Context() + stopCh := make(chan struct{}) + log := logger.Test(t) + + relayer1 := mocks.NewRelayer(t) + relayers := map[types.RelayID]core.Relayer{ + {Network: "N1", ChainID: "C1"}: relayer1, + } + + pluginName := "solana-relayerset-test" + client, server := plugin.TestPluginGRPCConn( + t, + true, + map[string]plugin.Plugin{ + pluginName: &testRelaySetPlugin{ + log: log, + impl: &TestRelayerSet{relayers: relayers}, + brokerExt: &net.BrokerExt{ + BrokerConfig: net.BrokerConfig{ + StopCh: stopCh, + Logger: log, + }, + }, + }, + }, + ) + defer client.Close() + defer server.Stop() + + relayerSetClient, err := client.Dispense(pluginName) + require.NoError(t, err) + rc, ok := relayerSetClient.(*Client) + require.True(t, ok) + + retrievedRelayer, err := rc.Get(ctx, types.RelayID{Network: "N1", ChainID: "C1"}) + require.NoError(t, err) + + tests := []struct { + name string + run func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) + }{ + { + name: "GetBalance", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + address := soltypes.PublicKey{1, 2, 3} + bal := uint64(32) + mockSol.EXPECT().GetBalance(mock.Anything, soltypes.GetBalanceRequest{ + Addr: address, + Commitment: soltypes.CommitmentConfirmed, + }).Return(&soltypes.GetBalanceReply{Value: bal}, nil) + reply, err := sol.GetBalance(ctx, soltypes.GetBalanceRequest{ + Addr: address, Commitment: soltypes.CommitmentConfirmed, + }) + require.NoError(t, err) + require.Equal(t, bal, reply.Value) + }, + }, + { + name: "GetAccountInfoWithOpts", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.GetAccountInfoRequest{ + Account: soltypes.PublicKey{9, 9, 9}, + Opts: &soltypes.GetAccountInfoOpts{ + Encoding: soltypes.EncodingJSONParsed, + Commitment: soltypes.CommitmentFinalized, + }, + } + slot := uint64(22) + lamports := uint64(33) + mockSol.EXPECT(). + GetAccountInfoWithOpts(mock.Anything, req). + Return(&soltypes.GetAccountInfoReply{ + RPCContext: soltypes.RPCContext{Context: soltypes.Context{Slot: slot}}, + Value: &soltypes.Account{ + Lamports: lamports, + Executable: false, + }, + }, nil) + + out, err := sol.GetAccountInfoWithOpts(ctx, req) + require.NoError(t, err) + require.Equal(t, lamports, out.Value.Lamports) + require.Equal(t, slot, out.RPCContext.Context.Slot) + }, + }, + { + name: "GetMultipleAccountsWithOpts", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.GetMultipleAccountsRequest{ + Accounts: []soltypes.PublicKey{{1}, {2}}, + Opts: &soltypes.GetMultipleAccountsOpts{ + Encoding: soltypes.EncodingBase64, + Commitment: soltypes.CommitmentProcessed, + }, + } + slot := uint64(22) + lamports := uint64(33) + mockSol.EXPECT(). + GetMultipleAccountsWithOpts(mock.Anything, req). + Return(&soltypes.GetMultipleAccountsReply{ + RPCContext: soltypes.RPCContext{Context: soltypes.Context{Slot: slot}}, + Value: []*soltypes.Account{ + {Lamports: lamports}, {Lamports: lamports}, + }, + }, nil) + + out, err := sol.GetMultipleAccountsWithOpts(ctx, req) + require.NoError(t, err) + require.Len(t, out.Value, 2) + require.Equal(t, lamports, out.Value[0].Lamports) + }, + }, + { + name: "GetBlock", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + rew := true + req := soltypes.GetBlockRequest{ + Slot: 42, + Opts: &soltypes.GetBlockOpts{ + Encoding: soltypes.EncodingJSON, + TransactionDetails: soltypes.TransactionDetailsNone, + Rewards: &rew, + Commitment: soltypes.CommitmentConfirmed, + }, + } + expHash := soltypes.Hash{1, 2, 3} + parSlot := uint64(33) + expHeight := uint64(66) + mockSol.EXPECT(). + GetBlock(mock.Anything, req). + Return(&soltypes.GetBlockReply{ + Blockhash: expHash, + ParentSlot: parSlot, + BlockTime: nil, + BlockHeight: &expHeight, + }, nil) + + out, err := sol.GetBlock(ctx, req) + require.NoError(t, err) + require.Equal(t, parSlot, out.ParentSlot) + require.Equal(t, expHeight, *out.BlockHeight) + }, + }, + { + name: "GetSlotHeight", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.GetSlotHeightRequest{Commitment: soltypes.CommitmentFinalized} + mockSol.EXPECT(). + GetSlotHeight(mock.Anything, req). + Return(&soltypes.GetSlotHeightReply{Height: 9090}, nil) + + out, err := sol.GetSlotHeight(ctx, req) + require.NoError(t, err) + require.Equal(t, uint64(9090), out.Height) + }, + }, + { + name: "GetTransaction", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + var sig soltypes.Signature + copy(sig[:], []byte{1, 2, 3, 4}) + req := soltypes.GetTransactionRequest{Signature: sig} + expTime := soltypes.UnixTimeSeconds(11) + expFee := uint64(33) + expSlot := uint64(17) + mockSol.EXPECT(). + GetTransaction(mock.Anything, req). + Return(&soltypes.GetTransactionReply{ + Slot: expSlot, + BlockTime: &expTime, + Meta: &soltypes.TransactionMeta{ + Fee: expFee, + }, + }, nil) + + out, err := sol.GetTransaction(ctx, req) + require.NoError(t, err) + require.Equal(t, expSlot, out.Slot) + require.Equal(t, expFee, out.Meta.Fee) + }, + }, + { + name: "GetFeeForMessage", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.GetFeeForMessageRequest{ + Message: "AgAAAA==", + Commitment: soltypes.CommitmentProcessed, + } + mockSol.EXPECT(). + GetFeeForMessage(mock.Anything, req). + Return(&soltypes.GetFeeForMessageReply{Fee: 1234}, nil) + + out, err := sol.GetFeeForMessage(ctx, req) + require.NoError(t, err) + require.Equal(t, uint64(1234), out.Fee) + }, + }, + { + name: "GetSignatureStatuses", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + s1, s2 := soltypes.Signature{}, soltypes.Signature{} + copy(s1[:], []byte{7}) + copy(s2[:], []byte{8}) + req := soltypes.GetSignatureStatusesRequest{Sigs: []soltypes.Signature{s1, s2}} + expSlot1 := uint64(1) + expConf1 := uint64(11) + expSlot2 := uint64(33) + expConf2 := uint64(22) + mockSol.EXPECT(). + GetSignatureStatuses(mock.Anything, req). + Return(&soltypes.GetSignatureStatusesReply{ + Results: []soltypes.GetSignatureStatusesResult{ + {Slot: uint64(expSlot1), Confirmations: &expConf1}, {Slot: expSlot2, Confirmations: &expConf2}, + }, + }, nil) + + out, err := sol.GetSignatureStatuses(ctx, req) + require.NoError(t, err) + require.Len(t, out.Results, 2) + require.Equal(t, expSlot1, out.Results[0].Slot) + }, + }, + { + name: "SimulateTX", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.SimulateTXRequest{ + Receiver: soltypes.PublicKey{5, 5, 5}, + EncodedTransaction: "BASE64TX==", + Opts: &soltypes.SimulateTXOpts{ + SigVerify: true, + Commitment: soltypes.CommitmentProcessed, + ReplaceRecentBlockhash: true, + }, + } + mockSol.EXPECT(). + SimulateTX(mock.Anything, req). + Return(&soltypes.SimulateTXReply{ + Err: "", + Logs: []string{"log1", "log2"}, + }, nil) + + out, err := sol.SimulateTX(ctx, req) + require.NoError(t, err) + require.Len(t, out.Logs, 2) + }, + }, + { + name: "SubmitTransaction", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + units := uint32(1_400_999) + price := uint64(11) + req := soltypes.SubmitTransactionRequest{ + Cfg: &soltypes.ComputeConfig{ + ComputeLimit: &units, + ComputeMaxPrice: &price, + }, + Receiver: soltypes.PublicKey{3, 3, 3}, + EncodedTransaction: "BASE64TX==", + } + expected := &soltypes.SubmitTransactionReply{ + Signature: soltypes.Signature{0xaa, 0xbb}, + IdempotencyKey: "idem-123", + Status: soltypes.TxSuccess, + } + mockSol.EXPECT(). + SubmitTransaction(mock.Anything, req). + Return(expected, nil) + + out, err := sol.SubmitTransaction(ctx, req) + require.NoError(t, err) + require.Equal(t, expected.IdempotencyKey, out.IdempotencyKey) + require.Equal(t, expected.Signature, out.Signature) + require.Equal(t, expected.Status, out.Status) + }, + }, + { + name: "RegisterLogTracking", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + req := soltypes.LPFilterQuery{ + Name: "my-filter", + Address: soltypes.PublicKey{0x11}, + EventName: "MyEvent", + StartingBlock: 1234, + Retention: 3600, + } + mockSol.EXPECT(). + RegisterLogTracking(mock.Anything, req). + Return(nil) + + err := sol.RegisterLogTracking(ctx, req) + require.NoError(t, err) + }, + }, + { + name: "UnregisterLogTracking", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + filterName := "my-filter" + mockSol.EXPECT(). + UnregisterLogTracking(mock.Anything, filterName). + Return(nil) + + err := sol.UnregisterLogTracking(ctx, filterName) + require.NoError(t, err) + }, + }, + { + name: "QueryTrackedLogs", + run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { + // simple expression & limit + filterExpr := []query.Expression{} + primitiveExpressions := []query.Expression{query.TxHash("txHash")} + primitiveExpressions = append(primitiveExpressions, solprimitives.NewAddressFilter(soltypes.PublicKey{1, 2, 3})) + filterExpr = append(filterExpr, primitiveExpressions...) + expected := []*soltypes.Log{ + {BlockNumber: 1, LogIndex: 0}, + {BlockNumber: 2, LogIndex: 5}, + } + + expLimitAndSort := query.NewLimitAndSort(query.CountLimit(10), query.SortByTimestamp{}) + mockSol.EXPECT(). + QueryTrackedLogs(mock.Anything, filterExpr, expLimitAndSort). + Return(expected, nil) + + out, err := sol.QueryTrackedLogs(ctx, filterExpr, expLimitAndSort) + require.NoError(t, err) + require.Len(t, out, 2) + require.Equal(t, int64(2), out[1].BlockNumber) + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + mockSol := mocks2.NewSolanaService(t) + relayer1.On("Solana", mock.Anything, mock.Anything).Return(mockSol, nil).Once() + + fetchedSol, err := retrievedRelayer.Solana() + require.NoError(t, err) + + tc.run(t, fetchedSol, mockSol) + }) + } +} + func Test_RelayerSet_TONService(t *testing.T) { ctx := t.Context() stopCh := make(chan struct{}) diff --git a/pkg/loop/internal/relayerset/server.go b/pkg/loop/internal/relayerset/server.go index d4183c1981..23a25aee89 100644 --- a/pkg/loop/internal/relayerset/server.go +++ b/pkg/loop/internal/relayerset/server.go @@ -14,6 +14,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" evmpb "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + solpb "github.com/smartcontractkit/chainlink-common/pkg/chains/solana" tonpb "github.com/smartcontractkit/chainlink-common/pkg/chains/ton" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/net" @@ -36,6 +37,7 @@ type Server struct { relayerset.UnimplementedRelayerSetServer evmpb.UnimplementedEVMServer tonpb.UnimplementedTONServer + solpb.UnimplementedSolanaServer pb.ContractReaderServer impl core.RelayerSet @@ -53,6 +55,7 @@ type Server struct { var _ relayerset.RelayerSetServer = (*Server)(nil) var _ evmpb.EVMServer = (*Server)(nil) var _ tonpb.TONServer = (*Server)(nil) +var _ solpb.SolanaServer = (*Server)(nil) var _ pb.ContractReaderServer = (*Server)(nil) func NewRelayerSetServer(log logger.Logger, underlying core.RelayerSet, broker *net.BrokerExt) (*Server, net.Resource) { diff --git a/pkg/types/mocks/solana_service.go b/pkg/types/mocks/solana_service.go new file mode 100644 index 0000000000..3de7d41d35 --- /dev/null +++ b/pkg/types/mocks/solana_service.go @@ -0,0 +1,783 @@ +// Code generated by mockery v2.53.3. DO NOT EDIT. + +package mocks + +import ( + context "context" + + query "github.com/smartcontractkit/chainlink-common/pkg/types/query" + mock "github.com/stretchr/testify/mock" + + solana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" +) + +// SolanaService is an autogenerated mock type for the SolanaService type +type SolanaService struct { + mock.Mock +} + +type SolanaService_Expecter struct { + mock *mock.Mock +} + +func (_m *SolanaService) EXPECT() *SolanaService_Expecter { + return &SolanaService_Expecter{mock: &_m.Mock} +} + +// GetAccountInfoWithOpts provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetAccountInfoWithOpts(ctx context.Context, req solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetAccountInfoWithOpts") + } + + var r0 *solana.GetAccountInfoReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetAccountInfoRequest) *solana.GetAccountInfoReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetAccountInfoReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetAccountInfoRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetAccountInfoWithOpts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccountInfoWithOpts' +type SolanaService_GetAccountInfoWithOpts_Call struct { + *mock.Call +} + +// GetAccountInfoWithOpts is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetAccountInfoRequest +func (_e *SolanaService_Expecter) GetAccountInfoWithOpts(ctx interface{}, req interface{}) *SolanaService_GetAccountInfoWithOpts_Call { + return &SolanaService_GetAccountInfoWithOpts_Call{Call: _e.mock.On("GetAccountInfoWithOpts", ctx, req)} +} + +func (_c *SolanaService_GetAccountInfoWithOpts_Call) Run(run func(ctx context.Context, req solana.GetAccountInfoRequest)) *SolanaService_GetAccountInfoWithOpts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetAccountInfoRequest)) + }) + return _c +} + +func (_c *SolanaService_GetAccountInfoWithOpts_Call) Return(_a0 *solana.GetAccountInfoReply, _a1 error) *SolanaService_GetAccountInfoWithOpts_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetAccountInfoWithOpts_Call) RunAndReturn(run func(context.Context, solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error)) *SolanaService_GetAccountInfoWithOpts_Call { + _c.Call.Return(run) + return _c +} + +// GetBalance provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetBalance(ctx context.Context, req solana.GetBalanceRequest) (*solana.GetBalanceReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + + var r0 *solana.GetBalanceReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetBalanceRequest) (*solana.GetBalanceReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetBalanceRequest) *solana.GetBalanceReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetBalanceReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetBalanceRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance' +type SolanaService_GetBalance_Call struct { + *mock.Call +} + +// GetBalance is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetBalanceRequest +func (_e *SolanaService_Expecter) GetBalance(ctx interface{}, req interface{}) *SolanaService_GetBalance_Call { + return &SolanaService_GetBalance_Call{Call: _e.mock.On("GetBalance", ctx, req)} +} + +func (_c *SolanaService_GetBalance_Call) Run(run func(ctx context.Context, req solana.GetBalanceRequest)) *SolanaService_GetBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetBalanceRequest)) + }) + return _c +} + +func (_c *SolanaService_GetBalance_Call) Return(_a0 *solana.GetBalanceReply, _a1 error) *SolanaService_GetBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetBalance_Call) RunAndReturn(run func(context.Context, solana.GetBalanceRequest) (*solana.GetBalanceReply, error)) *SolanaService_GetBalance_Call { + _c.Call.Return(run) + return _c +} + +// GetBlock provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetBlock(ctx context.Context, req solana.GetBlockRequest) (*solana.GetBlockReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + + var r0 *solana.GetBlockReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetBlockRequest) (*solana.GetBlockReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetBlockRequest) *solana.GetBlockReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetBlockReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetBlockRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock' +type SolanaService_GetBlock_Call struct { + *mock.Call +} + +// GetBlock is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetBlockRequest +func (_e *SolanaService_Expecter) GetBlock(ctx interface{}, req interface{}) *SolanaService_GetBlock_Call { + return &SolanaService_GetBlock_Call{Call: _e.mock.On("GetBlock", ctx, req)} +} + +func (_c *SolanaService_GetBlock_Call) Run(run func(ctx context.Context, req solana.GetBlockRequest)) *SolanaService_GetBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetBlockRequest)) + }) + return _c +} + +func (_c *SolanaService_GetBlock_Call) Return(_a0 *solana.GetBlockReply, _a1 error) *SolanaService_GetBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetBlock_Call) RunAndReturn(run func(context.Context, solana.GetBlockRequest) (*solana.GetBlockReply, error)) *SolanaService_GetBlock_Call { + _c.Call.Return(run) + return _c +} + +// GetFeeForMessage provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetFeeForMessage(ctx context.Context, req solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetFeeForMessage") + } + + var r0 *solana.GetFeeForMessageReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetFeeForMessageRequest) *solana.GetFeeForMessageReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetFeeForMessageReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetFeeForMessageRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetFeeForMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeForMessage' +type SolanaService_GetFeeForMessage_Call struct { + *mock.Call +} + +// GetFeeForMessage is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetFeeForMessageRequest +func (_e *SolanaService_Expecter) GetFeeForMessage(ctx interface{}, req interface{}) *SolanaService_GetFeeForMessage_Call { + return &SolanaService_GetFeeForMessage_Call{Call: _e.mock.On("GetFeeForMessage", ctx, req)} +} + +func (_c *SolanaService_GetFeeForMessage_Call) Run(run func(ctx context.Context, req solana.GetFeeForMessageRequest)) *SolanaService_GetFeeForMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetFeeForMessageRequest)) + }) + return _c +} + +func (_c *SolanaService_GetFeeForMessage_Call) Return(_a0 *solana.GetFeeForMessageReply, _a1 error) *SolanaService_GetFeeForMessage_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetFeeForMessage_Call) RunAndReturn(run func(context.Context, solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error)) *SolanaService_GetFeeForMessage_Call { + _c.Call.Return(run) + return _c +} + +// GetMultipleAccountsWithOpts provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetMultipleAccountsWithOpts(ctx context.Context, req solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetMultipleAccountsWithOpts") + } + + var r0 *solana.GetMultipleAccountsReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetMultipleAccountsRequest) *solana.GetMultipleAccountsReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetMultipleAccountsReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetMultipleAccountsRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetMultipleAccountsWithOpts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMultipleAccountsWithOpts' +type SolanaService_GetMultipleAccountsWithOpts_Call struct { + *mock.Call +} + +// GetMultipleAccountsWithOpts is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetMultipleAccountsRequest +func (_e *SolanaService_Expecter) GetMultipleAccountsWithOpts(ctx interface{}, req interface{}) *SolanaService_GetMultipleAccountsWithOpts_Call { + return &SolanaService_GetMultipleAccountsWithOpts_Call{Call: _e.mock.On("GetMultipleAccountsWithOpts", ctx, req)} +} + +func (_c *SolanaService_GetMultipleAccountsWithOpts_Call) Run(run func(ctx context.Context, req solana.GetMultipleAccountsRequest)) *SolanaService_GetMultipleAccountsWithOpts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetMultipleAccountsRequest)) + }) + return _c +} + +func (_c *SolanaService_GetMultipleAccountsWithOpts_Call) Return(_a0 *solana.GetMultipleAccountsReply, _a1 error) *SolanaService_GetMultipleAccountsWithOpts_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetMultipleAccountsWithOpts_Call) RunAndReturn(run func(context.Context, solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error)) *SolanaService_GetMultipleAccountsWithOpts_Call { + _c.Call.Return(run) + return _c +} + +// GetSignatureStatuses provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetSignatureStatuses(ctx context.Context, req solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetSignatureStatuses") + } + + var r0 *solana.GetSignatureStatusesReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetSignatureStatusesRequest) *solana.GetSignatureStatusesReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetSignatureStatusesReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetSignatureStatusesRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetSignatureStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSignatureStatuses' +type SolanaService_GetSignatureStatuses_Call struct { + *mock.Call +} + +// GetSignatureStatuses is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetSignatureStatusesRequest +func (_e *SolanaService_Expecter) GetSignatureStatuses(ctx interface{}, req interface{}) *SolanaService_GetSignatureStatuses_Call { + return &SolanaService_GetSignatureStatuses_Call{Call: _e.mock.On("GetSignatureStatuses", ctx, req)} +} + +func (_c *SolanaService_GetSignatureStatuses_Call) Run(run func(ctx context.Context, req solana.GetSignatureStatusesRequest)) *SolanaService_GetSignatureStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetSignatureStatusesRequest)) + }) + return _c +} + +func (_c *SolanaService_GetSignatureStatuses_Call) Return(_a0 *solana.GetSignatureStatusesReply, _a1 error) *SolanaService_GetSignatureStatuses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetSignatureStatuses_Call) RunAndReturn(run func(context.Context, solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error)) *SolanaService_GetSignatureStatuses_Call { + _c.Call.Return(run) + return _c +} + +// GetSlotHeight provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetSlotHeight(ctx context.Context, req solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetSlotHeight") + } + + var r0 *solana.GetSlotHeightReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetSlotHeightRequest) *solana.GetSlotHeightReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetSlotHeightReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetSlotHeightRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetSlotHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlotHeight' +type SolanaService_GetSlotHeight_Call struct { + *mock.Call +} + +// GetSlotHeight is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetSlotHeightRequest +func (_e *SolanaService_Expecter) GetSlotHeight(ctx interface{}, req interface{}) *SolanaService_GetSlotHeight_Call { + return &SolanaService_GetSlotHeight_Call{Call: _e.mock.On("GetSlotHeight", ctx, req)} +} + +func (_c *SolanaService_GetSlotHeight_Call) Run(run func(ctx context.Context, req solana.GetSlotHeightRequest)) *SolanaService_GetSlotHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetSlotHeightRequest)) + }) + return _c +} + +func (_c *SolanaService_GetSlotHeight_Call) Return(_a0 *solana.GetSlotHeightReply, _a1 error) *SolanaService_GetSlotHeight_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetSlotHeight_Call) RunAndReturn(run func(context.Context, solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error)) *SolanaService_GetSlotHeight_Call { + _c.Call.Return(run) + return _c +} + +// GetTransaction provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetTransaction(ctx context.Context, req solana.GetTransactionRequest) (*solana.GetTransactionReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetTransaction") + } + + var r0 *solana.GetTransactionReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetTransactionRequest) (*solana.GetTransactionReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetTransactionRequest) *solana.GetTransactionReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetTransactionReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetTransactionRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransaction' +type SolanaService_GetTransaction_Call struct { + *mock.Call +} + +// GetTransaction is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetTransactionRequest +func (_e *SolanaService_Expecter) GetTransaction(ctx interface{}, req interface{}) *SolanaService_GetTransaction_Call { + return &SolanaService_GetTransaction_Call{Call: _e.mock.On("GetTransaction", ctx, req)} +} + +func (_c *SolanaService_GetTransaction_Call) Run(run func(ctx context.Context, req solana.GetTransactionRequest)) *SolanaService_GetTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetTransactionRequest)) + }) + return _c +} + +func (_c *SolanaService_GetTransaction_Call) Return(_a0 *solana.GetTransactionReply, _a1 error) *SolanaService_GetTransaction_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetTransaction_Call) RunAndReturn(run func(context.Context, solana.GetTransactionRequest) (*solana.GetTransactionReply, error)) *SolanaService_GetTransaction_Call { + _c.Call.Return(run) + return _c +} + +// QueryTrackedLogs provides a mock function with given fields: ctx, filterQuery, limitAndSort +func (_m *SolanaService) QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort) ([]*solana.Log, error) { + ret := _m.Called(ctx, filterQuery, limitAndSort) + + if len(ret) == 0 { + panic("no return value specified for QueryTrackedLogs") + } + + var r0 []*solana.Log + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []query.Expression, query.LimitAndSort) ([]*solana.Log, error)); ok { + return rf(ctx, filterQuery, limitAndSort) + } + if rf, ok := ret.Get(0).(func(context.Context, []query.Expression, query.LimitAndSort) []*solana.Log); ok { + r0 = rf(ctx, filterQuery, limitAndSort) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*solana.Log) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, []query.Expression, query.LimitAndSort) error); ok { + r1 = rf(ctx, filterQuery, limitAndSort) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_QueryTrackedLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryTrackedLogs' +type SolanaService_QueryTrackedLogs_Call struct { + *mock.Call +} + +// QueryTrackedLogs is a helper method to define mock.On call +// - ctx context.Context +// - filterQuery []query.Expression +// - limitAndSort query.LimitAndSort +func (_e *SolanaService_Expecter) QueryTrackedLogs(ctx interface{}, filterQuery interface{}, limitAndSort interface{}) *SolanaService_QueryTrackedLogs_Call { + return &SolanaService_QueryTrackedLogs_Call{Call: _e.mock.On("QueryTrackedLogs", ctx, filterQuery, limitAndSort)} +} + +func (_c *SolanaService_QueryTrackedLogs_Call) Run(run func(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort)) *SolanaService_QueryTrackedLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]query.Expression), args[2].(query.LimitAndSort)) + }) + return _c +} + +func (_c *SolanaService_QueryTrackedLogs_Call) Return(_a0 []*solana.Log, _a1 error) *SolanaService_QueryTrackedLogs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_QueryTrackedLogs_Call) RunAndReturn(run func(context.Context, []query.Expression, query.LimitAndSort) ([]*solana.Log, error)) *SolanaService_QueryTrackedLogs_Call { + _c.Call.Return(run) + return _c +} + +// RegisterLogTracking provides a mock function with given fields: ctx, req +func (_m *SolanaService) RegisterLogTracking(ctx context.Context, req solana.LPFilterQuery) error { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for RegisterLogTracking") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, solana.LPFilterQuery) error); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SolanaService_RegisterLogTracking_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterLogTracking' +type SolanaService_RegisterLogTracking_Call struct { + *mock.Call +} + +// RegisterLogTracking is a helper method to define mock.On call +// - ctx context.Context +// - req solana.LPFilterQuery +func (_e *SolanaService_Expecter) RegisterLogTracking(ctx interface{}, req interface{}) *SolanaService_RegisterLogTracking_Call { + return &SolanaService_RegisterLogTracking_Call{Call: _e.mock.On("RegisterLogTracking", ctx, req)} +} + +func (_c *SolanaService_RegisterLogTracking_Call) Run(run func(ctx context.Context, req solana.LPFilterQuery)) *SolanaService_RegisterLogTracking_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.LPFilterQuery)) + }) + return _c +} + +func (_c *SolanaService_RegisterLogTracking_Call) Return(_a0 error) *SolanaService_RegisterLogTracking_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *SolanaService_RegisterLogTracking_Call) RunAndReturn(run func(context.Context, solana.LPFilterQuery) error) *SolanaService_RegisterLogTracking_Call { + _c.Call.Return(run) + return _c +} + +// SimulateTX provides a mock function with given fields: ctx, req +func (_m *SolanaService) SimulateTX(ctx context.Context, req solana.SimulateTXRequest) (*solana.SimulateTXReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for SimulateTX") + } + + var r0 *solana.SimulateTXReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.SimulateTXRequest) (*solana.SimulateTXReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.SimulateTXRequest) *solana.SimulateTXReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.SimulateTXReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.SimulateTXRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_SimulateTX_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimulateTX' +type SolanaService_SimulateTX_Call struct { + *mock.Call +} + +// SimulateTX is a helper method to define mock.On call +// - ctx context.Context +// - req solana.SimulateTXRequest +func (_e *SolanaService_Expecter) SimulateTX(ctx interface{}, req interface{}) *SolanaService_SimulateTX_Call { + return &SolanaService_SimulateTX_Call{Call: _e.mock.On("SimulateTX", ctx, req)} +} + +func (_c *SolanaService_SimulateTX_Call) Run(run func(ctx context.Context, req solana.SimulateTXRequest)) *SolanaService_SimulateTX_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.SimulateTXRequest)) + }) + return _c +} + +func (_c *SolanaService_SimulateTX_Call) Return(_a0 *solana.SimulateTXReply, _a1 error) *SolanaService_SimulateTX_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_SimulateTX_Call) RunAndReturn(run func(context.Context, solana.SimulateTXRequest) (*solana.SimulateTXReply, error)) *SolanaService_SimulateTX_Call { + _c.Call.Return(run) + return _c +} + +// SubmitTransaction provides a mock function with given fields: ctx, req +func (_m *SolanaService) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for SubmitTransaction") + } + + var r0 *solana.SubmitTransactionReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.SubmitTransactionRequest) *solana.SubmitTransactionReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.SubmitTransactionReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.SubmitTransactionRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_SubmitTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitTransaction' +type SolanaService_SubmitTransaction_Call struct { + *mock.Call +} + +// SubmitTransaction is a helper method to define mock.On call +// - ctx context.Context +// - req solana.SubmitTransactionRequest +func (_e *SolanaService_Expecter) SubmitTransaction(ctx interface{}, req interface{}) *SolanaService_SubmitTransaction_Call { + return &SolanaService_SubmitTransaction_Call{Call: _e.mock.On("SubmitTransaction", ctx, req)} +} + +func (_c *SolanaService_SubmitTransaction_Call) Run(run func(ctx context.Context, req solana.SubmitTransactionRequest)) *SolanaService_SubmitTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.SubmitTransactionRequest)) + }) + return _c +} + +func (_c *SolanaService_SubmitTransaction_Call) Return(_a0 *solana.SubmitTransactionReply, _a1 error) *SolanaService_SubmitTransaction_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_SubmitTransaction_Call) RunAndReturn(run func(context.Context, solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error)) *SolanaService_SubmitTransaction_Call { + _c.Call.Return(run) + return _c +} + +// UnregisterLogTracking provides a mock function with given fields: ctx, filterName +func (_m *SolanaService) UnregisterLogTracking(ctx context.Context, filterName string) error { + ret := _m.Called(ctx, filterName) + + if len(ret) == 0 { + panic("no return value specified for UnregisterLogTracking") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, filterName) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SolanaService_UnregisterLogTracking_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnregisterLogTracking' +type SolanaService_UnregisterLogTracking_Call struct { + *mock.Call +} + +// UnregisterLogTracking is a helper method to define mock.On call +// - ctx context.Context +// - filterName string +func (_e *SolanaService_Expecter) UnregisterLogTracking(ctx interface{}, filterName interface{}) *SolanaService_UnregisterLogTracking_Call { + return &SolanaService_UnregisterLogTracking_Call{Call: _e.mock.On("UnregisterLogTracking", ctx, filterName)} +} + +func (_c *SolanaService_UnregisterLogTracking_Call) Run(run func(ctx context.Context, filterName string)) *SolanaService_UnregisterLogTracking_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *SolanaService_UnregisterLogTracking_Call) Return(_a0 error) *SolanaService_UnregisterLogTracking_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *SolanaService_UnregisterLogTracking_Call) RunAndReturn(run func(context.Context, string) error) *SolanaService_UnregisterLogTracking_Call { + _c.Call.Return(run) + return _c +} + +// NewSolanaService creates a new instance of SolanaService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSolanaService(t interface { + mock.TestingT + Cleanup(func()) +}) *SolanaService { + mock := &SolanaService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 7318f332469212f4a5a3160e7041b52eeedda072 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 07:16:13 -0500 Subject: [PATCH 09/21] adjust indexed value type --- pkg/chains/solana/proto_helpers.go | 12 ++---------- pkg/chains/solana/proto_helpers_test.go | 2 +- pkg/chains/solana/solana.pb.go | 6 +++--- pkg/chains/solana/solana.proto | 2 +- pkg/types/query/primitives/solana/solana.go | 2 +- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index d4ebe0cc92..071ecf2fdb 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -1524,12 +1524,8 @@ func ConvertValueComparatorsToProto(comparators []solprimitives.IndexedValueComp out := make([]*IndexedValueComparator, len(comparators)) for _, c := range comparators { - value := make([][]byte, 0, len(c.Value)) - for _, v := range c.Value { - value = append(value, v) - } out = append(out, &IndexedValueComparator{ - Value: value, + Value: c.Value, Operator: chaincommonpb.ComparisonOperator(c.Operator), }) } @@ -1544,12 +1540,8 @@ func ConvertValueCompraratorsFromProto(comparators []*IndexedValueComparator) [] out := make([]solprimitives.IndexedValueComparator, 0, len(comparators)) for _, c := range comparators { - value := make([]solana.IndexedValue, 0, len(c.Value)) - for _, v := range c.Value { - value = append(value, v) - } out = append(out, solprimitives.IndexedValueComparator{ - Value: value, + Value: c.Value, Operator: primitives.ComparisonOperator(c.Operator), }) } diff --git a/pkg/chains/solana/proto_helpers_test.go b/pkg/chains/solana/proto_helpers_test.go index 2462ab7d3c..0f8c4f4c33 100644 --- a/pkg/chains/solana/proto_helpers_test.go +++ b/pkg/chains/solana/proto_helpers_test.go @@ -288,7 +288,7 @@ func TestExpressions_Roundtrip_SolanaPrimitives(t *testing.T) { a := solprimitives.NewAddressFilter(addr) e := solprimitives.NewEventSigFilter(ev) evBy := solprimitives.NewEventBySubkeyFilter(1, []solprimitives.IndexedValueComparator{ - {Value: []typesolana.IndexedValue{[]byte("abc")}, Operator: 0}, + {Value: typesolana.IndexedValue{1, 2, 3}, Operator: 0}, }) root := query.Or(query.And(a, e), evBy) diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index fcf80d6bd9..863eea64b8 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -681,7 +681,7 @@ func (x *EventSig) GetHashedValueComparers() []*HashedValueComparator { type IndexedValueComparator struct { state protoimpl.MessageState `protogen:"open.v1"` - Value [][]byte `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -717,7 +717,7 @@ func (*IndexedValueComparator) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{7} } -func (x *IndexedValueComparator) GetValue() [][]byte { +func (x *IndexedValueComparator) GetValue() []byte { if x != nil { return x.Value } @@ -4160,7 +4160,7 @@ const file_solana_proto_rawDesc = "" + "\x05topic\x18\x01 \x01(\x04R\x05topic\x12X\n" + "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"q\n" + "\x16IndexedValueComparator\x12\x14\n" + - "\x05value\x18\x01 \x03(\fR\x05value\x12A\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + "\boperator\x18\x02 \x01(\x0e2%.loop.chain.common.ComparisonOperatorR\boperator\"\x80\x01\n" + "\rEventBySubkey\x12!\n" + "\fsubkey_index\x18\x01 \x01(\x04R\vsubkeyIndex\x12L\n" + diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 96bbddeeff..528fbcfb2d 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -103,7 +103,7 @@ message EventSig { } message IndexedValueComparator { - repeated bytes value = 1; + bytes value = 1; loop.chain.common.ComparisonOperator operator = 2; } diff --git a/pkg/types/query/primitives/solana/solana.go b/pkg/types/query/primitives/solana/solana.go index c23fab049c..56141ba8a0 100644 --- a/pkg/types/query/primitives/solana/solana.go +++ b/pkg/types/query/primitives/solana/solana.go @@ -52,7 +52,7 @@ type EventBySubkey struct { } type IndexedValueComparator struct { - Value []solana.IndexedValue + Value solana.IndexedValue Operator primitives.ComparisonOperator } From d80daabb6942a852a01ae2b522925431c7f2932b Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 08:10:09 -0500 Subject: [PATCH 10/21] add comments --- pkg/chains/solana/solana.pb.go | 762 ++++++++++++++---------------- pkg/chains/solana/solana.proto | 445 +++++++++-------- pkg/types/chains/solana/solana.go | 30 ++ 3 files changed, 622 insertions(+), 615 deletions(-) diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 863eea64b8..9f012dd6e6 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -23,12 +23,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Transaction execution status returned by submitters/simulations. type TransactionStatus int32 const ( - TransactionStatus_TX_FATAL TransactionStatus = 0 - TransactionStatus_TX_ABORTED TransactionStatus = 1 - TransactionStatus_TX_SUCCESS TransactionStatus = 2 + TransactionStatus_TX_FATAL TransactionStatus = 0 // unrecoverable failure + TransactionStatus_TX_ABORTED TransactionStatus = 1 // not executed / dropped + TransactionStatus_TX_SUCCESS TransactionStatus = 2 // executed successfully ) // Enum value maps for TransactionStatus. @@ -72,13 +73,14 @@ func (TransactionStatus) EnumDescriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{0} } +// Level of tx details in block response. type TransactionDetailsType int32 const ( - TransactionDetailsType_TRANSACTION_DETAILS_FULL TransactionDetailsType = 0 - TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES TransactionDetailsType = 1 - TransactionDetailsType_TRANSACTION_DETAILS_NONE TransactionDetailsType = 2 - TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS TransactionDetailsType = 3 + TransactionDetailsType_TRANSACTION_DETAILS_FULL TransactionDetailsType = 0 // tx + meta + TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES TransactionDetailsType = 1 // signatures only + TransactionDetailsType_TRANSACTION_DETAILS_NONE TransactionDetailsType = 2 // no txs + TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS TransactionDetailsType = 3 // account keys only ) // Enum value maps for TransactionDetailsType. @@ -124,20 +126,16 @@ func (TransactionDetailsType) EnumDescriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{1} } +// Account/tx data encodings. type EncodingType int32 const ( - EncodingType_ENCODING_NONE EncodingType = 0 - EncodingType_ENCODING_BASE58 EncodingType = 1 // limited to Account data of less than 129 bytes - EncodingType_ENCODING_BASE64 EncodingType = 2 // will return base64 encoded data for Account data of any size - EncodingType_ENCODING_BASE64_ZST EncodingType = 3 // compresses the Account data using Zstandard and base64-encodes the result - // attempts to use program-specific state parsers to - // return more human-readable and explicit account state data. - // If "jsonParsed" is requested but a parser cannot be found, - // the field falls back to "base64" encoding, detectable when the data field is type . - // Cannot be used if specifying dataSlice parameters (offset, length). - EncodingType_ENCODING_JSON_PARSED EncodingType = 4 - EncodingType_ENCODING_JSON EncodingType = 5 // NOTE: you're probably looking for EncodingJSONParsed + EncodingType_ENCODING_NONE EncodingType = 0 + EncodingType_ENCODING_BASE58 EncodingType = 1 // for data <129 bytes + EncodingType_ENCODING_BASE64 EncodingType = 2 // any size + EncodingType_ENCODING_BASE64_ZST EncodingType = 3 // zstd-compressed, base64-wrapped + EncodingType_ENCODING_JSON_PARSED EncodingType = 4 // program parsers; fallback to base64 if unknown + EncodingType_ENCODING_JSON EncodingType = 5 // raw JSON (rare; prefer JSON_PARSED) ) // Enum value maps for EncodingType. @@ -187,13 +185,14 @@ func (EncodingType) EnumDescriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{2} } +// Read consistency of queried state. type CommitmentType int32 const ( CommitmentType_COMMITMENT_NONE CommitmentType = 0 - CommitmentType_COMMITMENT_FINALIZED CommitmentType = 1 - CommitmentType_COMMITMENT_CONFIRMED CommitmentType = 2 - CommitmentType_COMMITMENT_PROCESSED CommitmentType = 3 + CommitmentType_COMMITMENT_FINALIZED CommitmentType = 1 // cluster-finalized + CommitmentType_COMMITMENT_CONFIRMED CommitmentType = 2 // voted by supermajority + CommitmentType_COMMITMENT_PROCESSED CommitmentType = 3 // node’s latest ) // Enum value maps for CommitmentType. @@ -239,6 +238,7 @@ func (CommitmentType) EnumDescriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{3} } +// Cluster confirmation status of a tx/signature. type ConfirmationStatusType int32 const ( @@ -291,14 +291,15 @@ func (ConfirmationStatusType) EnumDescriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{4} } +// On-chain account state. type Account struct { state protoimpl.MessageState `protogen:"open.v1"` - Lamports uint64 `protobuf:"varint,1,opt,name=lamports,proto3" json:"lamports,omitempty"` - Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Data *DataBytesOrJSON `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"` - RentEpoch *pb.BigInt `protobuf:"bytes,5,opt,name=rent_epoch,json=rentEpoch,proto3" json:"rent_epoch,omitempty"` - Space uint64 `protobuf:"varint,6,opt,name=space,proto3" json:"space,omitempty"` + Lamports uint64 `protobuf:"varint,1,opt,name=lamports,proto3" json:"lamports,omitempty"` // balance in lamports (1e-9 SOL) + Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // 32-byte program id (Pubkey) + Data *DataBytesOrJSON `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // account data (encoded or JSON) + Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"` // true if this is a program account + RentEpoch *pb.BigInt `protobuf:"bytes,5,opt,name=rent_epoch,json=rentEpoch,proto3" json:"rent_epoch,omitempty"` // next rent epoch + Space uint64 `protobuf:"varint,6,opt,name=space,proto3" json:"space,omitempty"` // data length in bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -375,9 +376,10 @@ func (x *Account) GetSpace() uint64 { return 0 } +// 32-byte address (Pubkey). type Address struct { state protoimpl.MessageState `protogen:"open.v1"` - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32 bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -419,10 +421,11 @@ func (x *Address) GetAddress() []byte { return nil } +// Compute budget configuration when submitting txs. type ComputeConfig struct { state protoimpl.MessageState `protogen:"open.v1"` - ComputeLimit uint32 `protobuf:"varint,1,opt,name=compute_limit,json=computeLimit,proto3" json:"compute_limit,omitempty"` - ComputeMaxPrice uint64 `protobuf:"varint,2,opt,name=compute_max_price,json=computeMaxPrice,proto3" json:"compute_max_price,omitempty"` + ComputeLimit uint32 `protobuf:"varint,1,opt,name=compute_limit,json=computeLimit,proto3" json:"compute_limit,omitempty"` // max CUs (approx per-tx limit) + ComputeMaxPrice uint64 `protobuf:"varint,2,opt,name=compute_max_price,json=computeMaxPrice,proto3" json:"compute_max_price,omitempty"` // max lamports per CU unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -471,6 +474,7 @@ func (x *ComputeConfig) GetComputeMaxPrice() uint64 { return 0 } +// RPC context (slot at which state was read). type Context struct { state protoimpl.MessageState `protogen:"open.v1"` Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` @@ -515,11 +519,12 @@ func (x *Context) GetSlot() uint64 { return 0 } +// Raw bytes vs parsed JSON (as returned by RPC). type DataBytesOrJSON struct { state protoimpl.MessageState `protogen:"open.v1"` - RawDataEncoding EncodingType `protobuf:"varint,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3,enum=loop.solana.EncodingType" json:"raw_data_encoding,omitempty"` - AsDecodedBinary []byte `protobuf:"bytes,2,opt,name=as_decoded_binary,json=asDecodedBinary,proto3" json:"as_decoded_binary,omitempty"` - AsJson []byte `protobuf:"bytes,3,opt,name=as_json,json=asJson,proto3" json:"as_json,omitempty"` + RawDataEncoding EncodingType `protobuf:"varint,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3,enum=loop.solana.EncodingType" json:"raw_data_encoding,omitempty"` // encoding of payload + AsDecodedBinary []byte `protobuf:"bytes,2,opt,name=as_decoded_binary,json=asDecodedBinary,proto3" json:"as_decoded_binary,omitempty"` // if binary encoding + AsJson []byte `protobuf:"bytes,3,opt,name=as_json,json=asJson,proto3" json:"as_json,omitempty"` // if JSON/JSON_PARSED unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -575,10 +580,11 @@ func (x *DataBytesOrJSON) GetAsJson() []byte { return nil } +// Return a slice of account data. type DataSlice struct { state protoimpl.MessageState `protogen:"open.v1"` - Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` - Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // start byte + Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` // number of bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -627,10 +633,11 @@ func (x *DataSlice) GetLength() uint64 { return 0 } +// Event/topic filter by hashed value(s). type EventSig struct { state protoimpl.MessageState `protogen:"open.v1"` - Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` - HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` + Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` // topic index + HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` // comparisons unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -679,10 +686,11 @@ func (x *EventSig) GetHashedValueComparers() []*HashedValueComparator { return nil } +// Comparator for a single indexed value. type IndexedValueComparator struct { state protoimpl.MessageState `protogen:"open.v1"` - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // raw bytes + Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` // eq/lt/gt etc. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -731,9 +739,10 @@ func (x *IndexedValueComparator) GetOperator() chain_common.ComparisonOperator { return chain_common.ComparisonOperator(0) } +// Filter events by a subkey path. type EventBySubkey struct { state protoimpl.MessageState `protogen:"open.v1"` - SubkeyIndex uint64 `protobuf:"varint,1,opt,name=subkey_index,json=subkeyIndex,proto3" json:"subkey_index,omitempty"` + SubkeyIndex uint64 `protobuf:"varint,1,opt,name=subkey_index,json=subkeyIndex,proto3" json:"subkey_index,omitempty"` // path element index ValueComparers []*IndexedValueComparator `protobuf:"bytes,2,rep,name=value_comparers,json=valueComparers,proto3" json:"value_comparers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -783,6 +792,7 @@ func (x *EventBySubkey) GetValueComparers() []*IndexedValueComparator { return nil } +// Expression tree wrapper. type Expression struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Evaluator: @@ -854,20 +864,21 @@ type isExpression_Evaluator interface { } type Expression_Primitive struct { - Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3,oneof"` + Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3,oneof"` // leaf filter } type Expression_BooleanExpression struct { - BooleanExpression *BooleanExpression `protobuf:"bytes,2,opt,name=boolean_expression,json=booleanExpression,proto3,oneof"` + BooleanExpression *BooleanExpression `protobuf:"bytes,2,opt,name=boolean_expression,json=booleanExpression,proto3,oneof"` // AND/OR of expressions } func (*Expression_Primitive) isExpression_Evaluator() {} func (*Expression_BooleanExpression) isExpression_Evaluator() {} +// Boolean composition over expressions. type BooleanExpression struct { state protoimpl.MessageState `protogen:"open.v1"` - BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` + BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` // AND/OR Expression []*Expression `protobuf:"bytes,2,rep,name=expression,proto3" json:"expression,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -917,12 +928,13 @@ func (x *BooleanExpression) GetExpression() []*Expression { return nil } +// Options for GetAccountInfo. type GetAccountInfoOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` - DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` - MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // data encoding + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` // optional slice window + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` // lower bound slot unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -985,10 +997,11 @@ func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { return 0 } +// Reply for GetAccountInfoWithOpts. type GetAccountInfoWithOptsReply struct { state protoimpl.MessageState `protogen:"open.v1"` - RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` - Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` // read slot + Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // account (may be empty) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1037,9 +1050,10 @@ func (x *GetAccountInfoWithOptsReply) GetValue() *Account { return nil } +// Request for GetAccountInfoWithOpts. type GetAccountInfoWithOptsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 32-byte Pubkey Opts *GetAccountInfoOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1089,9 +1103,10 @@ func (x *GetAccountInfoWithOptsRequest) GetOpts() *GetAccountInfoOpts { return nil } +// Reply for GetBalance. type GetBalanceReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // lamports unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1133,10 +1148,11 @@ func (x *GetBalanceReply) GetValue() uint64 { return 0 } +// Request for GetBalance. type GetBalanceRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // 32-byte Pubkey + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1185,13 +1201,14 @@ func (x *GetBalanceRequest) GetCommitment() CommitmentType { return CommitmentType_COMMITMENT_NONE } +// Options for GetBlock. type GetBlockOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` - TransactionDetails TransactionDetailsType `protobuf:"varint,2,opt,name=transaction_details,json=transactionDetails,proto3,enum=loop.solana.TransactionDetailsType" json:"transaction_details,omitempty"` - Rewards bool `protobuf:"varint,3,opt,name=rewards,proto3" json:"rewards,omitempty"` - Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` - MaxSupportedTransactionVersion uint64 `protobuf:"varint,5,opt,name=max_supported_transaction_version,json=maxSupportedTransactionVersion,proto3" json:"max_supported_transaction_version,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // tx encoding + TransactionDetails TransactionDetailsType `protobuf:"varint,2,opt,name=transaction_details,json=transactionDetails,proto3,enum=loop.solana.TransactionDetailsType" json:"transaction_details,omitempty"` // tx detail level + Rewards bool `protobuf:"varint,3,opt,name=rewards,proto3" json:"rewards,omitempty"` // include rewards + Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + MaxSupportedTransactionVersion uint64 `protobuf:"varint,5,opt,name=max_supported_transaction_version,json=maxSupportedTransactionVersion,proto3" json:"max_supported_transaction_version,omitempty"` // fail if higher present unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1261,15 +1278,16 @@ func (x *GetBlockOpts) GetMaxSupportedTransactionVersion() uint64 { return 0 } +// Block response. type GetBlockReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` - PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` + Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` // 32-byte block hash + PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` // 32-byte parent hash ParentSlot uint64 `protobuf:"varint,3,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` - Transactions []*TransactionWithMeta `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty"` - Signatures [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` - BlockTime int64 `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Transactions []*TransactionWithMeta `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty"` // present if FULL + Signatures [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` // present if SIGNATURES + BlockTime int64 `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds + BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // chain height unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1353,9 +1371,10 @@ func (x *GetBlockReply) GetBlockHeight() uint64 { return 0 } +// Request for GetBlock. type GetBlockRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // target slot Opts *GetBlockOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1405,9 +1424,10 @@ func (x *GetBlockRequest) GetOpts() *GetBlockOpts { return nil } +// Fee quote for a base58-encoded Message. type GetFeeForMessageReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Fee uint64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` + Fee uint64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` // lamports unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1451,8 +1471,8 @@ func (x *GetFeeForMessageReply) GetFee() uint64 { type GetFeeForMessageRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // base58-encoded Message + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1501,6 +1521,7 @@ func (x *GetFeeForMessageRequest) GetCommitment() CommitmentType { return CommitmentType_COMMITMENT_NONE } +// Options for GetMultipleAccounts. type GetMultipleAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` @@ -1569,10 +1590,11 @@ func (x *GetMultipleAccountsOpts) GetMinContextSlot() uint64 { return 0 } +// Reply for GetMultipleAccountsWithOpts. type GetMultipleAccountsWithOptsReply struct { state protoimpl.MessageState `protogen:"open.v1"` - RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` - Value []*Account `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` + RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` // read slot + Value []*Account `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // accounts (nil entries allowed) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1621,9 +1643,10 @@ func (x *GetMultipleAccountsWithOptsReply) GetValue() []*Account { return nil } +// Request for GetMultipleAccountsWithOpts. type GetMultipleAccountsWithOptsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // list of 32-byte Pubkeys Opts *GetMultipleAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1673,9 +1696,10 @@ func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts return nil } +// Reply for GetSignatureStatuses. type GetSignatureStatusesReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Results []*GetSignatureStatusesResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Results []*GetSignatureStatusesResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // 1:1 with input unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1717,9 +1741,10 @@ func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { return nil } +// Request for GetSignatureStatuses. type GetSignatureStatusesRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` + Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` // 64-byte signatures unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1761,11 +1786,12 @@ func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { return nil } +// Per-signature status. type GetSignatureStatusesResult struct { state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"` - Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot + Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"` // null->0 here + Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` // error JSON string (empty on success) ConfirmationStatus ConfirmationStatusType `protobuf:"varint,4,opt,name=confirmation_status,json=confirmationStatus,proto3,enum=loop.solana.ConfirmationStatusType" json:"confirmation_status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1829,6 +1855,7 @@ func (x *GetSignatureStatusesResult) GetConfirmationStatus() ConfirmationStatusT return ConfirmationStatusType_CONFIRMATION_NONE } +// Current “height” (blocks below latest). type GetSlotHeightReply struct { state protoimpl.MessageState `protogen:"open.v1"` Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` @@ -1875,7 +1902,7 @@ func (x *GetSlotHeightReply) GetHeight() uint64 { type GetSlotHeightRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Commitment CommitmentType `protobuf:"varint,1,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + Commitment CommitmentType `protobuf:"varint,1,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1917,11 +1944,12 @@ func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { return CommitmentType_COMMITMENT_NONE } +// Message header counts. type MessageHeader struct { state protoimpl.MessageState `protogen:"open.v1"` - NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` - NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` - NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` + NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` // signer count + NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` // trailing signed RO + NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` // trailing unsigned RO unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1977,10 +2005,11 @@ func (x *MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 { return 0 } +// Parsed message (no address tables). type ParsedMessage struct { state protoimpl.MessageState `protogen:"open.v1"` - RecentBlockhash []byte `protobuf:"bytes,1,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` // 32 bytes solana Hash - AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` // list of 32 bytes account keys + RecentBlockhash []byte `protobuf:"bytes,1,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` // 32-byte Hash + AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` // list of 32-byte Pubkeys Header *MessageHeader `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` Instructions []*CompiledInstruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` unknownFields protoimpl.UnknownFields @@ -2045,9 +2074,10 @@ func (x *ParsedMessage) GetInstructions() []*CompiledInstruction { return nil } +// Parsed transaction (signatures + message). type ParsedTransaction struct { state protoimpl.MessageState `protogen:"open.v1"` - Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` // 64 bytes solana Signature each + Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` // 64-byte signatures Message *ParsedMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2097,11 +2127,12 @@ func (x *ParsedTransaction) GetMessage() *ParsedMessage { return nil } +// Token amount (UI-friendly). type UiTokenAmount struct { state protoimpl.MessageState `protogen:"open.v1"` - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // raw integer as string - Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` - UiAmountString string `protobuf:"bytes,4,opt,name=ui_amount_string,json=uiAmountString,proto3" json:"ui_amount_string,omitempty"` + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // raw integer string + Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` // mint decimals + UiAmountString string `protobuf:"bytes,4,opt,name=ui_amount_string,json=uiAmountString,proto3" json:"ui_amount_string,omitempty"` // amount / 10^decimals unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2157,13 +2188,14 @@ func (x *UiTokenAmount) GetUiAmountString() string { return "" } +// SPL token balance entry. type TokenBalance struct { state protoimpl.MessageState `protogen:"open.v1"` - AccountIndex uint32 `protobuf:"varint,1,opt,name=account_index,json=accountIndex,proto3" json:"account_index,omitempty"` - Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // 32 bytes solana PublicKey - ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32 bytes solana PublicKey - Mint []byte `protobuf:"bytes,4,opt,name=mint,proto3" json:"mint,omitempty"` // 32 bytes solana PublicKey - Ui *UiTokenAmount `protobuf:"bytes,5,opt,name=ui,proto3" json:"ui,omitempty"` + AccountIndex uint32 `protobuf:"varint,1,opt,name=account_index,json=accountIndex,proto3" json:"account_index,omitempty"` // index in account_keys + Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // 32-byte owner (optional) + ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32-byte token program (optional) + Mint []byte `protobuf:"bytes,4,opt,name=mint,proto3" json:"mint,omitempty"` // 32-byte mint + Ui *UiTokenAmount `protobuf:"bytes,5,opt,name=ui,proto3" json:"ui,omitempty"` // formatted amounts unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2233,10 +2265,11 @@ func (x *TokenBalance) GetUi() *UiTokenAmount { return nil } +// Inner instruction list at a given outer instruction index. type InnerInstruction struct { state protoimpl.MessageState `protogen:"open.v1"` - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Instructions []*CompiledInstruction `protobuf:"bytes,2,rep,name=instructions,proto3" json:"instructions,omitempty"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // outer ix index + Instructions []*CompiledInstruction `protobuf:"bytes,2,rep,name=instructions,proto3" json:"instructions,omitempty"` // invoked ixs unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2285,10 +2318,11 @@ func (x *InnerInstruction) GetInstructions() []*CompiledInstruction { return nil } +// Address table lookups expanded by loader. type LoadedAddresses struct { state protoimpl.MessageState `protogen:"open.v1"` - Readonly [][]byte `protobuf:"bytes,1,rep,name=readonly,proto3" json:"readonly,omitempty"` // 32 bytes solana PublicKey - Writable [][]byte `protobuf:"bytes,2,rep,name=writable,proto3" json:"writable,omitempty"` // 32 bytes solana PublicKey + Readonly [][]byte `protobuf:"bytes,1,rep,name=readonly,proto3" json:"readonly,omitempty"` // 32-byte Pubkeys + Writable [][]byte `protobuf:"bytes,2,rep,name=writable,proto3" json:"writable,omitempty"` // 32-byte Pubkeys unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2337,12 +2371,13 @@ func (x *LoadedAddresses) GetWritable() [][]byte { return nil } +// Compiled (program) instruction. type CompiledInstruction struct { state protoimpl.MessageState `protogen:"open.v1"` - ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"` - Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - StackHeight uint32 `protobuf:"varint,4,opt,name=stack_height,json=stackHeight,proto3" json:"stack_height,omitempty"` + ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"` // index into account_keys + Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` // indices into account_keys + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // program input bytes + StackHeight uint32 `protobuf:"varint,4,opt,name=stack_height,json=stackHeight,proto3" json:"stack_height,omitempty"` // if recorded by node unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2405,10 +2440,11 @@ func (x *CompiledInstruction) GetStackHeight() uint32 { return 0 } +// Raw bytes with encoding tag. type Data struct { state protoimpl.MessageState `protogen:"open.v1"` - Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - Encoding EncodingType `protobuf:"varint,2,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // raw bytes + Encoding EncodingType `protobuf:"varint,2,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // how it was encoded originally unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2457,10 +2493,11 @@ func (x *Data) GetEncoding() EncodingType { return EncodingType_ENCODING_NONE } +// Program return data. type ReturnData struct { state protoimpl.MessageState `protogen:"open.v1"` - ProgramId []byte `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32 bytes solana publicKey - Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw program return bytes + ProgramId []byte `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32-byte Pubkey + Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw return bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2509,19 +2546,20 @@ func (x *ReturnData) GetData() *Data { return nil } +// Transaction execution metadata. type TransactionMeta struct { state protoimpl.MessageState `protogen:"open.v1"` - ErrJson string `protobuf:"bytes,1,opt,name=err_json,json=errJson,proto3" json:"err_json,omitempty"` - Fee uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` - PreBalances []uint64 `protobuf:"varint,3,rep,packed,name=pre_balances,json=preBalances,proto3" json:"pre_balances,omitempty"` - PostBalances []uint64 `protobuf:"varint,4,rep,packed,name=post_balances,json=postBalances,proto3" json:"post_balances,omitempty"` - LogMessages []string `protobuf:"bytes,5,rep,name=log_messages,json=logMessages,proto3" json:"log_messages,omitempty"` + ErrJson string `protobuf:"bytes,1,opt,name=err_json,json=errJson,proto3" json:"err_json,omitempty"` // error JSON (empty on success) + Fee uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` // lamports + PreBalances []uint64 `protobuf:"varint,3,rep,packed,name=pre_balances,json=preBalances,proto3" json:"pre_balances,omitempty"` // lamports per account + PostBalances []uint64 `protobuf:"varint,4,rep,packed,name=post_balances,json=postBalances,proto3" json:"post_balances,omitempty"` // lamports per account + LogMessages []string `protobuf:"bytes,5,rep,name=log_messages,json=logMessages,proto3" json:"log_messages,omitempty"` // runtime logs PreTokenBalances []*TokenBalance `protobuf:"bytes,6,rep,name=pre_token_balances,json=preTokenBalances,proto3" json:"pre_token_balances,omitempty"` PostTokenBalances []*TokenBalance `protobuf:"bytes,7,rep,name=post_token_balances,json=postTokenBalances,proto3" json:"post_token_balances,omitempty"` InnerInstructions []*InnerInstruction `protobuf:"bytes,8,rep,name=inner_instructions,json=innerInstructions,proto3" json:"inner_instructions,omitempty"` LoadedAddresses *LoadedAddresses `protobuf:"bytes,9,opt,name=loaded_addresses,json=loadedAddresses,proto3" json:"loaded_addresses,omitempty"` ReturnData *ReturnData `protobuf:"bytes,10,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"` - ComputeUnitsConsumed uint64 `protobuf:"varint,11,opt,name=compute_units_consumed,json=computeUnitsConsumed,proto3" json:"compute_units_consumed,omitempty"` + ComputeUnitsConsumed uint64 `protobuf:"varint,11,opt,name=compute_units_consumed,json=computeUnitsConsumed,proto3" json:"compute_units_consumed,omitempty"` // CUs unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2633,10 +2671,9 @@ func (x *TransactionMeta) GetComputeUnitsConsumed() uint64 { return 0 } +// Transaction envelope: raw bytes or parsed struct. type TransactionEnvelope struct { state protoimpl.MessageState `protogen:"open.v1"` - // - For RAW encoding, "transaction" contains tx bytes; for PARSED, structured fields. - // // Types that are valid to be assigned to Transaction: // // *TransactionEnvelope_Raw @@ -2706,23 +2743,24 @@ type isTransactionEnvelope_Transaction interface { } type TransactionEnvelope_Raw struct { - Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` + Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` // raw tx bytes (for RAW/base64) } type TransactionEnvelope_Parsed struct { - Parsed *ParsedTransaction `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` + Parsed *ParsedTransaction `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` // parsed tx (for JSON_PARSED) } func (*TransactionEnvelope_Raw) isTransactionEnvelope_Transaction() {} func (*TransactionEnvelope_Parsed) isTransactionEnvelope_Transaction() {} +// GetTransaction reply. type GetTransactionReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - Transaction *TransactionEnvelope `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` - Meta *TransactionMeta `protobuf:"bytes,12,opt,name=meta,proto3" json:"meta,omitempty"` // - "meta" may be omitted by the node/config. + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds + Transaction *TransactionEnvelope `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` // tx bytes or parsed + Meta *TransactionMeta `protobuf:"bytes,12,opt,name=meta,proto3" json:"meta,omitempty"` // may be omitted by node unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2785,9 +2823,10 @@ func (x *GetTransactionReply) GetMeta() *TransactionMeta { return nil } +// GetTransaction request. type GetTransactionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64 bytes signature + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2829,10 +2868,11 @@ func (x *GetTransactionRequest) GetSignature() []byte { return nil } +// Comparator against hashed values. type HashedValueComparator struct { state protoimpl.MessageState `protogen:"open.v1"` - Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - Operator int64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` + Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // hashed bytes + Operator int64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` // comparison op unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2881,9 +2921,10 @@ func (x *HashedValueComparator) GetOperator() int64 { return 0 } +// Subkey path elements. type Subkeys struct { state protoimpl.MessageState `protogen:"open.v1"` - Subkeys []string `protobuf:"bytes,1,rep,name=subkeys,proto3" json:"subkeys,omitempty"` + Subkeys []string `protobuf:"bytes,1,rep,name=subkeys,proto3" json:"subkeys,omitempty"` // e.g., ["events","0","fields","owner"] unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2925,18 +2966,19 @@ func (x *Subkeys) GetSubkeys() []string { return nil } +// Log-poller filter config (Solana flavor). type LPFilterQuery struct { state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - EventName string `protobuf:"bytes,3,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` - EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` - StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` - EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` - SubkeyPaths []*Subkeys `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` - Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` - MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` - IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // filter name/id + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id + EventName string `protobuf:"bytes,3,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` // optional label + EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte event discriminator + StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` // start slot + EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` // IDL JSON bytes + SubkeyPaths []*Subkeys `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` // subkey selectors + Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` // seconds to keep logs + MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // 0 = unlimited + IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` // include rolled-back unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3041,130 +3083,27 @@ func (x *LPFilterQuery) GetIncludeReverted() bool { return false } -type Limit struct { - state protoimpl.MessageState `protogen:"open.v1"` - Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` - CursorDirection int32 `protobuf:"varint,2,opt,name=cursor_direction,json=cursorDirection,proto3" json:"cursor_direction,omitempty"` - Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Limit) Reset() { - *x = Limit{} - mi := &file_solana_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Limit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Limit) ProtoMessage() {} - -func (x *Limit) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[46] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Limit.ProtoReflect.Descriptor instead. -func (*Limit) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{46} -} - -func (x *Limit) GetCursor() string { - if x != nil { - return x.Cursor - } - return "" -} - -func (x *Limit) GetCursorDirection() int32 { - if x != nil { - return x.CursorDirection - } - return 0 -} - -func (x *Limit) GetCount() uint64 { - if x != nil { - return x.Count - } - return 0 -} - -type LimitAndSort struct { - state protoimpl.MessageState `protogen:"open.v1"` - Limit *Limit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LimitAndSort) Reset() { - *x = LimitAndSort{} - mi := &file_solana_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LimitAndSort) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LimitAndSort) ProtoMessage() {} - -func (x *LimitAndSort) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[47] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LimitAndSort.ProtoReflect.Descriptor instead. -func (*LimitAndSort) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{47} -} - -func (x *LimitAndSort) GetLimit() *Limit { - if x != nil { - return x.Limit - } - return nil -} - +// Canonical log shape for tracked events. type Log struct { state protoimpl.MessageState `protogen:"open.v1"` - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BlockTimestamp uint64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` - Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` - EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` - TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` - SequenceNum int64 `protobuf:"varint,10,opt,name=sequence_num,json=sequenceNum,proto3" json:"sequence_num,omitempty"` - Error string `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // e.g., "solana-mainnet" + LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // per-block index + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // 32-byte + BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // slot + BlockTimestamp uint64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // unix seconds + Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id + EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte discriminator + TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // 64-byte signature + Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` // raw event bytes + SequenceNum int64 `protobuf:"varint,10,opt,name=sequence_num,json=sequenceNum,proto3" json:"sequence_num,omitempty"` // monotonic seq + Error string `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` // decode/processing error unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Log) Reset() { *x = Log{} - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3176,7 +3115,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3189,7 +3128,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{48} + return file_solana_proto_rawDescGZIP(), []int{46} } func (x *Log) GetChainId() string { @@ -3269,6 +3208,7 @@ func (x *Log) GetError() string { return "" } +// RPC read context. type RPCContext struct { state protoimpl.MessageState `protogen:"open.v1"` Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` @@ -3278,7 +3218,7 @@ type RPCContext struct { func (x *RPCContext) Reset() { *x = RPCContext{} - mi := &file_solana_proto_msgTypes[49] + mi := &file_solana_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3290,7 +3230,7 @@ func (x *RPCContext) String() string { func (*RPCContext) ProtoMessage() {} func (x *RPCContext) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[49] + mi := &file_solana_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3303,7 +3243,7 @@ func (x *RPCContext) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. func (*RPCContext) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{49} + return file_solana_proto_rawDescGZIP(), []int{47} } func (x *RPCContext) GetContext() *Context { @@ -3313,19 +3253,20 @@ func (x *RPCContext) GetContext() *Context { return nil } +// Simulation options. type SimulateTXOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` - ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` - Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` + SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` // verify sigs + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` // refresh blockhash + Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` // return accounts unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SimulateTXOpts) Reset() { *x = SimulateTXOpts{} - mi := &file_solana_proto_msgTypes[50] + mi := &file_solana_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3337,7 +3278,7 @@ func (x *SimulateTXOpts) String() string { func (*SimulateTXOpts) ProtoMessage() {} func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[50] + mi := &file_solana_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3350,7 +3291,7 @@ func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. func (*SimulateTXOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{50} + return file_solana_proto_rawDescGZIP(), []int{48} } func (x *SimulateTXOpts) GetSigVerify() bool { @@ -3381,19 +3322,20 @@ func (x *SimulateTXOpts) GetAccounts() *SimulateTransactionAccountsOpts { return nil } +// Simulation result. type SimulateTXReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` - Accounts []*Account `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` - UnitsConsumed uint64 `protobuf:"varint,4,opt,name=units_consumed,json=unitsConsumed,proto3" json:"units_consumed,omitempty"` + Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // empty on success + Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` // runtime logs + Accounts []*Account `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` // returned accounts + UnitsConsumed uint64 `protobuf:"varint,4,opt,name=units_consumed,json=unitsConsumed,proto3" json:"units_consumed,omitempty"` // CUs unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SimulateTXReply) Reset() { *x = SimulateTXReply{} - mi := &file_solana_proto_msgTypes[51] + mi := &file_solana_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3405,7 +3347,7 @@ func (x *SimulateTXReply) String() string { func (*SimulateTXReply) ProtoMessage() {} func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[51] + mi := &file_solana_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3418,7 +3360,7 @@ func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. func (*SimulateTXReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{51} + return file_solana_proto_rawDescGZIP(), []int{49} } func (x *SimulateTXReply) GetErr() string { @@ -3449,10 +3391,11 @@ func (x *SimulateTXReply) GetUnitsConsumed() uint64 { return 0 } +// Simulation request. type SimulateTXRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` - EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` + Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) + EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx Opts *SimulateTXOpts `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3460,7 +3403,7 @@ type SimulateTXRequest struct { func (x *SimulateTXRequest) Reset() { *x = SimulateTXRequest{} - mi := &file_solana_proto_msgTypes[52] + mi := &file_solana_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3472,7 +3415,7 @@ func (x *SimulateTXRequest) String() string { func (*SimulateTXRequest) ProtoMessage() {} func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[52] + mi := &file_solana_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3485,7 +3428,7 @@ func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. func (*SimulateTXRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{52} + return file_solana_proto_rawDescGZIP(), []int{50} } func (x *SimulateTXRequest) GetReceiver() []byte { @@ -3509,17 +3452,18 @@ func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { return nil } +// Accounts to return during simulation. type SimulateTransactionAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` - Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // account data encoding + Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` // 32-byte Pubkeys unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SimulateTransactionAccountsOpts) Reset() { *x = SimulateTransactionAccountsOpts{} - mi := &file_solana_proto_msgTypes[53] + mi := &file_solana_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3531,7 +3475,7 @@ func (x *SimulateTransactionAccountsOpts) String() string { func (*SimulateTransactionAccountsOpts) ProtoMessage() {} func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[53] + mi := &file_solana_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3544,7 +3488,7 @@ func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{53} + return file_solana_proto_rawDescGZIP(), []int{51} } func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { @@ -3561,10 +3505,11 @@ func (x *SimulateTransactionAccountsOpts) GetAddresses() [][]byte { return nil } +// Submit transaction result. type SubmitTransactionReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` - IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature + IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // echo key Status TransactionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=loop.solana.TransactionStatus" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3572,7 +3517,7 @@ type SubmitTransactionReply struct { func (x *SubmitTransactionReply) Reset() { *x = SubmitTransactionReply{} - mi := &file_solana_proto_msgTypes[54] + mi := &file_solana_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3584,7 +3529,7 @@ func (x *SubmitTransactionReply) String() string { func (*SubmitTransactionReply) ProtoMessage() {} func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[54] + mi := &file_solana_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3597,7 +3542,7 @@ func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{54} + return file_solana_proto_rawDescGZIP(), []int{52} } func (x *SubmitTransactionReply) GetSignature() []byte { @@ -3621,18 +3566,19 @@ func (x *SubmitTransactionReply) GetStatus() TransactionStatus { return TransactionStatus_TX_FATAL } +// Submit transaction request. type SubmitTransactionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Cfg *ComputeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"` - Receiver []byte `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - EncodedTransaction string `protobuf:"bytes,3,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` + Cfg *ComputeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"` // compute budget + Receiver []byte `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) + EncodedTransaction string `protobuf:"bytes,3,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SubmitTransactionRequest) Reset() { *x = SubmitTransactionRequest{} - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3644,7 +3590,7 @@ func (x *SubmitTransactionRequest) String() string { func (*SubmitTransactionRequest) ProtoMessage() {} func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3657,7 +3603,7 @@ func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{55} + return file_solana_proto_rawDescGZIP(), []int{53} } func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { @@ -3681,20 +3627,21 @@ func (x *SubmitTransactionRequest) GetEncodedTransaction() string { return "" } +// Block transaction with meta. type TransactionWithMeta struct { state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - Transaction *DataBytesOrJSON `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` - Meta *TransactionMeta `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` - Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds + Transaction *DataBytesOrJSON `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` // tx (encoding per opts) + Meta *TransactionMeta `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` // execution metadata + Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` // -1 legacy, >=0 v0+ unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TransactionWithMeta) Reset() { *x = TransactionWithMeta{} - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3706,7 +3653,7 @@ func (x *TransactionWithMeta) String() string { func (*TransactionWithMeta) ProtoMessage() {} func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3719,7 +3666,7 @@ func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionWithMeta.ProtoReflect.Descriptor instead. func (*TransactionWithMeta) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{56} + return file_solana_proto_rawDescGZIP(), []int{54} } func (x *TransactionWithMeta) GetSlot() uint64 { @@ -3757,6 +3704,7 @@ func (x *TransactionWithMeta) GetVersion() int64 { return 0 } +// Primitive leaf for expressions/filters. type Primitive struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Primitive: @@ -3772,7 +3720,7 @@ type Primitive struct { func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3784,7 +3732,7 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3797,7 +3745,7 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{57} + return file_solana_proto_rawDescGZIP(), []int{55} } func (x *Primitive) GetPrimitive() isPrimitive_Primitive { @@ -3848,19 +3796,19 @@ type isPrimitive_Primitive interface { } type Primitive_GeneralPrimitive struct { - GeneralPrimitive *chain_common.Primitive `protobuf:"bytes,1,opt,name=general_primitive,json=generalPrimitive,proto3,oneof"` + GeneralPrimitive *chain_common.Primitive `protobuf:"bytes,1,opt,name=general_primitive,json=generalPrimitive,proto3,oneof"` // shared primitives } type Primitive_Address struct { - Address []byte `protobuf:"bytes,2,opt,name=address,proto3,oneof"` // filter event by program public key 32 bytes + Address []byte `protobuf:"bytes,2,opt,name=address,proto3,oneof"` // 32-byte program id } type Primitive_EventSig struct { - EventSig []byte `protobuf:"bytes,3,opt,name=event_sig,json=eventSig,proto3,oneof"` // filter event by event signature 8 bytes length + EventSig []byte `protobuf:"bytes,3,opt,name=event_sig,json=eventSig,proto3,oneof"` // 8-byte discriminator } type Primitive_EventBySubkey struct { - EventBySubkey *EventBySubkey `protobuf:"bytes,4,opt,name=event_by_subkey,json=eventBySubkey,proto3,oneof"` // filter event by subkey + EventBySubkey *EventBySubkey `protobuf:"bytes,4,opt,name=event_by_subkey,json=eventBySubkey,proto3,oneof"` // subkey filter } func (*Primitive_GeneralPrimitive) isPrimitive_Primitive() {} @@ -3871,17 +3819,18 @@ func (*Primitive_EventSig) isPrimitive_Primitive() {} func (*Primitive_EventBySubkey) isPrimitive_Primitive() {} +// Query tracked logs. type QueryTrackedLogsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - FilterQuery []*Expression `protobuf:"bytes,1,rep,name=filterQuery,proto3" json:"filterQuery,omitempty"` - LimitAndSort *chain_common.LimitAndSort `protobuf:"bytes,2,opt,name=limit_and_sort,json=limitAndSort,proto3" json:"limit_and_sort,omitempty"` + FilterQuery []*Expression `protobuf:"bytes,1,rep,name=filterQuery,proto3" json:"filterQuery,omitempty"` // filter tree + LimitAndSort *chain_common.LimitAndSort `protobuf:"bytes,2,opt,name=limit_and_sort,json=limitAndSort,proto3" json:"limit_and_sort,omitempty"` // paging unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3893,7 +3842,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3906,7 +3855,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{58} + return file_solana_proto_rawDescGZIP(), []int{56} } func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { @@ -3932,7 +3881,7 @@ type QueryTrackedLogsReply struct { func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3944,7 +3893,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3957,7 +3906,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{59} + return file_solana_proto_rawDescGZIP(), []int{57} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -3967,6 +3916,7 @@ func (x *QueryTrackedLogsReply) GetLogs() []*Log { return nil } +// Register a log tracking filter. type RegisterLogTrackingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Filter *LPFilterQuery `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` @@ -3976,7 +3926,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3988,7 +3938,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4001,7 +3951,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{60} + return file_solana_proto_rawDescGZIP(), []int{58} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { @@ -4019,7 +3969,7 @@ type RegisterLogTrackingReply struct { func (x *RegisterLogTrackingReply) Reset() { *x = RegisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4031,7 +3981,7 @@ func (x *RegisterLogTrackingReply) String() string { func (*RegisterLogTrackingReply) ProtoMessage() {} func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4044,9 +3994,10 @@ func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{61} + return file_solana_proto_rawDescGZIP(), []int{59} } +// Unregister a filter by name/id. type UnregisterLogTrackingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` FilterName string `protobuf:"bytes,1,opt,name=filterName,proto3" json:"filterName,omitempty"` @@ -4056,7 +4007,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[62] + mi := &file_solana_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4068,7 +4019,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[62] + mi := &file_solana_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4081,7 +4032,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{62} + return file_solana_proto_rawDescGZIP(), []int{60} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -4099,7 +4050,7 @@ type UnregisterLogTrackingReply struct { func (x *UnregisterLogTrackingReply) Reset() { *x = UnregisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[63] + mi := &file_solana_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4111,7 +4062,7 @@ func (x *UnregisterLogTrackingReply) String() string { func (*UnregisterLogTrackingReply) ProtoMessage() {} func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[63] + mi := &file_solana_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4124,7 +4075,7 @@ func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{63} + return file_solana_proto_rawDescGZIP(), []int{61} } var File_solana_proto protoreflect.FileDescriptor @@ -4344,13 +4295,7 @@ const file_solana_proto_rawDesc = "" + "\tretention\x18\b \x01(\x03R\tretention\x12\"\n" + "\rmax_logs_kept\x18\t \x01(\x03R\vmaxLogsKept\x12)\n" + "\x10include_reverted\x18\n" + - " \x01(\bR\x0fincludeReverted\"`\n" + - "\x05Limit\x12\x16\n" + - "\x06cursor\x18\x01 \x01(\tR\x06cursor\x12)\n" + - "\x10cursor_direction\x18\x02 \x01(\x05R\x0fcursorDirection\x12\x14\n" + - "\x05count\x18\x03 \x01(\x04R\x05count\"8\n" + - "\fLimitAndSort\x12(\n" + - "\x05limit\x18\x01 \x01(\v2\x12.loop.solana.LimitR\x05limit\"\xc5\x02\n" + + " \x01(\bR\x0fincludeReverted\"\xc5\x02\n" + "\x03Log\x12\x19\n" + "\bchain_id\x18\x01 \x01(\tR\achainId\x12\x1b\n" + "\tlog_index\x18\x02 \x01(\x03R\blogIndex\x12\x1d\n" + @@ -4480,7 +4425,7 @@ func file_solana_proto_rawDescGZIP() []byte { } var file_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 64) +var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 62) var file_solana_proto_goTypes = []any{ (TransactionStatus)(0), // 0: loop.solana.TransactionStatus (TransactionDetailsType)(0), // 1: loop.solana.TransactionDetailsType @@ -4533,58 +4478,56 @@ var file_solana_proto_goTypes = []any{ (*HashedValueComparator)(nil), // 48: loop.solana.HashedValueComparator (*Subkeys)(nil), // 49: loop.solana.Subkeys (*LPFilterQuery)(nil), // 50: loop.solana.LPFilterQuery - (*Limit)(nil), // 51: loop.solana.Limit - (*LimitAndSort)(nil), // 52: loop.solana.LimitAndSort - (*Log)(nil), // 53: loop.solana.Log - (*RPCContext)(nil), // 54: loop.solana.RPCContext - (*SimulateTXOpts)(nil), // 55: loop.solana.SimulateTXOpts - (*SimulateTXReply)(nil), // 56: loop.solana.SimulateTXReply - (*SimulateTXRequest)(nil), // 57: loop.solana.SimulateTXRequest - (*SimulateTransactionAccountsOpts)(nil), // 58: loop.solana.SimulateTransactionAccountsOpts - (*SubmitTransactionReply)(nil), // 59: loop.solana.SubmitTransactionReply - (*SubmitTransactionRequest)(nil), // 60: loop.solana.SubmitTransactionRequest - (*TransactionWithMeta)(nil), // 61: loop.solana.TransactionWithMeta - (*Primitive)(nil), // 62: loop.solana.Primitive - (*QueryTrackedLogsRequest)(nil), // 63: loop.solana.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 64: loop.solana.QueryTrackedLogsReply - (*RegisterLogTrackingRequest)(nil), // 65: loop.solana.RegisterLogTrackingRequest - (*RegisterLogTrackingReply)(nil), // 66: loop.solana.RegisterLogTrackingReply - (*UnregisterLogTrackingRequest)(nil), // 67: loop.solana.UnregisterLogTrackingRequest - (*UnregisterLogTrackingReply)(nil), // 68: loop.solana.UnregisterLogTrackingReply - (*pb.BigInt)(nil), // 69: values.v1.BigInt - (chain_common.ComparisonOperator)(0), // 70: loop.chain.common.ComparisonOperator - (chain_common.BooleanOperator)(0), // 71: loop.chain.common.BooleanOperator - (*chain_common.Primitive)(nil), // 72: loop.chain.common.Primitive - (*chain_common.LimitAndSort)(nil), // 73: loop.chain.common.LimitAndSort + (*Log)(nil), // 51: loop.solana.Log + (*RPCContext)(nil), // 52: loop.solana.RPCContext + (*SimulateTXOpts)(nil), // 53: loop.solana.SimulateTXOpts + (*SimulateTXReply)(nil), // 54: loop.solana.SimulateTXReply + (*SimulateTXRequest)(nil), // 55: loop.solana.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 56: loop.solana.SimulateTransactionAccountsOpts + (*SubmitTransactionReply)(nil), // 57: loop.solana.SubmitTransactionReply + (*SubmitTransactionRequest)(nil), // 58: loop.solana.SubmitTransactionRequest + (*TransactionWithMeta)(nil), // 59: loop.solana.TransactionWithMeta + (*Primitive)(nil), // 60: loop.solana.Primitive + (*QueryTrackedLogsRequest)(nil), // 61: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 62: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 63: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 64: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 65: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 66: loop.solana.UnregisterLogTrackingReply + (*pb.BigInt)(nil), // 67: values.v1.BigInt + (chain_common.ComparisonOperator)(0), // 68: loop.chain.common.ComparisonOperator + (chain_common.BooleanOperator)(0), // 69: loop.chain.common.BooleanOperator + (*chain_common.Primitive)(nil), // 70: loop.chain.common.Primitive + (*chain_common.LimitAndSort)(nil), // 71: loop.chain.common.LimitAndSort } var file_solana_proto_depIdxs = []int32{ 9, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON - 69, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt + 67, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt 2, // 2: loop.solana.DataBytesOrJSON.raw_data_encoding:type_name -> loop.solana.EncodingType 48, // 3: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator - 70, // 4: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 68, // 4: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator 12, // 5: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator - 62, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 60, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive 15, // 7: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression - 71, // 8: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 69, // 8: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator 14, // 9: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression 2, // 10: loop.solana.GetAccountInfoOpts.encoding:type_name -> loop.solana.EncodingType 3, // 11: loop.solana.GetAccountInfoOpts.commitment:type_name -> loop.solana.CommitmentType 10, // 12: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice - 54, // 13: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 52, // 13: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext 5, // 14: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account 16, // 15: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts 3, // 16: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType 2, // 17: loop.solana.GetBlockOpts.encoding:type_name -> loop.solana.EncodingType 1, // 18: loop.solana.GetBlockOpts.transaction_details:type_name -> loop.solana.TransactionDetailsType 3, // 19: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType - 61, // 20: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta + 59, // 20: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta 21, // 21: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts 3, // 22: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType 2, // 23: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType 3, // 24: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType 10, // 25: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice - 54, // 26: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext + 52, // 26: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext 5, // 27: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account 26, // 28: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts 31, // 29: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult @@ -4606,54 +4549,53 @@ var file_solana_proto_depIdxs = []int32{ 45, // 45: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope 44, // 46: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta 49, // 47: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys - 51, // 48: loop.solana.LimitAndSort.limit:type_name -> loop.solana.Limit - 8, // 49: loop.solana.RPCContext.context:type_name -> loop.solana.Context - 3, // 50: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType - 58, // 51: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts - 5, // 52: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account - 55, // 53: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts - 2, // 54: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 0, // 55: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus - 7, // 56: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig - 9, // 57: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON - 44, // 58: loop.solana.TransactionWithMeta.meta:type_name -> loop.solana.TransactionMeta - 72, // 59: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 13, // 60: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey - 14, // 61: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression - 73, // 62: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 53, // 63: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log - 50, // 64: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery - 18, // 65: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest - 20, // 66: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest - 23, // 67: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest - 25, // 68: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest - 28, // 69: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest - 30, // 70: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest - 33, // 71: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest - 47, // 72: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 63, // 73: loop.solana.Solana.QueryTrackedLogsSol:input_type -> loop.solana.QueryTrackedLogsRequest - 65, // 74: loop.solana.Solana.RegisterLogTrackingSol:input_type -> loop.solana.RegisterLogTrackingRequest - 57, // 75: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 60, // 76: loop.solana.Solana.SubmitTransactionSol:input_type -> loop.solana.SubmitTransactionRequest - 67, // 77: loop.solana.Solana.UnregisterLogTrackingSol:input_type -> loop.solana.UnregisterLogTrackingRequest - 17, // 78: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply - 19, // 79: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply - 22, // 80: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply - 24, // 81: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply - 27, // 82: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply - 29, // 83: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply - 32, // 84: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply - 46, // 85: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply - 64, // 86: loop.solana.Solana.QueryTrackedLogsSol:output_type -> loop.solana.QueryTrackedLogsReply - 66, // 87: loop.solana.Solana.RegisterLogTrackingSol:output_type -> loop.solana.RegisterLogTrackingReply - 56, // 88: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply - 59, // 89: loop.solana.Solana.SubmitTransactionSol:output_type -> loop.solana.SubmitTransactionReply - 68, // 90: loop.solana.Solana.UnregisterLogTrackingSol:output_type -> loop.solana.UnregisterLogTrackingReply - 78, // [78:91] is the sub-list for method output_type - 65, // [65:78] is the sub-list for method input_type - 65, // [65:65] is the sub-list for extension type_name - 65, // [65:65] is the sub-list for extension extendee - 0, // [0:65] is the sub-list for field type_name + 8, // 48: loop.solana.RPCContext.context:type_name -> loop.solana.Context + 3, // 49: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType + 56, // 50: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 5, // 51: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 53, // 52: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 2, // 53: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 0, // 54: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus + 7, // 55: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 9, // 56: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON + 44, // 57: loop.solana.TransactionWithMeta.meta:type_name -> loop.solana.TransactionMeta + 70, // 58: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 13, // 59: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey + 14, // 60: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 71, // 61: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 51, // 62: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log + 50, // 63: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 18, // 64: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 20, // 65: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest + 23, // 66: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest + 25, // 67: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 28, // 68: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 30, // 69: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 33, // 70: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 47, // 71: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 61, // 72: loop.solana.Solana.QueryTrackedLogsSol:input_type -> loop.solana.QueryTrackedLogsRequest + 63, // 73: loop.solana.Solana.RegisterLogTrackingSol:input_type -> loop.solana.RegisterLogTrackingRequest + 55, // 74: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 58, // 75: loop.solana.Solana.SubmitTransactionSol:input_type -> loop.solana.SubmitTransactionRequest + 65, // 76: loop.solana.Solana.UnregisterLogTrackingSol:input_type -> loop.solana.UnregisterLogTrackingRequest + 17, // 77: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 19, // 78: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply + 22, // 79: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply + 24, // 80: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 27, // 81: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 29, // 82: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 32, // 83: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 46, // 84: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply + 62, // 85: loop.solana.Solana.QueryTrackedLogsSol:output_type -> loop.solana.QueryTrackedLogsReply + 64, // 86: loop.solana.Solana.RegisterLogTrackingSol:output_type -> loop.solana.RegisterLogTrackingReply + 54, // 87: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply + 57, // 88: loop.solana.Solana.SubmitTransactionSol:output_type -> loop.solana.SubmitTransactionReply + 66, // 89: loop.solana.Solana.UnregisterLogTrackingSol:output_type -> loop.solana.UnregisterLogTrackingReply + 77, // [77:90] is the sub-list for method output_type + 64, // [64:77] is the sub-list for method input_type + 64, // [64:64] is the sub-list for extension type_name + 64, // [64:64] is the sub-list for extension extendee + 0, // [0:64] is the sub-list for field type_name } func init() { file_solana_proto_init() } @@ -4669,7 +4611,7 @@ func file_solana_proto_init() { (*TransactionEnvelope_Raw)(nil), (*TransactionEnvelope_Parsed)(nil), } - file_solana_proto_msgTypes[57].OneofWrappers = []any{ + file_solana_proto_msgTypes[55].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_Address)(nil), (*Primitive_EventSig)(nil), @@ -4681,7 +4623,7 @@ func file_solana_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc)), NumEnums: 5, - NumMessages: 64, + NumMessages: 62, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 528fbcfb2d..47a75a093f 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -22,166 +22,186 @@ service Solana { rpc UnregisterLogTrackingSol(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); } +// Transaction execution status returned by submitters/simulations. enum TransactionStatus { - TX_FATAL = 0; - TX_ABORTED = 1; - TX_SUCCESS = 2; + TX_FATAL = 0; // unrecoverable failure + TX_ABORTED = 1; // not executed / dropped + TX_SUCCESS = 2; // executed successfully } +// Level of tx details in block response. enum TransactionDetailsType { - TRANSACTION_DETAILS_FULL = 0; - TRANSCTION_DETAILS_SIGNATURES = 1; - TRANSACTION_DETAILS_NONE = 2; - TRANSACTION_DETAILS_ACCOUNTS = 3; + TRANSACTION_DETAILS_FULL = 0; // tx + meta + TRANSCTION_DETAILS_SIGNATURES = 1; // signatures only + TRANSACTION_DETAILS_NONE = 2; // no txs + TRANSACTION_DETAILS_ACCOUNTS = 3; // account keys only } +// Account/tx data encodings. enum EncodingType { - ENCODING_NONE = 0; - ENCODING_BASE58 = 1; // limited to Account data of less than 129 bytes - ENCODING_BASE64 = 2; // will return base64 encoded data for Account data of any size - ENCODING_BASE64_ZST = 3; // compresses the Account data using Zstandard and base64-encodes the result - // attempts to use program-specific state parsers to - // return more human-readable and explicit account state data. - // If "jsonParsed" is requested but a parser cannot be found, - // the field falls back to "base64" encoding, detectable when the data field is type . - // Cannot be used if specifying dataSlice parameters (offset, length). - ENCODING_JSON_PARSED = 4; - - ENCODING_JSON = 5; // NOTE: you're probably looking for EncodingJSONParsed + ENCODING_NONE = 0; + ENCODING_BASE58 = 1; // for data <129 bytes + ENCODING_BASE64 = 2; // any size + ENCODING_BASE64_ZST = 3; // zstd-compressed, base64-wrapped + ENCODING_JSON_PARSED = 4; // program parsers; fallback to base64 if unknown + ENCODING_JSON = 5; // raw JSON (rare; prefer JSON_PARSED) } +// Read consistency of queried state. enum CommitmentType { - COMMITMENT_NONE = 0; - COMMITMENT_FINALIZED = 1; - COMMITMENT_CONFIRMED = 2; - COMMITMENT_PROCESSED = 3; + COMMITMENT_NONE = 0; + COMMITMENT_FINALIZED = 1; // cluster-finalized + COMMITMENT_CONFIRMED = 2; // voted by supermajority + COMMITMENT_PROCESSED = 3; // node’s latest } +// Cluster confirmation status of a tx/signature. enum ConfirmationStatusType { - CONFIRMATION_NONE = 0; - CONFIRMATION_PROCESSED = 1; - CONFIRMATION_CONFIRMED = 2; - CONFIRMATION_FINALIZED = 3; + CONFIRMATION_NONE = 0; + CONFIRMATION_PROCESSED = 1; + CONFIRMATION_CONFIRMED = 2; + CONFIRMATION_FINALIZED = 3; } +// On-chain account state. message Account { - uint64 lamports = 1; - bytes owner = 2; - DataBytesOrJSON data = 3; - bool executable = 4; - values.v1.BigInt rent_epoch = 5; - uint64 space = 6; + uint64 lamports = 1; // balance in lamports (1e-9 SOL) + bytes owner = 2; // 32-byte program id (Pubkey) + DataBytesOrJSON data = 3; // account data (encoded or JSON) + bool executable = 4; // true if this is a program account + values.v1.BigInt rent_epoch = 5; // next rent epoch + uint64 space = 6; // data length in bytes } +// 32-byte address (Pubkey). message Address { - bytes address = 1; + bytes address = 1; // 32 bytes } +// Compute budget configuration when submitting txs. message ComputeConfig { - uint32 compute_limit = 1; - uint64 compute_max_price = 2; + uint32 compute_limit = 1; // max CUs (approx per-tx limit) + uint64 compute_max_price = 2; // max lamports per CU } +// RPC context (slot at which state was read). message Context { uint64 slot = 1; } +// Raw bytes vs parsed JSON (as returned by RPC). message DataBytesOrJSON { - EncodingType raw_data_encoding = 1; - bytes as_decoded_binary = 2; - bytes as_json = 3; + EncodingType raw_data_encoding = 1; // encoding of payload + bytes as_decoded_binary = 2; // if binary encoding + bytes as_json = 3; // if JSON/JSON_PARSED } +// Return a slice of account data. message DataSlice { - uint64 offset = 1; - uint64 length = 2; + uint64 offset = 1; // start byte + uint64 length = 2; // number of bytes } +// Event/topic filter by hashed value(s). message EventSig { - uint64 topic = 1; - repeated HashedValueComparator hashed_value_comparers = 2; + uint64 topic = 1; // topic index + repeated HashedValueComparator hashed_value_comparers = 2; // comparisons } +// Comparator for a single indexed value. message IndexedValueComparator { - bytes value = 1; - loop.chain.common.ComparisonOperator operator = 2; + bytes value = 1; // raw bytes + loop.chain.common.ComparisonOperator operator = 2; // eq/lt/gt etc. } +// Filter events by a subkey path. message EventBySubkey { - uint64 subkey_index = 1; - repeated IndexedValueComparator value_comparers = 2; + uint64 subkey_index = 1; // path element index + repeated IndexedValueComparator value_comparers = 2; } +// Expression tree wrapper. message Expression { - oneof evaluator { - Primitive primitive = 1; - BooleanExpression boolean_expression = 2; + oneof evaluator { + Primitive primitive = 1; // leaf filter + BooleanExpression boolean_expression = 2; // AND/OR of expressions } } +// Boolean composition over expressions. message BooleanExpression { - loop.chain.common.BooleanOperator boolean_operator = 1; + loop.chain.common.BooleanOperator boolean_operator = 1; // AND/OR repeated Expression expression = 2; } +// Options for GetAccountInfo. message GetAccountInfoOpts { - EncodingType encoding = 1; - CommitmentType commitment = 2; - DataSlice data_slice = 3; - uint64 min_context_slot = 4; + EncodingType encoding = 1; // data encoding + CommitmentType commitment = 2; // read consistency + DataSlice data_slice = 3; // optional slice window + uint64 min_context_slot = 4; // lower bound slot } +// Reply for GetAccountInfoWithOpts. message GetAccountInfoWithOptsReply { - RPCContext rpc_context = 1; - Account value = 2; + RPCContext rpc_context = 1; // read slot + Account value = 2; // account (may be empty) } +// Request for GetAccountInfoWithOpts. message GetAccountInfoWithOptsRequest { - bytes account = 1; + bytes account = 1; // 32-byte Pubkey GetAccountInfoOpts opts = 2; } +// Reply for GetBalance. message GetBalanceReply { - uint64 value = 1; + uint64 value = 1; // lamports } +// Request for GetBalance. message GetBalanceRequest { - bytes addr = 1; - CommitmentType commitment = 2; + bytes addr = 1; // 32-byte Pubkey + CommitmentType commitment = 2; // read consistency } +// Options for GetBlock. message GetBlockOpts { - EncodingType encoding = 1; - TransactionDetailsType transaction_details = 2; - bool rewards = 3; - CommitmentType commitment = 4; - uint64 max_supported_transaction_version = 5; + EncodingType encoding = 1; // tx encoding + TransactionDetailsType transaction_details = 2; // tx detail level + bool rewards = 3; // include rewards + CommitmentType commitment = 4; // read consistency + uint64 max_supported_transaction_version = 5; // fail if higher present } +// Block response. message GetBlockReply { - bytes blockhash = 1; - bytes previous_blockhash = 2; + bytes blockhash = 1; // 32-byte block hash + bytes previous_blockhash = 2; // 32-byte parent hash uint64 parent_slot = 3; - repeated TransactionWithMeta transactions = 4; - repeated bytes signatures = 5; - int64 block_time = 6; - uint64 block_height = 7; + repeated TransactionWithMeta transactions = 4; // present if FULL + repeated bytes signatures = 5; // present if SIGNATURES + int64 block_time = 6; // unix seconds + uint64 block_height = 7; // chain height } +// Request for GetBlock. message GetBlockRequest { - uint64 slot = 1; + uint64 slot = 1; // target slot GetBlockOpts opts = 2; } +// Fee quote for a base58-encoded Message. message GetFeeForMessageReply { - uint64 fee = 1; + uint64 fee = 1; // lamports } message GetFeeForMessageRequest { - string message = 1; - CommitmentType commitment = 2; + string message = 1; // base58-encoded Message + CommitmentType commitment = 2; // read consistency } +// Options for GetMultipleAccounts. message GetMultipleAccountsOpts { EncodingType encoding = 1; CommitmentType commitment = 2; @@ -189,262 +209,277 @@ message GetMultipleAccountsOpts { uint64 min_context_slot = 4; } +// Reply for GetMultipleAccountsWithOpts. message GetMultipleAccountsWithOptsReply { - RPCContext r_p_c_context = 1; - repeated Account value = 2; + RPCContext r_p_c_context = 1; // read slot + repeated Account value = 2; // accounts (nil entries allowed) } +// Request for GetMultipleAccountsWithOpts. message GetMultipleAccountsWithOptsRequest { - repeated bytes accounts = 1; + repeated bytes accounts = 1; // list of 32-byte Pubkeys GetMultipleAccountsOpts opts = 2; } +// Reply for GetSignatureStatuses. message GetSignatureStatusesReply { - repeated GetSignatureStatusesResult results = 1; + repeated GetSignatureStatusesResult results = 1; // 1:1 with input } +// Request for GetSignatureStatuses. message GetSignatureStatusesRequest { - repeated bytes sigs = 1; + repeated bytes sigs = 1; // 64-byte signatures } +// Per-signature status. message GetSignatureStatusesResult { - uint64 slot = 1; - uint64 confirmations = 2; - string err = 3; + uint64 slot = 1; // processed slot + uint64 confirmations = 2; // null->0 here + string err = 3; // error JSON string (empty on success) ConfirmationStatusType confirmation_status = 4; } +// Current “height” (blocks below latest). message GetSlotHeightReply { uint64 height = 1; } message GetSlotHeightRequest { - CommitmentType commitment = 1; + CommitmentType commitment = 1; // read consistency } +// Message header counts. message MessageHeader { - uint32 num_required_signatures = 1; - uint32 num_readonly_signed_accounts = 2; - uint32 num_readonly_unsigned_accounts = 3; + uint32 num_required_signatures = 1; // signer count + uint32 num_readonly_signed_accounts = 2; // trailing signed RO + uint32 num_readonly_unsigned_accounts = 3; // trailing unsigned RO } +// Parsed message (no address tables). message ParsedMessage { - bytes recent_blockhash = 1; // 32 bytes solana Hash - repeated bytes account_keys = 2; // list of 32 bytes account keys + bytes recent_blockhash = 1; // 32-byte Hash + repeated bytes account_keys = 2; // list of 32-byte Pubkeys MessageHeader header = 3; repeated CompiledInstruction instructions = 4; } +// Parsed transaction (signatures + message). message ParsedTransaction { - repeated bytes signatures = 1; // 64 bytes solana Signature each + repeated bytes signatures = 1; // 64-byte signatures ParsedMessage message = 2; } +// Token amount (UI-friendly). message UiTokenAmount { - string amount = 1; // raw integer as string - uint32 decimals = 2; - string ui_amount_string = 4; + string amount = 1; // raw integer string + uint32 decimals = 2; // mint decimals + string ui_amount_string = 4; // amount / 10^decimals } +// SPL token balance entry. message TokenBalance { - uint32 account_index = 1; - bytes owner = 2; // 32 bytes solana PublicKey - bytes program_id = 3; // 32 bytes solana PublicKey - bytes mint = 4; // 32 bytes solana PublicKey - UiTokenAmount ui = 5; + uint32 account_index = 1; // index in account_keys + bytes owner = 2; // 32-byte owner (optional) + bytes program_id = 3; // 32-byte token program (optional) + bytes mint = 4; // 32-byte mint + UiTokenAmount ui = 5; // formatted amounts } +// Inner instruction list at a given outer instruction index. message InnerInstruction { - uint32 index = 1; - repeated CompiledInstruction instructions = 2; + uint32 index = 1; // outer ix index + repeated CompiledInstruction instructions = 2; // invoked ixs } +// Address table lookups expanded by loader. message LoadedAddresses { - repeated bytes readonly = 1; // 32 bytes solana PublicKey - repeated bytes writable = 2; // 32 bytes solana PublicKey + repeated bytes readonly = 1; // 32-byte Pubkeys + repeated bytes writable = 2; // 32-byte Pubkeys } +// Compiled (program) instruction. message CompiledInstruction { - uint32 program_id_index = 1; - repeated uint32 accounts = 2; - bytes data = 3; - uint32 stack_height = 4; + uint32 program_id_index = 1; // index into account_keys + repeated uint32 accounts = 2; // indices into account_keys + bytes data = 3; // program input bytes + uint32 stack_height = 4; // if recorded by node } +// Raw bytes with encoding tag. message Data { - bytes content = 1; - EncodingType encoding = 2; + bytes content = 1; // raw bytes + EncodingType encoding = 2; // how it was encoded originally } +// Program return data. message ReturnData { - bytes program_id = 1; // 32 bytes solana publicKey - Data data = 2; // raw program return bytes + bytes program_id = 1; // 32-byte Pubkey + Data data = 2; // raw return bytes } +// Transaction execution metadata. message TransactionMeta { - string err_json = 1; - - uint64 fee = 2; - repeated uint64 pre_balances = 3; - repeated uint64 post_balances = 4; - - repeated string log_messages = 5; - + string err_json = 1; // error JSON (empty on success) + uint64 fee = 2; // lamports + repeated uint64 pre_balances = 3; // lamports per account + repeated uint64 post_balances = 4; // lamports per account + repeated string log_messages = 5; // runtime logs repeated TokenBalance pre_token_balances = 6; repeated TokenBalance post_token_balances = 7; - repeated InnerInstruction inner_instructions = 8; - LoadedAddresses loaded_addresses = 9; - ReturnData return_data = 10; - - uint64 compute_units_consumed = 11; + uint64 compute_units_consumed = 11; // CUs } +// Transaction envelope: raw bytes or parsed struct. message TransactionEnvelope { -// - For RAW encoding, "transaction" contains tx bytes; for PARSED, structured fields. - oneof transaction{ - bytes raw = 1; - ParsedTransaction parsed = 2; - } + oneof transaction { + bytes raw = 1; // raw tx bytes (for RAW/base64) + ParsedTransaction parsed = 2; // parsed tx (for JSON_PARSED) + } } +// GetTransaction reply. message GetTransactionReply { - uint64 slot = 1; - int64 block_time = 2; - - TransactionEnvelope transaction = 3; - TransactionMeta meta = 12; // - "meta" may be omitted by the node/config. + uint64 slot = 1; // processed slot + int64 block_time = 2; // unix seconds + TransactionEnvelope transaction = 3; // tx bytes or parsed + TransactionMeta meta = 12; // may be omitted by node } +// GetTransaction request. message GetTransactionRequest { - bytes signature = 1; // 64 bytes signature + bytes signature = 1; // 64-byte signature } +// Comparator against hashed values. message HashedValueComparator { - repeated bytes values = 1; - int64 operator = 2; + repeated bytes values = 1; // hashed bytes + int64 operator = 2; // comparison op } +// Subkey path elements. message Subkeys { - repeated string subkeys = 1; + repeated string subkeys = 1; // e.g., ["events","0","fields","owner"] } +// Log-poller filter config (Solana flavor). message LPFilterQuery { - string name = 1; - bytes address = 2; - string event_name = 3; - bytes event_sig = 4; - int64 starting_block = 5; - bytes event_idl_json = 6; - repeated Subkeys subkey_paths = 7; - int64 retention = 8; - int64 max_logs_kept = 9; - bool include_reverted = 10; -} - -message Limit { - string cursor = 1; - int32 cursor_direction = 2; - uint64 count = 3; -} - -message LimitAndSort { - Limit limit = 1; -} - + string name = 1; // filter name/id + bytes address = 2; // 32-byte program id + string event_name = 3; // optional label + bytes event_sig = 4; // 8-byte event discriminator + int64 starting_block = 5; // start slot + bytes event_idl_json = 6; // IDL JSON bytes + repeated Subkeys subkey_paths = 7; // subkey selectors + int64 retention = 8; // seconds to keep logs + int64 max_logs_kept = 9; // 0 = unlimited + bool include_reverted = 10; // include rolled-back +} + +// Canonical log shape for tracked events. message Log { - string chain_id = 1; - int64 log_index = 2; - bytes block_hash = 3; - int64 block_number = 4; - uint64 block_timestamp = 5; - bytes address = 6; - bytes event_sig = 7; - bytes tx_hash = 8; - bytes data = 9; - int64 sequence_num = 10; - string error = 11; -} - + string chain_id = 1; // e.g., "solana-mainnet" + int64 log_index = 2; // per-block index + bytes block_hash = 3; // 32-byte + int64 block_number = 4; // slot + uint64 block_timestamp = 5; // unix seconds + bytes address = 6; // 32-byte program id + bytes event_sig = 7; // 8-byte discriminator + bytes tx_hash = 8; // 64-byte signature + bytes data = 9; // raw event bytes + int64 sequence_num = 10; // monotonic seq + string error = 11; // decode/processing error +} + +// RPC read context. message RPCContext { Context context = 1; } +// Simulation options. message SimulateTXOpts { - bool sig_verify = 1; - CommitmentType commitment = 2; - bool replace_recent_blockhash = 3; - SimulateTransactionAccountsOpts accounts = 4; + bool sig_verify = 1; // verify sigs + CommitmentType commitment = 2; // read consistency + bool replace_recent_blockhash = 3; // refresh blockhash + SimulateTransactionAccountsOpts accounts = 4; // return accounts } +// Simulation result. message SimulateTXReply { - string err = 1; - repeated string logs = 2; - repeated Account accounts = 3; - uint64 units_consumed = 4; + string err = 1; // empty on success + repeated string logs = 2; // runtime logs + repeated Account accounts = 3; // returned accounts + uint64 units_consumed = 4; // CUs } +// Simulation request. message SimulateTXRequest { - bytes receiver = 1; - string encoded_transaction = 2; + bytes receiver = 1; // 32-byte program id (target) + string encoded_transaction = 2; // base64/base58 tx SimulateTXOpts opts = 3; } +// Accounts to return during simulation. message SimulateTransactionAccountsOpts { - EncodingType encoding = 1; - repeated bytes addresses = 2; + EncodingType encoding = 1; // account data encoding + repeated bytes addresses = 2; // 32-byte Pubkeys } +// Submit transaction result. message SubmitTransactionReply { - bytes signature = 1; - string idempotency_key = 2; + bytes signature = 1; // 64-byte signature + string idempotency_key = 2; // echo key TransactionStatus status = 3; } +// Submit transaction request. message SubmitTransactionRequest { - ComputeConfig cfg = 1; - bytes receiver = 2; - string encoded_transaction = 3; + ComputeConfig cfg = 1; // compute budget + bytes receiver = 2; // 32-byte program id (target) + string encoded_transaction = 3; // base64/base58 tx } +// Block transaction with meta. message TransactionWithMeta { - uint64 slot = 1; - int64 block_time = 2; - DataBytesOrJSON transaction = 3; - TransactionMeta meta = 4; - int64 version = 5; + uint64 slot = 1; // processed slot + int64 block_time = 2; // unix seconds + DataBytesOrJSON transaction = 3; // tx (encoding per opts) + TransactionMeta meta = 4; // execution metadata + int64 version = 5; // -1 legacy, >=0 v0+ } +// Primitive leaf for expressions/filters. message Primitive { oneof primitive { - loop.chain.common.Primitive general_primitive = 1; - bytes address = 2; // filter event by program public key 32 bytes - bytes event_sig = 3; // filter event by event signature 8 bytes length - EventBySubkey event_by_subkey = 4; // filter event by subkey + loop.chain.common.Primitive general_primitive = 1; // shared primitives + bytes address = 2; // 32-byte program id + bytes event_sig = 3; // 8-byte discriminator + EventBySubkey event_by_subkey = 4; // subkey filter } } +// Query tracked logs. message QueryTrackedLogsRequest { - repeated Expression filterQuery = 1; - loop.chain.common.LimitAndSort limit_and_sort = 2; + repeated Expression filterQuery = 1; // filter tree + loop.chain.common.LimitAndSort limit_and_sort = 2; // paging } message QueryTrackedLogsReply { repeated Log logs = 1; } +// Register a log tracking filter. message RegisterLogTrackingRequest { LPFilterQuery filter = 1; } -message RegisterLogTrackingReply { -} +message RegisterLogTrackingReply {} +// Unregister a filter by name/id. message UnregisterLogTrackingRequest { string filterName = 1; } -message UnregisterLogTrackingReply { -} +message UnregisterLogTrackingReply {} diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index bb1b5c4edb..1bdd6c4468 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -70,15 +70,45 @@ const ( CommitmentProcessed CommitmentType = "processed" ) +// Client wraps Solana RPC via type/chains/solana types. type Client interface { + // GetBalance: lamports for account at commitment. + // In: ctx, {Addr, Commitment}. Out: {Value}, error. GetBalance(ctx context.Context, req GetBalanceRequest) (*GetBalanceReply, error) + + // GetAccountInfoWithOpts: account state + metadata. + // In: ctx, {Account, Opts(Encoding, Commitment, DataSlice, MinContextSlot)}. + // Out: {Context.Slot, Value(*Account|nil)}, error. GetAccountInfoWithOpts(ctx context.Context, req GetAccountInfoRequest) (*GetAccountInfoReply, error) + + // GetMultipleAccountsWithOpts: batch account fetch. + // In: ctx, {Accounts, Opts}. Out: {Context.Slot, Value([]*Account)}, error. GetMultipleAccountsWithOpts(ctx context.Context, req GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) + + // GetBlock: block by slot with optional tx details. + // In: ctx, {Slot, Opts(Encoding, TxDetails, Rewards, Commitment, MaxTxVersion)}. + // Out: block fields + Transactions/Signatures, error. GetBlock(ctx context.Context, req GetBlockRequest) (*GetBlockReply, error) + + // GetSlotHeight: current height at commitment. + // In: ctx, {Commitment}. Out: {Height}, error. GetSlotHeight(ctx context.Context, req GetSlotHeightRequest) (*GetSlotHeightReply, error) + + // GetTransaction: tx by signature with meta. + // In: ctx, {Signature}. Out: {Slot, BlockTime, Version, Transaction, Meta}, error. GetTransaction(ctx context.Context, req GetTransactionRequest) (*GetTransactionReply, error) + + // GetFeeForMessage: fee estimate for base58 message. + // In: ctx, {Message, Commitment}. Out: {Fee}, error. GetFeeForMessage(ctx context.Context, req GetFeeForMessageRequest) (*GetFeeForMessageReply, error) + + // GetSignatureStatuses: confirmation status for sigs. + // In: ctx, {Sigs}. Out: {Results[Slot, Confirmations, Err, Status]}, error. GetSignatureStatuses(ctx context.Context, req GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) + + // SimulateTX: dry-run a transaction. + // In: ctx, {Receiver, EncodedTransaction, Opts(SigVerify, Commitment, ReplaceRecentBlockhash, Accounts)}. + // Out: {Err, Logs, Accounts, UnitsConsumed}, error. SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) } From 41a500b04e240ab2cf33f19773ce1e88de9aa804 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 10:41:27 -0500 Subject: [PATCH 11/21] add UnimplementedSolanaService --- pkg/loop/internal/example-relay/main.go | 12 ------ pkg/types/relayer.go | 50 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/pkg/loop/internal/example-relay/main.go b/pkg/loop/internal/example-relay/main.go index 69a6213145..16eb6d0086 100644 --- a/pkg/loop/internal/example-relay/main.go +++ b/pkg/loop/internal/example-relay/main.go @@ -74,18 +74,6 @@ type relayer struct { func (r *relayer) Name() string { return r.lggr.Name() } -func (r *relayer) EVM() (types.EVMService, error) { - return nil, nil -} - -func (r *relayer) TON() (types.TONService, error) { - return nil, nil -} - -func (r *relayer) Solana() (types.SolanaService, error) { - return nil, nil -} - func (r *relayer) Start(ctx context.Context) error { var names []string // Test database connection with dummy query diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index 35e80b08cf..0543a0885b 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -481,3 +481,53 @@ func (ues *UnimplementedEVMService) GetTransactionStatus(ctx context.Context, tr func (ues *UnimplementedEVMService) GetForwarderForEOA(ctx context.Context, eoa, ocr2AggregatorID evm.Address, pluginType string) (forwarder evm.Address, err error) { return evm.Address{}, status.Errorf(codes.Unimplemented, "method GetForwarderForEOA not implemented") } + +var _ SolanaService = &UnimplementedSolanaService{} + +// UnimplementedSolanaService implements the SolanaService interface with stubbed methods that return codes.Unimplemented errors or panic. +// It is meant to be embedded in real SolanaService implementations in order to get default behavior for new methods without having +// to react to each change. +// In the future, embedding this type may be required to implement SolanaService (through use of an unexported method). +type UnimplementedSolanaService struct{} + +func (uss *UnimplementedSolanaService) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") +} + +func (uss *UnimplementedSolanaService) RegisterLogTracking(ctx context.Context, req solana.LPFilterQuery) error { + return status.Errorf(codes.Unimplemented, "method RegisterLogTracking not implemented") +} + +func (uss *UnimplementedSolanaService) UnregisterLogTracking(ctx context.Context, filterName string) error { + return status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") +} +func (uss *UnimplementedSolanaService) QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort) ([]*solana.Log, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogs not implemented") +} +func (uss *UnimplementedSolanaService) GetBalance(ctx context.Context, req solana.GetBalanceRequest) (*solana.GetBalanceReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented") +} +func (uss *UnimplementedSolanaService) GetAccountInfoWithOpts(ctx context.Context, req solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfoWithOpts not implemented") +} +func (uss *UnimplementedSolanaService) GetMultipleAccountsWithOpts(ctx context.Context, req solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMultipleAccountsWithOpts not implemented") +} +func (uss *UnimplementedSolanaService) GetBlock(ctx context.Context, req solana.GetBlockRequest) (*solana.GetBlockReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") +} +func (uss *UnimplementedSolanaService) GetSlotHeight(ctx context.Context, req solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSlotHeight not implemented") +} +func (uss *UnimplementedSolanaService) GetTransaction(ctx context.Context, req solana.GetTransactionRequest) (*solana.GetTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") +} +func (uss *UnimplementedSolanaService) GetFeeForMessage(ctx context.Context, req solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFeeForMessage not implemented") +} +func (uss *UnimplementedSolanaService) GetSignatureStatuses(ctx context.Context, req solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSignatureStatuses not implemented") +} +func (uss *UnimplementedSolanaService) SimulateTX(ctx context.Context, req solana.SimulateTXRequest) (*solana.SimulateTXReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") +} From c4cab43073bd70c7c3eb3af393da65c51bb37c12 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 12:14:49 -0500 Subject: [PATCH 12/21] resolve name conflict on relayerset --- pkg/chains/solana/solana.pb.go | 30 +++---- pkg/chains/solana/solana.proto | 8 +- pkg/chains/solana/solana_grpc.pb.go | 104 +++++++++++----------- pkg/loop/internal/pb/relayerset/helper.go | 11 ++- pkg/loop/internal/relayer/solana.go | 16 ++-- pkg/loop/internal/relayerset/server.go | 6 +- pkg/loop/internal/relayerset/solana.go | 75 +++++++++------- 7 files changed, 131 insertions(+), 119 deletions(-) diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 9f012dd6e6..0902e8a825 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -4394,7 +4394,7 @@ const file_solana_proto_rawDesc = "" + "\x11CONFIRMATION_NONE\x10\x00\x12\x1a\n" + "\x16CONFIRMATION_PROCESSED\x10\x01\x12\x1a\n" + "\x16CONFIRMATION_CONFIRMED\x10\x02\x12\x1a\n" + - "\x16CONFIRMATION_FINALIZED\x10\x032\xe9\t\n" + + "\x16CONFIRMATION_FINALIZED\x10\x032\xdd\t\n" + "\x06Solana\x12n\n" + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + "\n" + @@ -4404,13 +4404,13 @@ const file_solana_proto_rawDesc = "" + "\x1bGetMultipleAccountsWithOpts\x12/.loop.solana.GetMultipleAccountsWithOptsRequest\x1a-.loop.solana.GetMultipleAccountsWithOptsReply\x12h\n" + "\x14GetSignatureStatuses\x12(.loop.solana.GetSignatureStatusesRequest\x1a&.loop.solana.GetSignatureStatusesReply\x12S\n" + "\rGetSlotHeight\x12!.loop.solana.GetSlotHeightRequest\x1a\x1f.loop.solana.GetSlotHeightReply\x12V\n" + - "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12_\n" + - "\x13QueryTrackedLogsSol\x12$.loop.solana.QueryTrackedLogsRequest\x1a\".loop.solana.QueryTrackedLogsReply\x12h\n" + - "\x16RegisterLogTrackingSol\x12'.loop.solana.RegisterLogTrackingRequest\x1a%.loop.solana.RegisterLogTrackingReply\x12J\n" + + "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12\\\n" + + "\x10QueryTrackedLogs\x12$.loop.solana.QueryTrackedLogsRequest\x1a\".loop.solana.QueryTrackedLogsReply\x12e\n" + + "\x13RegisterLogTracking\x12'.loop.solana.RegisterLogTrackingRequest\x1a%.loop.solana.RegisterLogTrackingReply\x12J\n" + "\n" + - "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12b\n" + - "\x14SubmitTransactionSol\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12n\n" + - "\x18UnregisterLogTrackingSol\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" + "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12_\n" + + "\x11SubmitTransaction\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12k\n" + + "\x15UnregisterLogTracking\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" var ( file_solana_proto_rawDescOnce sync.Once @@ -4573,11 +4573,11 @@ var file_solana_proto_depIdxs = []int32{ 30, // 69: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest 33, // 70: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest 47, // 71: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 61, // 72: loop.solana.Solana.QueryTrackedLogsSol:input_type -> loop.solana.QueryTrackedLogsRequest - 63, // 73: loop.solana.Solana.RegisterLogTrackingSol:input_type -> loop.solana.RegisterLogTrackingRequest + 61, // 72: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest + 63, // 73: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest 55, // 74: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 58, // 75: loop.solana.Solana.SubmitTransactionSol:input_type -> loop.solana.SubmitTransactionRequest - 65, // 76: loop.solana.Solana.UnregisterLogTrackingSol:input_type -> loop.solana.UnregisterLogTrackingRequest + 58, // 75: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest + 65, // 76: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest 17, // 77: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply 19, // 78: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply 22, // 79: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply @@ -4586,11 +4586,11 @@ var file_solana_proto_depIdxs = []int32{ 29, // 82: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply 32, // 83: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply 46, // 84: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply - 62, // 85: loop.solana.Solana.QueryTrackedLogsSol:output_type -> loop.solana.QueryTrackedLogsReply - 64, // 86: loop.solana.Solana.RegisterLogTrackingSol:output_type -> loop.solana.RegisterLogTrackingReply + 62, // 85: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply + 64, // 86: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply 54, // 87: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply - 57, // 88: loop.solana.Solana.SubmitTransactionSol:output_type -> loop.solana.SubmitTransactionReply - 66, // 89: loop.solana.Solana.UnregisterLogTrackingSol:output_type -> loop.solana.UnregisterLogTrackingReply + 57, // 88: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply + 66, // 89: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply 77, // [77:90] is the sub-list for method output_type 64, // [64:77] is the sub-list for method input_type 64, // [64:64] is the sub-list for extension type_name diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 47a75a093f..c0e5547f25 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -15,11 +15,11 @@ service Solana { rpc GetSignatureStatuses(GetSignatureStatusesRequest) returns (GetSignatureStatusesReply); rpc GetSlotHeight(GetSlotHeightRequest) returns (GetSlotHeightReply); rpc GetTransaction(GetTransactionRequest) returns (GetTransactionReply); - rpc QueryTrackedLogsSol(QueryTrackedLogsRequest) returns (QueryTrackedLogsReply); - rpc RegisterLogTrackingSol(RegisterLogTrackingRequest) returns (RegisterLogTrackingReply); + rpc QueryTrackedLogs(QueryTrackedLogsRequest) returns (QueryTrackedLogsReply); + rpc RegisterLogTracking(RegisterLogTrackingRequest) returns (RegisterLogTrackingReply); rpc SimulateTX(SimulateTXRequest) returns (SimulateTXReply); - rpc SubmitTransactionSol(SubmitTransactionRequest) returns (SubmitTransactionReply); - rpc UnregisterLogTrackingSol(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); + rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); + rpc UnregisterLogTracking(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); } // Transaction execution status returned by submitters/simulations. diff --git a/pkg/chains/solana/solana_grpc.pb.go b/pkg/chains/solana/solana_grpc.pb.go index 85124c63e9..44d555a70e 100644 --- a/pkg/chains/solana/solana_grpc.pb.go +++ b/pkg/chains/solana/solana_grpc.pb.go @@ -27,11 +27,11 @@ const ( Solana_GetSignatureStatuses_FullMethodName = "/loop.solana.Solana/GetSignatureStatuses" Solana_GetSlotHeight_FullMethodName = "/loop.solana.Solana/GetSlotHeight" Solana_GetTransaction_FullMethodName = "/loop.solana.Solana/GetTransaction" - Solana_QueryTrackedLogsSol_FullMethodName = "/loop.solana.Solana/QueryTrackedLogsSol" - Solana_RegisterLogTrackingSol_FullMethodName = "/loop.solana.Solana/RegisterLogTrackingSol" + Solana_QueryTrackedLogs_FullMethodName = "/loop.solana.Solana/QueryTrackedLogs" + Solana_RegisterLogTracking_FullMethodName = "/loop.solana.Solana/RegisterLogTracking" Solana_SimulateTX_FullMethodName = "/loop.solana.Solana/SimulateTX" - Solana_SubmitTransactionSol_FullMethodName = "/loop.solana.Solana/SubmitTransactionSol" - Solana_UnregisterLogTrackingSol_FullMethodName = "/loop.solana.Solana/UnregisterLogTrackingSol" + Solana_SubmitTransaction_FullMethodName = "/loop.solana.Solana/SubmitTransaction" + Solana_UnregisterLogTracking_FullMethodName = "/loop.solana.Solana/UnregisterLogTracking" ) // SolanaClient is the client API for Solana service. @@ -46,11 +46,11 @@ type SolanaClient interface { GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) - QueryTrackedLogsSol(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) - RegisterLogTrackingSol(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) + QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) + RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) - SubmitTransactionSol(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) - UnregisterLogTrackingSol(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) + SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) + UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) } type solanaClient struct { @@ -141,20 +141,20 @@ func (c *solanaClient) GetTransaction(ctx context.Context, in *GetTransactionReq return out, nil } -func (c *solanaClient) QueryTrackedLogsSol(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) { +func (c *solanaClient) QueryTrackedLogs(ctx context.Context, in *QueryTrackedLogsRequest, opts ...grpc.CallOption) (*QueryTrackedLogsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryTrackedLogsReply) - err := c.cc.Invoke(ctx, Solana_QueryTrackedLogsSol_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_QueryTrackedLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaClient) RegisterLogTrackingSol(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) { +func (c *solanaClient) RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*RegisterLogTrackingReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RegisterLogTrackingReply) - err := c.cc.Invoke(ctx, Solana_RegisterLogTrackingSol_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_RegisterLogTracking_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -171,20 +171,20 @@ func (c *solanaClient) SimulateTX(ctx context.Context, in *SimulateTXRequest, op return out, nil } -func (c *solanaClient) SubmitTransactionSol(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) { +func (c *solanaClient) SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitTransactionReply) - err := c.cc.Invoke(ctx, Solana_SubmitTransactionSol_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_SubmitTransaction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *solanaClient) UnregisterLogTrackingSol(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) { +func (c *solanaClient) UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnregisterLogTrackingReply) - err := c.cc.Invoke(ctx, Solana_UnregisterLogTrackingSol_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Solana_UnregisterLogTracking_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -203,11 +203,11 @@ type SolanaServer interface { GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) - QueryTrackedLogsSol(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) - RegisterLogTrackingSol(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) + QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) + RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) - SubmitTransactionSol(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) - UnregisterLogTrackingSol(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) + SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) + UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) mustEmbedUnimplementedSolanaServer() } @@ -242,20 +242,20 @@ func (UnimplementedSolanaServer) GetSlotHeight(context.Context, *GetSlotHeightRe func (UnimplementedSolanaServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") } -func (UnimplementedSolanaServer) QueryTrackedLogsSol(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogsSol not implemented") +func (UnimplementedSolanaServer) QueryTrackedLogs(context.Context, *QueryTrackedLogsRequest) (*QueryTrackedLogsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogs not implemented") } -func (UnimplementedSolanaServer) RegisterLogTrackingSol(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterLogTrackingSol not implemented") +func (UnimplementedSolanaServer) RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*RegisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterLogTracking not implemented") } func (UnimplementedSolanaServer) SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") } -func (UnimplementedSolanaServer) SubmitTransactionSol(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitTransactionSol not implemented") +func (UnimplementedSolanaServer) SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") } -func (UnimplementedSolanaServer) UnregisterLogTrackingSol(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTrackingSol not implemented") +func (UnimplementedSolanaServer) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") } func (UnimplementedSolanaServer) mustEmbedUnimplementedSolanaServer() {} func (UnimplementedSolanaServer) testEmbeddedByValue() {} @@ -422,38 +422,38 @@ func _Solana_GetTransaction_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _Solana_QueryTrackedLogsSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_QueryTrackedLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryTrackedLogsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServer).QueryTrackedLogsSol(ctx, in) + return srv.(SolanaServer).QueryTrackedLogs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Solana_QueryTrackedLogsSol_FullMethodName, + FullMethod: Solana_QueryTrackedLogs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServer).QueryTrackedLogsSol(ctx, req.(*QueryTrackedLogsRequest)) + return srv.(SolanaServer).QueryTrackedLogs(ctx, req.(*QueryTrackedLogsRequest)) } return interceptor(ctx, in, info, handler) } -func _Solana_RegisterLogTrackingSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_RegisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RegisterLogTrackingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServer).RegisterLogTrackingSol(ctx, in) + return srv.(SolanaServer).RegisterLogTracking(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Solana_RegisterLogTrackingSol_FullMethodName, + FullMethod: Solana_RegisterLogTracking_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServer).RegisterLogTrackingSol(ctx, req.(*RegisterLogTrackingRequest)) + return srv.(SolanaServer).RegisterLogTracking(ctx, req.(*RegisterLogTrackingRequest)) } return interceptor(ctx, in, info, handler) } @@ -476,38 +476,38 @@ func _Solana_SimulateTX_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Solana_SubmitTransactionSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_SubmitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SubmitTransactionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServer).SubmitTransactionSol(ctx, in) + return srv.(SolanaServer).SubmitTransaction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Solana_SubmitTransactionSol_FullMethodName, + FullMethod: Solana_SubmitTransaction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServer).SubmitTransactionSol(ctx, req.(*SubmitTransactionRequest)) + return srv.(SolanaServer).SubmitTransaction(ctx, req.(*SubmitTransactionRequest)) } return interceptor(ctx, in, info, handler) } -func _Solana_UnregisterLogTrackingSol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Solana_UnregisterLogTracking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnregisterLogTrackingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SolanaServer).UnregisterLogTrackingSol(ctx, in) + return srv.(SolanaServer).UnregisterLogTracking(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Solana_UnregisterLogTrackingSol_FullMethodName, + FullMethod: Solana_UnregisterLogTracking_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SolanaServer).UnregisterLogTrackingSol(ctx, req.(*UnregisterLogTrackingRequest)) + return srv.(SolanaServer).UnregisterLogTracking(ctx, req.(*UnregisterLogTrackingRequest)) } return interceptor(ctx, in, info, handler) } @@ -552,24 +552,24 @@ var Solana_ServiceDesc = grpc.ServiceDesc{ Handler: _Solana_GetTransaction_Handler, }, { - MethodName: "QueryTrackedLogsSol", - Handler: _Solana_QueryTrackedLogsSol_Handler, + MethodName: "QueryTrackedLogs", + Handler: _Solana_QueryTrackedLogs_Handler, }, { - MethodName: "RegisterLogTrackingSol", - Handler: _Solana_RegisterLogTrackingSol_Handler, + MethodName: "RegisterLogTracking", + Handler: _Solana_RegisterLogTracking_Handler, }, { MethodName: "SimulateTX", Handler: _Solana_SimulateTX_Handler, }, { - MethodName: "SubmitTransactionSol", - Handler: _Solana_SubmitTransactionSol_Handler, + MethodName: "SubmitTransaction", + Handler: _Solana_SubmitTransaction_Handler, }, { - MethodName: "UnregisterLogTrackingSol", - Handler: _Solana_UnregisterLogTrackingSol_Handler, + MethodName: "UnregisterLogTracking", + Handler: _Solana_UnregisterLogTracking_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/loop/internal/pb/relayerset/helper.go b/pkg/loop/internal/pb/relayerset/helper.go index 6f10a4a3eb..a80122f266 100644 --- a/pkg/loop/internal/pb/relayerset/helper.go +++ b/pkg/loop/internal/pb/relayerset/helper.go @@ -9,6 +9,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/pb" ) +type HasChainServers interface { + SolanaServer() solana.SolanaServer +} + // RegisterRelayerSetServerWithDependants registers all the grpc services hidden injected into and hidden behind RelayerSet. func RegisterRelayerSetServerWithDependants(s grpc.ServiceRegistrar, srv RelayerSetServer) { RegisterRelayerSetServer(s, srv) @@ -21,11 +25,10 @@ func RegisterRelayerSetServerWithDependants(s grpc.ServiceRegistrar, srv Relayer ton.RegisterTONServer(s, eSrv) } switch eSrv := srv.(type) { - case solana.SolanaServer: - solana.RegisterSolanaServer(s, eSrv) - } - switch eSrv := srv.(type) { case pb.ContractReaderServer: pb.RegisterContractReaderServer(s, eSrv) } + if h, ok := any(srv).(HasChainServers); ok { + solana.RegisterSolanaServer(s, h.SolanaServer()) + } } diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go index 57b6bdccf5..b7e4411b7c 100644 --- a/pkg/loop/internal/relayer/solana.go +++ b/pkg/loop/internal/relayer/solana.go @@ -27,7 +27,7 @@ func NewSolanaClient(client solpb.SolanaClient) *SolClient { func (sc *SolClient) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { pReq := solpb.ConvertSubmitTransactionRequestToProto(req) - pResp, err := sc.grpcClient.SubmitTransactionSol(ctx, pReq) + pResp, err := sc.grpcClient.SubmitTransaction(ctx, pReq) if err != nil { return nil, net.WrapRPCErr(err) } @@ -41,14 +41,14 @@ func (sc *SolClient) SubmitTransaction(ctx context.Context, req solana.SubmitTra func (sc *SolClient) RegisterLogTracking(ctx context.Context, req solana.LPFilterQuery) error { filter := solpb.ConvertLPFilterQueryToProto(&req) - _, err := sc.grpcClient.RegisterLogTrackingSol(ctx, &solpb.RegisterLogTrackingRequest{ + _, err := sc.grpcClient.RegisterLogTracking(ctx, &solpb.RegisterLogTrackingRequest{ Filter: filter, }) return net.WrapRPCErr(err) } func (sc *SolClient) UnregisterLogTracking(ctx context.Context, filterName string) error { - _, err := sc.grpcClient.UnregisterLogTrackingSol(ctx, &solpb.UnregisterLogTrackingRequest{FilterName: filterName}) + _, err := sc.grpcClient.UnregisterLogTracking(ctx, &solpb.UnregisterLogTrackingRequest{FilterName: filterName}) return net.WrapRPCErr(err) } @@ -68,7 +68,7 @@ func (sc *SolClient) QueryTrackedLogs(ctx context.Context, filterQuery []query.E LimitAndSort: protoLimitAndSort, } - pResp, err := sc.grpcClient.QueryTrackedLogsSol(ctx, pReq) + pResp, err := sc.grpcClient.QueryTrackedLogs(ctx, pReq) if err != nil { return nil, net.WrapRPCErr(err) } @@ -217,7 +217,7 @@ func newSolServer(impl types.SolanaService, b *net.BrokerExt) *solServer { return &solServer{impl: impl, BrokerExt: b.WithName("SolanaServer")} } -func (s *solServer) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { +func (s *solServer) SubmitTransaction(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { dReq, err := solpb.ConvertSubmitTransactionRequestFromProto(req) if err != nil { return nil, net.WrapRPCErr(err) @@ -232,7 +232,7 @@ func (s *solServer) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitT return pResp, nil } -func (s *solServer) RegisterLogTrackingSol(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { +func (s *solServer) RegisterLogTracking(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { if req.Filter == nil { return nil, net.WrapRPCErr(fmt.Errorf("missing filter")) } @@ -249,7 +249,7 @@ func (s *solServer) RegisterLogTrackingSol(ctx context.Context, req *solpb.Regis return &solpb.RegisterLogTrackingReply{}, nil } -func (s *solServer) UnregisterLogTrackingSol(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { +func (s *solServer) UnregisterLogTracking(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { if err := s.impl.UnregisterLogTracking(ctx, req.GetFilterName()); err != nil { return nil, net.WrapRPCErr(err) } @@ -257,7 +257,7 @@ func (s *solServer) UnregisterLogTrackingSol(ctx context.Context, req *solpb.Unr return &solpb.UnregisterLogTrackingReply{}, nil } -func (s *solServer) QueryTrackedLogsSol(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { +func (s *solServer) QueryTrackedLogs(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { dExprs, err := solpb.ConvertExpressionsFromProto(req.GetFilterQuery()) if err != nil { return nil, net.WrapRPCErr(err) diff --git a/pkg/loop/internal/relayerset/server.go b/pkg/loop/internal/relayerset/server.go index 23a25aee89..89ef7ab611 100644 --- a/pkg/loop/internal/relayerset/server.go +++ b/pkg/loop/internal/relayerset/server.go @@ -37,12 +37,13 @@ type Server struct { relayerset.UnimplementedRelayerSetServer evmpb.UnimplementedEVMServer tonpb.UnimplementedTONServer - solpb.UnimplementedSolanaServer pb.ContractReaderServer impl core.RelayerSet broker *net.BrokerExt + sol *solServer + serverResources net.Resources readers map[string]*readerAndServer @@ -55,19 +56,20 @@ type Server struct { var _ relayerset.RelayerSetServer = (*Server)(nil) var _ evmpb.EVMServer = (*Server)(nil) var _ tonpb.TONServer = (*Server)(nil) -var _ solpb.SolanaServer = (*Server)(nil) var _ pb.ContractReaderServer = (*Server)(nil) func NewRelayerSetServer(log logger.Logger, underlying core.RelayerSet, broker *net.BrokerExt) (*Server, net.Resource) { pluginProviderServers := make(net.Resources, 0) server := &Server{log: log, impl: underlying, broker: broker, serverResources: pluginProviderServers, readers: map[string]*readerAndServer{}} + server.sol = &solServer{parent: server} return server, net.Resource{ Name: "PluginProviderServers", Closer: server, } } +func (s *Server) SolanaServer() solpb.SolanaServer { return s.sol } func (s *Server) Close() error { for _, pluginProviderServer := range s.serverResources { diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go index 0da3b9983c..6721e8ad4f 100644 --- a/pkg/loop/internal/relayerset/solana.go +++ b/pkg/loop/internal/relayerset/solana.go @@ -54,29 +54,36 @@ func (sc *solClient) GetTransaction(ctx context.Context, in *solpb.GetTransactio return sc.client.GetTransaction(appendRelayID(ctx, sc.relayID), in, opts...) } -func (sc *solClient) QueryTrackedLogsSol(ctx context.Context, in *solpb.QueryTrackedLogsRequest, opts ...grpc.CallOption) (*solpb.QueryTrackedLogsReply, error) { - return sc.client.QueryTrackedLogsSol(appendRelayID(ctx, sc.relayID), in, opts...) +func (sc *solClient) QueryTrackedLogs(ctx context.Context, in *solpb.QueryTrackedLogsRequest, opts ...grpc.CallOption) (*solpb.QueryTrackedLogsReply, error) { + return sc.client.QueryTrackedLogs(appendRelayID(ctx, sc.relayID), in, opts...) } -func (sc *solClient) RegisterLogTrackingSol(ctx context.Context, in *solpb.RegisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.RegisterLogTrackingReply, error) { - return sc.client.RegisterLogTrackingSol(appendRelayID(ctx, sc.relayID), in, opts...) +func (sc *solClient) RegisterLogTracking(ctx context.Context, in *solpb.RegisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.RegisterLogTrackingReply, error) { + return sc.client.RegisterLogTracking(appendRelayID(ctx, sc.relayID), in, opts...) } func (sc *solClient) SimulateTX(ctx context.Context, in *solpb.SimulateTXRequest, opts ...grpc.CallOption) (*solpb.SimulateTXReply, error) { return sc.client.SimulateTX(appendRelayID(ctx, sc.relayID), in, opts...) } -func (sc *solClient) SubmitTransactionSol(ctx context.Context, in *solpb.SubmitTransactionRequest, opts ...grpc.CallOption) (*solpb.SubmitTransactionReply, error) { - return sc.client.SubmitTransactionSol(appendRelayID(ctx, sc.relayID), in, opts...) +func (sc *solClient) SubmitTransaction(ctx context.Context, in *solpb.SubmitTransactionRequest, opts ...grpc.CallOption) (*solpb.SubmitTransactionReply, error) { + return sc.client.SubmitTransaction(appendRelayID(ctx, sc.relayID), in, opts...) } -func (sc *solClient) UnregisterLogTrackingSol(ctx context.Context, in *solpb.UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.UnregisterLogTrackingReply, error) { - return sc.client.UnregisterLogTrackingSol(appendRelayID(ctx, sc.relayID), in, opts...) +func (sc *solClient) UnregisterLogTracking(ctx context.Context, in *solpb.UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*solpb.UnregisterLogTrackingReply, error) { + return sc.client.UnregisterLogTracking(appendRelayID(ctx, sc.relayID), in, opts...) } +type solServer struct { + solpb.UnimplementedSolanaServer + parent *Server +} + +var _ solpb.SolanaServer = (*solServer)(nil) + // Server handlers -func (s *Server) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) SubmitTransaction(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -95,8 +102,8 @@ func (s *Server) SubmitTransactionSol(ctx context.Context, req *solpb.SubmitTran return pResp, nil } -func (s *Server) RegisterLogTrackingSol(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) RegisterLogTracking(ctx context.Context, req *solpb.RegisterLogTrackingRequest) (*solpb.RegisterLogTrackingReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -116,8 +123,8 @@ func (s *Server) RegisterLogTrackingSol(ctx context.Context, req *solpb.Register return &solpb.RegisterLogTrackingReply{}, nil } -func (s *Server) UnregisterLogTrackingSol(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) UnregisterLogTracking(ctx context.Context, req *solpb.UnregisterLogTrackingRequest) (*solpb.UnregisterLogTrackingReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -128,8 +135,8 @@ func (s *Server) UnregisterLogTrackingSol(ctx context.Context, req *solpb.Unregi return &solpb.UnregisterLogTrackingReply{}, nil } -func (s *Server) QueryTrackedLogsSol(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) QueryTrackedLogs(ctx context.Context, req *solpb.QueryTrackedLogsRequest) (*solpb.QueryTrackedLogsReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -156,8 +163,8 @@ func (s *Server) QueryTrackedLogsSol(ctx context.Context, req *solpb.QueryTracke return &solpb.QueryTrackedLogsReply{Logs: out}, nil } -func (s *Server) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest) (*solpb.GetBalanceReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest) (*solpb.GetBalanceReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -175,8 +182,8 @@ func (s *Server) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest) ( return solpb.ConvertGetBalanceReplyToProto(dResp), nil } -func (s *Server) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccountInfoWithOptsRequest) (*solpb.GetAccountInfoWithOptsReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccountInfoWithOptsRequest) (*solpb.GetAccountInfoWithOptsReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -200,8 +207,8 @@ func (s *Server) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccou }, nil } -func (s *Server) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb.GetMultipleAccountsWithOptsRequest) (*solpb.GetMultipleAccountsWithOptsReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb.GetMultipleAccountsWithOptsRequest) (*solpb.GetMultipleAccountsWithOptsReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -215,8 +222,8 @@ func (s *Server) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb.Get return solpb.ConvertGetMultipleAccountsReplyToProto(dResp), nil } -func (s *Server) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -230,8 +237,8 @@ func (s *Server) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*sol return solpb.ConvertGetBlockReplyToProto(dResp), nil } -func (s *Server) GetSlotHeight(ctx context.Context, req *solpb.GetSlotHeightRequest) (*solpb.GetSlotHeightReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetSlotHeight(ctx context.Context, req *solpb.GetSlotHeightRequest) (*solpb.GetSlotHeightReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -245,8 +252,8 @@ func (s *Server) GetSlotHeight(ctx context.Context, req *solpb.GetSlotHeightRequ return solpb.ConvertGetSlotHeightReplyToProto(dResp), nil } -func (s *Server) GetTransaction(ctx context.Context, req *solpb.GetTransactionRequest) (*solpb.GetTransactionReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetTransaction(ctx context.Context, req *solpb.GetTransactionRequest) (*solpb.GetTransactionReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -263,8 +270,8 @@ func (s *Server) GetTransaction(ctx context.Context, req *solpb.GetTransactionRe return solpb.ConvertGetTransactionReplyToProto(dResp), nil } -func (s *Server) GetFeeForMessage(ctx context.Context, req *solpb.GetFeeForMessageRequest) (*solpb.GetFeeForMessageReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetFeeForMessage(ctx context.Context, req *solpb.GetFeeForMessageRequest) (*solpb.GetFeeForMessageReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -278,8 +285,8 @@ func (s *Server) GetFeeForMessage(ctx context.Context, req *solpb.GetFeeForMessa return solpb.ConvertGetFeeForMessageReplyToProto(dResp), nil } -func (s *Server) GetSignatureStatuses(ctx context.Context, req *solpb.GetSignatureStatusesRequest) (*solpb.GetSignatureStatusesReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) GetSignatureStatuses(ctx context.Context, req *solpb.GetSignatureStatusesRequest) (*solpb.GetSignatureStatusesReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } @@ -297,8 +304,8 @@ func (s *Server) GetSignatureStatuses(ctx context.Context, req *solpb.GetSignatu return solpb.ConvertGetSignatureStatusesReplyToProto(dResp), nil } -func (s *Server) SimulateTX(ctx context.Context, req *solpb.SimulateTXRequest) (*solpb.SimulateTXReply, error) { - solService, err := s.getSolService(ctx) +func (ss *solServer) SimulateTX(ctx context.Context, req *solpb.SimulateTXRequest) (*solpb.SimulateTXReply, error) { + solService, err := ss.parent.getSolService(ctx) if err != nil { return nil, err } From 32a506438de27c56a3ef8e2c02d302585cb16278 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 12:38:32 -0500 Subject: [PATCH 13/21] get rid of any --- pkg/loop/internal/pb/relayerset/helper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/loop/internal/pb/relayerset/helper.go b/pkg/loop/internal/pb/relayerset/helper.go index a80122f266..2ed79547b4 100644 --- a/pkg/loop/internal/pb/relayerset/helper.go +++ b/pkg/loop/internal/pb/relayerset/helper.go @@ -28,7 +28,8 @@ func RegisterRelayerSetServerWithDependants(s grpc.ServiceRegistrar, srv Relayer case pb.ContractReaderServer: pb.RegisterContractReaderServer(s, eSrv) } - if h, ok := any(srv).(HasChainServers); ok { + + if h, ok := srv.(HasChainServers); ok { solana.RegisterSolanaServer(s, h.SolanaServer()) } } From 5a8192a31a9ee1122ea4937c4dbed17bf8af6143 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 18:51:35 -0500 Subject: [PATCH 14/21] separate chain service implementations on relayerset server --- pkg/loop/internal/pb/relayerset/helper.go | 15 ++-- .../internal/relayerset/contract_reader.go | 52 ++++++++----- pkg/loop/internal/relayerset/evm.go | 75 ++++++++++--------- pkg/loop/internal/relayerset/server.go | 20 +++-- pkg/loop/internal/relayerset/ton.go | 46 ++++++------ 5 files changed, 117 insertions(+), 91 deletions(-) diff --git a/pkg/loop/internal/pb/relayerset/helper.go b/pkg/loop/internal/pb/relayerset/helper.go index 2ed79547b4..be49adb443 100644 --- a/pkg/loop/internal/pb/relayerset/helper.go +++ b/pkg/loop/internal/pb/relayerset/helper.go @@ -11,25 +11,22 @@ import ( type HasChainServers interface { SolanaServer() solana.SolanaServer + EVMServer() evm.EVMServer + TONServer() ton.TONServer + ContractReaderServer() pb.ContractReaderServer } // RegisterRelayerSetServerWithDependants registers all the grpc services hidden injected into and hidden behind RelayerSet. func RegisterRelayerSetServerWithDependants(s grpc.ServiceRegistrar, srv RelayerSetServer) { RegisterRelayerSetServer(s, srv) switch eSrv := srv.(type) { - case evm.EVMServer: - evm.RegisterEVMServer(s, eSrv) - } - switch eSrv := srv.(type) { - case ton.TONServer: - ton.RegisterTONServer(s, eSrv) - } - switch eSrv := srv.(type) { case pb.ContractReaderServer: pb.RegisterContractReaderServer(s, eSrv) } - if h, ok := srv.(HasChainServers); ok { solana.RegisterSolanaServer(s, h.SolanaServer()) + evm.RegisterEVMServer(s, h.EVMServer()) + ton.RegisterTONServer(s, h.TONServer()) + pb.RegisterContractReaderServer(s, h.ContractReaderServer()) } } diff --git a/pkg/loop/internal/relayerset/contract_reader.go b/pkg/loop/internal/relayerset/contract_reader.go index e686ec9702..d167984f22 100644 --- a/pkg/loop/internal/relayerset/contract_reader.go +++ b/pkg/loop/internal/relayerset/contract_reader.go @@ -83,8 +83,15 @@ func (s *contractReaderServiceClient) Ready() error { return nil } -func (s *Server) ContractReaderStart(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { - reader, err := s.getReader(ctx) +type readerServer struct { + pb.UnimplementedContractReaderServer + parent *Server +} + +var _ pb.ContractReaderServer = (*readerServer)(nil) + +func (rs *readerServer) ContractReaderStart(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -92,8 +99,8 @@ func (s *Server) ContractReaderStart(ctx context.Context, _ *emptypb.Empty) (*em return &emptypb.Empty{}, reader.reader.Start(ctx) } -func (s *Server) ContractReaderClose(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) ContractReaderClose(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -101,12 +108,12 @@ func (s *Server) ContractReaderClose(ctx context.Context, _ *emptypb.Empty) (*em if err != nil { return nil, err } - s.removeReader(id) + rs.parent.removeReader(id) return &emptypb.Empty{}, reader.reader.Close() } -func (s *Server) GetLatestValue(ctx context.Context, in *pb.GetLatestValueRequest) (*pb.GetLatestValueReply, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) GetLatestValue(ctx context.Context, in *pb.GetLatestValueRequest) (*pb.GetLatestValueReply, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -114,8 +121,8 @@ func (s *Server) GetLatestValue(ctx context.Context, in *pb.GetLatestValueReques return reader.server.GetLatestValue(ctx, in) } -func (s *Server) GetLatestValueWithHeadData(ctx context.Context, in *pb.GetLatestValueRequest) (*pb.GetLatestValueWithHeadDataReply, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) GetLatestValueWithHeadData(ctx context.Context, in *pb.GetLatestValueRequest) (*pb.GetLatestValueWithHeadDataReply, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -123,8 +130,8 @@ func (s *Server) GetLatestValueWithHeadData(ctx context.Context, in *pb.GetLates return reader.server.GetLatestValueWithHeadData(ctx, in) } -func (s *Server) GetLatestValues(ctx context.Context, in *pb.BatchGetLatestValuesRequest) (*pb.BatchGetLatestValuesReply, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) GetLatestValues(ctx context.Context, in *pb.BatchGetLatestValuesRequest) (*pb.BatchGetLatestValuesReply, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -132,8 +139,8 @@ func (s *Server) GetLatestValues(ctx context.Context, in *pb.BatchGetLatestValue return reader.server.BatchGetLatestValues(ctx, in) } -func (s *Server) QueryKeys(ctx context.Context, in *pb.QueryKeysRequest) (*pb.QueryKeysReply, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) QueryKeys(ctx context.Context, in *pb.QueryKeysRequest) (*pb.QueryKeysReply, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -141,8 +148,8 @@ func (s *Server) QueryKeys(ctx context.Context, in *pb.QueryKeysRequest) (*pb.Qu return reader.server.QueryKeys(ctx, in) } -func (s *Server) QueryKey(ctx context.Context, in *pb.QueryKeyRequest) (*pb.QueryKeyReply, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) QueryKey(ctx context.Context, in *pb.QueryKeyRequest) (*pb.QueryKeyReply, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -150,8 +157,8 @@ func (s *Server) QueryKey(ctx context.Context, in *pb.QueryKeyRequest) (*pb.Quer return reader.server.QueryKey(ctx, in) } -func (s *Server) Bind(ctx context.Context, in *pb.BindRequest) (*emptypb.Empty, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) Bind(ctx context.Context, in *pb.BindRequest) (*emptypb.Empty, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } @@ -159,11 +166,18 @@ func (s *Server) Bind(ctx context.Context, in *pb.BindRequest) (*emptypb.Empty, return reader.server.Bind(ctx, in) } -func (s *Server) Unbind(ctx context.Context, in *pb.UnbindRequest) (*emptypb.Empty, error) { - reader, err := s.getReader(ctx) +func (rs *readerServer) Unbind(ctx context.Context, in *pb.UnbindRequest) (*emptypb.Empty, error) { + reader, err := rs.parent.getReader(ctx) if err != nil { return nil, err } return reader.server.Unbind(ctx, in) } + +func (s *Server) ContractReaderStart(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { + return s.contractReader.ContractReaderStart(ctx, &emptypb.Empty{}) +} +func (s *Server) ContractReaderClose(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { + return s.contractReader.ContractReaderClose(ctx, &emptypb.Empty{}) +} diff --git a/pkg/loop/internal/relayerset/evm.go b/pkg/loop/internal/relayerset/evm.go index d6f4ae48e4..f40948845e 100644 --- a/pkg/loop/internal/relayerset/evm.go +++ b/pkg/loop/internal/relayerset/evm.go @@ -95,8 +95,15 @@ func (e evmClient) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts return e.client.GetLatestLPBlock(appendRelayID(ctx, e.relayID), in, opts...) } -func (s *Server) GetTransactionFee(ctx context.Context, request *evmpb.GetTransactionFeeRequest) (*evmpb.GetTransactionFeeReply, error) { - evmService, err := s.getEVMService(ctx) +type evmServer struct { + evmpb.UnimplementedEVMServer + parent *Server +} + +var _ evmpb.EVMServer = (*evmServer)(nil) + +func (es *evmServer) GetTransactionFee(ctx context.Context, request *evmpb.GetTransactionFeeRequest) (*evmpb.GetTransactionFeeReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -112,8 +119,8 @@ func (s *Server) GetTransactionFee(ctx context.Context, request *evmpb.GetTransa return &evmpb.GetTransactionFeeReply{TransactionFee: valuespb.NewBigIntFromInt(reply.TransactionFee)}, nil } -func (s *Server) CallContract(ctx context.Context, request *evmpb.CallContractRequest) (*evmpb.CallContractReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) CallContract(ctx context.Context, request *evmpb.CallContractRequest) (*evmpb.CallContractReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -146,8 +153,8 @@ func (s *Server) CallContract(ctx context.Context, request *evmpb.CallContractRe }, nil } -func (s *Server) FilterLogs(ctx context.Context, request *evmpb.FilterLogsRequest) (*evmpb.FilterLogsReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) FilterLogs(ctx context.Context, request *evmpb.FilterLogsRequest) (*evmpb.FilterLogsReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -181,8 +188,8 @@ func (s *Server) FilterLogs(ctx context.Context, request *evmpb.FilterLogsReques return &evmpb.FilterLogsReply{Logs: logs}, nil } -func (s *Server) BalanceAt(ctx context.Context, request *evmpb.BalanceAtRequest) (*evmpb.BalanceAtReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) BalanceAt(ctx context.Context, request *evmpb.BalanceAtRequest) (*evmpb.BalanceAtReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -213,8 +220,8 @@ func (s *Server) BalanceAt(ctx context.Context, request *evmpb.BalanceAtRequest) return &evmpb.BalanceAtReply{Balance: valuespb.NewBigIntFromInt(reply.Balance)}, nil } -func (s *Server) EstimateGas(ctx context.Context, request *evmpb.EstimateGasRequest) (*evmpb.EstimateGasReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) EstimateGas(ctx context.Context, request *evmpb.EstimateGasRequest) (*evmpb.EstimateGasReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -232,8 +239,8 @@ func (s *Server) EstimateGas(ctx context.Context, request *evmpb.EstimateGasRequ return &evmpb.EstimateGasReply{Gas: gasLimit}, nil } -func (s *Server) GetTransactionByHash(ctx context.Context, request *evmpb.GetTransactionByHashRequest) (*evmpb.GetTransactionByHashReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) GetTransactionByHash(ctx context.Context, request *evmpb.GetTransactionByHashRequest) (*evmpb.GetTransactionByHashReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -256,8 +263,8 @@ func (s *Server) GetTransactionByHash(ctx context.Context, request *evmpb.GetTra }, nil } -func (s *Server) GetTransactionReceipt(ctx context.Context, request *evmpb.GetTransactionReceiptRequest) (*evmpb.GetTransactionReceiptReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) GetTransactionReceipt(ctx context.Context, request *evmpb.GetTransactionReceiptRequest) (*evmpb.GetTransactionReceiptReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -280,8 +287,8 @@ func (s *Server) GetTransactionReceipt(ctx context.Context, request *evmpb.GetTr }, nil } -func (s *Server) HeaderByNumber(ctx context.Context, request *evmpb.HeaderByNumberRequest) (*evmpb.HeaderByNumberReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) HeaderByNumber(ctx context.Context, request *evmpb.HeaderByNumberRequest) (*evmpb.HeaderByNumberReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -313,8 +320,8 @@ func (s *Server) HeaderByNumber(ctx context.Context, request *evmpb.HeaderByNumb }, nil } -func (s *Server) QueryTrackedLogs(ctx context.Context, request *evmpb.QueryTrackedLogsRequest) (*evmpb.QueryTrackedLogsReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) QueryTrackedLogs(ctx context.Context, request *evmpb.QueryTrackedLogsRequest) (*evmpb.QueryTrackedLogsReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -347,9 +354,9 @@ func (s *Server) QueryTrackedLogs(ctx context.Context, request *evmpb.QueryTrack return &evmpb.QueryTrackedLogsReply{Logs: l}, nil } -func (s *Server) GetFiltersNames(ctx context.Context, _ *emptypb.Empty) (*evmpb.GetFiltersNamesReply, error) { +func (es *evmServer) GetFiltersNames(ctx context.Context, _ *emptypb.Empty) (*evmpb.GetFiltersNamesReply, error) { // TODO PLEX-1465: once code is moved away, remove this GetFiltersNames method - evmService, err := s.getEVMService(ctx) + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -362,8 +369,8 @@ func (s *Server) GetFiltersNames(ctx context.Context, _ *emptypb.Empty) (*evmpb. return &evmpb.GetFiltersNamesReply{Items: names}, nil } -func (s *Server) RegisterLogTracking(ctx context.Context, request *evmpb.RegisterLogTrackingRequest) (*emptypb.Empty, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) RegisterLogTracking(ctx context.Context, request *evmpb.RegisterLogTrackingRequest) (*emptypb.Empty, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -380,8 +387,8 @@ func (s *Server) RegisterLogTracking(ctx context.Context, request *evmpb.Registe return &emptypb.Empty{}, nil } -func (s *Server) UnregisterLogTracking(ctx context.Context, request *evmpb.UnregisterLogTrackingRequest) (*emptypb.Empty, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) UnregisterLogTracking(ctx context.Context, request *evmpb.UnregisterLogTrackingRequest) (*emptypb.Empty, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -393,8 +400,8 @@ func (s *Server) UnregisterLogTracking(ctx context.Context, request *evmpb.Unreg return &emptypb.Empty{}, nil } -func (s *Server) GetTransactionStatus(ctx context.Context, request *evmpb.GetTransactionStatusRequest) (*evmpb.GetTransactionStatusReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) GetTransactionStatus(ctx context.Context, request *evmpb.GetTransactionStatusRequest) (*evmpb.GetTransactionStatusReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -408,8 +415,8 @@ func (s *Server) GetTransactionStatus(ctx context.Context, request *evmpb.GetTra return &evmpb.GetTransactionStatusReply{TransactionStatus: evmpb.TransactionStatus(txStatus)}, nil } -func (s *Server) SubmitTransaction(ctx context.Context, request *evmpb.SubmitTransactionRequest) (*evmpb.SubmitTransactionReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) SubmitTransaction(ctx context.Context, request *evmpb.SubmitTransactionRequest) (*evmpb.SubmitTransactionReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -438,8 +445,8 @@ func (s *Server) SubmitTransaction(ctx context.Context, request *evmpb.SubmitTra }, nil } -func (s *Server) CalculateTransactionFee(ctx context.Context, request *evmpb.CalculateTransactionFeeRequest) (*evmpb.CalculateTransactionFeeReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) CalculateTransactionFee(ctx context.Context, request *evmpb.CalculateTransactionFeeRequest) (*evmpb.CalculateTransactionFeeReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -460,8 +467,8 @@ func (s *Server) CalculateTransactionFee(ctx context.Context, request *evmpb.Cal }, nil } -func (s *Server) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty) (*evmpb.GetLatestLPBlockReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty) (*evmpb.GetLatestLPBlockReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } @@ -482,8 +489,8 @@ func (s *Server) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty) (*evmp }, nil } -func (s *Server) GetForwarderForEOA(ctx context.Context, request *evmpb.GetForwarderForEOARequest) (*evmpb.GetForwarderForEOAReply, error) { - evmService, err := s.getEVMService(ctx) +func (es *evmServer) GetForwarderForEOA(ctx context.Context, request *evmpb.GetForwarderForEOARequest) (*evmpb.GetForwarderForEOAReply, error) { + evmService, err := es.parent.getEVMService(ctx) if err != nil { return nil, err } diff --git a/pkg/loop/internal/relayerset/server.go b/pkg/loop/internal/relayerset/server.go index 89ef7ab611..d0a254508f 100644 --- a/pkg/loop/internal/relayerset/server.go +++ b/pkg/loop/internal/relayerset/server.go @@ -35,14 +35,14 @@ type Server struct { log logger.Logger relayerset.UnimplementedRelayerSetServer - evmpb.UnimplementedEVMServer - tonpb.UnimplementedTONServer - pb.ContractReaderServer impl core.RelayerSet broker *net.BrokerExt - sol *solServer + sol *solServer + ton *tonServer + evm *evmServer + contractReader *readerServer serverResources net.Resources @@ -54,22 +54,26 @@ type Server struct { } var _ relayerset.RelayerSetServer = (*Server)(nil) -var _ evmpb.EVMServer = (*Server)(nil) -var _ tonpb.TONServer = (*Server)(nil) -var _ pb.ContractReaderServer = (*Server)(nil) func NewRelayerSetServer(log logger.Logger, underlying core.RelayerSet, broker *net.BrokerExt) (*Server, net.Resource) { pluginProviderServers := make(net.Resources, 0) server := &Server{log: log, impl: underlying, broker: broker, serverResources: pluginProviderServers, readers: map[string]*readerAndServer{}} server.sol = &solServer{parent: server} + server.ton = &tonServer{parent: server} + server.evm = &evmServer{parent: server} + server.contractReader = &readerServer{parent: server} return server, net.Resource{ Name: "PluginProviderServers", Closer: server, } } -func (s *Server) SolanaServer() solpb.SolanaServer { return s.sol } + +func (s *Server) SolanaServer() solpb.SolanaServer { return s.sol } +func (s *Server) TONServer() tonpb.TONServer { return s.ton } +func (s *Server) EVMServer() evmpb.EVMServer { return s.evm } +func (s *Server) ContractReaderServer() pb.ContractReaderServer { return s.contractReader } func (s *Server) Close() error { for _, pluginProviderServer := range s.serverResources { diff --git a/pkg/loop/internal/relayerset/ton.go b/pkg/loop/internal/relayerset/ton.go index ec21f007d0..e7502ab0fa 100644 --- a/pkg/loop/internal/relayerset/ton.go +++ b/pkg/loop/internal/relayerset/ton.go @@ -57,8 +57,15 @@ func (t tonClient) UnregisterFilter(ctx context.Context, in *tonpb.UnregisterFil return t.client.UnregisterFilter(appendRelayID(ctx, t.relayID), in, opts...) } -func (s *Server) GetMasterchainInfo(ctx context.Context, request *emptypb.Empty) (*tonpb.BlockIDExt, error) { - tonService, err := s.getTONService(ctx) +type tonServer struct { + tonpb.UnimplementedTONServer + parent *Server +} + +var _ tonpb.TONServer = (*tonServer)(nil) + +func (ts *tonServer) GetMasterchainInfo(ctx context.Context, request *emptypb.Empty) (*tonpb.BlockIDExt, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -71,8 +78,8 @@ func (s *Server) GetMasterchainInfo(ctx context.Context, request *emptypb.Empty) return &tonpb.BlockIDExt{Workchain: blockIdExt.Workchain, Shard: blockIdExt.Shard, SeqNo: blockIdExt.SeqNo}, nil } -func (s *Server) GetBlockData(ctx context.Context, request *tonpb.GetBlockDataRequest) (*tonpb.Block, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) GetBlockData(ctx context.Context, request *tonpb.GetBlockDataRequest) (*tonpb.Block, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -86,8 +93,8 @@ func (s *Server) GetBlockData(ctx context.Context, request *tonpb.GetBlockDataRe return tonpb.NewBlock(block), nil } -func (s *Server) GetAccountBalance(ctx context.Context, request *tonpb.GetAccountBalanceRequest) (*tonpb.Balance, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) GetAccountBalance(ctx context.Context, request *tonpb.GetAccountBalanceRequest) (*tonpb.Balance, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -101,8 +108,8 @@ func (s *Server) GetAccountBalance(ctx context.Context, request *tonpb.GetAccoun return tonpb.NewBalance(balance), nil } -func (s *Server) SendTx(ctx context.Context, request *tonpb.SendTxRequest) (*emptypb.Empty, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) SendTx(ctx context.Context, request *tonpb.SendTxRequest) (*emptypb.Empty, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -116,8 +123,8 @@ func (s *Server) SendTx(ctx context.Context, request *tonpb.SendTxRequest) (*emp return &emptypb.Empty{}, nil } -func (s *Server) GetTxStatus(ctx context.Context, request *tonpb.GetTxStatusRequest) (*tonpb.GetTxStatusReply, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) GetTxStatus(ctx context.Context, request *tonpb.GetTxStatusRequest) (*tonpb.GetTxStatusReply, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -134,8 +141,8 @@ func (s *Server) GetTxStatus(ctx context.Context, request *tonpb.GetTxStatusRequ }, nil } -func (s *Server) GetTxExecutionFees(ctx context.Context, request *tonpb.GetTxExecutionFeesRequest) (*tonpb.GetTxExecutionFeesReply, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) GetTxExecutionFees(ctx context.Context, request *tonpb.GetTxExecutionFeesRequest) (*tonpb.GetTxExecutionFeesReply, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -151,25 +158,22 @@ func (s *Server) GetTxExecutionFees(ctx context.Context, request *tonpb.GetTxExe }, nil } -func (s *Server) HasFilter(ctx context.Context, request *tonpb.HasFilterRequest) (*tonpb.HasFilterReply, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) HasFilter(ctx context.Context, request *tonpb.HasFilterRequest) (*tonpb.HasFilterReply, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } name := request.GetName() exists := tonService.HasFilter(ctx, name) - if err != nil { - return nil, err - } return &tonpb.HasFilterReply{ Exists: exists, }, nil } -func (s *Server) RegisterFilter(ctx context.Context, request *tonpb.RegisterFilterRequest) (*emptypb.Empty, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) RegisterFilter(ctx context.Context, request *tonpb.RegisterFilterRequest) (*emptypb.Empty, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } @@ -183,8 +187,8 @@ func (s *Server) RegisterFilter(ctx context.Context, request *tonpb.RegisterFilt return &emptypb.Empty{}, nil } -func (s *Server) UnregisterFilter(ctx context.Context, request *tonpb.UnregisterFilterRequest) (*emptypb.Empty, error) { - tonService, err := s.getTONService(ctx) +func (ts *tonServer) UnregisterFilter(ctx context.Context, request *tonpb.UnregisterFilterRequest) (*emptypb.Empty, error) { + tonService, err := ts.parent.getTONService(ctx) if err != nil { return nil, err } From 0a1aaabecdf72c95b4958916812ed8f84b5e24e4 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Wed, 19 Nov 2025 18:54:04 -0500 Subject: [PATCH 15/21] fix comment --- pkg/types/chains/solana/lp_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index ea2607916e..e35811c71f 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -130,7 +130,7 @@ type SubKeyPaths [][]string // matches cache-filter // this filter defines what logs should be cached -// cached logs can be retrieved with [types.SolanaService.QueryLogsFromCache] +// cached logs can be retrieved with [types.SolanaService.QueryTrackedLogs] type LPFilterQuery struct { Name string Address PublicKey From fe0244e9b45d60b4dbb73e8bccef44955b0788c3 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 20 Nov 2025 10:35:45 -0500 Subject: [PATCH 16/21] simplify GetBlock proto --- .../basictrigger/v1/basic_trigger.pb.go | 184 ++++++++ pkg/chains/solana/proto_helpers.go | 117 +---- pkg/chains/solana/solana.pb.go | 439 +++++++----------- pkg/chains/solana/solana.proto | 24 +- pkg/chains/solana/solana_grpc.pb.go | 39 ++ pkg/loop/internal/relayer/solana.go | 29 ++ pkg/loop/internal/relayerset/solana.go | 22 + pkg/types/chains/solana/lp_types.go | 5 + pkg/types/chains/solana/solana.go | 50 -- pkg/types/mocks/solana_service.go | 58 +++ pkg/types/relayer.go | 6 + 11 files changed, 533 insertions(+), 440 deletions(-) create mode 100644 pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go diff --git a/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go b/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go new file mode 100644 index 0000000000..f2a375f31e --- /dev/null +++ b/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go @@ -0,0 +1,184 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.8 +// protoc v5.29.3 +// source: capabilities/internal/basictrigger/v1/basic_trigger.proto + +package basictrigger + +import ( + _ "github.com/smartcontractkit/chainlink-protos/cre/go/tools/generator" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config) Reset() { + *x = Config{} + mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Config) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +type Outputs struct { + state protoimpl.MessageState `protogen:"open.v1"` + CoolOutput string `protobuf:"bytes,1,opt,name=cool_output,json=coolOutput,proto3" json:"cool_output,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Outputs) Reset() { + *x = Outputs{} + mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Outputs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Outputs) ProtoMessage() {} + +func (x *Outputs) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Outputs.ProtoReflect.Descriptor instead. +func (*Outputs) Descriptor() ([]byte, []int) { + return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP(), []int{1} +} + +func (x *Outputs) GetCoolOutput() string { + if x != nil { + return x.CoolOutput + } + return "" +} + +var File_capabilities_internal_basictrigger_v1_basic_trigger_proto protoreflect.FileDescriptor + +const file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc = "" + + "\n" + + "9capabilities/internal/basictrigger/v1/basic_trigger.proto\x12%capabilities.internal.basictrigger.v1\x1a*tools/generator/v1alpha/cre_metadata.proto\"4\n" + + "\x06Config\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x06number\x18\x02 \x01(\x05R\x06number\"*\n" + + "\aOutputs\x12\x1f\n" + + "\vcool_output\x18\x01 \x01(\tR\n" + + "coolOutput2\x95\x01\n" + + "\x05Basic\x12j\n" + + "\aTrigger\x12-.capabilities.internal.basictrigger.v1.Config\x1a..capabilities.internal.basictrigger.v1.Outputs0\x01\x1a \x82\xb5\x18\x1c\b\x01\x12\x18basic-test-trigger@1.0.0b\x06proto3" + +var ( + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescOnce sync.Once + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData []byte +) + +func file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP() []byte { + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescOnce.Do(func() { + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc), len(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc))) + }) + return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData +} + +var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes = []any{ + (*Config)(nil), // 0: capabilities.internal.basictrigger.v1.Config + (*Outputs)(nil), // 1: capabilities.internal.basictrigger.v1.Outputs +} +var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs = []int32{ + 0, // 0: capabilities.internal.basictrigger.v1.Basic.Trigger:input_type -> capabilities.internal.basictrigger.v1.Config + 1, // 1: capabilities.internal.basictrigger.v1.Basic.Trigger:output_type -> capabilities.internal.basictrigger.v1.Outputs + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_capabilities_internal_basictrigger_v1_basic_trigger_proto_init() } +func file_capabilities_internal_basictrigger_v1_basic_trigger_proto_init() { + if File_capabilities_internal_basictrigger_v1_basic_trigger_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc), len(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes, + DependencyIndexes: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs, + MessageInfos: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes, + }.Build() + File_capabilities_internal_basictrigger_v1_basic_trigger_proto = out.File + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes = nil + file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs = nil +} diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index 071ecf2fdb..74066cf699 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -211,36 +211,6 @@ func ConvertConfirmationStatusFromProto(c ConfirmationStatusType) typesolana.Con } } -func ConvertTransactionDetailsFromProto(s TransactionDetailsType) typesolana.TransactionDetailsType { - switch s { - case TransactionDetailsType_TRANSACTION_DETAILS_FULL: - return typesolana.TransactionDetailsFull - case TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS: - return typesolana.TransactionDetailsAccounts - case TransactionDetailsType_TRANSACTION_DETAILS_NONE: - return typesolana.TransactionDetailsNone - case TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES: - return typesolana.TransactionDetailsSignatures - default: - return typesolana.TransactionDetailsType("") - } -} - -func ConvertTransactionDetailsToProto(t typesolana.TransactionDetailsType) TransactionDetailsType { - switch t { - case typesolana.TransactionDetailsAccounts: - return TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS - case typesolana.TransactionDetailsNone: - return TransactionDetailsType_TRANSACTION_DETAILS_NONE - case typesolana.TransactionDetailsSignatures: - return TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES - case typesolana.TransactionDetailsFull: - return TransactionDetailsType_TRANSACTION_DETAILS_FULL - default: - return TransactionDetailsType_TRANSACTION_DETAILS_FULL - } -} - func ConvertDataSliceFromProto(p *DataSlice) *typesolana.DataSlice { if p == nil { return nil @@ -409,11 +379,7 @@ func ConvertGetBlockOptsFromProto(p *GetBlockOpts) *typesolana.GetBlockOpts { return nil } return &typesolana.GetBlockOpts{ - Encoding: ConvertEncodingTypeFromProto(p.Encoding), - TransactionDetails: ConvertTransactionDetailsFromProto(p.TransactionDetails), - Rewards: ptrBool(p.Rewards), - Commitment: ConvertCommitmentFromProto(p.Commitment), - MaxSupportedTransactionVersion: ptrUint64(p.MaxSupportedTransactionVersion), + Commitment: ConvertCommitmentFromProto(p.Commitment), } } @@ -421,20 +387,8 @@ func ConvertGetBlockOptsToProto(o *typesolana.GetBlockOpts) *GetBlockOpts { if o == nil { return nil } - var rewards bool - if o.Rewards != nil { - rewards = *o.Rewards - } - var maxv uint64 - if o.MaxSupportedTransactionVersion != nil { - maxv = *o.MaxSupportedTransactionVersion - } return &GetBlockOpts{ - Encoding: ConvertEncodingTypeToProto(o.Encoding), - TransactionDetails: ConvertTransactionDetailsToProto(o.TransactionDetails), - Rewards: rewards, - Commitment: ConvertCommitmentToProto(o.Commitment), - MaxSupportedTransactionVersion: maxv, + Commitment: ConvertCommitmentToProto(o.Commitment), } } @@ -808,47 +762,6 @@ func ConvertTransactionEnvelopeToProto(e typesolana.TransactionResultEnvelope) * } } -func ConvertTransactionWithMetaFromProto(p *TransactionWithMeta) (*typesolana.TransactionWithMeta, error) { - if p == nil { - return nil, nil - } - env, err := ConvertDataBytesOrJSONFromProto(p.Transaction) - if err != nil { - return nil, fmt.Errorf("transaction bytes/json: %w", err) - } - meta, err := ConvertTransactionMetaFromProto(p.Meta) - if err != nil { - return nil, fmt.Errorf("meta: %w", err) - } - t := typesolana.UnixTimeSeconds(p.BlockTime) - - return &typesolana.TransactionWithMeta{ - Slot: p.Slot, - BlockTime: &t, - Transaction: env, - Meta: meta, - Version: typesolana.TransactionVersion(p.Version), - }, nil -} - -func ConvertTransactionWithMetaToProto(t *typesolana.TransactionWithMeta) *TransactionWithMeta { - if t == nil { - return nil - } - var bt int64 - if t.BlockTime != nil { - bt = int64(*t.BlockTime) - } - - return &TransactionWithMeta{ - Slot: t.Slot, - BlockTime: bt, - Transaction: ConvertDataBytesOrJSONToProto(t.Transaction), - Meta: ConvertTransactionMetaToProto(t.Meta), - Version: int64(t.Version), - } -} - func ConvertGetTransactionReplyFromProto(p *GetTransactionReply) (*typesolana.GetTransactionReply, error) { if p == nil { return nil, nil @@ -972,22 +885,7 @@ func ConvertGetBlockOptsReplyFromProto(p *GetBlockReply) (*typesolana.GetBlockRe if err != nil { return nil, fmt.Errorf("previous blockhash: %w", err) } - txs := make([]typesolana.TransactionWithMeta, 0, len(p.Transactions)) - for _, tx := range p.Transactions { - twm, err := ConvertTransactionWithMetaFromProto(tx) - if err != nil { - return nil, err - } - txs = append(txs, *twm) - } - var sigs []typesolana.Signature - for _, s := range p.Signatures { - ss, err := ConvertSignatureFromProto(s) - if err != nil { - return nil, err - } - sigs = append(sigs, ss) - } + var bt *solana.UnixTimeSeconds if p.BlockTime != 0 { bt = ptrUnix(typesolana.UnixTimeSeconds(p.BlockTime)) @@ -996,8 +894,6 @@ func ConvertGetBlockOptsReplyFromProto(p *GetBlockReply) (*typesolana.GetBlockRe Blockhash: hash, PreviousBlockhash: prev, ParentSlot: p.ParentSlot, - Transactions: txs, - Signatures: sigs, BlockTime: bt, BlockHeight: ptrUint64(p.BlockHeight), }, nil @@ -1015,17 +911,10 @@ func ConvertGetBlockReplyToProto(r *typesolana.GetBlockReply) *GetBlockReply { if r.BlockHeight != nil { bh = *r.BlockHeight } - txs := make([]*TransactionWithMeta, 0, len(r.Transactions)) - for i := range r.Transactions { - txs = append(txs, ConvertTransactionWithMetaToProto(&r.Transactions[i])) - } - sigs := ConvertSignaturesToProto(r.Signatures) return &GetBlockReply{ Blockhash: r.Blockhash[:], PreviousBlockhash: r.PreviousBlockhash[:], ParentSlot: r.ParentSlot, - Transactions: txs, - Signatures: sigs, BlockTime: bt, BlockHeight: bh, } diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 0902e8a825..48cac2af6b 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -11,6 +11,7 @@ import ( pb "github.com/smartcontractkit/chainlink-protos/cre/go/values/pb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -1203,14 +1204,10 @@ func (x *GetBalanceRequest) GetCommitment() CommitmentType { // Options for GetBlock. type GetBlockOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // tx encoding - TransactionDetails TransactionDetailsType `protobuf:"varint,2,opt,name=transaction_details,json=transactionDetails,proto3,enum=loop.solana.TransactionDetailsType" json:"transaction_details,omitempty"` // tx detail level - Rewards bool `protobuf:"varint,3,opt,name=rewards,proto3" json:"rewards,omitempty"` // include rewards - Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency - MaxSupportedTransactionVersion uint64 `protobuf:"varint,5,opt,name=max_supported_transaction_version,json=maxSupportedTransactionVersion,proto3" json:"max_supported_transaction_version,omitempty"` // fail if higher present - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetBlockOpts) Reset() { @@ -1243,27 +1240,6 @@ func (*GetBlockOpts) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{16} } -func (x *GetBlockOpts) GetEncoding() EncodingType { - if x != nil { - return x.Encoding - } - return EncodingType_ENCODING_NONE -} - -func (x *GetBlockOpts) GetTransactionDetails() TransactionDetailsType { - if x != nil { - return x.TransactionDetails - } - return TransactionDetailsType_TRANSACTION_DETAILS_FULL -} - -func (x *GetBlockOpts) GetRewards() bool { - if x != nil { - return x.Rewards - } - return false -} - func (x *GetBlockOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment @@ -1271,21 +1247,12 @@ func (x *GetBlockOpts) GetCommitment() CommitmentType { return CommitmentType_COMMITMENT_NONE } -func (x *GetBlockOpts) GetMaxSupportedTransactionVersion() uint64 { - if x != nil { - return x.MaxSupportedTransactionVersion - } - return 0 -} - // Block response. type GetBlockReply struct { state protoimpl.MessageState `protogen:"open.v1"` Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` // 32-byte block hash PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` // 32-byte parent hash ParentSlot uint64 `protobuf:"varint,3,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` - Transactions []*TransactionWithMeta `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty"` // present if FULL - Signatures [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` // present if SIGNATURES BlockTime int64 `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // chain height unknownFields protoimpl.UnknownFields @@ -1343,20 +1310,6 @@ func (x *GetBlockReply) GetParentSlot() uint64 { return 0 } -func (x *GetBlockReply) GetTransactions() []*TransactionWithMeta { - if x != nil { - return x.Transactions - } - return nil -} - -func (x *GetBlockReply) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - func (x *GetBlockReply) GetBlockTime() int64 { if x != nil { return x.BlockTime @@ -3627,83 +3580,6 @@ func (x *SubmitTransactionRequest) GetEncodedTransaction() string { return "" } -// Block transaction with meta. -type TransactionWithMeta struct { - state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds - Transaction *DataBytesOrJSON `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` // tx (encoding per opts) - Meta *TransactionMeta `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` // execution metadata - Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` // -1 legacy, >=0 v0+ - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TransactionWithMeta) Reset() { - *x = TransactionWithMeta{} - mi := &file_solana_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TransactionWithMeta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionWithMeta) ProtoMessage() {} - -func (x *TransactionWithMeta) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[54] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactionWithMeta.ProtoReflect.Descriptor instead. -func (*TransactionWithMeta) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{54} -} - -func (x *TransactionWithMeta) GetSlot() uint64 { - if x != nil { - return x.Slot - } - return 0 -} - -func (x *TransactionWithMeta) GetBlockTime() int64 { - if x != nil { - return x.BlockTime - } - return 0 -} - -func (x *TransactionWithMeta) GetTransaction() *DataBytesOrJSON { - if x != nil { - return x.Transaction - } - return nil -} - -func (x *TransactionWithMeta) GetMeta() *TransactionMeta { - if x != nil { - return x.Meta - } - return nil -} - -func (x *TransactionWithMeta) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - // Primitive leaf for expressions/filters. type Primitive struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3720,7 +3596,7 @@ type Primitive struct { func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3732,7 +3608,7 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3745,7 +3621,7 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{55} + return file_solana_proto_rawDescGZIP(), []int{54} } func (x *Primitive) GetPrimitive() isPrimitive_Primitive { @@ -3830,7 +3706,7 @@ type QueryTrackedLogsRequest struct { func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3842,7 +3718,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3855,7 +3731,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{56} + return file_solana_proto_rawDescGZIP(), []int{55} } func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { @@ -3881,7 +3757,7 @@ type QueryTrackedLogsReply struct { func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3893,7 +3769,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3906,7 +3782,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{57} + return file_solana_proto_rawDescGZIP(), []int{56} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -3926,7 +3802,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3938,7 +3814,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3951,7 +3827,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{58} + return file_solana_proto_rawDescGZIP(), []int{57} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { @@ -3969,7 +3845,7 @@ type RegisterLogTrackingReply struct { func (x *RegisterLogTrackingReply) Reset() { *x = RegisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3981,7 +3857,7 @@ func (x *RegisterLogTrackingReply) String() string { func (*RegisterLogTrackingReply) ProtoMessage() {} func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3994,7 +3870,7 @@ func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{59} + return file_solana_proto_rawDescGZIP(), []int{58} } // Unregister a filter by name/id. @@ -4007,7 +3883,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4019,7 +3895,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4032,7 +3908,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{60} + return file_solana_proto_rawDescGZIP(), []int{59} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -4050,7 +3926,7 @@ type UnregisterLogTrackingReply struct { func (x *UnregisterLogTrackingReply) Reset() { *x = UnregisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4062,7 +3938,7 @@ func (x *UnregisterLogTrackingReply) String() string { func (*UnregisterLogTrackingReply) ProtoMessage() {} func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4075,14 +3951,67 @@ func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{60} +} + +// latest block processed by lp +type GetLatestLPBlockReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // block slot + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // 32 bytes block hash + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLatestLPBlockReply) Reset() { + *x = GetLatestLPBlockReply{} + mi := &file_solana_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLatestLPBlockReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestLPBlockReply) ProtoMessage() {} + +func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestLPBlockReply.ProtoReflect.Descriptor instead. +func (*GetLatestLPBlockReply) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{61} } +func (x *GetLatestLPBlockReply) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +func (x *GetLatestLPBlockReply) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + var File_solana_proto protoreflect.FileDescriptor const file_solana_proto_rawDesc = "" + "\n" + - "\fsolana.proto\x12\vloop.solana\x1a\x1dloop/chain-common/query.proto\x1a\x16values/v1/values.proto\"\xd5\x01\n" + + "\fsolana.proto\x12\vloop.solana\x1a\x1dloop/chain-common/query.proto\x1a\x16values/v1/values.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xd5\x01\n" + "\aAccount\x12\x1a\n" + "\blamports\x18\x01 \x01(\x04R\blamports\x12\x14\n" + "\x05owner\x18\x02 \x01(\fR\x05owner\x120\n" + @@ -4147,24 +4076,16 @@ const file_solana_proto_rawDesc = "" + "\x04addr\x18\x01 \x01(\fR\x04addr\x12;\n" + "\n" + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + - "commitment\"\xbd\x02\n" + - "\fGetBlockOpts\x125\n" + - "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12T\n" + - "\x13transaction_details\x18\x02 \x01(\x0e2#.loop.solana.TransactionDetailsTypeR\x12transactionDetails\x12\x18\n" + - "\arewards\x18\x03 \x01(\bR\arewards\x12;\n" + + "commitment\"K\n" + + "\fGetBlockOpts\x12;\n" + "\n" + "commitment\x18\x04 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + - "commitment\x12I\n" + - "!max_supported_transaction_version\x18\x05 \x01(\x04R\x1emaxSupportedTransactionVersion\"\xa5\x02\n" + + "commitment\"\xbf\x01\n" + "\rGetBlockReply\x12\x1c\n" + "\tblockhash\x18\x01 \x01(\fR\tblockhash\x12-\n" + "\x12previous_blockhash\x18\x02 \x01(\fR\x11previousBlockhash\x12\x1f\n" + "\vparent_slot\x18\x03 \x01(\x04R\n" + - "parentSlot\x12D\n" + - "\ftransactions\x18\x04 \x03(\v2 .loop.solana.TransactionWithMetaR\ftransactions\x12\x1e\n" + - "\n" + - "signatures\x18\x05 \x03(\fR\n" + - "signatures\x12\x1d\n" + + "parentSlot\x12\x1d\n" + "\n" + "block_time\x18\x06 \x01(\x03R\tblockTime\x12!\n" + "\fblock_height\x18\a \x01(\x04R\vblockHeight\"T\n" + @@ -4340,14 +4261,7 @@ const file_solana_proto_rawDesc = "" + "\x18SubmitTransactionRequest\x12,\n" + "\x03cfg\x18\x01 \x01(\v2\x1a.loop.solana.ComputeConfigR\x03cfg\x12\x1a\n" + "\breceiver\x18\x02 \x01(\fR\breceiver\x12/\n" + - "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xd4\x01\n" + - "\x13TransactionWithMeta\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + - "\n" + - "block_time\x18\x02 \x01(\x03R\tblockTime\x12>\n" + - "\vtransaction\x18\x03 \x01(\v2\x1c.loop.solana.DataBytesOrJSONR\vtransaction\x120\n" + - "\x04meta\x18\x04 \x01(\v2\x1c.loop.solana.TransactionMetaR\x04meta\x12\x18\n" + - "\aversion\x18\x05 \x01(\x03R\aversion\"\xe6\x01\n" + + "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xe6\x01\n" + "\tPrimitive\x12K\n" + "\x11general_primitive\x18\x01 \x01(\v2\x1c.loop.chain.common.PrimitiveH\x00R\x10generalPrimitive\x12\x1a\n" + "\aaddress\x18\x02 \x01(\fH\x00R\aaddress\x12\x1d\n" + @@ -4366,7 +4280,10 @@ const file_solana_proto_rawDesc = "" + "\n" + "filterName\x18\x01 \x01(\tR\n" + "filterName\"\x1c\n" + - "\x1aUnregisterLogTrackingReply*A\n" + + "\x1aUnregisterLogTrackingReply\"?\n" + + "\x15GetLatestLPBlockReply\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x12\n" + + "\x04hash\x18\x02 \x01(\fR\x04hash*A\n" + "\x11TransactionStatus\x12\f\n" + "\bTX_FATAL\x10\x00\x12\x0e\n" + "\n" + @@ -4394,7 +4311,8 @@ const file_solana_proto_rawDesc = "" + "\x11CONFIRMATION_NONE\x10\x00\x12\x1a\n" + "\x16CONFIRMATION_PROCESSED\x10\x01\x12\x1a\n" + "\x16CONFIRMATION_CONFIRMED\x10\x02\x12\x1a\n" + - "\x16CONFIRMATION_FINALIZED\x10\x032\xdd\t\n" + + "\x16CONFIRMATION_FINALIZED\x10\x032\xad\n" + + "\n" + "\x06Solana\x12n\n" + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + "\n" + @@ -4410,7 +4328,8 @@ const file_solana_proto_rawDesc = "" + "\n" + "SimulateTX\x12\x1e.loop.solana.SimulateTXRequest\x1a\x1c.loop.solana.SimulateTXReply\x12_\n" + "\x11SubmitTransaction\x12%.loop.solana.SubmitTransactionRequest\x1a#.loop.solana.SubmitTransactionReply\x12k\n" + - "\x15UnregisterLogTracking\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" + "\x15UnregisterLogTracking\x12).loop.solana.UnregisterLogTrackingRequest\x1a'.loop.solana.UnregisterLogTrackingReply\x12N\n" + + "\x10GetLatestLPBlock\x12\x16.google.protobuf.Empty\x1a\".loop.solana.GetLatestLPBlockReplyB@Z>github.com/smartcontractkit/chainlink-common/pkg/chains/solanab\x06proto3" var ( file_solana_proto_rawDescOnce sync.Once @@ -4486,19 +4405,20 @@ var file_solana_proto_goTypes = []any{ (*SimulateTransactionAccountsOpts)(nil), // 56: loop.solana.SimulateTransactionAccountsOpts (*SubmitTransactionReply)(nil), // 57: loop.solana.SubmitTransactionReply (*SubmitTransactionRequest)(nil), // 58: loop.solana.SubmitTransactionRequest - (*TransactionWithMeta)(nil), // 59: loop.solana.TransactionWithMeta - (*Primitive)(nil), // 60: loop.solana.Primitive - (*QueryTrackedLogsRequest)(nil), // 61: loop.solana.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 62: loop.solana.QueryTrackedLogsReply - (*RegisterLogTrackingRequest)(nil), // 63: loop.solana.RegisterLogTrackingRequest - (*RegisterLogTrackingReply)(nil), // 64: loop.solana.RegisterLogTrackingReply - (*UnregisterLogTrackingRequest)(nil), // 65: loop.solana.UnregisterLogTrackingRequest - (*UnregisterLogTrackingReply)(nil), // 66: loop.solana.UnregisterLogTrackingReply + (*Primitive)(nil), // 59: loop.solana.Primitive + (*QueryTrackedLogsRequest)(nil), // 60: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 61: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 62: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 63: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 64: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 65: loop.solana.UnregisterLogTrackingReply + (*GetLatestLPBlockReply)(nil), // 66: loop.solana.GetLatestLPBlockReply (*pb.BigInt)(nil), // 67: values.v1.BigInt (chain_common.ComparisonOperator)(0), // 68: loop.chain.common.ComparisonOperator (chain_common.BooleanOperator)(0), // 69: loop.chain.common.BooleanOperator (*chain_common.Primitive)(nil), // 70: loop.chain.common.Primitive (*chain_common.LimitAndSort)(nil), // 71: loop.chain.common.LimitAndSort + (*emptypb.Empty)(nil), // 72: google.protobuf.Empty } var file_solana_proto_depIdxs = []int32{ 9, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON @@ -4507,7 +4427,7 @@ var file_solana_proto_depIdxs = []int32{ 48, // 3: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator 68, // 4: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator 12, // 5: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator - 60, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 59, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive 15, // 7: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression 69, // 8: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator 14, // 9: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression @@ -4518,84 +4438,81 @@ var file_solana_proto_depIdxs = []int32{ 5, // 14: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account 16, // 15: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts 3, // 16: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType - 2, // 17: loop.solana.GetBlockOpts.encoding:type_name -> loop.solana.EncodingType - 1, // 18: loop.solana.GetBlockOpts.transaction_details:type_name -> loop.solana.TransactionDetailsType - 3, // 19: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType - 59, // 20: loop.solana.GetBlockReply.transactions:type_name -> loop.solana.TransactionWithMeta - 21, // 21: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts - 3, // 22: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType - 2, // 23: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 3, // 24: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType - 10, // 25: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice - 52, // 26: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext - 5, // 27: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account - 26, // 28: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts - 31, // 29: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult - 4, // 30: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType - 3, // 31: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType - 34, // 32: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader - 41, // 33: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction - 35, // 34: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage - 37, // 35: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount - 41, // 36: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction - 2, // 37: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType - 42, // 38: loop.solana.ReturnData.data:type_name -> loop.solana.Data - 38, // 39: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance - 38, // 40: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance - 39, // 41: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction - 40, // 42: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses - 43, // 43: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData - 36, // 44: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction - 45, // 45: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope - 44, // 46: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta - 49, // 47: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys - 8, // 48: loop.solana.RPCContext.context:type_name -> loop.solana.Context - 3, // 49: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType - 56, // 50: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts - 5, // 51: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account - 53, // 52: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts - 2, // 53: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 0, // 54: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus - 7, // 55: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig - 9, // 56: loop.solana.TransactionWithMeta.transaction:type_name -> loop.solana.DataBytesOrJSON - 44, // 57: loop.solana.TransactionWithMeta.meta:type_name -> loop.solana.TransactionMeta - 70, // 58: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 13, // 59: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey - 14, // 60: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression - 71, // 61: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 51, // 62: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log - 50, // 63: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery - 18, // 64: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest - 20, // 65: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest - 23, // 66: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest - 25, // 67: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest - 28, // 68: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest - 30, // 69: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest - 33, // 70: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest - 47, // 71: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 61, // 72: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest - 63, // 73: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest - 55, // 74: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 58, // 75: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest - 65, // 76: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest - 17, // 77: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply - 19, // 78: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply - 22, // 79: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply - 24, // 80: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply - 27, // 81: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply - 29, // 82: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply - 32, // 83: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply - 46, // 84: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply - 62, // 85: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply - 64, // 86: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply - 54, // 87: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply - 57, // 88: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply - 66, // 89: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply - 77, // [77:90] is the sub-list for method output_type - 64, // [64:77] is the sub-list for method input_type - 64, // [64:64] is the sub-list for extension type_name - 64, // [64:64] is the sub-list for extension extendee - 0, // [0:64] is the sub-list for field type_name + 3, // 17: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType + 21, // 18: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts + 3, // 19: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType + 2, // 20: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 3, // 21: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType + 10, // 22: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice + 52, // 23: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext + 5, // 24: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account + 26, // 25: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts + 31, // 26: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult + 4, // 27: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType + 3, // 28: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType + 34, // 29: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader + 41, // 30: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction + 35, // 31: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage + 37, // 32: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount + 41, // 33: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction + 2, // 34: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType + 42, // 35: loop.solana.ReturnData.data:type_name -> loop.solana.Data + 38, // 36: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance + 38, // 37: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance + 39, // 38: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction + 40, // 39: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses + 43, // 40: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData + 36, // 41: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction + 45, // 42: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope + 44, // 43: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta + 49, // 44: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys + 8, // 45: loop.solana.RPCContext.context:type_name -> loop.solana.Context + 3, // 46: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType + 56, // 47: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 5, // 48: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 53, // 49: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 2, // 50: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 0, // 51: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus + 7, // 52: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 70, // 53: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 13, // 54: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey + 14, // 55: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 71, // 56: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 51, // 57: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log + 50, // 58: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 18, // 59: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 20, // 60: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest + 23, // 61: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest + 25, // 62: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 28, // 63: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 30, // 64: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 33, // 65: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 47, // 66: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 60, // 67: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest + 62, // 68: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest + 55, // 69: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 58, // 70: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest + 64, // 71: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest + 72, // 72: loop.solana.Solana.GetLatestLPBlock:input_type -> google.protobuf.Empty + 17, // 73: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 19, // 74: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply + 22, // 75: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply + 24, // 76: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 27, // 77: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 29, // 78: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 32, // 79: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 46, // 80: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply + 61, // 81: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply + 63, // 82: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply + 54, // 83: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply + 57, // 84: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply + 65, // 85: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply + 66, // 86: loop.solana.Solana.GetLatestLPBlock:output_type -> loop.solana.GetLatestLPBlockReply + 73, // [73:87] is the sub-list for method output_type + 59, // [59:73] is the sub-list for method input_type + 59, // [59:59] is the sub-list for extension type_name + 59, // [59:59] is the sub-list for extension extendee + 0, // [0:59] is the sub-list for field type_name } func init() { file_solana_proto_init() } @@ -4611,7 +4528,7 @@ func file_solana_proto_init() { (*TransactionEnvelope_Raw)(nil), (*TransactionEnvelope_Parsed)(nil), } - file_solana_proto_msgTypes[55].OneofWrappers = []any{ + file_solana_proto_msgTypes[54].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_Address)(nil), (*Primitive_EventSig)(nil), diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index c0e5547f25..73dfb1fb5f 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -3,6 +3,7 @@ option go_package = "github.com/smartcontractkit/chainlink-common/pkg/chains/sol import "loop/chain-common/query.proto"; import "values/v1/values.proto"; +import "google/protobuf/empty.proto"; package loop.solana; @@ -20,6 +21,7 @@ service Solana { rpc SimulateTX(SimulateTXRequest) returns (SimulateTXReply); rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc UnregisterLogTracking(UnregisterLogTrackingRequest) returns (UnregisterLogTrackingReply); + rpc GetLatestLPBlock(google.protobuf.Empty) returns (GetLatestLPBlockReply); } // Transaction execution status returned by submitters/simulations. @@ -167,11 +169,7 @@ message GetBalanceRequest { // Options for GetBlock. message GetBlockOpts { - EncodingType encoding = 1; // tx encoding - TransactionDetailsType transaction_details = 2; // tx detail level - bool rewards = 3; // include rewards CommitmentType commitment = 4; // read consistency - uint64 max_supported_transaction_version = 5; // fail if higher present } // Block response. @@ -179,8 +177,6 @@ message GetBlockReply { bytes blockhash = 1; // 32-byte block hash bytes previous_blockhash = 2; // 32-byte parent hash uint64 parent_slot = 3; - repeated TransactionWithMeta transactions = 4; // present if FULL - repeated bytes signatures = 5; // present if SIGNATURES int64 block_time = 6; // unix seconds uint64 block_height = 7; // chain height } @@ -441,15 +437,6 @@ message SubmitTransactionRequest { string encoded_transaction = 3; // base64/base58 tx } -// Block transaction with meta. -message TransactionWithMeta { - uint64 slot = 1; // processed slot - int64 block_time = 2; // unix seconds - DataBytesOrJSON transaction = 3; // tx (encoding per opts) - TransactionMeta meta = 4; // execution metadata - int64 version = 5; // -1 legacy, >=0 v0+ -} - // Primitive leaf for expressions/filters. message Primitive { oneof primitive { @@ -483,3 +470,10 @@ message UnregisterLogTrackingRequest { } message UnregisterLogTrackingReply {} + + +// latest block processed by lp +message GetLatestLPBlockReply { + uint64 slot = 1; // block slot + bytes hash = 2; // 32 bytes block hash +} diff --git a/pkg/chains/solana/solana_grpc.pb.go b/pkg/chains/solana/solana_grpc.pb.go index 44d555a70e..0ba218f75a 100644 --- a/pkg/chains/solana/solana_grpc.pb.go +++ b/pkg/chains/solana/solana_grpc.pb.go @@ -11,6 +11,7 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file @@ -32,6 +33,7 @@ const ( Solana_SimulateTX_FullMethodName = "/loop.solana.Solana/SimulateTX" Solana_SubmitTransaction_FullMethodName = "/loop.solana.Solana/SubmitTransaction" Solana_UnregisterLogTracking_FullMethodName = "/loop.solana.Solana/UnregisterLogTracking" + Solana_GetLatestLPBlock_FullMethodName = "/loop.solana.Solana/GetLatestLPBlock" ) // SolanaClient is the client API for Solana service. @@ -51,6 +53,7 @@ type SolanaClient interface { SimulateTX(ctx context.Context, in *SimulateTXRequest, opts ...grpc.CallOption) (*SimulateTXReply, error) SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*UnregisterLogTrackingReply, error) + GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestLPBlockReply, error) } type solanaClient struct { @@ -191,6 +194,16 @@ func (c *solanaClient) UnregisterLogTracking(ctx context.Context, in *Unregister return out, nil } +func (c *solanaClient) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestLPBlockReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLatestLPBlockReply) + err := c.cc.Invoke(ctx, Solana_GetLatestLPBlock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // SolanaServer is the server API for Solana service. // All implementations must embed UnimplementedSolanaServer // for forward compatibility. @@ -208,6 +221,7 @@ type SolanaServer interface { SimulateTX(context.Context, *SimulateTXRequest) (*SimulateTXReply, error) SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) + GetLatestLPBlock(context.Context, *emptypb.Empty) (*GetLatestLPBlockReply, error) mustEmbedUnimplementedSolanaServer() } @@ -257,6 +271,9 @@ func (UnimplementedSolanaServer) SubmitTransaction(context.Context, *SubmitTrans func (UnimplementedSolanaServer) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*UnregisterLogTrackingReply, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") } +func (UnimplementedSolanaServer) GetLatestLPBlock(context.Context, *emptypb.Empty) (*GetLatestLPBlockReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestLPBlock not implemented") +} func (UnimplementedSolanaServer) mustEmbedUnimplementedSolanaServer() {} func (UnimplementedSolanaServer) testEmbeddedByValue() {} @@ -512,6 +529,24 @@ func _Solana_UnregisterLogTracking_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Solana_GetLatestLPBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServer).GetLatestLPBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Solana_GetLatestLPBlock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServer).GetLatestLPBlock(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // Solana_ServiceDesc is the grpc.ServiceDesc for Solana service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -571,6 +606,10 @@ var Solana_ServiceDesc = grpc.ServiceDesc{ MethodName: "UnregisterLogTracking", Handler: _Solana_UnregisterLogTracking_Handler, }, + { + MethodName: "GetLatestLPBlock", + Handler: _Solana_GetLatestLPBlock_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "solana.proto", diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go index b7e4411b7c..06365395d4 100644 --- a/pkg/loop/internal/relayer/solana.go +++ b/pkg/loop/internal/relayer/solana.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "google.golang.org/protobuf/types/known/emptypb" ) var _ types.SolanaService = (*SolClient)(nil) @@ -24,6 +25,22 @@ func NewSolanaClient(client solpb.SolanaClient) *SolClient { } } +func (sc *SolClient) GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, error) { + resp, err := sc.grpcClient.GetLatestLPBlock(ctx, &emptypb.Empty{}) + if err != nil { + return nil, net.WrapRPCErr(err) + } + hash, err := solpb.ConvertHashFromProto(resp.Hash) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solana.LPBlock{ + Slot: resp.GetSlot(), + Hash: hash, + }, nil +} + func (sc *SolClient) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { pReq := solpb.ConvertSubmitTransactionRequestToProto(req) @@ -217,6 +234,18 @@ func newSolServer(impl types.SolanaService, b *net.BrokerExt) *solServer { return &solServer{impl: impl, BrokerExt: b.WithName("SolanaServer")} } +func (s *solServer) GetLatestLPBlock(ctx context.Context, _ *emptypb.Empty) (*solpb.GetLatestLPBlockReply, error) { + dResp, err := s.impl.GetLatestLPBlock(ctx) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return &solpb.GetLatestLPBlockReply{ + Hash: dResp.Hash[:], + Slot: dResp.Slot, + }, nil +} + func (s *solServer) SubmitTransaction(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { dReq, err := solpb.ConvertSubmitTransactionRequestFromProto(req) if err != nil { diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go index 6721e8ad4f..abd8c6debc 100644 --- a/pkg/loop/internal/relayerset/solana.go +++ b/pkg/loop/internal/relayerset/solana.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/emptypb" ) // solClient wraps the SolanaRelayerSetClient by attaching a RelayerID to SolClient requests. @@ -34,6 +35,10 @@ func (sc *solClient) GetBlock(ctx context.Context, in *solpb.GetBlockRequest, op return sc.client.GetBlock(appendRelayID(ctx, sc.relayID), in, opts...) } +func (sc *solClient) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*solpb.GetLatestLPBlockReply, error) { + return sc.client.GetLatestLPBlock(appendRelayID(ctx, sc.relayID), in, opts...) +} + func (sc *solClient) GetFeeForMessage(ctx context.Context, in *solpb.GetFeeForMessageRequest, opts ...grpc.CallOption) (*solpb.GetFeeForMessageReply, error) { return sc.client.GetFeeForMessage(appendRelayID(ctx, sc.relayID), in, opts...) } @@ -82,6 +87,23 @@ type solServer struct { var _ solpb.SolanaServer = (*solServer)(nil) // Server handlers +func (ss *solServer) GetLatestLPBlock(ctx context.Context, _ *emptypb.Empty) (*solpb.GetLatestLPBlockReply, error) { + solService, err := ss.parent.getSolService(ctx) + if err != nil { + return nil, err + } + + dResp, err := solService.GetLatestLPBlock(ctx) + if err != nil { + return nil, err + } + + return &solpb.GetLatestLPBlockReply{ + Hash: dResp.Hash[:], + Slot: dResp.Slot, + }, nil +} + func (ss *solServer) SubmitTransaction(ctx context.Context, req *solpb.SubmitTransactionRequest) (*solpb.SubmitTransactionReply, error) { solService, err := ss.parent.getSolService(ctx) if err != nil { diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index e35811c71f..380ea5b094 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -158,3 +158,8 @@ type Log struct { SequenceNum int64 Error *string } + +type LPBlock struct { + Slot uint64 + Hash Hash +} diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index 1bdd6c4468..91f2b27ec9 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -302,56 +302,13 @@ type CompiledInstruction struct { StackHeight uint16 } -type TransactionWithMeta struct { - // The slot this transaction was processed in. - Slot uint64 - - // Estimated production time, as Unix timestamp (seconds since the Unix epoch) - // of when the transaction was processed. - // Nil if not available. - BlockTime *UnixTimeSeconds - - // Encoded Transaction - Transaction *DataBytesOrJSON - - Meta *TransactionMeta - - Version TransactionVersion -} - // represents solana-go GetBlockOpts type GetBlockOpts struct { - // Encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". - // If parameter not provided, the default encoding is "json". - // - "jsonParsed" encoding attempts to use program-specific instruction parsers to return - // more human-readable and explicit data in the transaction.message.instructions list. - // - If "jsonParsed" is requested but a parser cannot be found, the instruction falls back - // to regular JSON encoding (accounts, data, and programIdIndex fields). - // - // This parameter is optional. - Encoding EncodingType - - // Level of transaction detail to return. - // If parameter not provided, the default detail level is "full". - // - // This parameter is optional. - TransactionDetails TransactionDetailsType - - // Whether to populate the rewards array. - // If parameter not provided, the default includes rewards. - // - // This parameter is optional. - Rewards *bool - // "processed" is not supported. // If parameter not provided, the default is "finalized". // // This parameter is optional. Commitment CommitmentType - - // Max transaction version to return in responses. - // If the requested block contains a transaction with a higher version, an error will be returned. - MaxSupportedTransactionVersion *uint64 } var ( @@ -450,13 +407,6 @@ type GetBlockReply struct { // The slot index of this block's parent. ParentSlot uint64 - // Present if "full" transaction details are requested. - Transactions []TransactionWithMeta - - // Present if "signatures" are requested for transaction details; - // an array of signatures, corresponding to the transaction order in the block. - Signatures []Signature - // Estimated production time, as Unix timestamp (seconds since the Unix epoch). // Nil if not available. BlockTime *UnixTimeSeconds diff --git a/pkg/types/mocks/solana_service.go b/pkg/types/mocks/solana_service.go index 3de7d41d35..5ece5720f4 100644 --- a/pkg/types/mocks/solana_service.go +++ b/pkg/types/mocks/solana_service.go @@ -260,6 +260,64 @@ func (_c *SolanaService_GetFeeForMessage_Call) RunAndReturn(run func(context.Con return _c } +// GetLatestLPBlock provides a mock function with given fields: ctx +func (_m *SolanaService) GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetLatestLPBlock") + } + + var r0 *solana.LPBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*solana.LPBlock, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *solana.LPBlock); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.LPBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetLatestLPBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestLPBlock' +type SolanaService_GetLatestLPBlock_Call struct { + *mock.Call +} + +// GetLatestLPBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *SolanaService_Expecter) GetLatestLPBlock(ctx interface{}) *SolanaService_GetLatestLPBlock_Call { + return &SolanaService_GetLatestLPBlock_Call{Call: _e.mock.On("GetLatestLPBlock", ctx)} +} + +func (_c *SolanaService_GetLatestLPBlock_Call) Run(run func(ctx context.Context)) *SolanaService_GetLatestLPBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *SolanaService_GetLatestLPBlock_Call) Return(_a0 *solana.LPBlock, _a1 error) *SolanaService_GetLatestLPBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetLatestLPBlock_Call) RunAndReturn(run func(context.Context) (*solana.LPBlock, error)) *SolanaService_GetLatestLPBlock_Call { + _c.Call.Return(run) + return _c +} + // GetMultipleAccountsWithOpts provides a mock function with given fields: ctx, req func (_m *SolanaService) GetMultipleAccountsWithOpts(ctx context.Context, req solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error) { ret := _m.Called(ctx, req) diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index 0543a0885b..f848834c8b 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -250,6 +250,9 @@ type SolanaService interface { // collected through previously registered log filters. QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort) ([]*solana.Log, error) + + // GetLatestLPBlock retrieves current LatestBlock from cache perspective + GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, error) } // Relayer extends ChainService with providers for each product. @@ -531,3 +534,6 @@ func (uss *UnimplementedSolanaService) GetSignatureStatuses(ctx context.Context, func (uss *UnimplementedSolanaService) SimulateTX(ctx context.Context, req solana.SimulateTXRequest) (*solana.SimulateTXReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") } +func (uss *UnimplementedSolanaService) GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestLPBlock not implemented") +} From d45c7c6543799a1b6ff50c1e26d5bec4795c2156 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 20 Nov 2025 10:39:55 -0500 Subject: [PATCH 17/21] fix gen --- .../basictrigger/v1/basic_trigger.pb.go | 184 ------------------ 1 file changed, 184 deletions(-) delete mode 100644 pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go diff --git a/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go b/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go deleted file mode 100644 index f2a375f31e..0000000000 --- a/pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/capabilities/internal/basictrigger/v1/basic_trigger.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc v5.29.3 -// source: capabilities/internal/basictrigger/v1/basic_trigger.proto - -package basictrigger - -import ( - _ "github.com/smartcontractkit/chainlink-protos/cre/go/tools/generator" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Config struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Config) Reset() { - *x = Config{} - mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP(), []int{0} -} - -func (x *Config) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Config) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -type Outputs struct { - state protoimpl.MessageState `protogen:"open.v1"` - CoolOutput string `protobuf:"bytes,1,opt,name=cool_output,json=coolOutput,proto3" json:"cool_output,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Outputs) Reset() { - *x = Outputs{} - mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Outputs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Outputs) ProtoMessage() {} - -func (x *Outputs) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Outputs.ProtoReflect.Descriptor instead. -func (*Outputs) Descriptor() ([]byte, []int) { - return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP(), []int{1} -} - -func (x *Outputs) GetCoolOutput() string { - if x != nil { - return x.CoolOutput - } - return "" -} - -var File_capabilities_internal_basictrigger_v1_basic_trigger_proto protoreflect.FileDescriptor - -const file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc = "" + - "\n" + - "9capabilities/internal/basictrigger/v1/basic_trigger.proto\x12%capabilities.internal.basictrigger.v1\x1a*tools/generator/v1alpha/cre_metadata.proto\"4\n" + - "\x06Config\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06number\x18\x02 \x01(\x05R\x06number\"*\n" + - "\aOutputs\x12\x1f\n" + - "\vcool_output\x18\x01 \x01(\tR\n" + - "coolOutput2\x95\x01\n" + - "\x05Basic\x12j\n" + - "\aTrigger\x12-.capabilities.internal.basictrigger.v1.Config\x1a..capabilities.internal.basictrigger.v1.Outputs0\x01\x1a \x82\xb5\x18\x1c\b\x01\x12\x18basic-test-trigger@1.0.0b\x06proto3" - -var ( - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescOnce sync.Once - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData []byte -) - -func file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescGZIP() []byte { - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescOnce.Do(func() { - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc), len(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc))) - }) - return file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDescData -} - -var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes = []any{ - (*Config)(nil), // 0: capabilities.internal.basictrigger.v1.Config - (*Outputs)(nil), // 1: capabilities.internal.basictrigger.v1.Outputs -} -var file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs = []int32{ - 0, // 0: capabilities.internal.basictrigger.v1.Basic.Trigger:input_type -> capabilities.internal.basictrigger.v1.Config - 1, // 1: capabilities.internal.basictrigger.v1.Basic.Trigger:output_type -> capabilities.internal.basictrigger.v1.Outputs - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_capabilities_internal_basictrigger_v1_basic_trigger_proto_init() } -func file_capabilities_internal_basictrigger_v1_basic_trigger_proto_init() { - if File_capabilities_internal_basictrigger_v1_basic_trigger_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc), len(file_capabilities_internal_basictrigger_v1_basic_trigger_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes, - DependencyIndexes: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs, - MessageInfos: file_capabilities_internal_basictrigger_v1_basic_trigger_proto_msgTypes, - }.Build() - File_capabilities_internal_basictrigger_v1_basic_trigger_proto = out.File - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_goTypes = nil - file_capabilities_internal_basictrigger_v1_basic_trigger_proto_depIdxs = nil -} From c2ac08502230bcc8cbbe48798ee41bb26927d561 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 20 Nov 2025 10:47:10 -0500 Subject: [PATCH 18/21] fix relayerset test --- pkg/loop/internal/relayerset/relayerset_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/loop/internal/relayerset/relayerset_test.go b/pkg/loop/internal/relayerset/relayerset_test.go index 5256b17b78..2156633ec4 100644 --- a/pkg/loop/internal/relayerset/relayerset_test.go +++ b/pkg/loop/internal/relayerset/relayerset_test.go @@ -693,14 +693,10 @@ func Test_RelayerSet_SolanaService(t *testing.T) { { name: "GetBlock", run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { - rew := true req := soltypes.GetBlockRequest{ Slot: 42, Opts: &soltypes.GetBlockOpts{ - Encoding: soltypes.EncodingJSON, - TransactionDetails: soltypes.TransactionDetailsNone, - Rewards: &rew, - Commitment: soltypes.CommitmentConfirmed, + Commitment: soltypes.CommitmentConfirmed, }, } expHash := soltypes.Hash{1, 2, 3} From 0cc5d531711bb14b59efc74ccb1d9ff984ce8090 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 20 Nov 2025 11:00:59 -0500 Subject: [PATCH 19/21] rm Hash from getLatestLPBlock --- pkg/chains/solana/solana.pb.go | 13 ++----------- pkg/chains/solana/solana.proto | 1 - pkg/loop/internal/relayer/solana.go | 6 ------ pkg/loop/internal/relayerset/solana.go | 1 - pkg/types/chains/solana/lp_types.go | 1 - 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 48cac2af6b..e48074018d 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -3958,7 +3958,6 @@ func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { type GetLatestLPBlockReply struct { state protoimpl.MessageState `protogen:"open.v1"` Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // block slot - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // 32 bytes block hash unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4000,13 +3999,6 @@ func (x *GetLatestLPBlockReply) GetSlot() uint64 { return 0 } -func (x *GetLatestLPBlockReply) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - var File_solana_proto protoreflect.FileDescriptor const file_solana_proto_rawDesc = "" + @@ -4280,10 +4272,9 @@ const file_solana_proto_rawDesc = "" + "\n" + "filterName\x18\x01 \x01(\tR\n" + "filterName\"\x1c\n" + - "\x1aUnregisterLogTrackingReply\"?\n" + + "\x1aUnregisterLogTrackingReply\"+\n" + "\x15GetLatestLPBlockReply\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x12\n" + - "\x04hash\x18\x02 \x01(\fR\x04hash*A\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot*A\n" + "\x11TransactionStatus\x12\f\n" + "\bTX_FATAL\x10\x00\x12\x0e\n" + "\n" + diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 73dfb1fb5f..b3b06bddcc 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -475,5 +475,4 @@ message UnregisterLogTrackingReply {} // latest block processed by lp message GetLatestLPBlockReply { uint64 slot = 1; // block slot - bytes hash = 2; // 32 bytes block hash } diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go index 06365395d4..491a4935ba 100644 --- a/pkg/loop/internal/relayer/solana.go +++ b/pkg/loop/internal/relayer/solana.go @@ -30,14 +30,9 @@ func (sc *SolClient) GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, err if err != nil { return nil, net.WrapRPCErr(err) } - hash, err := solpb.ConvertHashFromProto(resp.Hash) - if err != nil { - return nil, net.WrapRPCErr(err) - } return &solana.LPBlock{ Slot: resp.GetSlot(), - Hash: hash, }, nil } @@ -241,7 +236,6 @@ func (s *solServer) GetLatestLPBlock(ctx context.Context, _ *emptypb.Empty) (*so } return &solpb.GetLatestLPBlockReply{ - Hash: dResp.Hash[:], Slot: dResp.Slot, }, nil } diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go index abd8c6debc..563ee8ff92 100644 --- a/pkg/loop/internal/relayerset/solana.go +++ b/pkg/loop/internal/relayerset/solana.go @@ -99,7 +99,6 @@ func (ss *solServer) GetLatestLPBlock(ctx context.Context, _ *emptypb.Empty) (*s } return &solpb.GetLatestLPBlockReply{ - Hash: dResp.Hash[:], Slot: dResp.Slot, }, nil } diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index 380ea5b094..4edd358919 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -161,5 +161,4 @@ type Log struct { type LPBlock struct { Slot uint64 - Hash Hash } From 3f5a644f98f60a03d9d9fcafe7b7fa8f13376dd3 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Fri, 21 Nov 2025 10:11:21 -0500 Subject: [PATCH 20/21] update proto --- pkg/chains/solana/proto_helpers.go | 144 +- pkg/chains/solana/proto_helpers_test.go | 20 +- pkg/chains/solana/solana.pb.go | 3897 ++++++++--------- pkg/chains/solana/solana.proto | 247 +- .../internal/relayerset/relayerset_test.go | 6 +- pkg/types/chains/solana/solana.go | 6 +- 6 files changed, 2127 insertions(+), 2193 deletions(-) diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index 74066cf699..6df89854ec 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -127,15 +127,15 @@ func ConvertEventSigFromProto(b []byte) (typesolana.EventSignature, error) { func ConvertEncodingTypeFromProto(e EncodingType) typesolana.EncodingType { switch e { - case EncodingType_ENCODING_BASE58: + case EncodingType_ENCODING_TYPE_BASE58: return typesolana.EncodingBase58 - case EncodingType_ENCODING_BASE64: + case EncodingType_ENCODING_TYPE_BASE64: return typesolana.EncodingBase64 - case EncodingType_ENCODING_BASE64_ZST: + case EncodingType_ENCODING_TYPE_BASE64_ZSTD: return typesolana.EncodingBase64Zstd - case EncodingType_ENCODING_JSON: + case EncodingType_ENCODING_TYPE_JSON: return typesolana.EncodingJSON - case EncodingType_ENCODING_JSON_PARSED: + case EncodingType_ENCODING_TYPE_JSON_PARSED: return typesolana.EncodingJSONParsed default: return typesolana.EncodingType("") @@ -145,27 +145,27 @@ func ConvertEncodingTypeFromProto(e EncodingType) typesolana.EncodingType { func ConvertEncodingTypeToProto(e typesolana.EncodingType) EncodingType { switch e { case typesolana.EncodingBase64: - return EncodingType_ENCODING_BASE64 + return EncodingType_ENCODING_TYPE_BASE64 case typesolana.EncodingBase58: - return EncodingType_ENCODING_BASE58 + return EncodingType_ENCODING_TYPE_BASE58 case typesolana.EncodingBase64Zstd: - return EncodingType_ENCODING_BASE64_ZST + return EncodingType_ENCODING_TYPE_BASE64_ZSTD case typesolana.EncodingJSONParsed: - return EncodingType_ENCODING_JSON_PARSED + return EncodingType_ENCODING_TYPE_JSON_PARSED case typesolana.EncodingJSON: - return EncodingType_ENCODING_JSON + return EncodingType_ENCODING_TYPE_JSON default: - return EncodingType_ENCODING_NONE + return EncodingType_ENCODING_TYPE_NONE } } func ConvertCommitmentFromProto(c CommitmentType) typesolana.CommitmentType { switch c { - case CommitmentType_COMMITMENT_CONFIRMED: + case CommitmentType_COMMITMENT_TYPE_CONFIRMED: return typesolana.CommitmentConfirmed - case CommitmentType_COMMITMENT_FINALIZED: + case CommitmentType_COMMITMENT_TYPE_FINALIZED: return typesolana.CommitmentFinalized - case CommitmentType_COMMITMENT_PROCESSED: + case CommitmentType_COMMITMENT_TYPE_PROCESSED: return typesolana.CommitmentProcessed default: return typesolana.CommitmentType("") @@ -175,36 +175,36 @@ func ConvertCommitmentFromProto(c CommitmentType) typesolana.CommitmentType { func ConvertCommitmentToProto(c typesolana.CommitmentType) CommitmentType { switch c { case typesolana.CommitmentFinalized: - return CommitmentType_COMMITMENT_FINALIZED + return CommitmentType_COMMITMENT_TYPE_FINALIZED case typesolana.CommitmentConfirmed: - return CommitmentType_COMMITMENT_CONFIRMED + return CommitmentType_COMMITMENT_TYPE_CONFIRMED case typesolana.CommitmentProcessed: - return CommitmentType_COMMITMENT_PROCESSED + return CommitmentType_COMMITMENT_TYPE_PROCESSED default: - return CommitmentType_COMMITMENT_NONE + return CommitmentType_COMMITMENT_TYPE_NONE } } func ConvertConfirmationStatusToProto(c typesolana.ConfirmationStatusType) ConfirmationStatusType { switch c { case typesolana.ConfirmationStatusFinalized: - return ConfirmationStatusType_CONFIRMATION_FINALIZED + return ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_FINALIZED case typesolana.ConfirmationStatusConfirmed: - return ConfirmationStatusType_CONFIRMATION_CONFIRMED + return ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED case typesolana.ConfirmationStatusProcessed: - return ConfirmationStatusType_CONFIRMATION_PROCESSED + return ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_PROCESSED default: - return ConfirmationStatusType_CONFIRMATION_NONE + return ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_NONE } } func ConvertConfirmationStatusFromProto(c ConfirmationStatusType) typesolana.ConfirmationStatusType { switch c { - case ConfirmationStatusType_CONFIRMATION_CONFIRMED: + case ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED: return typesolana.ConfirmationStatusConfirmed - case ConfirmationStatusType_CONFIRMATION_FINALIZED: + case ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_FINALIZED: return typesolana.ConfirmationStatusFinalized - case ConfirmationStatusType_CONFIRMATION_PROCESSED: + case ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_PROCESSED: return typesolana.ConfirmationStatusProcessed default: return typesolana.ConfirmationStatusType("") @@ -268,10 +268,8 @@ func ConvertAccountFromProto(p *Account) (*typesolana.Account, error) { if err != nil { return nil, fmt.Errorf("owner: %w", err) } - data, err := ConvertDataBytesOrJSONFromProto(p.Data) - if err != nil { - return nil, fmt.Errorf("data: %w", err) - } + data := ConvertDataBytesOrJSONFromProto(p.Data) + return &typesolana.Account{ Lamports: p.Lamports, Owner: owner, @@ -296,26 +294,42 @@ func ConvertAccountToProto(a *typesolana.Account) *Account { } } -func ConvertDataBytesOrJSONFromProto(p *DataBytesOrJSON) (*typesolana.DataBytesOrJSON, error) { +func ConvertDataBytesOrJSONFromProto(p *DataBytesOrJSON) *typesolana.DataBytesOrJSON { if p == nil { - return nil, nil + return nil } - return &typesolana.DataBytesOrJSON{ - RawDataEncoding: ConvertEncodingTypeFromProto(p.RawDataEncoding), - AsDecodedBinary: p.AsDecodedBinary, - AsJSON: p.AsJson, - }, nil + switch t := p.GetBody().(type) { + case *DataBytesOrJSON_Raw: + return &typesolana.DataBytesOrJSON{ + AsDecodedBinary: t.Raw, + RawDataEncoding: ConvertEncodingTypeFromProto(p.Encoding), + } + case *DataBytesOrJSON_Json: + return &typesolana.DataBytesOrJSON{ + AsJSON: t.Json, + RawDataEncoding: ConvertEncodingTypeFromProto(p.Encoding), + } + } + + return nil } func ConvertDataBytesOrJSONToProto(d *typesolana.DataBytesOrJSON) *DataBytesOrJSON { if d == nil { return nil } - return &DataBytesOrJSON{ - RawDataEncoding: ConvertEncodingTypeToProto(d.RawDataEncoding), - AsDecodedBinary: d.AsDecodedBinary, - AsJson: d.AsJSON, + + ret := &DataBytesOrJSON{ + Encoding: ConvertEncodingTypeToProto(d.RawDataEncoding), } + if d.AsJSON != nil { + ret.Body = &DataBytesOrJSON_Json{Json: d.AsJSON} + return ret + } + + ret.Body = &DataBytesOrJSON_Raw{Raw: d.AsDecodedBinary} + + return ret } func ConvertGetAccountInfoOptsFromProto(p *GetAccountInfoOpts) *typesolana.GetAccountInfoOpts { @@ -419,6 +433,7 @@ func ConvertCompiledInstructionFromProto(p *CompiledInstruction) typesolana.Comp for i, a := range p.Accounts { accts[i] = uint16(a) } + return typesolana.CompiledInstruction{ ProgramIDIndex: uint16(p.ProgramIdIndex), Accounts: accts, @@ -681,7 +696,7 @@ func ConvertTransactionMetaFromProto(p *TransactionMeta) (*typesolana.Transactio LogMessages: p.LogMessages, LoadedAddresses: la, ReturnData: *ret, - ComputeUnitsConsumed: ptrUint64(p.ComputeUnitsConsumed), + ComputeUnitsConsumed: p.ComputeUnitsConsumed, } return meta, nil } @@ -717,7 +732,7 @@ func ConvertTransactionMetaToProto(m *typesolana.TransactionMeta) *TransactionMe InnerInstructions: inner, LoadedAddresses: ConvertLoadedAddressesToProto(m.LoadedAddresses), ReturnData: ConvertReturnDataToProto(&m.ReturnData), - ComputeUnitsConsumed: cuc, + ComputeUnitsConsumed: &cuc, } } @@ -775,8 +790,8 @@ func ConvertGetTransactionReplyFromProto(p *GetTransactionReply) (*typesolana.Ge return nil, err } var bt *typesolana.UnixTimeSeconds - if p.BlockTime != 0 { - bt = ptrUnix(typesolana.UnixTimeSeconds(p.BlockTime)) + if p.BlockTime != nil { + bt = ptrUnix(typesolana.UnixTimeSeconds(*p.BlockTime)) } return &typesolana.GetTransactionReply{ @@ -801,7 +816,7 @@ func ConvertGetTransactionReplyToProto(r *typesolana.GetTransactionReply) *GetTr } return &GetTransactionReply{ Slot: r.Slot, - BlockTime: bt, + BlockTime: &bt, Transaction: tx, Meta: ConvertTransactionMetaToProto(r.Meta), } @@ -887,9 +902,10 @@ func ConvertGetBlockOptsReplyFromProto(p *GetBlockReply) (*typesolana.GetBlockRe } var bt *solana.UnixTimeSeconds - if p.BlockTime != 0 { - bt = ptrUnix(typesolana.UnixTimeSeconds(p.BlockTime)) + if p.BlockTime != nil { + bt = ptrUnix(typesolana.UnixTimeSeconds(*p.BlockTime)) } + return &typesolana.GetBlockReply{ Blockhash: hash, PreviousBlockhash: prev, @@ -903,14 +919,16 @@ func ConvertGetBlockReplyToProto(r *typesolana.GetBlockReply) *GetBlockReply { if r == nil { return nil } - var bt int64 + var bt *int64 if r.BlockTime != nil { - bt = int64(*r.BlockTime) + t := int64(*r.BlockTime) + bt = &t } var bh uint64 if r.BlockHeight != nil { bh = *r.BlockHeight } + return &GetBlockReply{ Blockhash: r.Blockhash[:], PreviousBlockhash: r.PreviousBlockhash[:], @@ -1001,7 +1019,7 @@ func ConvertGetMultipleAccountsReplyFromProto(p *GetMultipleAccountsWithOptsRepl } val := make([]*typesolana.Account, 0, len(p.Value)) for _, a := range p.Value { - acc, err := ConvertAccountFromProto(a) + acc, err := ConvertAccountFromProto(a.Account) if err != nil { return nil, err } @@ -1016,10 +1034,11 @@ func ConvertGetMultipleAccountsReplyToProto(r *typesolana.GetMultipleAccountsRep if r == nil { return nil } - val := make([]*Account, 0, len(r.Value)) + val := make([]*OptionalAccountWrapper, 0, len(r.Value)) for _, a := range r.Value { - val = append(val, ConvertAccountToProto(a)) + val = append(val, &OptionalAccountWrapper{Account: ConvertAccountToProto(a)}) } + return &GetMultipleAccountsWithOptsReply{ Value: val, } @@ -1051,7 +1070,7 @@ func ConvertGetSignatureStatusesReplyFromProto(p *GetSignatureStatusesReply) *ty for _, r := range p.Results { out.Results = append(out.Results, typesolana.GetSignatureStatusesResult{ Slot: r.Slot, - Confirmations: ptrUint64(r.Confirmations), + Confirmations: r.Confirmations, Err: r.Err, ConfirmationStatus: ConvertConfirmationStatusFromProto(r.ConfirmationStatus), }) @@ -1071,7 +1090,7 @@ func ConvertGetSignatureStatusesReplyToProto(r *typesolana.GetSignatureStatusesR } out.Results = append(out.Results, &GetSignatureStatusesResult{ Slot: r.Results[i].Slot, - Confirmations: conf, + Confirmations: ptrUint64(conf), Err: r.Results[i].Err, ConfirmationStatus: ConvertConfirmationStatusToProto(r.Results[i].ConfirmationStatus), }) @@ -1257,30 +1276,19 @@ func ConvertSubmitTransactionReplyToProto(r *typesolana.SubmitTransactionReply) return &SubmitTransactionReply{ Signature: r.Signature[:], IdempotencyKey: r.IdempotencyKey, - Status: TransactionStatus(r.Status), + Status: TxStatus(r.Status), } } -func ConvertContextFromProto(p *Context) typesolana.Context { - if p == nil { - return typesolana.Context{} - } - return typesolana.Context{Slot: p.Slot} -} - -func ConvertContextToProto(c typesolana.Context) *Context { - return &Context{Slot: c.Slot} -} - func ConvertRPCContextFromProto(p *RPCContext) typesolana.RPCContext { if p == nil { return typesolana.RPCContext{} } - return typesolana.RPCContext{Context: ConvertContextFromProto(p.Context)} + return typesolana.RPCContext{Slot: p.Slot} } func ConvertRPCContextToProto(r typesolana.RPCContext) *RPCContext { - return &RPCContext{Context: ConvertContextToProto(r.Context)} + return &RPCContext{Slot: r.Slot} } func ConvertLogFromProto(p *Log) (*typesolana.Log, error) { diff --git a/pkg/chains/solana/proto_helpers_test.go b/pkg/chains/solana/proto_helpers_test.go index 0f8c4f4c33..f66ce6908b 100644 --- a/pkg/chains/solana/proto_helpers_test.go +++ b/pkg/chains/solana/proto_helpers_test.go @@ -355,10 +355,10 @@ func TestGettersAndSmallStructs_Smoke(t *testing.T) { require.EqualValues(t, 6, ui2.Decimals) // Commitment/Encoding enums (spot) - require.Equal(t, conv.EncodingType_ENCODING_BASE64, conv.ConvertEncodingTypeToProto(typesolana.EncodingBase64)) - require.Equal(t, typesolana.EncodingJSON, conv.ConvertEncodingTypeFromProto(conv.EncodingType_ENCODING_JSON)) - require.Equal(t, conv.CommitmentType_COMMITMENT_FINALIZED, conv.ConvertCommitmentToProto(typesolana.CommitmentFinalized)) - require.Equal(t, typesolana.CommitmentProcessed, conv.ConvertCommitmentFromProto(conv.CommitmentType_COMMITMENT_PROCESSED)) + require.Equal(t, conv.EncodingType_ENCODING_TYPE_BASE64, conv.ConvertEncodingTypeToProto(typesolana.EncodingBase64)) + require.Equal(t, typesolana.EncodingJSON, conv.ConvertEncodingTypeFromProto(conv.EncodingType_ENCODING_TYPE_JSON)) + require.Equal(t, conv.CommitmentType_COMMITMENT_TYPE_FINALIZED, conv.ConvertCommitmentToProto(typesolana.CommitmentFinalized)) + require.Equal(t, typesolana.CommitmentProcessed, conv.ConvertCommitmentFromProto(conv.CommitmentType_COMMITMENT_TYPE_PROCESSED)) } func TestGetSignatureStatusesConverters(t *testing.T) { @@ -368,23 +368,23 @@ func TestGetSignatureStatusesConverters(t *testing.T) { req2 := conv.ConvertGetSignatureStatusesRequestToProto(dr) require.Len(t, req2.Sigs, 1) require.True(t, bytes.Equal(req.Sigs[0], req2.Sigs[0])) - + c := uint64(2) rep := &conv.GetSignatureStatusesReply{ Results: []*conv.GetSignatureStatusesResult{{ Slot: 1, - Confirmations: 2, + Confirmations: &c, Err: "", - ConfirmationStatus: conv.ConfirmationStatusType_CONFIRMATION_CONFIRMED, + ConfirmationStatus: conv.ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED, }}, } drep := conv.ConvertGetSignatureStatusesReplyFromProto(rep) require.EqualValues(t, 1, drep.Results[0].Slot) require.NotNil(t, drep.Results[0].Confirmations) - require.EqualValues(t, 2, *drep.Results[0].Confirmations) + require.EqualValues(t, c, *drep.Results[0].Confirmations) rep2 := conv.ConvertGetSignatureStatusesReplyToProto(drep) - require.EqualValues(t, 2, rep2.Results[0].Confirmations) - require.Equal(t, conv.ConfirmationStatusType_CONFIRMATION_CONFIRMED, rep2.Results[0].ConfirmationStatus) + require.EqualValues(t, &c, rep2.Results[0].Confirmations) + require.Equal(t, conv.ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED, rep2.Results[0].ConfirmationStatus) } func TestErrorJoinBehavior_PublicKeys(t *testing.T) { diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index e48074018d..c3f8baeec4 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -24,138 +24,35 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Transaction execution status returned by submitters/simulations. -type TransactionStatus int32 - -const ( - TransactionStatus_TX_FATAL TransactionStatus = 0 // unrecoverable failure - TransactionStatus_TX_ABORTED TransactionStatus = 1 // not executed / dropped - TransactionStatus_TX_SUCCESS TransactionStatus = 2 // executed successfully -) - -// Enum value maps for TransactionStatus. -var ( - TransactionStatus_name = map[int32]string{ - 0: "TX_FATAL", - 1: "TX_ABORTED", - 2: "TX_SUCCESS", - } - TransactionStatus_value = map[string]int32{ - "TX_FATAL": 0, - "TX_ABORTED": 1, - "TX_SUCCESS": 2, - } -) - -func (x TransactionStatus) Enum() *TransactionStatus { - p := new(TransactionStatus) - *p = x - return p -} - -func (x TransactionStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransactionStatus) Descriptor() protoreflect.EnumDescriptor { - return file_solana_proto_enumTypes[0].Descriptor() -} - -func (TransactionStatus) Type() protoreflect.EnumType { - return &file_solana_proto_enumTypes[0] -} - -func (x TransactionStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransactionStatus.Descriptor instead. -func (TransactionStatus) EnumDescriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{0} -} - -// Level of tx details in block response. -type TransactionDetailsType int32 - -const ( - TransactionDetailsType_TRANSACTION_DETAILS_FULL TransactionDetailsType = 0 // tx + meta - TransactionDetailsType_TRANSCTION_DETAILS_SIGNATURES TransactionDetailsType = 1 // signatures only - TransactionDetailsType_TRANSACTION_DETAILS_NONE TransactionDetailsType = 2 // no txs - TransactionDetailsType_TRANSACTION_DETAILS_ACCOUNTS TransactionDetailsType = 3 // account keys only -) - -// Enum value maps for TransactionDetailsType. -var ( - TransactionDetailsType_name = map[int32]string{ - 0: "TRANSACTION_DETAILS_FULL", - 1: "TRANSCTION_DETAILS_SIGNATURES", - 2: "TRANSACTION_DETAILS_NONE", - 3: "TRANSACTION_DETAILS_ACCOUNTS", - } - TransactionDetailsType_value = map[string]int32{ - "TRANSACTION_DETAILS_FULL": 0, - "TRANSCTION_DETAILS_SIGNATURES": 1, - "TRANSACTION_DETAILS_NONE": 2, - "TRANSACTION_DETAILS_ACCOUNTS": 3, - } -) - -func (x TransactionDetailsType) Enum() *TransactionDetailsType { - p := new(TransactionDetailsType) - *p = x - return p -} - -func (x TransactionDetailsType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransactionDetailsType) Descriptor() protoreflect.EnumDescriptor { - return file_solana_proto_enumTypes[1].Descriptor() -} - -func (TransactionDetailsType) Type() protoreflect.EnumType { - return &file_solana_proto_enumTypes[1] -} - -func (x TransactionDetailsType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransactionDetailsType.Descriptor instead. -func (TransactionDetailsType) EnumDescriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{1} -} - // Account/tx data encodings. type EncodingType int32 const ( - EncodingType_ENCODING_NONE EncodingType = 0 - EncodingType_ENCODING_BASE58 EncodingType = 1 // for data <129 bytes - EncodingType_ENCODING_BASE64 EncodingType = 2 // any size - EncodingType_ENCODING_BASE64_ZST EncodingType = 3 // zstd-compressed, base64-wrapped - EncodingType_ENCODING_JSON_PARSED EncodingType = 4 // program parsers; fallback to base64 if unknown - EncodingType_ENCODING_JSON EncodingType = 5 // raw JSON (rare; prefer JSON_PARSED) + EncodingType_ENCODING_TYPE_NONE EncodingType = 0 + EncodingType_ENCODING_TYPE_BASE58 EncodingType = 1 // for data <129 bytes + EncodingType_ENCODING_TYPE_BASE64 EncodingType = 2 // any size + EncodingType_ENCODING_TYPE_BASE64_ZSTD EncodingType = 3 // zstd-compressed, base64-wrapped + EncodingType_ENCODING_TYPE_JSON_PARSED EncodingType = 4 // program parsers; fallback to base64 if unknown + EncodingType_ENCODING_TYPE_JSON EncodingType = 5 // raw JSON (rare; prefer JSON_PARSED) ) // Enum value maps for EncodingType. var ( EncodingType_name = map[int32]string{ - 0: "ENCODING_NONE", - 1: "ENCODING_BASE58", - 2: "ENCODING_BASE64", - 3: "ENCODING_BASE64_ZST", - 4: "ENCODING_JSON_PARSED", - 5: "ENCODING_JSON", + 0: "ENCODING_TYPE_NONE", + 1: "ENCODING_TYPE_BASE58", + 2: "ENCODING_TYPE_BASE64", + 3: "ENCODING_TYPE_BASE64_ZSTD", + 4: "ENCODING_TYPE_JSON_PARSED", + 5: "ENCODING_TYPE_JSON", } EncodingType_value = map[string]int32{ - "ENCODING_NONE": 0, - "ENCODING_BASE58": 1, - "ENCODING_BASE64": 2, - "ENCODING_BASE64_ZST": 3, - "ENCODING_JSON_PARSED": 4, - "ENCODING_JSON": 5, + "ENCODING_TYPE_NONE": 0, + "ENCODING_TYPE_BASE58": 1, + "ENCODING_TYPE_BASE64": 2, + "ENCODING_TYPE_BASE64_ZSTD": 3, + "ENCODING_TYPE_JSON_PARSED": 4, + "ENCODING_TYPE_JSON": 5, } ) @@ -170,11 +67,11 @@ func (x EncodingType) String() string { } func (EncodingType) Descriptor() protoreflect.EnumDescriptor { - return file_solana_proto_enumTypes[2].Descriptor() + return file_solana_proto_enumTypes[0].Descriptor() } func (EncodingType) Type() protoreflect.EnumType { - return &file_solana_proto_enumTypes[2] + return &file_solana_proto_enumTypes[0] } func (x EncodingType) Number() protoreflect.EnumNumber { @@ -183,32 +80,32 @@ func (x EncodingType) Number() protoreflect.EnumNumber { // Deprecated: Use EncodingType.Descriptor instead. func (EncodingType) EnumDescriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{2} + return file_solana_proto_rawDescGZIP(), []int{0} } // Read consistency of queried state. type CommitmentType int32 const ( - CommitmentType_COMMITMENT_NONE CommitmentType = 0 - CommitmentType_COMMITMENT_FINALIZED CommitmentType = 1 // cluster-finalized - CommitmentType_COMMITMENT_CONFIRMED CommitmentType = 2 // voted by supermajority - CommitmentType_COMMITMENT_PROCESSED CommitmentType = 3 // node’s latest + CommitmentType_COMMITMENT_TYPE_NONE CommitmentType = 0 + CommitmentType_COMMITMENT_TYPE_FINALIZED CommitmentType = 1 // cluster-finalized + CommitmentType_COMMITMENT_TYPE_CONFIRMED CommitmentType = 2 // voted by supermajority + CommitmentType_COMMITMENT_TYPE_PROCESSED CommitmentType = 3 // node’s latest ) // Enum value maps for CommitmentType. var ( CommitmentType_name = map[int32]string{ - 0: "COMMITMENT_NONE", - 1: "COMMITMENT_FINALIZED", - 2: "COMMITMENT_CONFIRMED", - 3: "COMMITMENT_PROCESSED", + 0: "COMMITMENT_TYPE_NONE", + 1: "COMMITMENT_TYPE_FINALIZED", + 2: "COMMITMENT_TYPE_CONFIRMED", + 3: "COMMITMENT_TYPE_PROCESSED", } CommitmentType_value = map[string]int32{ - "COMMITMENT_NONE": 0, - "COMMITMENT_FINALIZED": 1, - "COMMITMENT_CONFIRMED": 2, - "COMMITMENT_PROCESSED": 3, + "COMMITMENT_TYPE_NONE": 0, + "COMMITMENT_TYPE_FINALIZED": 1, + "COMMITMENT_TYPE_CONFIRMED": 2, + "COMMITMENT_TYPE_PROCESSED": 3, } ) @@ -223,11 +120,11 @@ func (x CommitmentType) String() string { } func (CommitmentType) Descriptor() protoreflect.EnumDescriptor { - return file_solana_proto_enumTypes[3].Descriptor() + return file_solana_proto_enumTypes[1].Descriptor() } func (CommitmentType) Type() protoreflect.EnumType { - return &file_solana_proto_enumTypes[3] + return &file_solana_proto_enumTypes[1] } func (x CommitmentType) Number() protoreflect.EnumNumber { @@ -236,32 +133,32 @@ func (x CommitmentType) Number() protoreflect.EnumNumber { // Deprecated: Use CommitmentType.Descriptor instead. func (CommitmentType) EnumDescriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{3} + return file_solana_proto_rawDescGZIP(), []int{1} } // Cluster confirmation status of a tx/signature. type ConfirmationStatusType int32 const ( - ConfirmationStatusType_CONFIRMATION_NONE ConfirmationStatusType = 0 - ConfirmationStatusType_CONFIRMATION_PROCESSED ConfirmationStatusType = 1 - ConfirmationStatusType_CONFIRMATION_CONFIRMED ConfirmationStatusType = 2 - ConfirmationStatusType_CONFIRMATION_FINALIZED ConfirmationStatusType = 3 + ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_NONE ConfirmationStatusType = 0 + ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_PROCESSED ConfirmationStatusType = 1 + ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED ConfirmationStatusType = 2 + ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_FINALIZED ConfirmationStatusType = 3 ) // Enum value maps for ConfirmationStatusType. var ( ConfirmationStatusType_name = map[int32]string{ - 0: "CONFIRMATION_NONE", - 1: "CONFIRMATION_PROCESSED", - 2: "CONFIRMATION_CONFIRMED", - 3: "CONFIRMATION_FINALIZED", + 0: "CONFIRMATION_STATUS_TYPE_NONE", + 1: "CONFIRMATION_STATUS_TYPE_PROCESSED", + 2: "CONFIRMATION_STATUS_TYPE_CONFIRMED", + 3: "CONFIRMATION_STATUS_TYPE_FINALIZED", } ConfirmationStatusType_value = map[string]int32{ - "CONFIRMATION_NONE": 0, - "CONFIRMATION_PROCESSED": 1, - "CONFIRMATION_CONFIRMED": 2, - "CONFIRMATION_FINALIZED": 3, + "CONFIRMATION_STATUS_TYPE_NONE": 0, + "CONFIRMATION_STATUS_TYPE_PROCESSED": 1, + "CONFIRMATION_STATUS_TYPE_CONFIRMED": 2, + "CONFIRMATION_STATUS_TYPE_FINALIZED": 3, } ) @@ -276,11 +173,11 @@ func (x ConfirmationStatusType) String() string { } func (ConfirmationStatusType) Descriptor() protoreflect.EnumDescriptor { - return file_solana_proto_enumTypes[4].Descriptor() + return file_solana_proto_enumTypes[2].Descriptor() } func (ConfirmationStatusType) Type() protoreflect.EnumType { - return &file_solana_proto_enumTypes[4] + return &file_solana_proto_enumTypes[2] } func (x ConfirmationStatusType) Number() protoreflect.EnumNumber { @@ -289,7 +186,57 @@ func (x ConfirmationStatusType) Number() protoreflect.EnumNumber { // Deprecated: Use ConfirmationStatusType.Descriptor instead. func (ConfirmationStatusType) EnumDescriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{4} + return file_solana_proto_rawDescGZIP(), []int{2} +} + +// Transaction execution status returned by submitters/simulations. +type TxStatus int32 + +const ( + TxStatus_TX_STATUS_FATAL TxStatus = 0 // unrecoverable failure + TxStatus_TX_STATUS_ABORTED TxStatus = 1 // not executed / dropped + TxStatus_TX_STATUS_SUCCESS TxStatus = 2 // executed successfully +) + +// Enum value maps for TxStatus. +var ( + TxStatus_name = map[int32]string{ + 0: "TX_STATUS_FATAL", + 1: "TX_STATUS_ABORTED", + 2: "TX_STATUS_SUCCESS", + } + TxStatus_value = map[string]int32{ + "TX_STATUS_FATAL": 0, + "TX_STATUS_ABORTED": 1, + "TX_STATUS_SUCCESS": 2, + } +) + +func (x TxStatus) Enum() *TxStatus { + p := new(TxStatus) + *p = x + return p +} + +func (x TxStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TxStatus) Descriptor() protoreflect.EnumDescriptor { + return file_solana_proto_enumTypes[3].Descriptor() +} + +func (TxStatus) Type() protoreflect.EnumType { + return &file_solana_proto_enumTypes[3] +} + +func (x TxStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TxStatus.Descriptor instead. +func (TxStatus) EnumDescriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{3} } // On-chain account state. @@ -377,51 +324,6 @@ func (x *Account) GetSpace() uint64 { return 0 } -// 32-byte address (Pubkey). -type Address struct { - state protoimpl.MessageState `protogen:"open.v1"` - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32 bytes - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Address) Reset() { - *x = Address{} - mi := &file_solana_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Address) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Address) ProtoMessage() {} - -func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Address.ProtoReflect.Descriptor instead. -func (*Address) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{1} -} - -func (x *Address) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - // Compute budget configuration when submitting txs. type ComputeConfig struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -433,7 +335,7 @@ type ComputeConfig struct { func (x *ComputeConfig) Reset() { *x = ComputeConfig{} - mi := &file_solana_proto_msgTypes[2] + mi := &file_solana_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -445,7 +347,7 @@ func (x *ComputeConfig) String() string { func (*ComputeConfig) ProtoMessage() {} func (x *ComputeConfig) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[2] + mi := &file_solana_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -458,7 +360,7 @@ func (x *ComputeConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ComputeConfig.ProtoReflect.Descriptor instead. func (*ComputeConfig) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{2} + return file_solana_proto_rawDescGZIP(), []int{1} } func (x *ComputeConfig) GetComputeLimit() uint32 { @@ -475,64 +377,22 @@ func (x *ComputeConfig) GetComputeMaxPrice() uint64 { return 0 } -// RPC context (slot at which state was read). -type Context struct { - state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Context) Reset() { - *x = Context{} - mi := &file_solana_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Context) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Context) ProtoMessage() {} - -func (x *Context) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Context.ProtoReflect.Descriptor instead. -func (*Context) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{3} -} - -func (x *Context) GetSlot() uint64 { - if x != nil { - return x.Slot - } - return 0 -} - // Raw bytes vs parsed JSON (as returned by RPC). type DataBytesOrJSON struct { - state protoimpl.MessageState `protogen:"open.v1"` - RawDataEncoding EncodingType `protobuf:"varint,1,opt,name=raw_data_encoding,json=rawDataEncoding,proto3,enum=loop.solana.EncodingType" json:"raw_data_encoding,omitempty"` // encoding of payload - AsDecodedBinary []byte `protobuf:"bytes,2,opt,name=as_decoded_binary,json=asDecodedBinary,proto3" json:"as_decoded_binary,omitempty"` // if binary encoding - AsJson []byte `protobuf:"bytes,3,opt,name=as_json,json=asJson,proto3" json:"as_json,omitempty"` // if JSON/JSON_PARSED - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + // Types that are valid to be assigned to Body: + // + // *DataBytesOrJSON_Raw + // *DataBytesOrJSON_Json + Body isDataBytesOrJSON_Body `protobuf_oneof:"body"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DataBytesOrJSON) Reset() { *x = DataBytesOrJSON{} - mi := &file_solana_proto_msgTypes[4] + mi := &file_solana_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -544,7 +404,7 @@ func (x *DataBytesOrJSON) String() string { func (*DataBytesOrJSON) ProtoMessage() {} func (x *DataBytesOrJSON) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[4] + mi := &file_solana_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -557,30 +417,57 @@ func (x *DataBytesOrJSON) ProtoReflect() protoreflect.Message { // Deprecated: Use DataBytesOrJSON.ProtoReflect.Descriptor instead. func (*DataBytesOrJSON) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{4} + return file_solana_proto_rawDescGZIP(), []int{2} +} + +func (x *DataBytesOrJSON) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_TYPE_NONE } -func (x *DataBytesOrJSON) GetRawDataEncoding() EncodingType { +func (x *DataBytesOrJSON) GetBody() isDataBytesOrJSON_Body { if x != nil { - return x.RawDataEncoding + return x.Body } - return EncodingType_ENCODING_NONE + return nil } -func (x *DataBytesOrJSON) GetAsDecodedBinary() []byte { +func (x *DataBytesOrJSON) GetRaw() []byte { if x != nil { - return x.AsDecodedBinary + if x, ok := x.Body.(*DataBytesOrJSON_Raw); ok { + return x.Raw + } } return nil } -func (x *DataBytesOrJSON) GetAsJson() []byte { +func (x *DataBytesOrJSON) GetJson() []byte { if x != nil { - return x.AsJson + if x, ok := x.Body.(*DataBytesOrJSON_Json); ok { + return x.Json + } } return nil } +type isDataBytesOrJSON_Body interface { + isDataBytesOrJSON_Body() +} + +type DataBytesOrJSON_Raw struct { + Raw []byte `protobuf:"bytes,2,opt,name=raw,proto3,oneof"` // program data (node’s base64/base58 decoded) +} + +type DataBytesOrJSON_Json struct { + Json []byte `protobuf:"bytes,3,opt,name=json,proto3,oneof"` // json: UTF-8 bytes of the jsonParsed payload. +} + +func (*DataBytesOrJSON_Raw) isDataBytesOrJSON_Body() {} + +func (*DataBytesOrJSON_Json) isDataBytesOrJSON_Body() {} + // Return a slice of account data. type DataSlice struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -592,7 +479,7 @@ type DataSlice struct { func (x *DataSlice) Reset() { *x = DataSlice{} - mi := &file_solana_proto_msgTypes[5] + mi := &file_solana_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -604,7 +491,7 @@ func (x *DataSlice) String() string { func (*DataSlice) ProtoMessage() {} func (x *DataSlice) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[5] + mi := &file_solana_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -617,7 +504,7 @@ func (x *DataSlice) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSlice.ProtoReflect.Descriptor instead. func (*DataSlice) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{5} + return file_solana_proto_rawDescGZIP(), []int{3} } func (x *DataSlice) GetOffset() uint64 { @@ -634,30 +521,32 @@ func (x *DataSlice) GetLength() uint64 { return 0 } -// Event/topic filter by hashed value(s). -type EventSig struct { - state protoimpl.MessageState `protogen:"open.v1"` - Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` // topic index - HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` // comparisons - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Options for GetAccountInfo. +type GetAccountInfoOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // data encoding + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` // optional slice window + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` // lower bound slot + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *EventSig) Reset() { - *x = EventSig{} - mi := &file_solana_proto_msgTypes[6] +func (x *GetAccountInfoOpts) Reset() { + *x = GetAccountInfoOpts{} + mi := &file_solana_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *EventSig) String() string { +func (x *GetAccountInfoOpts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventSig) ProtoMessage() {} +func (*GetAccountInfoOpts) ProtoMessage() {} -func (x *EventSig) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[6] +func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -668,49 +557,63 @@ func (x *EventSig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventSig.ProtoReflect.Descriptor instead. -func (*EventSig) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{6} +// Deprecated: Use GetAccountInfoOpts.ProtoReflect.Descriptor instead. +func (*GetAccountInfoOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{4} } -func (x *EventSig) GetTopic() uint64 { +func (x *GetAccountInfoOpts) GetEncoding() EncodingType { if x != nil { - return x.Topic + return x.Encoding } - return 0 + return EncodingType_ENCODING_TYPE_NONE } -func (x *EventSig) GetHashedValueComparers() []*HashedValueComparator { +func (x *GetAccountInfoOpts) GetCommitment() CommitmentType { if x != nil { - return x.HashedValueComparers + return x.Commitment + } + return CommitmentType_COMMITMENT_TYPE_NONE +} + +func (x *GetAccountInfoOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice } return nil } -// Comparator for a single indexed value. -type IndexedValueComparator struct { - state protoimpl.MessageState `protogen:"open.v1"` - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // raw bytes - Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` // eq/lt/gt etc. +func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { + if x != nil { + return x.MinContextSlot + } + return 0 +} + +// Reply for GetAccountInfoWithOpts. +type GetAccountInfoWithOptsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` // read slot + Value *Account `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // account (may be empty) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *IndexedValueComparator) Reset() { - *x = IndexedValueComparator{} - mi := &file_solana_proto_msgTypes[7] +func (x *GetAccountInfoWithOptsReply) Reset() { + *x = GetAccountInfoWithOptsReply{} + mi := &file_solana_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *IndexedValueComparator) String() string { +func (x *GetAccountInfoWithOptsReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IndexedValueComparator) ProtoMessage() {} +func (*GetAccountInfoWithOptsReply) ProtoMessage() {} -func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[7] +func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,49 +624,49 @@ func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IndexedValueComparator.ProtoReflect.Descriptor instead. -func (*IndexedValueComparator) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{7} +// Deprecated: Use GetAccountInfoWithOptsReply.ProtoReflect.Descriptor instead. +func (*GetAccountInfoWithOptsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{5} } -func (x *IndexedValueComparator) GetValue() []byte { +func (x *GetAccountInfoWithOptsReply) GetRpcContext() *RPCContext { if x != nil { - return x.Value + return x.RpcContext } return nil } -func (x *IndexedValueComparator) GetOperator() chain_common.ComparisonOperator { +func (x *GetAccountInfoWithOptsReply) GetValue() *Account { if x != nil { - return x.Operator + return x.Value } - return chain_common.ComparisonOperator(0) + return nil } -// Filter events by a subkey path. -type EventBySubkey struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubkeyIndex uint64 `protobuf:"varint,1,opt,name=subkey_index,json=subkeyIndex,proto3" json:"subkey_index,omitempty"` // path element index - ValueComparers []*IndexedValueComparator `protobuf:"bytes,2,rep,name=value_comparers,json=valueComparers,proto3" json:"value_comparers,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Request for GetAccountInfoWithOpts. +type GetAccountInfoWithOptsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 32-byte Pubkey + Opts *GetAccountInfoOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *EventBySubkey) Reset() { - *x = EventBySubkey{} - mi := &file_solana_proto_msgTypes[8] +func (x *GetAccountInfoWithOptsRequest) Reset() { + *x = GetAccountInfoWithOptsRequest{} + mi := &file_solana_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *EventBySubkey) String() string { +func (x *GetAccountInfoWithOptsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventBySubkey) ProtoMessage() {} +func (*GetAccountInfoWithOptsRequest) ProtoMessage() {} -func (x *EventBySubkey) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[8] +func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -774,52 +677,48 @@ func (x *EventBySubkey) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventBySubkey.ProtoReflect.Descriptor instead. -func (*EventBySubkey) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{8} +// Deprecated: Use GetAccountInfoWithOptsRequest.ProtoReflect.Descriptor instead. +func (*GetAccountInfoWithOptsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{6} } -func (x *EventBySubkey) GetSubkeyIndex() uint64 { +func (x *GetAccountInfoWithOptsRequest) GetAccount() []byte { if x != nil { - return x.SubkeyIndex + return x.Account } - return 0 + return nil } -func (x *EventBySubkey) GetValueComparers() []*IndexedValueComparator { +func (x *GetAccountInfoWithOptsRequest) GetOpts() *GetAccountInfoOpts { if x != nil { - return x.ValueComparers + return x.Opts } return nil } -// Expression tree wrapper. -type Expression struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Evaluator: - // - // *Expression_Primitive - // *Expression_BooleanExpression - Evaluator isExpression_Evaluator `protobuf_oneof:"evaluator"` +// Reply for GetBalance. +type GetBalanceReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // lamports unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Expression) Reset() { - *x = Expression{} - mi := &file_solana_proto_msgTypes[9] +func (x *GetBalanceReply) Reset() { + *x = GetBalanceReply{} + mi := &file_solana_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Expression) String() string { +func (x *GetBalanceReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Expression) ProtoMessage() {} +func (*GetBalanceReply) ProtoMessage() {} -func (x *Expression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[9] +func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -830,76 +729,42 @@ func (x *Expression) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Expression.ProtoReflect.Descriptor instead. -func (*Expression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{9} -} - -func (x *Expression) GetEvaluator() isExpression_Evaluator { - if x != nil { - return x.Evaluator - } - return nil -} - -func (x *Expression) GetPrimitive() *Primitive { - if x != nil { - if x, ok := x.Evaluator.(*Expression_Primitive); ok { - return x.Primitive - } - } - return nil +// Deprecated: Use GetBalanceReply.ProtoReflect.Descriptor instead. +func (*GetBalanceReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{7} } -func (x *Expression) GetBooleanExpression() *BooleanExpression { +func (x *GetBalanceReply) GetValue() uint64 { if x != nil { - if x, ok := x.Evaluator.(*Expression_BooleanExpression); ok { - return x.BooleanExpression - } + return x.Value } - return nil -} - -type isExpression_Evaluator interface { - isExpression_Evaluator() -} - -type Expression_Primitive struct { - Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3,oneof"` // leaf filter -} - -type Expression_BooleanExpression struct { - BooleanExpression *BooleanExpression `protobuf:"bytes,2,opt,name=boolean_expression,json=booleanExpression,proto3,oneof"` // AND/OR of expressions + return 0 } -func (*Expression_Primitive) isExpression_Evaluator() {} - -func (*Expression_BooleanExpression) isExpression_Evaluator() {} - -// Boolean composition over expressions. -type BooleanExpression struct { - state protoimpl.MessageState `protogen:"open.v1"` - BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` // AND/OR - Expression []*Expression `protobuf:"bytes,2,rep,name=expression,proto3" json:"expression,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Request for GetBalance. +type GetBalanceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // 32-byte Pubkey + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *BooleanExpression) Reset() { - *x = BooleanExpression{} - mi := &file_solana_proto_msgTypes[10] +func (x *GetBalanceRequest) Reset() { + *x = GetBalanceRequest{} + mi := &file_solana_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *BooleanExpression) String() string { +func (x *GetBalanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BooleanExpression) ProtoMessage() {} +func (*GetBalanceRequest) ProtoMessage() {} -func (x *BooleanExpression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[10] +func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -910,51 +775,48 @@ func (x *BooleanExpression) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. -func (*BooleanExpression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{10} +// Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead. +func (*GetBalanceRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{8} } -func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { +func (x *GetBalanceRequest) GetAddr() []byte { if x != nil { - return x.BooleanOperator + return x.Addr } - return chain_common.BooleanOperator(0) + return nil } -func (x *BooleanExpression) GetExpression() []*Expression { +func (x *GetBalanceRequest) GetCommitment() CommitmentType { if x != nil { - return x.Expression + return x.Commitment } - return nil + return CommitmentType_COMMITMENT_TYPE_NONE } -// Options for GetAccountInfo. -type GetAccountInfoOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // data encoding - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency - DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` // optional slice window - MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` // lower bound slot - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Options for GetBlock. +type GetBlockOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetAccountInfoOpts) Reset() { - *x = GetAccountInfoOpts{} - mi := &file_solana_proto_msgTypes[11] +func (x *GetBlockOpts) Reset() { + *x = GetBlockOpts{} + mi := &file_solana_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAccountInfoOpts) String() string { +func (x *GetBlockOpts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAccountInfoOpts) ProtoMessage() {} +func (*GetBlockOpts) ProtoMessage() {} -func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[11] +func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -965,63 +827,45 @@ func (x *GetAccountInfoOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAccountInfoOpts.ProtoReflect.Descriptor instead. -func (*GetAccountInfoOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{11} -} - -func (x *GetAccountInfoOpts) GetEncoding() EncodingType { - if x != nil { - return x.Encoding - } - return EncodingType_ENCODING_NONE +// Deprecated: Use GetBlockOpts.ProtoReflect.Descriptor instead. +func (*GetBlockOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{9} } -func (x *GetAccountInfoOpts) GetCommitment() CommitmentType { +func (x *GetBlockOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return CommitmentType_COMMITMENT_NONE + return CommitmentType_COMMITMENT_TYPE_NONE } -func (x *GetAccountInfoOpts) GetDataSlice() *DataSlice { - if x != nil { - return x.DataSlice - } - return nil -} - -func (x *GetAccountInfoOpts) GetMinContextSlot() uint64 { - if x != nil { - return x.MinContextSlot - } - return 0 -} - -// Reply for GetAccountInfoWithOpts. -type GetAccountInfoWithOptsReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` // read slot - Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // account (may be empty) - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Block response. +type GetBlockReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` // 32-byte block hash + PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` // 32-byte parent hash + ParentSlot uint64 `protobuf:"varint,3,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` + BlockTime *int64 `protobuf:"varint,4,opt,name=block_time,json=blockTime,proto3,oneof" json:"block_time,omitempty"` // unix seconds, node may not report it + BlockHeight uint64 `protobuf:"varint,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // chain height + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetAccountInfoWithOptsReply) Reset() { - *x = GetAccountInfoWithOptsReply{} - mi := &file_solana_proto_msgTypes[12] +func (x *GetBlockReply) Reset() { + *x = GetBlockReply{} + mi := &file_solana_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAccountInfoWithOptsReply) String() string { +func (x *GetBlockReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAccountInfoWithOptsReply) ProtoMessage() {} +func (*GetBlockReply) ProtoMessage() {} -func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[12] +func (x *GetBlockReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1032,49 +876,70 @@ func (x *GetAccountInfoWithOptsReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAccountInfoWithOptsReply.ProtoReflect.Descriptor instead. -func (*GetAccountInfoWithOptsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{12} +// Deprecated: Use GetBlockReply.ProtoReflect.Descriptor instead. +func (*GetBlockReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{10} } -func (x *GetAccountInfoWithOptsReply) GetRpcContext() *RPCContext { +func (x *GetBlockReply) GetBlockhash() []byte { if x != nil { - return x.RpcContext + return x.Blockhash } return nil } -func (x *GetAccountInfoWithOptsReply) GetValue() *Account { +func (x *GetBlockReply) GetPreviousBlockhash() []byte { if x != nil { - return x.Value + return x.PreviousBlockhash } return nil } -// Request for GetAccountInfoWithOpts. -type GetAccountInfoWithOptsRequest struct { +func (x *GetBlockReply) GetParentSlot() uint64 { + if x != nil { + return x.ParentSlot + } + return 0 +} + +func (x *GetBlockReply) GetBlockTime() int64 { + if x != nil && x.BlockTime != nil { + return *x.BlockTime + } + return 0 +} + +func (x *GetBlockReply) GetBlockHeight() uint64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +// Request for GetBlock. +type GetBlockRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 32-byte Pubkey - Opts *GetAccountInfoOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // target slot + Opts *GetBlockOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetAccountInfoWithOptsRequest) Reset() { - *x = GetAccountInfoWithOptsRequest{} - mi := &file_solana_proto_msgTypes[13] +func (x *GetBlockRequest) Reset() { + *x = GetBlockRequest{} + mi := &file_solana_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAccountInfoWithOptsRequest) String() string { +func (x *GetBlockRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAccountInfoWithOptsRequest) ProtoMessage() {} +func (*GetBlockRequest) ProtoMessage() {} -func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[13] +func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1085,48 +950,48 @@ func (x *GetAccountInfoWithOptsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAccountInfoWithOptsRequest.ProtoReflect.Descriptor instead. -func (*GetAccountInfoWithOptsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{13} +// Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead. +func (*GetBlockRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{11} } -func (x *GetAccountInfoWithOptsRequest) GetAccount() []byte { +func (x *GetBlockRequest) GetSlot() uint64 { if x != nil { - return x.Account + return x.Slot } - return nil + return 0 } -func (x *GetAccountInfoWithOptsRequest) GetOpts() *GetAccountInfoOpts { +func (x *GetBlockRequest) GetOpts() *GetBlockOpts { if x != nil { return x.Opts } return nil } -// Reply for GetBalance. -type GetBalanceReply struct { +// Fee quote for a base58-encoded Message. +type GetFeeForMessageReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // lamports + Fee uint64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` // lamports unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetBalanceReply) Reset() { - *x = GetBalanceReply{} - mi := &file_solana_proto_msgTypes[14] +func (x *GetFeeForMessageReply) Reset() { + *x = GetFeeForMessageReply{} + mi := &file_solana_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBalanceReply) String() string { +func (x *GetFeeForMessageReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBalanceReply) ProtoMessage() {} +func (*GetFeeForMessageReply) ProtoMessage() {} -func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[14] +func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1137,42 +1002,41 @@ func (x *GetBalanceReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBalanceReply.ProtoReflect.Descriptor instead. -func (*GetBalanceReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{14} +// Deprecated: Use GetFeeForMessageReply.ProtoReflect.Descriptor instead. +func (*GetFeeForMessageReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{12} } -func (x *GetBalanceReply) GetValue() uint64 { +func (x *GetFeeForMessageReply) GetFee() uint64 { if x != nil { - return x.Value + return x.Fee } return 0 } -// Request for GetBalance. -type GetBalanceRequest struct { +type GetFeeForMessageRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // 32-byte Pubkey + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // must be base58-encoded Message Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetBalanceRequest) Reset() { - *x = GetBalanceRequest{} - mi := &file_solana_proto_msgTypes[15] +func (x *GetFeeForMessageRequest) Reset() { + *x = GetFeeForMessageRequest{} + mi := &file_solana_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBalanceRequest) String() string { +func (x *GetFeeForMessageRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBalanceRequest) ProtoMessage() {} +func (*GetFeeForMessageRequest) ProtoMessage() {} -func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[15] +func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1183,48 +1047,51 @@ func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead. -func (*GetBalanceRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{15} +// Deprecated: Use GetFeeForMessageRequest.ProtoReflect.Descriptor instead. +func (*GetFeeForMessageRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{13} } -func (x *GetBalanceRequest) GetAddr() []byte { +func (x *GetFeeForMessageRequest) GetMessage() string { if x != nil { - return x.Addr + return x.Message } - return nil + return "" } -func (x *GetBalanceRequest) GetCommitment() CommitmentType { +func (x *GetFeeForMessageRequest) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return CommitmentType_COMMITMENT_NONE + return CommitmentType_COMMITMENT_TYPE_NONE } -// Options for GetBlock. -type GetBlockOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - Commitment CommitmentType `protobuf:"varint,4,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Options for GetMultipleAccounts. +type GetMultipleAccountsOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetBlockOpts) Reset() { - *x = GetBlockOpts{} - mi := &file_solana_proto_msgTypes[16] +func (x *GetMultipleAccountsOpts) Reset() { + *x = GetMultipleAccountsOpts{} + mi := &file_solana_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBlockOpts) String() string { +func (x *GetMultipleAccountsOpts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockOpts) ProtoMessage() {} +func (*GetMultipleAccountsOpts) ProtoMessage() {} -func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[16] +func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1235,45 +1102,61 @@ func (x *GetBlockOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockOpts.ProtoReflect.Descriptor instead. -func (*GetBlockOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{16} +// Deprecated: Use GetMultipleAccountsOpts.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{14} } -func (x *GetBlockOpts) GetCommitment() CommitmentType { +func (x *GetMultipleAccountsOpts) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_TYPE_NONE +} + +func (x *GetMultipleAccountsOpts) GetCommitment() CommitmentType { if x != nil { return x.Commitment } - return CommitmentType_COMMITMENT_NONE + return CommitmentType_COMMITMENT_TYPE_NONE } -// Block response. -type GetBlockReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Blockhash []byte `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"` // 32-byte block hash - PreviousBlockhash []byte `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` // 32-byte parent hash - ParentSlot uint64 `protobuf:"varint,3,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` - BlockTime int64 `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds - BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // chain height - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *GetMultipleAccountsOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil } -func (x *GetBlockReply) Reset() { - *x = GetBlockReply{} - mi := &file_solana_proto_msgTypes[17] +func (x *GetMultipleAccountsOpts) GetMinContextSlot() uint64 { + if x != nil { + return x.MinContextSlot + } + return 0 +} + +type OptionalAccountWrapper struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account *Account `protobuf:"bytes,1,opt,name=account,proto3,oneof" json:"account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OptionalAccountWrapper) Reset() { + *x = OptionalAccountWrapper{} + mi := &file_solana_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBlockReply) String() string { +func (x *OptionalAccountWrapper) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockReply) ProtoMessage() {} +func (*OptionalAccountWrapper) ProtoMessage() {} -func (x *GetBlockReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[17] +func (x *OptionalAccountWrapper) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1284,70 +1167,95 @@ func (x *GetBlockReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockReply.ProtoReflect.Descriptor instead. -func (*GetBlockReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{17} +// Deprecated: Use OptionalAccountWrapper.ProtoReflect.Descriptor instead. +func (*OptionalAccountWrapper) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{15} } -func (x *GetBlockReply) GetBlockhash() []byte { +func (x *OptionalAccountWrapper) GetAccount() *Account { if x != nil { - return x.Blockhash + return x.Account } return nil } -func (x *GetBlockReply) GetPreviousBlockhash() []byte { - if x != nil { - return x.PreviousBlockhash - } - return nil +// Reply for GetMultipleAccountsWithOpts. +type GetMultipleAccountsWithOptsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + RpcContext *RPCContext `protobuf:"bytes,1,opt,name=rpc_context,json=rpcContext,proto3" json:"rpc_context,omitempty"` // read slot + Value []*OptionalAccountWrapper `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // accounts (nil entries allowed) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetBlockReply) GetParentSlot() uint64 { +func (x *GetMultipleAccountsWithOptsReply) Reset() { + *x = GetMultipleAccountsWithOptsReply{} + mi := &file_solana_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMultipleAccountsWithOptsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMultipleAccountsWithOptsReply) ProtoMessage() {} + +func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[16] if x != nil { - return x.ParentSlot + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *GetBlockReply) GetBlockTime() int64 { +// Deprecated: Use GetMultipleAccountsWithOptsReply.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsWithOptsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{16} +} + +func (x *GetMultipleAccountsWithOptsReply) GetRpcContext() *RPCContext { if x != nil { - return x.BlockTime + return x.RpcContext } - return 0 + return nil } -func (x *GetBlockReply) GetBlockHeight() uint64 { +func (x *GetMultipleAccountsWithOptsReply) GetValue() []*OptionalAccountWrapper { if x != nil { - return x.BlockHeight + return x.Value } - return 0 + return nil } -// Request for GetBlock. -type GetBlockRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // target slot - Opts *GetBlockOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` +// Request for GetMultipleAccountsWithOpts. +type GetMultipleAccountsWithOptsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // list of 32-byte Pubkeys + Opts *GetMultipleAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetBlockRequest) Reset() { - *x = GetBlockRequest{} - mi := &file_solana_proto_msgTypes[18] +func (x *GetMultipleAccountsWithOptsRequest) Reset() { + *x = GetMultipleAccountsWithOptsRequest{} + mi := &file_solana_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBlockRequest) String() string { +func (x *GetMultipleAccountsWithOptsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockRequest) ProtoMessage() {} +func (*GetMultipleAccountsWithOptsRequest) ProtoMessage() {} -func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[18] +func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1358,48 +1266,48 @@ func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead. -func (*GetBlockRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{18} +// Deprecated: Use GetMultipleAccountsWithOptsRequest.ProtoReflect.Descriptor instead. +func (*GetMultipleAccountsWithOptsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{17} } -func (x *GetBlockRequest) GetSlot() uint64 { +func (x *GetMultipleAccountsWithOptsRequest) GetAccounts() [][]byte { if x != nil { - return x.Slot + return x.Accounts } - return 0 + return nil } -func (x *GetBlockRequest) GetOpts() *GetBlockOpts { +func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts { if x != nil { return x.Opts } return nil } -// Fee quote for a base58-encoded Message. -type GetFeeForMessageReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Fee uint64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` // lamports +// Reply for GetSignatureStatuses. +type GetSignatureStatusesReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*GetSignatureStatusesResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // 1:1 with input unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetFeeForMessageReply) Reset() { - *x = GetFeeForMessageReply{} - mi := &file_solana_proto_msgTypes[19] +func (x *GetSignatureStatusesReply) Reset() { + *x = GetSignatureStatusesReply{} + mi := &file_solana_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetFeeForMessageReply) String() string { +func (x *GetSignatureStatusesReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeeForMessageReply) ProtoMessage() {} +func (*GetSignatureStatusesReply) ProtoMessage() {} -func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[19] +func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1410,41 +1318,41 @@ func (x *GetFeeForMessageReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeeForMessageReply.ProtoReflect.Descriptor instead. -func (*GetFeeForMessageReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{19} +// Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{18} } -func (x *GetFeeForMessageReply) GetFee() uint64 { +func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { if x != nil { - return x.Fee + return x.Results } - return 0 + return nil } -type GetFeeForMessageRequest struct { +// Request for GetSignatureStatuses. +type GetSignatureStatusesRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // base58-encoded Message - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` // 64-byte signatures unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetFeeForMessageRequest) Reset() { - *x = GetFeeForMessageRequest{} - mi := &file_solana_proto_msgTypes[20] +func (x *GetSignatureStatusesRequest) Reset() { + *x = GetSignatureStatusesRequest{} + mi := &file_solana_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetFeeForMessageRequest) String() string { +func (x *GetSignatureStatusesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeeForMessageRequest) ProtoMessage() {} +func (*GetSignatureStatusesRequest) ProtoMessage() {} -func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[20] +func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1455,51 +1363,44 @@ func (x *GetFeeForMessageRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeeForMessageRequest.ProtoReflect.Descriptor instead. -func (*GetFeeForMessageRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{20} -} - -func (x *GetFeeForMessageRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" +// Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{19} } -func (x *GetFeeForMessageRequest) GetCommitment() CommitmentType { +func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { if x != nil { - return x.Commitment + return x.Sigs } - return CommitmentType_COMMITMENT_NONE + return nil } -// Options for GetMultipleAccounts. -type GetMultipleAccountsOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` - DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` - MinContextSlot uint64 `protobuf:"varint,4,opt,name=min_context_slot,json=minContextSlot,proto3" json:"min_context_slot,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Per-signature status. +type GetSignatureStatusesResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot + Confirmations *uint64 `protobuf:"varint,2,opt,name=confirmations,proto3,oneof" json:"confirmations,omitempty"` // null->0 here + Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` // error JSON string (empty on success) + ConfirmationStatus ConfirmationStatusType `protobuf:"varint,4,opt,name=confirmation_status,json=confirmationStatus,proto3,enum=loop.solana.ConfirmationStatusType" json:"confirmation_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetMultipleAccountsOpts) Reset() { - *x = GetMultipleAccountsOpts{} - mi := &file_solana_proto_msgTypes[21] +func (x *GetSignatureStatusesResult) Reset() { + *x = GetSignatureStatusesResult{} + mi := &file_solana_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetMultipleAccountsOpts) String() string { +func (x *GetSignatureStatusesResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMultipleAccountsOpts) ProtoMessage() {} +func (*GetSignatureStatusesResult) ProtoMessage() {} -func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[21] +func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1510,63 +1411,62 @@ func (x *GetMultipleAccountsOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetMultipleAccountsOpts.ProtoReflect.Descriptor instead. -func (*GetMultipleAccountsOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{21} +// Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. +func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{20} } -func (x *GetMultipleAccountsOpts) GetEncoding() EncodingType { +func (x *GetSignatureStatusesResult) GetSlot() uint64 { if x != nil { - return x.Encoding + return x.Slot } - return EncodingType_ENCODING_NONE + return 0 } -func (x *GetMultipleAccountsOpts) GetCommitment() CommitmentType { - if x != nil { - return x.Commitment +func (x *GetSignatureStatusesResult) GetConfirmations() uint64 { + if x != nil && x.Confirmations != nil { + return *x.Confirmations } - return CommitmentType_COMMITMENT_NONE + return 0 } -func (x *GetMultipleAccountsOpts) GetDataSlice() *DataSlice { +func (x *GetSignatureStatusesResult) GetErr() string { if x != nil { - return x.DataSlice + return x.Err } - return nil + return "" } -func (x *GetMultipleAccountsOpts) GetMinContextSlot() uint64 { +func (x *GetSignatureStatusesResult) GetConfirmationStatus() ConfirmationStatusType { if x != nil { - return x.MinContextSlot + return x.ConfirmationStatus } - return 0 + return ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_NONE } -// Reply for GetMultipleAccountsWithOpts. -type GetMultipleAccountsWithOptsReply struct { +// Current “height” (blocks below latest). +type GetSlotHeightReply struct { state protoimpl.MessageState `protogen:"open.v1"` - RPCContext *RPCContext `protobuf:"bytes,1,opt,name=r_p_c_context,json=rPCContext,proto3" json:"r_p_c_context,omitempty"` // read slot - Value []*Account `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // accounts (nil entries allowed) + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetMultipleAccountsWithOptsReply) Reset() { - *x = GetMultipleAccountsWithOptsReply{} - mi := &file_solana_proto_msgTypes[22] +func (x *GetSlotHeightReply) Reset() { + *x = GetSlotHeightReply{} + mi := &file_solana_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetMultipleAccountsWithOptsReply) String() string { +func (x *GetSlotHeightReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMultipleAccountsWithOptsReply) ProtoMessage() {} +func (*GetSlotHeightReply) ProtoMessage() {} -func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[22] +func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1577,48 +1477,86 @@ func (x *GetMultipleAccountsWithOptsReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetMultipleAccountsWithOptsReply.ProtoReflect.Descriptor instead. -func (*GetMultipleAccountsWithOptsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{22} -} - -func (x *GetMultipleAccountsWithOptsReply) GetRPCContext() *RPCContext { - if x != nil { - return x.RPCContext - } - return nil +// Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. +func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{21} } -func (x *GetMultipleAccountsWithOptsReply) GetValue() []*Account { +func (x *GetSlotHeightReply) GetHeight() uint64 { if x != nil { - return x.Value + return x.Height } - return nil + return 0 } -// Request for GetMultipleAccountsWithOpts. -type GetMultipleAccountsWithOptsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // list of 32-byte Pubkeys - Opts *GetMultipleAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` +type GetSlotHeightRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Commitment CommitmentType `protobuf:"varint,1,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetMultipleAccountsWithOptsRequest) Reset() { - *x = GetMultipleAccountsWithOptsRequest{} +func (x *GetSlotHeightRequest) Reset() { + *x = GetSlotHeightRequest{} + mi := &file_solana_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSlotHeightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSlotHeightRequest) ProtoMessage() {} + +func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. +func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{22} +} + +func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { + if x != nil { + return x.Commitment + } + return CommitmentType_COMMITMENT_TYPE_NONE +} + +// Message header counts. +type MessageHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` // signer count + NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` // trailing signed RO + NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` // trailing unsigned RO + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageHeader) Reset() { + *x = MessageHeader{} mi := &file_solana_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetMultipleAccountsWithOptsRequest) String() string { +func (x *MessageHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMultipleAccountsWithOptsRequest) ProtoMessage() {} +func (*MessageHeader) ProtoMessage() {} -func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message { +func (x *MessageHeader) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1630,47 +1568,57 @@ func (x *GetMultipleAccountsWithOptsRequest) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use GetMultipleAccountsWithOptsRequest.ProtoReflect.Descriptor instead. -func (*GetMultipleAccountsWithOptsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead. +func (*MessageHeader) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{23} } -func (x *GetMultipleAccountsWithOptsRequest) GetAccounts() [][]byte { +func (x *MessageHeader) GetNumRequiredSignatures() uint32 { if x != nil { - return x.Accounts + return x.NumRequiredSignatures } - return nil + return 0 } -func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts { +func (x *MessageHeader) GetNumReadonlySignedAccounts() uint32 { if x != nil { - return x.Opts + return x.NumReadonlySignedAccounts } - return nil + return 0 } -// Reply for GetSignatureStatuses. -type GetSignatureStatusesReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Results []*GetSignatureStatusesResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // 1:1 with input - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 { + if x != nil { + return x.NumReadonlyUnsignedAccounts + } + return 0 } -func (x *GetSignatureStatusesReply) Reset() { - *x = GetSignatureStatusesReply{} +// Parsed message (no address tables). +type ParsedMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RecentBlockhash []byte `protobuf:"bytes,1,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` // 32-byte Hash + AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` // list of 32-byte Pubkeys + Header *MessageHeader `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + Instructions []*CompiledInstruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParsedMessage) Reset() { + *x = ParsedMessage{} mi := &file_solana_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSignatureStatusesReply) String() string { +func (x *ParsedMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSignatureStatusesReply) ProtoMessage() {} +func (*ParsedMessage) ProtoMessage() {} -func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { +func (x *ParsedMessage) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1682,40 +1630,62 @@ func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. -func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { +// Deprecated: Use ParsedMessage.ProtoReflect.Descriptor instead. +func (*ParsedMessage) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{24} } -func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { +func (x *ParsedMessage) GetRecentBlockhash() []byte { if x != nil { - return x.Results + return x.RecentBlockhash } return nil } -// Request for GetSignatureStatuses. -type GetSignatureStatusesRequest struct { +func (x *ParsedMessage) GetAccountKeys() [][]byte { + if x != nil { + return x.AccountKeys + } + return nil +} + +func (x *ParsedMessage) GetHeader() *MessageHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *ParsedMessage) GetInstructions() []*CompiledInstruction { + if x != nil { + return x.Instructions + } + return nil +} + +// Parsed transaction (signatures + message). +type ParsedTransaction struct { state protoimpl.MessageState `protogen:"open.v1"` - Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` // 64-byte signatures + Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` // 64-byte signatures + Message *ParsedMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetSignatureStatusesRequest) Reset() { - *x = GetSignatureStatusesRequest{} +func (x *ParsedTransaction) Reset() { + *x = ParsedTransaction{} mi := &file_solana_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSignatureStatusesRequest) String() string { +func (x *ParsedTransaction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSignatureStatusesRequest) ProtoMessage() {} +func (*ParsedTransaction) ProtoMessage() {} -func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { +func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1727,43 +1697,49 @@ func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. -func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ParsedTransaction.ProtoReflect.Descriptor instead. +func (*ParsedTransaction) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{25} } -func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { +func (x *ParsedTransaction) GetSignatures() [][]byte { if x != nil { - return x.Sigs + return x.Signatures } return nil } -// Per-signature status. -type GetSignatureStatusesResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot - Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"` // null->0 here - Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` // error JSON string (empty on success) - ConfirmationStatus ConfirmationStatusType `protobuf:"varint,4,opt,name=confirmation_status,json=confirmationStatus,proto3,enum=loop.solana.ConfirmationStatusType" json:"confirmation_status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *ParsedTransaction) GetMessage() *ParsedMessage { + if x != nil { + return x.Message + } + return nil } -func (x *GetSignatureStatusesResult) Reset() { - *x = GetSignatureStatusesResult{} +// Token amount (UI-friendly). +type UiTokenAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // raw integer string + Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` // mint decimals + UiAmountString string `protobuf:"bytes,4,opt,name=ui_amount_string,json=uiAmountString,proto3" json:"ui_amount_string,omitempty"` // amount / 10^decimals + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UiTokenAmount) Reset() { + *x = UiTokenAmount{} mi := &file_solana_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSignatureStatusesResult) String() string { +func (x *UiTokenAmount) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSignatureStatusesResult) ProtoMessage() {} +func (*UiTokenAmount) ProtoMessage() {} -func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { +func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1775,61 +1751,58 @@ func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. -func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { +// Deprecated: Use UiTokenAmount.ProtoReflect.Descriptor instead. +func (*UiTokenAmount) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{26} } -func (x *GetSignatureStatusesResult) GetSlot() uint64 { +func (x *UiTokenAmount) GetAmount() string { if x != nil { - return x.Slot + return x.Amount } - return 0 + return "" } -func (x *GetSignatureStatusesResult) GetConfirmations() uint64 { +func (x *UiTokenAmount) GetDecimals() uint32 { if x != nil { - return x.Confirmations + return x.Decimals } return 0 } -func (x *GetSignatureStatusesResult) GetErr() string { +func (x *UiTokenAmount) GetUiAmountString() string { if x != nil { - return x.Err + return x.UiAmountString } return "" } -func (x *GetSignatureStatusesResult) GetConfirmationStatus() ConfirmationStatusType { - if x != nil { - return x.ConfirmationStatus - } - return ConfirmationStatusType_CONFIRMATION_NONE -} - -// Current “height” (blocks below latest). -type GetSlotHeightReply struct { +// SPL token balance entry. +type TokenBalance struct { state protoimpl.MessageState `protogen:"open.v1"` - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + AccountIndex uint32 `protobuf:"varint,1,opt,name=account_index,json=accountIndex,proto3" json:"account_index,omitempty"` // index in account_keys + Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3,oneof" json:"owner,omitempty"` // 32-byte owner (optional) + ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3,oneof" json:"program_id,omitempty"` // 32-byte token program (optional) + Mint []byte `protobuf:"bytes,4,opt,name=mint,proto3" json:"mint,omitempty"` // 32-byte mint + Ui *UiTokenAmount `protobuf:"bytes,5,opt,name=ui,proto3" json:"ui,omitempty"` // formatted amounts unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetSlotHeightReply) Reset() { - *x = GetSlotHeightReply{} +func (x *TokenBalance) Reset() { + *x = TokenBalance{} mi := &file_solana_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSlotHeightReply) String() string { +func (x *TokenBalance) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSlotHeightReply) ProtoMessage() {} +func (*TokenBalance) ProtoMessage() {} -func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { +func (x *TokenBalance) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1841,39 +1814,69 @@ func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. -func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { +// Deprecated: Use TokenBalance.ProtoReflect.Descriptor instead. +func (*TokenBalance) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{27} } -func (x *GetSlotHeightReply) GetHeight() uint64 { +func (x *TokenBalance) GetAccountIndex() uint32 { if x != nil { - return x.Height + return x.AccountIndex } return 0 } -type GetSlotHeightRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Commitment CommitmentType `protobuf:"varint,1,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSlotHeightRequest) Reset() { - *x = GetSlotHeightRequest{} - mi := &file_solana_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *TokenBalance) GetOwner() []byte { + if x != nil { + return x.Owner + } + return nil } -func (x *GetSlotHeightRequest) String() string { +func (x *TokenBalance) GetProgramId() []byte { + if x != nil { + return x.ProgramId + } + return nil +} + +func (x *TokenBalance) GetMint() []byte { + if x != nil { + return x.Mint + } + return nil +} + +func (x *TokenBalance) GetUi() *UiTokenAmount { + if x != nil { + return x.Ui + } + return nil +} + +// Inner instruction list at a given outer instruction index. +type InnerInstruction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // outer ix index + Instructions []*CompiledInstruction `protobuf:"bytes,2,rep,name=instructions,proto3" json:"instructions,omitempty"` // invoked ixs + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InnerInstruction) Reset() { + *x = InnerInstruction{} + mi := &file_solana_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InnerInstruction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSlotHeightRequest) ProtoMessage() {} +func (*InnerInstruction) ProtoMessage() {} -func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { +func (x *InnerInstruction) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1885,42 +1888,48 @@ func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. -func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use InnerInstruction.ProtoReflect.Descriptor instead. +func (*InnerInstruction) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{28} } -func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { +func (x *InnerInstruction) GetIndex() uint32 { if x != nil { - return x.Commitment + return x.Index } - return CommitmentType_COMMITMENT_NONE + return 0 } -// Message header counts. -type MessageHeader struct { - state protoimpl.MessageState `protogen:"open.v1"` - NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` // signer count - NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` // trailing signed RO - NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` // trailing unsigned RO - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *InnerInstruction) GetInstructions() []*CompiledInstruction { + if x != nil { + return x.Instructions + } + return nil } -func (x *MessageHeader) Reset() { - *x = MessageHeader{} +// Address table lookups expanded by loader. +type LoadedAddresses struct { + state protoimpl.MessageState `protogen:"open.v1"` + Readonly [][]byte `protobuf:"bytes,1,rep,name=readonly,proto3" json:"readonly,omitempty"` // 32-byte Pubkeys + Writable [][]byte `protobuf:"bytes,2,rep,name=writable,proto3" json:"writable,omitempty"` // 32-byte Pubkeys + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadedAddresses) Reset() { + *x = LoadedAddresses{} mi := &file_solana_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *MessageHeader) String() string { +func (x *LoadedAddresses) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MessageHeader) ProtoMessage() {} +func (*LoadedAddresses) ProtoMessage() {} -func (x *MessageHeader) ProtoReflect() protoreflect.Message { +func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1932,57 +1941,50 @@ func (x *MessageHeader) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead. -func (*MessageHeader) Descriptor() ([]byte, []int) { +// Deprecated: Use LoadedAddresses.ProtoReflect.Descriptor instead. +func (*LoadedAddresses) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{29} } -func (x *MessageHeader) GetNumRequiredSignatures() uint32 { - if x != nil { - return x.NumRequiredSignatures - } - return 0 -} - -func (x *MessageHeader) GetNumReadonlySignedAccounts() uint32 { +func (x *LoadedAddresses) GetReadonly() [][]byte { if x != nil { - return x.NumReadonlySignedAccounts + return x.Readonly } - return 0 + return nil } -func (x *MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 { +func (x *LoadedAddresses) GetWritable() [][]byte { if x != nil { - return x.NumReadonlyUnsignedAccounts + return x.Writable } - return 0 + return nil } -// Parsed message (no address tables). -type ParsedMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - RecentBlockhash []byte `protobuf:"bytes,1,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` // 32-byte Hash - AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` // list of 32-byte Pubkeys - Header *MessageHeader `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` - Instructions []*CompiledInstruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Compiled (program) instruction. +type CompiledInstruction struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"` // index into account_keys + Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` // indices into account_keys + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // program input bytes + StackHeight uint32 `protobuf:"varint,4,opt,name=stack_height,json=stackHeight,proto3" json:"stack_height,omitempty"` // if recorded by node + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ParsedMessage) Reset() { - *x = ParsedMessage{} +func (x *CompiledInstruction) Reset() { + *x = CompiledInstruction{} mi := &file_solana_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ParsedMessage) String() string { +func (x *CompiledInstruction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ParsedMessage) ProtoMessage() {} +func (*CompiledInstruction) ProtoMessage() {} -func (x *ParsedMessage) ProtoReflect() protoreflect.Message { +func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1994,62 +1996,62 @@ func (x *ParsedMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ParsedMessage.ProtoReflect.Descriptor instead. -func (*ParsedMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead. +func (*CompiledInstruction) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{30} } -func (x *ParsedMessage) GetRecentBlockhash() []byte { +func (x *CompiledInstruction) GetProgramIdIndex() uint32 { if x != nil { - return x.RecentBlockhash + return x.ProgramIdIndex } - return nil + return 0 } -func (x *ParsedMessage) GetAccountKeys() [][]byte { +func (x *CompiledInstruction) GetAccounts() []uint32 { if x != nil { - return x.AccountKeys + return x.Accounts } return nil } -func (x *ParsedMessage) GetHeader() *MessageHeader { +func (x *CompiledInstruction) GetData() []byte { if x != nil { - return x.Header + return x.Data } return nil } -func (x *ParsedMessage) GetInstructions() []*CompiledInstruction { +func (x *CompiledInstruction) GetStackHeight() uint32 { if x != nil { - return x.Instructions + return x.StackHeight } - return nil + return 0 } -// Parsed transaction (signatures + message). -type ParsedTransaction struct { +// Raw bytes with encoding tag. +type Data struct { state protoimpl.MessageState `protogen:"open.v1"` - Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` // 64-byte signatures - Message *ParsedMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // raw bytes + Encoding EncodingType `protobuf:"varint,2,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // how it was encoded originally unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ParsedTransaction) Reset() { - *x = ParsedTransaction{} +func (x *Data) Reset() { + *x = Data{} mi := &file_solana_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ParsedTransaction) String() string { +func (x *Data) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ParsedTransaction) ProtoMessage() {} +func (*Data) ProtoMessage() {} -func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { +func (x *Data) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2061,49 +2063,48 @@ func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ParsedTransaction.ProtoReflect.Descriptor instead. -func (*ParsedTransaction) Descriptor() ([]byte, []int) { +// Deprecated: Use Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{31} } -func (x *ParsedTransaction) GetSignatures() [][]byte { +func (x *Data) GetContent() []byte { if x != nil { - return x.Signatures + return x.Content } return nil } -func (x *ParsedTransaction) GetMessage() *ParsedMessage { +func (x *Data) GetEncoding() EncodingType { if x != nil { - return x.Message + return x.Encoding } - return nil + return EncodingType_ENCODING_TYPE_NONE } -// Token amount (UI-friendly). -type UiTokenAmount struct { - state protoimpl.MessageState `protogen:"open.v1"` - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // raw integer string - Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` // mint decimals - UiAmountString string `protobuf:"bytes,4,opt,name=ui_amount_string,json=uiAmountString,proto3" json:"ui_amount_string,omitempty"` // amount / 10^decimals - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Program return data. +type ReturnData struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProgramId []byte `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32-byte Pubkey + Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw return bytes + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *UiTokenAmount) Reset() { - *x = UiTokenAmount{} +func (x *ReturnData) Reset() { + *x = ReturnData{} mi := &file_solana_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *UiTokenAmount) String() string { +func (x *ReturnData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UiTokenAmount) ProtoMessage() {} +func (*ReturnData) ProtoMessage() {} -func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { +func (x *ReturnData) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2115,58 +2116,57 @@ func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UiTokenAmount.ProtoReflect.Descriptor instead. -func (*UiTokenAmount) Descriptor() ([]byte, []int) { +// Deprecated: Use ReturnData.ProtoReflect.Descriptor instead. +func (*ReturnData) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{32} } -func (x *UiTokenAmount) GetAmount() string { +func (x *ReturnData) GetProgramId() []byte { if x != nil { - return x.Amount + return x.ProgramId } - return "" + return nil } -func (x *UiTokenAmount) GetDecimals() uint32 { +func (x *ReturnData) GetData() *Data { if x != nil { - return x.Decimals + return x.Data } - return 0 + return nil } -func (x *UiTokenAmount) GetUiAmountString() string { - if x != nil { - return x.UiAmountString - } - return "" +// Transaction execution metadata. +type TransactionMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + ErrJson string `protobuf:"bytes,1,opt,name=err_json,json=errJson,proto3" json:"err_json,omitempty"` // error JSON (empty on success) + Fee uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` // lamports + PreBalances []uint64 `protobuf:"varint,3,rep,packed,name=pre_balances,json=preBalances,proto3" json:"pre_balances,omitempty"` // lamports per account + PostBalances []uint64 `protobuf:"varint,4,rep,packed,name=post_balances,json=postBalances,proto3" json:"post_balances,omitempty"` // lamports per account + LogMessages []string `protobuf:"bytes,5,rep,name=log_messages,json=logMessages,proto3" json:"log_messages,omitempty"` // runtime logs + PreTokenBalances []*TokenBalance `protobuf:"bytes,6,rep,name=pre_token_balances,json=preTokenBalances,proto3" json:"pre_token_balances,omitempty"` + PostTokenBalances []*TokenBalance `protobuf:"bytes,7,rep,name=post_token_balances,json=postTokenBalances,proto3" json:"post_token_balances,omitempty"` + InnerInstructions []*InnerInstruction `protobuf:"bytes,8,rep,name=inner_instructions,json=innerInstructions,proto3" json:"inner_instructions,omitempty"` + LoadedAddresses *LoadedAddresses `protobuf:"bytes,9,opt,name=loaded_addresses,json=loadedAddresses,proto3" json:"loaded_addresses,omitempty"` + ReturnData *ReturnData `protobuf:"bytes,10,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"` + ComputeUnitsConsumed *uint64 `protobuf:"varint,11,opt,name=compute_units_consumed,json=computeUnitsConsumed,proto3,oneof" json:"compute_units_consumed,omitempty"` // CUs + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -// SPL token balance entry. -type TokenBalance struct { - state protoimpl.MessageState `protogen:"open.v1"` - AccountIndex uint32 `protobuf:"varint,1,opt,name=account_index,json=accountIndex,proto3" json:"account_index,omitempty"` // index in account_keys - Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // 32-byte owner (optional) - ProgramId []byte `protobuf:"bytes,3,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32-byte token program (optional) - Mint []byte `protobuf:"bytes,4,opt,name=mint,proto3" json:"mint,omitempty"` // 32-byte mint - Ui *UiTokenAmount `protobuf:"bytes,5,opt,name=ui,proto3" json:"ui,omitempty"` // formatted amounts - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TokenBalance) Reset() { - *x = TokenBalance{} +func (x *TransactionMeta) Reset() { + *x = TransactionMeta{} mi := &file_solana_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *TokenBalance) String() string { +func (x *TransactionMeta) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TokenBalance) ProtoMessage() {} +func (*TransactionMeta) ProtoMessage() {} -func (x *TokenBalance) ProtoReflect() protoreflect.Message { +func (x *TransactionMeta) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2178,69 +2178,114 @@ func (x *TokenBalance) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TokenBalance.ProtoReflect.Descriptor instead. -func (*TokenBalance) Descriptor() ([]byte, []int) { +// Deprecated: Use TransactionMeta.ProtoReflect.Descriptor instead. +func (*TransactionMeta) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{33} } -func (x *TokenBalance) GetAccountIndex() uint32 { +func (x *TransactionMeta) GetErrJson() string { if x != nil { - return x.AccountIndex + return x.ErrJson + } + return "" +} + +func (x *TransactionMeta) GetFee() uint64 { + if x != nil { + return x.Fee } return 0 } -func (x *TokenBalance) GetOwner() []byte { +func (x *TransactionMeta) GetPreBalances() []uint64 { if x != nil { - return x.Owner + return x.PreBalances } return nil } -func (x *TokenBalance) GetProgramId() []byte { +func (x *TransactionMeta) GetPostBalances() []uint64 { if x != nil { - return x.ProgramId + return x.PostBalances } return nil } -func (x *TokenBalance) GetMint() []byte { +func (x *TransactionMeta) GetLogMessages() []string { if x != nil { - return x.Mint + return x.LogMessages } return nil } -func (x *TokenBalance) GetUi() *UiTokenAmount { +func (x *TransactionMeta) GetPreTokenBalances() []*TokenBalance { if x != nil { - return x.Ui + return x.PreTokenBalances } return nil } -// Inner instruction list at a given outer instruction index. -type InnerInstruction struct { - state protoimpl.MessageState `protogen:"open.v1"` - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // outer ix index - Instructions []*CompiledInstruction `protobuf:"bytes,2,rep,name=instructions,proto3" json:"instructions,omitempty"` // invoked ixs +func (x *TransactionMeta) GetPostTokenBalances() []*TokenBalance { + if x != nil { + return x.PostTokenBalances + } + return nil +} + +func (x *TransactionMeta) GetInnerInstructions() []*InnerInstruction { + if x != nil { + return x.InnerInstructions + } + return nil +} + +func (x *TransactionMeta) GetLoadedAddresses() *LoadedAddresses { + if x != nil { + return x.LoadedAddresses + } + return nil +} + +func (x *TransactionMeta) GetReturnData() *ReturnData { + if x != nil { + return x.ReturnData + } + return nil +} + +func (x *TransactionMeta) GetComputeUnitsConsumed() uint64 { + if x != nil && x.ComputeUnitsConsumed != nil { + return *x.ComputeUnitsConsumed + } + return 0 +} + +// Transaction envelope: raw bytes or parsed struct. +type TransactionEnvelope struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Transaction: + // + // *TransactionEnvelope_Raw + // *TransactionEnvelope_Parsed + Transaction isTransactionEnvelope_Transaction `protobuf_oneof:"transaction"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *InnerInstruction) Reset() { - *x = InnerInstruction{} +func (x *TransactionEnvelope) Reset() { + *x = TransactionEnvelope{} mi := &file_solana_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *InnerInstruction) String() string { +func (x *TransactionEnvelope) String() string { return protoimpl.X.MessageStringOf(x) } -func (*InnerInstruction) ProtoMessage() {} +func (*TransactionEnvelope) ProtoMessage() {} -func (x *InnerInstruction) ProtoReflect() protoreflect.Message { +func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2252,48 +2297,77 @@ func (x *InnerInstruction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use InnerInstruction.ProtoReflect.Descriptor instead. -func (*InnerInstruction) Descriptor() ([]byte, []int) { +// Deprecated: Use TransactionEnvelope.ProtoReflect.Descriptor instead. +func (*TransactionEnvelope) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{34} } -func (x *InnerInstruction) GetIndex() uint32 { +func (x *TransactionEnvelope) GetTransaction() isTransactionEnvelope_Transaction { if x != nil { - return x.Index + return x.Transaction } - return 0 + return nil } -func (x *InnerInstruction) GetInstructions() []*CompiledInstruction { +func (x *TransactionEnvelope) GetRaw() []byte { if x != nil { - return x.Instructions + if x, ok := x.Transaction.(*TransactionEnvelope_Raw); ok { + return x.Raw + } } return nil } -// Address table lookups expanded by loader. -type LoadedAddresses struct { +func (x *TransactionEnvelope) GetParsed() *ParsedTransaction { + if x != nil { + if x, ok := x.Transaction.(*TransactionEnvelope_Parsed); ok { + return x.Parsed + } + } + return nil +} + +type isTransactionEnvelope_Transaction interface { + isTransactionEnvelope_Transaction() +} + +type TransactionEnvelope_Raw struct { + Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` // raw tx bytes (for RAW/base64) +} + +type TransactionEnvelope_Parsed struct { + Parsed *ParsedTransaction `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` // parsed tx (for JSON_PARSED) +} + +func (*TransactionEnvelope_Raw) isTransactionEnvelope_Transaction() {} + +func (*TransactionEnvelope_Parsed) isTransactionEnvelope_Transaction() {} + +// GetTransaction reply. +type GetTransactionReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Readonly [][]byte `protobuf:"bytes,1,rep,name=readonly,proto3" json:"readonly,omitempty"` // 32-byte Pubkeys - Writable [][]byte `protobuf:"bytes,2,rep,name=writable,proto3" json:"writable,omitempty"` // 32-byte Pubkeys + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot + BlockTime *int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3,oneof" json:"block_time,omitempty"` // unix seconds + Transaction *TransactionEnvelope `protobuf:"bytes,3,opt,name=transaction,proto3,oneof" json:"transaction,omitempty"` // tx bytes or parsed + Meta *TransactionMeta `protobuf:"bytes,4,opt,name=meta,proto3,oneof" json:"meta,omitempty"` // may be omitted by node unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *LoadedAddresses) Reset() { - *x = LoadedAddresses{} +func (x *GetTransactionReply) Reset() { + *x = GetTransactionReply{} mi := &file_solana_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *LoadedAddresses) String() string { +func (x *GetTransactionReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LoadedAddresses) ProtoMessage() {} +func (*GetTransactionReply) ProtoMessage() {} -func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { +func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2305,50 +2379,61 @@ func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LoadedAddresses.ProtoReflect.Descriptor instead. -func (*LoadedAddresses) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. +func (*GetTransactionReply) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{35} } -func (x *LoadedAddresses) GetReadonly() [][]byte { +func (x *GetTransactionReply) GetSlot() uint64 { if x != nil { - return x.Readonly + return x.Slot + } + return 0 +} + +func (x *GetTransactionReply) GetBlockTime() int64 { + if x != nil && x.BlockTime != nil { + return *x.BlockTime + } + return 0 +} + +func (x *GetTransactionReply) GetTransaction() *TransactionEnvelope { + if x != nil { + return x.Transaction } return nil } -func (x *LoadedAddresses) GetWritable() [][]byte { +func (x *GetTransactionReply) GetMeta() *TransactionMeta { if x != nil { - return x.Writable + return x.Meta } return nil } -// Compiled (program) instruction. -type CompiledInstruction struct { - state protoimpl.MessageState `protogen:"open.v1"` - ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"` // index into account_keys - Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` // indices into account_keys - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // program input bytes - StackHeight uint32 `protobuf:"varint,4,opt,name=stack_height,json=stackHeight,proto3" json:"stack_height,omitempty"` // if recorded by node - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// GetTransaction request. +type GetTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *CompiledInstruction) Reset() { - *x = CompiledInstruction{} +func (x *GetTransactionRequest) Reset() { + *x = GetTransactionRequest{} mi := &file_solana_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CompiledInstruction) String() string { +func (x *GetTransactionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CompiledInstruction) ProtoMessage() {} +func (*GetTransactionRequest) ProtoMessage() {} -func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { +func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2360,62 +2445,40 @@ func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead. -func (*CompiledInstruction) Descriptor() ([]byte, []int) { +// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetTransactionRequest) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{36} } -func (x *CompiledInstruction) GetProgramIdIndex() uint32 { - if x != nil { - return x.ProgramIdIndex - } - return 0 -} - -func (x *CompiledInstruction) GetAccounts() []uint32 { - if x != nil { - return x.Accounts - } - return nil -} - -func (x *CompiledInstruction) GetData() []byte { +func (x *GetTransactionRequest) GetSignature() []byte { if x != nil { - return x.Data + return x.Signature } return nil } -func (x *CompiledInstruction) GetStackHeight() uint32 { - if x != nil { - return x.StackHeight - } - return 0 -} - -// Raw bytes with encoding tag. -type Data struct { +// RPC read context. +type RPCContext struct { state protoimpl.MessageState `protogen:"open.v1"` - Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // raw bytes - Encoding EncodingType `protobuf:"varint,2,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // how it was encoded originally + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Data) Reset() { - *x = Data{} +func (x *RPCContext) Reset() { + *x = RPCContext{} mi := &file_solana_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Data) String() string { +func (x *RPCContext) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Data) ProtoMessage() {} +func (*RPCContext) ProtoMessage() {} -func (x *Data) ProtoReflect() protoreflect.Message { +func (x *RPCContext) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2427,48 +2490,43 @@ func (x *Data) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Data.ProtoReflect.Descriptor instead. -func (*Data) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{37} -} - -func (x *Data) GetContent() []byte { - if x != nil { - return x.Content - } - return nil +// Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. +func (*RPCContext) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{37} } -func (x *Data) GetEncoding() EncodingType { +func (x *RPCContext) GetSlot() uint64 { if x != nil { - return x.Encoding + return x.Slot } - return EncodingType_ENCODING_NONE + return 0 } -// Program return data. -type ReturnData struct { - state protoimpl.MessageState `protogen:"open.v1"` - ProgramId []byte `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` // 32-byte Pubkey - Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw return bytes - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Simulation options. +type SimulateTXOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` // verify sigs + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency + ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` // refresh blockhash + Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` // return accounts + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ReturnData) Reset() { - *x = ReturnData{} +func (x *SimulateTXOpts) Reset() { + *x = SimulateTXOpts{} mi := &file_solana_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ReturnData) String() string { +func (x *SimulateTXOpts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ReturnData) ProtoMessage() {} +func (*SimulateTXOpts) ProtoMessage() {} -func (x *ReturnData) ProtoReflect() protoreflect.Message { +func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2480,57 +2538,64 @@ func (x *ReturnData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ReturnData.ProtoReflect.Descriptor instead. -func (*ReturnData) Descriptor() ([]byte, []int) { +// Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. +func (*SimulateTXOpts) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{38} } -func (x *ReturnData) GetProgramId() []byte { +func (x *SimulateTXOpts) GetSigVerify() bool { if x != nil { - return x.ProgramId + return x.SigVerify } - return nil + return false } -func (x *ReturnData) GetData() *Data { +func (x *SimulateTXOpts) GetCommitment() CommitmentType { if x != nil { - return x.Data + return x.Commitment + } + return CommitmentType_COMMITMENT_TYPE_NONE +} + +func (x *SimulateTXOpts) GetReplaceRecentBlockhash() bool { + if x != nil { + return x.ReplaceRecentBlockhash + } + return false +} + +func (x *SimulateTXOpts) GetAccounts() *SimulateTransactionAccountsOpts { + if x != nil { + return x.Accounts } return nil } -// Transaction execution metadata. -type TransactionMeta struct { - state protoimpl.MessageState `protogen:"open.v1"` - ErrJson string `protobuf:"bytes,1,opt,name=err_json,json=errJson,proto3" json:"err_json,omitempty"` // error JSON (empty on success) - Fee uint64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` // lamports - PreBalances []uint64 `protobuf:"varint,3,rep,packed,name=pre_balances,json=preBalances,proto3" json:"pre_balances,omitempty"` // lamports per account - PostBalances []uint64 `protobuf:"varint,4,rep,packed,name=post_balances,json=postBalances,proto3" json:"post_balances,omitempty"` // lamports per account - LogMessages []string `protobuf:"bytes,5,rep,name=log_messages,json=logMessages,proto3" json:"log_messages,omitempty"` // runtime logs - PreTokenBalances []*TokenBalance `protobuf:"bytes,6,rep,name=pre_token_balances,json=preTokenBalances,proto3" json:"pre_token_balances,omitempty"` - PostTokenBalances []*TokenBalance `protobuf:"bytes,7,rep,name=post_token_balances,json=postTokenBalances,proto3" json:"post_token_balances,omitempty"` - InnerInstructions []*InnerInstruction `protobuf:"bytes,8,rep,name=inner_instructions,json=innerInstructions,proto3" json:"inner_instructions,omitempty"` - LoadedAddresses *LoadedAddresses `protobuf:"bytes,9,opt,name=loaded_addresses,json=loadedAddresses,proto3" json:"loaded_addresses,omitempty"` - ReturnData *ReturnData `protobuf:"bytes,10,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"` - ComputeUnitsConsumed uint64 `protobuf:"varint,11,opt,name=compute_units_consumed,json=computeUnitsConsumed,proto3" json:"compute_units_consumed,omitempty"` // CUs - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Simulation result. +type SimulateTXReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // empty on success + Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` // runtime logs + Accounts []*Account `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` // returned accounts + UnitsConsumed uint64 `protobuf:"varint,4,opt,name=units_consumed,json=unitsConsumed,proto3" json:"units_consumed,omitempty"` // CUs + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *TransactionMeta) Reset() { - *x = TransactionMeta{} +func (x *SimulateTXReply) Reset() { + *x = SimulateTXReply{} mi := &file_solana_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *TransactionMeta) String() string { +func (x *SimulateTXReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TransactionMeta) ProtoMessage() {} +func (*SimulateTXReply) ProtoMessage() {} -func (x *TransactionMeta) ProtoReflect() protoreflect.Message { +func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2542,114 +2607,63 @@ func (x *TransactionMeta) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TransactionMeta.ProtoReflect.Descriptor instead. -func (*TransactionMeta) Descriptor() ([]byte, []int) { +// Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. +func (*SimulateTXReply) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{39} } -func (x *TransactionMeta) GetErrJson() string { +func (x *SimulateTXReply) GetErr() string { if x != nil { - return x.ErrJson + return x.Err } return "" } -func (x *TransactionMeta) GetFee() uint64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *TransactionMeta) GetPreBalances() []uint64 { - if x != nil { - return x.PreBalances - } - return nil -} - -func (x *TransactionMeta) GetPostBalances() []uint64 { - if x != nil { - return x.PostBalances - } - return nil -} - -func (x *TransactionMeta) GetLogMessages() []string { - if x != nil { - return x.LogMessages - } - return nil -} - -func (x *TransactionMeta) GetPreTokenBalances() []*TokenBalance { - if x != nil { - return x.PreTokenBalances - } - return nil -} - -func (x *TransactionMeta) GetPostTokenBalances() []*TokenBalance { - if x != nil { - return x.PostTokenBalances - } - return nil -} - -func (x *TransactionMeta) GetInnerInstructions() []*InnerInstruction { - if x != nil { - return x.InnerInstructions - } - return nil -} - -func (x *TransactionMeta) GetLoadedAddresses() *LoadedAddresses { +func (x *SimulateTXReply) GetLogs() []string { if x != nil { - return x.LoadedAddresses + return x.Logs } return nil } -func (x *TransactionMeta) GetReturnData() *ReturnData { +func (x *SimulateTXReply) GetAccounts() []*Account { if x != nil { - return x.ReturnData + return x.Accounts } return nil } -func (x *TransactionMeta) GetComputeUnitsConsumed() uint64 { +func (x *SimulateTXReply) GetUnitsConsumed() uint64 { if x != nil { - return x.ComputeUnitsConsumed + return x.UnitsConsumed } return 0 } -// Transaction envelope: raw bytes or parsed struct. -type TransactionEnvelope struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Transaction: - // - // *TransactionEnvelope_Raw - // *TransactionEnvelope_Parsed - Transaction isTransactionEnvelope_Transaction `protobuf_oneof:"transaction"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Simulation request. +type SimulateTXRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) + EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx + Opts *SimulateTXOpts `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *TransactionEnvelope) Reset() { - *x = TransactionEnvelope{} +func (x *SimulateTXRequest) Reset() { + *x = SimulateTXRequest{} mi := &file_solana_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *TransactionEnvelope) String() string { +func (x *SimulateTXRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TransactionEnvelope) ProtoMessage() {} +func (*SimulateTXRequest) ProtoMessage() {} -func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { +func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2661,77 +2675,55 @@ func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TransactionEnvelope.ProtoReflect.Descriptor instead. -func (*TransactionEnvelope) Descriptor() ([]byte, []int) { +// Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. +func (*SimulateTXRequest) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{40} } -func (x *TransactionEnvelope) GetTransaction() isTransactionEnvelope_Transaction { +func (x *SimulateTXRequest) GetReceiver() []byte { if x != nil { - return x.Transaction + return x.Receiver } return nil } -func (x *TransactionEnvelope) GetRaw() []byte { +func (x *SimulateTXRequest) GetEncodedTransaction() string { if x != nil { - if x, ok := x.Transaction.(*TransactionEnvelope_Raw); ok { - return x.Raw - } + return x.EncodedTransaction } - return nil + return "" } -func (x *TransactionEnvelope) GetParsed() *ParsedTransaction { +func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { if x != nil { - if x, ok := x.Transaction.(*TransactionEnvelope_Parsed); ok { - return x.Parsed - } + return x.Opts } return nil } -type isTransactionEnvelope_Transaction interface { - isTransactionEnvelope_Transaction() -} - -type TransactionEnvelope_Raw struct { - Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` // raw tx bytes (for RAW/base64) -} - -type TransactionEnvelope_Parsed struct { - Parsed *ParsedTransaction `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` // parsed tx (for JSON_PARSED) -} - -func (*TransactionEnvelope_Raw) isTransactionEnvelope_Transaction() {} - -func (*TransactionEnvelope_Parsed) isTransactionEnvelope_Transaction() {} - -// GetTransaction reply. -type GetTransactionReply struct { +// Accounts to return during simulation. +type SimulateTransactionAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // processed slot - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // unix seconds - Transaction *TransactionEnvelope `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` // tx bytes or parsed - Meta *TransactionMeta `protobuf:"bytes,12,opt,name=meta,proto3" json:"meta,omitempty"` // may be omitted by node + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // account data encoding + Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` // 32-byte Pubkeys unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetTransactionReply) Reset() { - *x = GetTransactionReply{} +func (x *SimulateTransactionAccountsOpts) Reset() { + *x = SimulateTransactionAccountsOpts{} mi := &file_solana_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetTransactionReply) String() string { +func (x *SimulateTransactionAccountsOpts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetTransactionReply) ProtoMessage() {} +func (*SimulateTransactionAccountsOpts) ProtoMessage() {} -func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { +func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2743,61 +2735,49 @@ func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. -func (*GetTransactionReply) Descriptor() ([]byte, []int) { +// Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. +func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{41} } -func (x *GetTransactionReply) GetSlot() uint64 { - if x != nil { - return x.Slot - } - return 0 -} - -func (x *GetTransactionReply) GetBlockTime() int64 { - if x != nil { - return x.BlockTime - } - return 0 -} - -func (x *GetTransactionReply) GetTransaction() *TransactionEnvelope { +func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { if x != nil { - return x.Transaction + return x.Encoding } - return nil + return EncodingType_ENCODING_TYPE_NONE } -func (x *GetTransactionReply) GetMeta() *TransactionMeta { +func (x *SimulateTransactionAccountsOpts) GetAddresses() [][]byte { if x != nil { - return x.Meta + return x.Addresses } return nil } -// GetTransaction request. -type GetTransactionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Submit transaction result. +type SubmitTransactionReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature + IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // echo key + Status TxStatus `protobuf:"varint,3,opt,name=status,proto3,enum=loop.solana.TxStatus" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetTransactionRequest) Reset() { - *x = GetTransactionRequest{} +func (x *SubmitTransactionReply) Reset() { + *x = SubmitTransactionReply{} mi := &file_solana_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetTransactionRequest) String() string { +func (x *SubmitTransactionReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetTransactionRequest) ProtoMessage() {} +func (*SubmitTransactionReply) ProtoMessage() {} -func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { +func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2809,41 +2789,56 @@ func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetTransactionRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. +func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{42} } -func (x *GetTransactionRequest) GetSignature() []byte { +func (x *SubmitTransactionReply) GetSignature() []byte { if x != nil { return x.Signature } return nil } -// Comparator against hashed values. -type HashedValueComparator struct { - state protoimpl.MessageState `protogen:"open.v1"` - Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // hashed bytes - Operator int64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` // comparison op - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *SubmitTransactionReply) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" } -func (x *HashedValueComparator) Reset() { - *x = HashedValueComparator{} +func (x *SubmitTransactionReply) GetStatus() TxStatus { + if x != nil { + return x.Status + } + return TxStatus_TX_STATUS_FATAL +} + +// Submit transaction request. +type SubmitTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cfg *ComputeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"` // compute budget + Receiver []byte `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) + EncodedTransaction string `protobuf:"bytes,3,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitTransactionRequest) Reset() { + *x = SubmitTransactionRequest{} mi := &file_solana_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *HashedValueComparator) String() string { +func (x *SubmitTransactionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*HashedValueComparator) ProtoMessage() {} +func (*SubmitTransactionRequest) ProtoMessage() {} -func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { +func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2855,47 +2850,55 @@ func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use HashedValueComparator.ProtoReflect.Descriptor instead. -func (*HashedValueComparator) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. +func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{43} } -func (x *HashedValueComparator) GetValues() [][]byte { +func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { if x != nil { - return x.Values + return x.Cfg } return nil } -func (x *HashedValueComparator) GetOperator() int64 { +func (x *SubmitTransactionRequest) GetReceiver() []byte { if x != nil { - return x.Operator + return x.Receiver } - return 0 + return nil } -// Subkey path elements. -type Subkeys struct { - state protoimpl.MessageState `protogen:"open.v1"` - Subkeys []string `protobuf:"bytes,1,rep,name=subkeys,proto3" json:"subkeys,omitempty"` // e.g., ["events","0","fields","owner"] - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *SubmitTransactionRequest) GetEncodedTransaction() string { + if x != nil { + return x.EncodedTransaction + } + return "" } -func (x *Subkeys) Reset() { - *x = Subkeys{} +// Event/topic filter by hashed value(s). +type EventSig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` // topic index + HashedValueComparers []*HashedValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` // comparisons + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventSig) Reset() { + *x = EventSig{} mi := &file_solana_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Subkeys) String() string { +func (x *EventSig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Subkeys) ProtoMessage() {} +func (*EventSig) ProtoMessage() {} -func (x *Subkeys) ProtoReflect() protoreflect.Message { +func (x *EventSig) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2907,49 +2910,48 @@ func (x *Subkeys) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Subkeys.ProtoReflect.Descriptor instead. -func (*Subkeys) Descriptor() ([]byte, []int) { +// Deprecated: Use EventSig.ProtoReflect.Descriptor instead. +func (*EventSig) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{44} } -func (x *Subkeys) GetSubkeys() []string { +func (x *EventSig) GetTopic() uint64 { if x != nil { - return x.Subkeys + return x.Topic + } + return 0 +} + +func (x *EventSig) GetHashedValueComparers() []*HashedValueComparator { + if x != nil { + return x.HashedValueComparers } return nil } -// Log-poller filter config (Solana flavor). -type LPFilterQuery struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // filter name/id - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id - EventName string `protobuf:"bytes,3,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` // optional label - EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte event discriminator - StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` // start slot - EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` // IDL JSON bytes - SubkeyPaths []*Subkeys `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` // subkey selectors - Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` // seconds to keep logs - MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // 0 = unlimited - IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` // include rolled-back - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Comparator for a single indexed value. +type IndexedValueComparator struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // raw bytes + Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` // eq/lt/gt etc. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *LPFilterQuery) Reset() { - *x = LPFilterQuery{} +func (x *IndexedValueComparator) Reset() { + *x = IndexedValueComparator{} mi := &file_solana_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *LPFilterQuery) String() string { +func (x *IndexedValueComparator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LPFilterQuery) ProtoMessage() {} +func (*IndexedValueComparator) ProtoMessage() {} -func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { +func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2961,114 +2963,105 @@ func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead. -func (*LPFilterQuery) Descriptor() ([]byte, []int) { +// Deprecated: Use IndexedValueComparator.ProtoReflect.Descriptor instead. +func (*IndexedValueComparator) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{45} } -func (x *LPFilterQuery) GetName() string { +func (x *IndexedValueComparator) GetValue() []byte { if x != nil { - return x.Name + return x.Value } - return "" + return nil } -func (x *LPFilterQuery) GetAddress() []byte { +func (x *IndexedValueComparator) GetOperator() chain_common.ComparisonOperator { if x != nil { - return x.Address + return x.Operator } - return nil + return chain_common.ComparisonOperator(0) } -func (x *LPFilterQuery) GetEventName() string { - if x != nil { - return x.EventName - } - return "" +// Filter events by a subkey path. +type EventBySubkey struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubkeyIndex uint64 `protobuf:"varint,1,opt,name=subkey_index,json=subkeyIndex,proto3" json:"subkey_index,omitempty"` // path element index + ValueComparers []*IndexedValueComparator `protobuf:"bytes,2,rep,name=value_comparers,json=valueComparers,proto3" json:"value_comparers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *LPFilterQuery) GetEventSig() []byte { - if x != nil { - return x.EventSig - } - return nil +func (x *EventBySubkey) Reset() { + *x = EventBySubkey{} + mi := &file_solana_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *LPFilterQuery) GetStartingBlock() int64 { - if x != nil { - return x.StartingBlock - } - return 0 +func (x *EventBySubkey) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *LPFilterQuery) GetEventIdlJson() []byte { +func (*EventBySubkey) ProtoMessage() {} + +func (x *EventBySubkey) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[46] if x != nil { - return x.EventIdlJson + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *LPFilterQuery) GetSubkeyPaths() []*Subkeys { - if x != nil { - return x.SubkeyPaths - } - return nil +// Deprecated: Use EventBySubkey.ProtoReflect.Descriptor instead. +func (*EventBySubkey) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{46} } -func (x *LPFilterQuery) GetRetention() int64 { +func (x *EventBySubkey) GetSubkeyIndex() uint64 { if x != nil { - return x.Retention + return x.SubkeyIndex } return 0 } -func (x *LPFilterQuery) GetMaxLogsKept() int64 { +func (x *EventBySubkey) GetValueComparers() []*IndexedValueComparator { if x != nil { - return x.MaxLogsKept + return x.ValueComparers } - return 0 + return nil } -func (x *LPFilterQuery) GetIncludeReverted() bool { - if x != nil { - return x.IncludeReverted - } - return false -} - -// Canonical log shape for tracked events. -type Log struct { - state protoimpl.MessageState `protogen:"open.v1"` - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // e.g., "solana-mainnet" - LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // per-block index - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // 32-byte - BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // slot - BlockTimestamp uint64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // unix seconds - Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id - EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte discriminator - TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // 64-byte signature - Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` // raw event bytes - SequenceNum int64 `protobuf:"varint,10,opt,name=sequence_num,json=sequenceNum,proto3" json:"sequence_num,omitempty"` // monotonic seq - Error string `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` // decode/processing error - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Expression tree wrapper. +type Expression struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Evaluator: + // + // *Expression_Primitive + // *Expression_BooleanExpression + Evaluator isExpression_Evaluator `protobuf_oneof:"evaluator"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *Log) Reset() { - *x = Log{} - mi := &file_solana_proto_msgTypes[46] +func (x *Expression) Reset() { + *x = Expression{} + mi := &file_solana_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Log) String() string { +func (x *Expression) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Log) ProtoMessage() {} +func (*Expression) ProtoMessage() {} -func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[46] +func (x *Expression) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3079,158 +3072,75 @@ func (x *Log) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Log.ProtoReflect.Descriptor instead. -func (*Log) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{46} -} - -func (x *Log) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *Log) GetLogIndex() int64 { - if x != nil { - return x.LogIndex - } - return 0 -} - -func (x *Log) GetBlockHash() []byte { - if x != nil { - return x.BlockHash - } - return nil -} - -func (x *Log) GetBlockNumber() int64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *Log) GetBlockTimestamp() uint64 { - if x != nil { - return x.BlockTimestamp - } - return 0 -} - -func (x *Log) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil +// Deprecated: Use Expression.ProtoReflect.Descriptor instead. +func (*Expression) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{47} } -func (x *Log) GetEventSig() []byte { +func (x *Expression) GetEvaluator() isExpression_Evaluator { if x != nil { - return x.EventSig + return x.Evaluator } return nil } -func (x *Log) GetTxHash() []byte { +func (x *Expression) GetPrimitive() *Primitive { if x != nil { - return x.TxHash + if x, ok := x.Evaluator.(*Expression_Primitive); ok { + return x.Primitive + } } return nil } -func (x *Log) GetData() []byte { +func (x *Expression) GetBooleanExpression() *BooleanExpression { if x != nil { - return x.Data + if x, ok := x.Evaluator.(*Expression_BooleanExpression); ok { + return x.BooleanExpression + } } return nil } -func (x *Log) GetSequenceNum() int64 { - if x != nil { - return x.SequenceNum - } - return 0 -} - -func (x *Log) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -// RPC read context. -type RPCContext struct { - state protoimpl.MessageState `protogen:"open.v1"` - Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RPCContext) Reset() { - *x = RPCContext{} - mi := &file_solana_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +type isExpression_Evaluator interface { + isExpression_Evaluator() } -func (x *RPCContext) String() string { - return protoimpl.X.MessageStringOf(x) +type Expression_Primitive struct { + Primitive *Primitive `protobuf:"bytes,1,opt,name=primitive,proto3,oneof"` // leaf filter } -func (*RPCContext) ProtoMessage() {} - -func (x *RPCContext) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[47] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +type Expression_BooleanExpression struct { + BooleanExpression *BooleanExpression `protobuf:"bytes,2,opt,name=boolean_expression,json=booleanExpression,proto3,oneof"` // AND/OR of expressions } -// Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. -func (*RPCContext) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{47} -} +func (*Expression_Primitive) isExpression_Evaluator() {} -func (x *RPCContext) GetContext() *Context { - if x != nil { - return x.Context - } - return nil -} +func (*Expression_BooleanExpression) isExpression_Evaluator() {} -// Simulation options. -type SimulateTXOpts struct { - state protoimpl.MessageState `protogen:"open.v1"` - SigVerify bool `protobuf:"varint,1,opt,name=sig_verify,json=sigVerify,proto3" json:"sig_verify,omitempty"` // verify sigs - Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` // read consistency - ReplaceRecentBlockhash bool `protobuf:"varint,3,opt,name=replace_recent_blockhash,json=replaceRecentBlockhash,proto3" json:"replace_recent_blockhash,omitempty"` // refresh blockhash - Accounts *SimulateTransactionAccountsOpts `protobuf:"bytes,4,opt,name=accounts,proto3" json:"accounts,omitempty"` // return accounts - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Boolean composition over expressions. +type BooleanExpression struct { + state protoimpl.MessageState `protogen:"open.v1"` + BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` // AND/OR + Expression []*Expression `protobuf:"bytes,2,rep,name=expression,proto3" json:"expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *SimulateTXOpts) Reset() { - *x = SimulateTXOpts{} +func (x *BooleanExpression) Reset() { + *x = BooleanExpression{} mi := &file_solana_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SimulateTXOpts) String() string { +func (x *BooleanExpression) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SimulateTXOpts) ProtoMessage() {} +func (*BooleanExpression) ProtoMessage() {} -func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { +func (x *BooleanExpression) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3242,64 +3152,53 @@ func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. -func (*SimulateTXOpts) Descriptor() ([]byte, []int) { +// Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. +func (*BooleanExpression) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{48} } -func (x *SimulateTXOpts) GetSigVerify() bool { - if x != nil { - return x.SigVerify - } - return false -} - -func (x *SimulateTXOpts) GetCommitment() CommitmentType { - if x != nil { - return x.Commitment - } - return CommitmentType_COMMITMENT_NONE -} - -func (x *SimulateTXOpts) GetReplaceRecentBlockhash() bool { +func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { if x != nil { - return x.ReplaceRecentBlockhash + return x.BooleanOperator } - return false + return chain_common.BooleanOperator(0) } -func (x *SimulateTXOpts) GetAccounts() *SimulateTransactionAccountsOpts { +func (x *BooleanExpression) GetExpression() []*Expression { if x != nil { - return x.Accounts + return x.Expression } return nil } -// Simulation result. -type SimulateTXReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // empty on success - Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` // runtime logs - Accounts []*Account `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` // returned accounts - UnitsConsumed uint64 `protobuf:"varint,4,opt,name=units_consumed,json=unitsConsumed,proto3" json:"units_consumed,omitempty"` // CUs +// Primitive leaf for expressions/filters. +type Primitive struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Primitive: + // + // *Primitive_GeneralPrimitive + // *Primitive_Address + // *Primitive_EventSig + // *Primitive_EventBySubkey + Primitive isPrimitive_Primitive `protobuf_oneof:"primitive"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SimulateTXReply) Reset() { - *x = SimulateTXReply{} +func (x *Primitive) Reset() { + *x = Primitive{} mi := &file_solana_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SimulateTXReply) String() string { +func (x *Primitive) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SimulateTXReply) ProtoMessage() {} +func (*Primitive) ProtoMessage() {} -func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { +func (x *Primitive) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3311,63 +3210,105 @@ func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. -func (*SimulateTXReply) Descriptor() ([]byte, []int) { +// Deprecated: Use Primitive.ProtoReflect.Descriptor instead. +func (*Primitive) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{49} } -func (x *SimulateTXReply) GetErr() string { +func (x *Primitive) GetPrimitive() isPrimitive_Primitive { if x != nil { - return x.Err + return x.Primitive } - return "" + return nil } -func (x *SimulateTXReply) GetLogs() []string { +func (x *Primitive) GetGeneralPrimitive() *chain_common.Primitive { if x != nil { - return x.Logs + if x, ok := x.Primitive.(*Primitive_GeneralPrimitive); ok { + return x.GeneralPrimitive + } + } + return nil +} + +func (x *Primitive) GetAddress() []byte { + if x != nil { + if x, ok := x.Primitive.(*Primitive_Address); ok { + return x.Address + } + } + return nil +} + +func (x *Primitive) GetEventSig() []byte { + if x != nil { + if x, ok := x.Primitive.(*Primitive_EventSig); ok { + return x.EventSig + } } return nil } -func (x *SimulateTXReply) GetAccounts() []*Account { +func (x *Primitive) GetEventBySubkey() *EventBySubkey { if x != nil { - return x.Accounts + if x, ok := x.Primitive.(*Primitive_EventBySubkey); ok { + return x.EventBySubkey + } } return nil } -func (x *SimulateTXReply) GetUnitsConsumed() uint64 { - if x != nil { - return x.UnitsConsumed - } - return 0 +type isPrimitive_Primitive interface { + isPrimitive_Primitive() } -// Simulation request. -type SimulateTXRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) - EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx - Opts *SimulateTXOpts `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type Primitive_GeneralPrimitive struct { + GeneralPrimitive *chain_common.Primitive `protobuf:"bytes,1,opt,name=general_primitive,json=generalPrimitive,proto3,oneof"` // shared primitives } -func (x *SimulateTXRequest) Reset() { - *x = SimulateTXRequest{} +type Primitive_Address struct { + Address []byte `protobuf:"bytes,2,opt,name=address,proto3,oneof"` // 32-byte program id +} + +type Primitive_EventSig struct { + EventSig []byte `protobuf:"bytes,3,opt,name=event_sig,json=eventSig,proto3,oneof"` // 8-byte discriminator +} + +type Primitive_EventBySubkey struct { + EventBySubkey *EventBySubkey `protobuf:"bytes,4,opt,name=event_by_subkey,json=eventBySubkey,proto3,oneof"` // subkey filter +} + +func (*Primitive_GeneralPrimitive) isPrimitive_Primitive() {} + +func (*Primitive_Address) isPrimitive_Primitive() {} + +func (*Primitive_EventSig) isPrimitive_Primitive() {} + +func (*Primitive_EventBySubkey) isPrimitive_Primitive() {} + +// Comparator against hashed values. +type HashedValueComparator struct { + state protoimpl.MessageState `protogen:"open.v1"` + Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // hashed bytes + Operator int64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` // comparison op + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HashedValueComparator) Reset() { + *x = HashedValueComparator{} mi := &file_solana_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SimulateTXRequest) String() string { +func (x *HashedValueComparator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SimulateTXRequest) ProtoMessage() {} +func (*HashedValueComparator) ProtoMessage() {} -func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { +func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3379,55 +3320,47 @@ func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. -func (*SimulateTXRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use HashedValueComparator.ProtoReflect.Descriptor instead. +func (*HashedValueComparator) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{50} } -func (x *SimulateTXRequest) GetReceiver() []byte { +func (x *HashedValueComparator) GetValues() [][]byte { if x != nil { - return x.Receiver + return x.Values } return nil } -func (x *SimulateTXRequest) GetEncodedTransaction() string { - if x != nil { - return x.EncodedTransaction - } - return "" -} - -func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { +func (x *HashedValueComparator) GetOperator() int64 { if x != nil { - return x.Opts + return x.Operator } - return nil + return 0 } -// Accounts to return during simulation. -type SimulateTransactionAccountsOpts struct { +// Subkey path elements. +type Subkeys struct { state protoimpl.MessageState `protogen:"open.v1"` - Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` // account data encoding - Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` // 32-byte Pubkeys + Subkeys []string `protobuf:"bytes,1,rep,name=subkeys,proto3" json:"subkeys,omitempty"` // e.g., ["events","0","fields","owner"] unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SimulateTransactionAccountsOpts) Reset() { - *x = SimulateTransactionAccountsOpts{} +func (x *Subkeys) Reset() { + *x = Subkeys{} mi := &file_solana_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SimulateTransactionAccountsOpts) String() string { +func (x *Subkeys) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SimulateTransactionAccountsOpts) ProtoMessage() {} +func (*Subkeys) ProtoMessage() {} -func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { +func (x *Subkeys) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3439,49 +3372,49 @@ func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. -func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { +// Deprecated: Use Subkeys.ProtoReflect.Descriptor instead. +func (*Subkeys) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{51} } -func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { - if x != nil { - return x.Encoding - } - return EncodingType_ENCODING_NONE -} - -func (x *SimulateTransactionAccountsOpts) GetAddresses() [][]byte { +func (x *Subkeys) GetSubkeys() []string { if x != nil { - return x.Addresses + return x.Subkeys } return nil } -// Submit transaction result. -type SubmitTransactionReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature - IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // echo key - Status TransactionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=loop.solana.TransactionStatus" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Log-poller filter config (Solana flavor). +type LPFilterQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // filter name/id + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id + EventName string `protobuf:"bytes,3,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` // optional label + EventSig []byte `protobuf:"bytes,4,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte event discriminator + StartingBlock int64 `protobuf:"varint,5,opt,name=starting_block,json=startingBlock,proto3" json:"starting_block,omitempty"` // start slot + EventIdlJson []byte `protobuf:"bytes,6,opt,name=event_idl_json,json=eventIdlJson,proto3" json:"event_idl_json,omitempty"` // IDL JSON bytes + SubkeyPaths []*Subkeys `protobuf:"bytes,7,rep,name=subkey_paths,json=subkeyPaths,proto3" json:"subkey_paths,omitempty"` // subkey selectors + Retention int64 `protobuf:"varint,8,opt,name=retention,proto3" json:"retention,omitempty"` // seconds to keep logs + MaxLogsKept int64 `protobuf:"varint,9,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // 0 = unlimited + IncludeReverted bool `protobuf:"varint,10,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` // include rolled-back + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *SubmitTransactionReply) Reset() { - *x = SubmitTransactionReply{} +func (x *LPFilterQuery) Reset() { + *x = LPFilterQuery{} mi := &file_solana_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SubmitTransactionReply) String() string { +func (x *LPFilterQuery) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubmitTransactionReply) ProtoMessage() {} +func (*LPFilterQuery) ProtoMessage() {} -func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { +func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { mi := &file_solana_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3493,122 +3426,114 @@ func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. -func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { +// Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead. +func (*LPFilterQuery) Descriptor() ([]byte, []int) { return file_solana_proto_rawDescGZIP(), []int{52} } -func (x *SubmitTransactionReply) GetSignature() []byte { +func (x *LPFilterQuery) GetName() string { if x != nil { - return x.Signature + return x.Name } - return nil + return "" } -func (x *SubmitTransactionReply) GetIdempotencyKey() string { +func (x *LPFilterQuery) GetAddress() []byte { if x != nil { - return x.IdempotencyKey + return x.Address } - return "" + return nil } -func (x *SubmitTransactionReply) GetStatus() TransactionStatus { +func (x *LPFilterQuery) GetEventName() string { if x != nil { - return x.Status + return x.EventName } - return TransactionStatus_TX_FATAL -} - -// Submit transaction request. -type SubmitTransactionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Cfg *ComputeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"` // compute budget - Receiver []byte `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) - EncodedTransaction string `protobuf:"bytes,3,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + return "" } -func (x *SubmitTransactionRequest) Reset() { - *x = SubmitTransactionRequest{} - mi := &file_solana_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *LPFilterQuery) GetEventSig() []byte { + if x != nil { + return x.EventSig + } + return nil } -func (x *SubmitTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *LPFilterQuery) GetStartingBlock() int64 { + if x != nil { + return x.StartingBlock + } + return 0 } -func (*SubmitTransactionRequest) ProtoMessage() {} - -func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[53] +func (x *LPFilterQuery) GetEventIdlJson() []byte { if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms + return x.EventIdlJson } - return mi.MessageOf(x) + return nil } -// Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. -func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{53} +func (x *LPFilterQuery) GetSubkeyPaths() []*Subkeys { + if x != nil { + return x.SubkeyPaths + } + return nil } -func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { +func (x *LPFilterQuery) GetRetention() int64 { if x != nil { - return x.Cfg + return x.Retention } - return nil + return 0 } -func (x *SubmitTransactionRequest) GetReceiver() []byte { +func (x *LPFilterQuery) GetMaxLogsKept() int64 { if x != nil { - return x.Receiver + return x.MaxLogsKept } - return nil + return 0 } -func (x *SubmitTransactionRequest) GetEncodedTransaction() string { +func (x *LPFilterQuery) GetIncludeReverted() bool { if x != nil { - return x.EncodedTransaction + return x.IncludeReverted } - return "" + return false } -// Primitive leaf for expressions/filters. -type Primitive struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Primitive: - // - // *Primitive_GeneralPrimitive - // *Primitive_Address - // *Primitive_EventSig - // *Primitive_EventBySubkey - Primitive isPrimitive_Primitive `protobuf_oneof:"primitive"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// Canonical log shape for tracked events. +type Log struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // e.g., "solana-mainnet" + LogIndex int64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // per-block index + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // 32-byte + BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // slot + BlockTimestamp uint64 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // unix seconds + Address []byte `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` // 32-byte program id + EventSig []byte `protobuf:"bytes,7,opt,name=event_sig,json=eventSig,proto3" json:"event_sig,omitempty"` // 8-byte discriminator + TxHash []byte `protobuf:"bytes,8,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // 64-byte signature + Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` // raw event bytes + SequenceNum int64 `protobuf:"varint,10,opt,name=sequence_num,json=sequenceNum,proto3" json:"sequence_num,omitempty"` // monotonic seq + Error string `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` // decode/processing error + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *Primitive) Reset() { - *x = Primitive{} - mi := &file_solana_proto_msgTypes[54] +func (x *Log) Reset() { + *x = Log{} + mi := &file_solana_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Primitive) String() string { +func (x *Log) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Primitive) ProtoMessage() {} +func (*Log) ProtoMessage() {} -func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[54] +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3619,81 +3544,87 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Primitive.ProtoReflect.Descriptor instead. -func (*Primitive) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{54} +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{53} } -func (x *Primitive) GetPrimitive() isPrimitive_Primitive { +func (x *Log) GetChainId() string { if x != nil { - return x.Primitive + return x.ChainId } - return nil + return "" } -func (x *Primitive) GetGeneralPrimitive() *chain_common.Primitive { +func (x *Log) GetLogIndex() int64 { if x != nil { - if x, ok := x.Primitive.(*Primitive_GeneralPrimitive); ok { - return x.GeneralPrimitive - } + return x.LogIndex } - return nil + return 0 } -func (x *Primitive) GetAddress() []byte { +func (x *Log) GetBlockHash() []byte { if x != nil { - if x, ok := x.Primitive.(*Primitive_Address); ok { - return x.Address - } + return x.BlockHash } return nil } -func (x *Primitive) GetEventSig() []byte { +func (x *Log) GetBlockNumber() int64 { if x != nil { - if x, ok := x.Primitive.(*Primitive_EventSig); ok { - return x.EventSig - } + return x.BlockNumber } - return nil + return 0 } -func (x *Primitive) GetEventBySubkey() *EventBySubkey { +func (x *Log) GetBlockTimestamp() uint64 { if x != nil { - if x, ok := x.Primitive.(*Primitive_EventBySubkey); ok { - return x.EventBySubkey - } + return x.BlockTimestamp } - return nil + return 0 } -type isPrimitive_Primitive interface { - isPrimitive_Primitive() +func (x *Log) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil } -type Primitive_GeneralPrimitive struct { - GeneralPrimitive *chain_common.Primitive `protobuf:"bytes,1,opt,name=general_primitive,json=generalPrimitive,proto3,oneof"` // shared primitives +func (x *Log) GetEventSig() []byte { + if x != nil { + return x.EventSig + } + return nil } -type Primitive_Address struct { - Address []byte `protobuf:"bytes,2,opt,name=address,proto3,oneof"` // 32-byte program id +func (x *Log) GetTxHash() []byte { + if x != nil { + return x.TxHash + } + return nil } -type Primitive_EventSig struct { - EventSig []byte `protobuf:"bytes,3,opt,name=event_sig,json=eventSig,proto3,oneof"` // 8-byte discriminator +func (x *Log) GetData() []byte { + if x != nil { + return x.Data + } + return nil } -type Primitive_EventBySubkey struct { - EventBySubkey *EventBySubkey `protobuf:"bytes,4,opt,name=event_by_subkey,json=eventBySubkey,proto3,oneof"` // subkey filter +func (x *Log) GetSequenceNum() int64 { + if x != nil { + return x.SequenceNum + } + return 0 } -func (*Primitive_GeneralPrimitive) isPrimitive_Primitive() {} - -func (*Primitive_Address) isPrimitive_Primitive() {} - -func (*Primitive_EventSig) isPrimitive_Primitive() {} - -func (*Primitive_EventBySubkey) isPrimitive_Primitive() {} +func (x *Log) GetError() string { + if x != nil { + return x.Error + } + return "" +} // Query tracked logs. type QueryTrackedLogsRequest struct { @@ -3706,7 +3637,7 @@ type QueryTrackedLogsRequest struct { func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3718,7 +3649,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3731,7 +3662,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{55} + return file_solana_proto_rawDescGZIP(), []int{54} } func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { @@ -3757,7 +3688,7 @@ type QueryTrackedLogsReply struct { func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3769,7 +3700,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3782,7 +3713,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{56} + return file_solana_proto_rawDescGZIP(), []int{55} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -3802,7 +3733,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3814,7 +3745,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3827,7 +3758,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{57} + return file_solana_proto_rawDescGZIP(), []int{56} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { @@ -3845,7 +3776,7 @@ type RegisterLogTrackingReply struct { func (x *RegisterLogTrackingReply) Reset() { *x = RegisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3857,7 +3788,7 @@ func (x *RegisterLogTrackingReply) String() string { func (*RegisterLogTrackingReply) ProtoMessage() {} func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3870,7 +3801,7 @@ func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{58} + return file_solana_proto_rawDescGZIP(), []int{57} } // Unregister a filter by name/id. @@ -3883,7 +3814,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3895,7 +3826,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3908,7 +3839,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{59} + return file_solana_proto_rawDescGZIP(), []int{58} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -3926,7 +3857,7 @@ type UnregisterLogTrackingReply struct { func (x *UnregisterLogTrackingReply) Reset() { *x = UnregisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3938,7 +3869,7 @@ func (x *UnregisterLogTrackingReply) String() string { func (*UnregisterLogTrackingReply) ProtoMessage() {} func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3951,7 +3882,7 @@ func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{60} + return file_solana_proto_rawDescGZIP(), []int{59} } // latest block processed by lp @@ -3964,7 +3895,7 @@ type GetLatestLPBlockReply struct { func (x *GetLatestLPBlockReply) Reset() { *x = GetLatestLPBlockReply{} - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3976,7 +3907,7 @@ func (x *GetLatestLPBlockReply) String() string { func (*GetLatestLPBlockReply) ProtoMessage() {} func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3989,7 +3920,7 @@ func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLatestLPBlockReply.ProtoReflect.Descriptor instead. func (*GetLatestLPBlockReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{61} + return file_solana_proto_rawDescGZIP(), []int{60} } func (x *GetLatestLPBlockReply) GetSlot() uint64 { @@ -4013,40 +3944,18 @@ const file_solana_proto_rawDesc = "" + "executable\x120\n" + "\n" + "rent_epoch\x18\x05 \x01(\v2\x11.values.v1.BigIntR\trentEpoch\x12\x14\n" + - "\x05space\x18\x06 \x01(\x04R\x05space\"#\n" + - "\aAddress\x12\x18\n" + - "\aaddress\x18\x01 \x01(\fR\aaddress\"`\n" + + "\x05space\x18\x06 \x01(\x04R\x05space\"`\n" + "\rComputeConfig\x12#\n" + "\rcompute_limit\x18\x01 \x01(\rR\fcomputeLimit\x12*\n" + - "\x11compute_max_price\x18\x02 \x01(\x04R\x0fcomputeMaxPrice\"\x1d\n" + - "\aContext\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\"\x9d\x01\n" + - "\x0fDataBytesOrJSON\x12E\n" + - "\x11raw_data_encoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\x0frawDataEncoding\x12*\n" + - "\x11as_decoded_binary\x18\x02 \x01(\fR\x0fasDecodedBinary\x12\x17\n" + - "\aas_json\x18\x03 \x01(\fR\x06asJson\";\n" + + "\x11compute_max_price\x18\x02 \x01(\x04R\x0fcomputeMaxPrice\"z\n" + + "\x0fDataBytesOrJSON\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12\x12\n" + + "\x03raw\x18\x02 \x01(\fH\x00R\x03raw\x12\x14\n" + + "\x04json\x18\x03 \x01(\fH\x00R\x04jsonB\x06\n" + + "\x04body\";\n" + "\tDataSlice\x12\x16\n" + "\x06offset\x18\x01 \x01(\x04R\x06offset\x12\x16\n" + - "\x06length\x18\x02 \x01(\x04R\x06length\"z\n" + - "\bEventSig\x12\x14\n" + - "\x05topic\x18\x01 \x01(\x04R\x05topic\x12X\n" + - "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"q\n" + - "\x16IndexedValueComparator\x12\x14\n" + - "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + - "\boperator\x18\x02 \x01(\x0e2%.loop.chain.common.ComparisonOperatorR\boperator\"\x80\x01\n" + - "\rEventBySubkey\x12!\n" + - "\fsubkey_index\x18\x01 \x01(\x04R\vsubkeyIndex\x12L\n" + - "\x0fvalue_comparers\x18\x02 \x03(\v2#.loop.solana.IndexedValueComparatorR\x0evalueComparers\"\xa2\x01\n" + - "\n" + - "Expression\x126\n" + - "\tprimitive\x18\x01 \x01(\v2\x16.loop.solana.PrimitiveH\x00R\tprimitive\x12O\n" + - "\x12boolean_expression\x18\x02 \x01(\v2\x1e.loop.solana.BooleanExpressionH\x00R\x11booleanExpressionB\v\n" + - "\tevaluator\"\x9b\x01\n" + - "\x11BooleanExpression\x12M\n" + - "\x10boolean_operator\x18\x01 \x01(\x0e2\".loop.chain.common.BooleanOperatorR\x0fbooleanOperator\x127\n" + - "\n" + - "expression\x18\x02 \x03(\v2\x17.loop.solana.ExpressionR\n" + - "expression\"\xe9\x01\n" + + "\x06length\x18\x02 \x01(\x04R\x06length\"\xe9\x01\n" + "\x12GetAccountInfoOpts\x125\n" + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12;\n" + "\n" + @@ -4054,11 +3963,12 @@ const file_solana_proto_rawDesc = "" + "commitment\x125\n" + "\n" + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + - "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x83\x01\n" + + "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x92\x01\n" + "\x1bGetAccountInfoWithOptsReply\x128\n" + "\vrpc_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + - "rpcContext\x12*\n" + - "\x05value\x18\x02 \x01(\v2\x14.loop.solana.AccountR\x05value\"n\n" + + "rpcContext\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x14.loop.solana.AccountH\x00R\x05value\x88\x01\x01B\b\n" + + "\x06_value\"n\n" + "\x1dGetAccountInfoWithOptsRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\fR\aaccount\x123\n" + "\x04opts\x18\x02 \x01(\v2\x1f.loop.solana.GetAccountInfoOptsR\x04opts\"'\n" + @@ -4072,15 +3982,16 @@ const file_solana_proto_rawDesc = "" + "\fGetBlockOpts\x12;\n" + "\n" + "commitment\x18\x04 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + - "commitment\"\xbf\x01\n" + + "commitment\"\xd3\x01\n" + "\rGetBlockReply\x12\x1c\n" + "\tblockhash\x18\x01 \x01(\fR\tblockhash\x12-\n" + "\x12previous_blockhash\x18\x02 \x01(\fR\x11previousBlockhash\x12\x1f\n" + "\vparent_slot\x18\x03 \x01(\x04R\n" + - "parentSlot\x12\x1d\n" + + "parentSlot\x12\"\n" + "\n" + - "block_time\x18\x06 \x01(\x03R\tblockTime\x12!\n" + - "\fblock_height\x18\a \x01(\x04R\vblockHeight\"T\n" + + "block_time\x18\x04 \x01(\x03H\x00R\tblockTime\x88\x01\x01\x12!\n" + + "\fblock_height\x18\x05 \x01(\x04R\vblockHeightB\r\n" + + "\v_block_time\"T\n" + "\x0fGetBlockRequest\x12\x12\n" + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12-\n" + "\x04opts\x18\x02 \x01(\v2\x19.loop.solana.GetBlockOptsR\x04opts\")\n" + @@ -4098,23 +4009,28 @@ const file_solana_proto_rawDesc = "" + "commitment\x125\n" + "\n" + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x12(\n" + - "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"\x8a\x01\n" + - " GetMultipleAccountsWithOptsReply\x12:\n" + - "\rr_p_c_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + - "rPCContext\x12*\n" + - "\x05value\x18\x02 \x03(\v2\x14.loop.solana.AccountR\x05value\"z\n" + + "\x10min_context_slot\x18\x04 \x01(\x04R\x0eminContextSlot\"Y\n" + + "\x16OptionalAccountWrapper\x123\n" + + "\aaccount\x18\x01 \x01(\v2\x14.loop.solana.AccountH\x00R\aaccount\x88\x01\x01B\n" + + "\n" + + "\b_account\"\x97\x01\n" + + " GetMultipleAccountsWithOptsReply\x128\n" + + "\vrpc_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + + "rpcContext\x129\n" + + "\x05value\x18\x02 \x03(\v2#.loop.solana.OptionalAccountWrapperR\x05value\"z\n" + "\"GetMultipleAccountsWithOptsRequest\x12\x1a\n" + "\baccounts\x18\x01 \x03(\fR\baccounts\x128\n" + "\x04opts\x18\x02 \x01(\v2$.loop.solana.GetMultipleAccountsOptsR\x04opts\"^\n" + "\x19GetSignatureStatusesReply\x12A\n" + "\aresults\x18\x01 \x03(\v2'.loop.solana.GetSignatureStatusesResultR\aresults\"1\n" + "\x1bGetSignatureStatusesRequest\x12\x12\n" + - "\x04sigs\x18\x01 \x03(\fR\x04sigs\"\xbe\x01\n" + + "\x04sigs\x18\x01 \x03(\fR\x04sigs\"\xd5\x01\n" + "\x1aGetSignatureStatusesResult\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\x12$\n" + - "\rconfirmations\x18\x02 \x01(\x04R\rconfirmations\x12\x10\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12)\n" + + "\rconfirmations\x18\x02 \x01(\x04H\x00R\rconfirmations\x88\x01\x01\x12\x10\n" + "\x03err\x18\x03 \x01(\tR\x03err\x12T\n" + - "\x13confirmation_status\x18\x04 \x01(\x0e2#.loop.solana.ConfirmationStatusTypeR\x12confirmationStatus\",\n" + + "\x13confirmation_status\x18\x04 \x01(\x0e2#.loop.solana.ConfirmationStatusTypeR\x12confirmationStatusB\x10\n" + + "\x0e_confirmations\",\n" + "\x12GetSlotHeightReply\x12\x16\n" + "\x06height\x18\x01 \x01(\x04R\x06height\"S\n" + "\x14GetSlotHeightRequest\x12;\n" + @@ -4138,14 +4054,16 @@ const file_solana_proto_rawDesc = "" + "\rUiTokenAmount\x12\x16\n" + "\x06amount\x18\x01 \x01(\tR\x06amount\x12\x1a\n" + "\bdecimals\x18\x02 \x01(\rR\bdecimals\x12(\n" + - "\x10ui_amount_string\x18\x04 \x01(\tR\x0euiAmountString\"\xa8\x01\n" + + "\x10ui_amount_string\x18\x04 \x01(\tR\x0euiAmountString\"\xcb\x01\n" + "\fTokenBalance\x12#\n" + - "\raccount_index\x18\x01 \x01(\rR\faccountIndex\x12\x14\n" + - "\x05owner\x18\x02 \x01(\fR\x05owner\x12\x1d\n" + + "\raccount_index\x18\x01 \x01(\rR\faccountIndex\x12\x19\n" + + "\x05owner\x18\x02 \x01(\fH\x00R\x05owner\x88\x01\x01\x12\"\n" + "\n" + - "program_id\x18\x03 \x01(\fR\tprogramId\x12\x12\n" + + "program_id\x18\x03 \x01(\fH\x01R\tprogramId\x88\x01\x01\x12\x12\n" + "\x04mint\x18\x04 \x01(\fR\x04mint\x12*\n" + - "\x02ui\x18\x05 \x01(\v2\x1a.loop.solana.UiTokenAmountR\x02ui\"n\n" + + "\x02ui\x18\x05 \x01(\v2\x1a.loop.solana.UiTokenAmountR\x02uiB\b\n" + + "\x06_ownerB\r\n" + + "\v_program_id\"n\n" + "\x10InnerInstruction\x12\x14\n" + "\x05index\x18\x01 \x01(\rR\x05index\x12D\n" + "\finstructions\x18\x02 \x03(\v2 .loop.solana.CompiledInstructionR\finstructions\"I\n" + @@ -4164,7 +4082,7 @@ const file_solana_proto_rawDesc = "" + "ReturnData\x12\x1d\n" + "\n" + "program_id\x18\x01 \x01(\fR\tprogramId\x12%\n" + - "\x04data\x18\x02 \x01(\v2\x11.loop.solana.DataR\x04data\"\xc4\x04\n" + + "\x04data\x18\x02 \x01(\v2\x11.loop.solana.DataR\x04data\"\xe4\x04\n" + "\x0fTransactionMeta\x12\x19\n" + "\berr_json\x18\x01 \x01(\tR\aerrJson\x12\x10\n" + "\x03fee\x18\x02 \x01(\x04R\x03fee\x12!\n" + @@ -4177,20 +4095,80 @@ const file_solana_proto_rawDesc = "" + "\x10loaded_addresses\x18\t \x01(\v2\x1c.loop.solana.LoadedAddressesR\x0floadedAddresses\x128\n" + "\vreturn_data\x18\n" + " \x01(\v2\x17.loop.solana.ReturnDataR\n" + - "returnData\x124\n" + - "\x16compute_units_consumed\x18\v \x01(\x04R\x14computeUnitsConsumed\"r\n" + + "returnData\x129\n" + + "\x16compute_units_consumed\x18\v \x01(\x04H\x00R\x14computeUnitsConsumed\x88\x01\x01B\x19\n" + + "\x17_compute_units_consumed\"r\n" + "\x13TransactionEnvelope\x12\x12\n" + "\x03raw\x18\x01 \x01(\fH\x00R\x03raw\x128\n" + "\x06parsed\x18\x02 \x01(\v2\x1e.loop.solana.ParsedTransactionH\x00R\x06parsedB\r\n" + - "\vtransaction\"\xbe\x01\n" + + "\vtransaction\"\xf5\x01\n" + "\x13GetTransactionReply\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x1d\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\x12\"\n" + "\n" + - "block_time\x18\x02 \x01(\x03R\tblockTime\x12B\n" + - "\vtransaction\x18\x03 \x01(\v2 .loop.solana.TransactionEnvelopeR\vtransaction\x120\n" + - "\x04meta\x18\f \x01(\v2\x1c.loop.solana.TransactionMetaR\x04meta\"5\n" + + "block_time\x18\x02 \x01(\x03H\x00R\tblockTime\x88\x01\x01\x12G\n" + + "\vtransaction\x18\x03 \x01(\v2 .loop.solana.TransactionEnvelopeH\x01R\vtransaction\x88\x01\x01\x125\n" + + "\x04meta\x18\x04 \x01(\v2\x1c.loop.solana.TransactionMetaH\x02R\x04meta\x88\x01\x01B\r\n" + + "\v_block_timeB\x0e\n" + + "\f_transactionB\a\n" + + "\x05_meta\"5\n" + "\x15GetTransactionRequest\x12\x1c\n" + - "\tsignature\x18\x01 \x01(\fR\tsignature\"K\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\" \n" + + "\n" + + "RPCContext\x12\x12\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot\"\xf0\x01\n" + + "\x0eSimulateTXOpts\x12\x1d\n" + + "\n" + + "sig_verify\x18\x01 \x01(\bR\tsigVerify\x12;\n" + + "\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + + "commitment\x128\n" + + "\x18replace_recent_blockhash\x18\x03 \x01(\bR\x16replaceRecentBlockhash\x12H\n" + + "\baccounts\x18\x04 \x01(\v2,.loop.solana.SimulateTransactionAccountsOptsR\baccounts\"\x90\x01\n" + + "\x0fSimulateTXReply\x12\x10\n" + + "\x03err\x18\x01 \x01(\tR\x03err\x12\x12\n" + + "\x04logs\x18\x02 \x03(\tR\x04logs\x120\n" + + "\baccounts\x18\x03 \x03(\v2\x14.loop.solana.AccountR\baccounts\x12%\n" + + "\x0eunits_consumed\x18\x04 \x01(\x04R\runitsConsumed\"\x91\x01\n" + + "\x11SimulateTXRequest\x12\x1a\n" + + "\breceiver\x18\x01 \x01(\fR\breceiver\x12/\n" + + "\x13encoded_transaction\x18\x02 \x01(\tR\x12encodedTransaction\x12/\n" + + "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"v\n" + + "\x1fSimulateTransactionAccountsOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12\x1c\n" + + "\taddresses\x18\x02 \x03(\fR\taddresses\"\x8e\x01\n" + + "\x16SubmitTransactionReply\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12'\n" + + "\x0fidempotency_key\x18\x02 \x01(\tR\x0eidempotencyKey\x12-\n" + + "\x06status\x18\x03 \x01(\x0e2\x15.loop.solana.TxStatusR\x06status\"\x95\x01\n" + + "\x18SubmitTransactionRequest\x12,\n" + + "\x03cfg\x18\x01 \x01(\v2\x1a.loop.solana.ComputeConfigR\x03cfg\x12\x1a\n" + + "\breceiver\x18\x02 \x01(\fR\breceiver\x12/\n" + + "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"z\n" + + "\bEventSig\x12\x14\n" + + "\x05topic\x18\x01 \x01(\x04R\x05topic\x12X\n" + + "\x16hashed_value_comparers\x18\x02 \x03(\v2\".loop.solana.HashedValueComparatorR\x14hashedValueComparers\"q\n" + + "\x16IndexedValueComparator\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + + "\boperator\x18\x02 \x01(\x0e2%.loop.chain.common.ComparisonOperatorR\boperator\"\x80\x01\n" + + "\rEventBySubkey\x12!\n" + + "\fsubkey_index\x18\x01 \x01(\x04R\vsubkeyIndex\x12L\n" + + "\x0fvalue_comparers\x18\x02 \x03(\v2#.loop.solana.IndexedValueComparatorR\x0evalueComparers\"\xa2\x01\n" + + "\n" + + "Expression\x126\n" + + "\tprimitive\x18\x01 \x01(\v2\x16.loop.solana.PrimitiveH\x00R\tprimitive\x12O\n" + + "\x12boolean_expression\x18\x02 \x01(\v2\x1e.loop.solana.BooleanExpressionH\x00R\x11booleanExpressionB\v\n" + + "\tevaluator\"\x9b\x01\n" + + "\x11BooleanExpression\x12M\n" + + "\x10boolean_operator\x18\x01 \x01(\x0e2\".loop.chain.common.BooleanOperatorR\x0fbooleanOperator\x127\n" + + "\n" + + "expression\x18\x02 \x03(\v2\x17.loop.solana.ExpressionR\n" + + "expression\"\xe6\x01\n" + + "\tPrimitive\x12K\n" + + "\x11general_primitive\x18\x01 \x01(\v2\x1c.loop.chain.common.PrimitiveH\x00R\x10generalPrimitive\x12\x1a\n" + + "\aaddress\x18\x02 \x01(\fH\x00R\aaddress\x12\x1d\n" + + "\tevent_sig\x18\x03 \x01(\fH\x00R\beventSig\x12D\n" + + "\x0fevent_by_subkey\x18\x04 \x01(\v2\x1a.loop.solana.EventBySubkeyH\x00R\reventBySubkeyB\v\n" + + "\tprimitive\"K\n" + "\x15HashedValueComparator\x12\x16\n" + "\x06values\x18\x01 \x03(\fR\x06values\x12\x1a\n" + "\boperator\x18\x02 \x01(\x03R\boperator\"#\n" + @@ -4222,44 +4200,7 @@ const file_solana_proto_rawDesc = "" + "\x04data\x18\t \x01(\fR\x04data\x12!\n" + "\fsequence_num\x18\n" + " \x01(\x03R\vsequenceNum\x12\x14\n" + - "\x05error\x18\v \x01(\tR\x05error\"<\n" + - "\n" + - "RPCContext\x12.\n" + - "\acontext\x18\x01 \x01(\v2\x14.loop.solana.ContextR\acontext\"\xf0\x01\n" + - "\x0eSimulateTXOpts\x12\x1d\n" + - "\n" + - "sig_verify\x18\x01 \x01(\bR\tsigVerify\x12;\n" + - "\n" + - "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + - "commitment\x128\n" + - "\x18replace_recent_blockhash\x18\x03 \x01(\bR\x16replaceRecentBlockhash\x12H\n" + - "\baccounts\x18\x04 \x01(\v2,.loop.solana.SimulateTransactionAccountsOptsR\baccounts\"\x90\x01\n" + - "\x0fSimulateTXReply\x12\x10\n" + - "\x03err\x18\x01 \x01(\tR\x03err\x12\x12\n" + - "\x04logs\x18\x02 \x03(\tR\x04logs\x120\n" + - "\baccounts\x18\x03 \x03(\v2\x14.loop.solana.AccountR\baccounts\x12%\n" + - "\x0eunits_consumed\x18\x04 \x01(\x04R\runitsConsumed\"\x91\x01\n" + - "\x11SimulateTXRequest\x12\x1a\n" + - "\breceiver\x18\x01 \x01(\fR\breceiver\x12/\n" + - "\x13encoded_transaction\x18\x02 \x01(\tR\x12encodedTransaction\x12/\n" + - "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"v\n" + - "\x1fSimulateTransactionAccountsOpts\x125\n" + - "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12\x1c\n" + - "\taddresses\x18\x02 \x03(\fR\taddresses\"\x97\x01\n" + - "\x16SubmitTransactionReply\x12\x1c\n" + - "\tsignature\x18\x01 \x01(\fR\tsignature\x12'\n" + - "\x0fidempotency_key\x18\x02 \x01(\tR\x0eidempotencyKey\x126\n" + - "\x06status\x18\x03 \x01(\x0e2\x1e.loop.solana.TransactionStatusR\x06status\"\x95\x01\n" + - "\x18SubmitTransactionRequest\x12,\n" + - "\x03cfg\x18\x01 \x01(\v2\x1a.loop.solana.ComputeConfigR\x03cfg\x12\x1a\n" + - "\breceiver\x18\x02 \x01(\fR\breceiver\x12/\n" + - "\x13encoded_transaction\x18\x03 \x01(\tR\x12encodedTransaction\"\xe6\x01\n" + - "\tPrimitive\x12K\n" + - "\x11general_primitive\x18\x01 \x01(\v2\x1c.loop.chain.common.PrimitiveH\x00R\x10generalPrimitive\x12\x1a\n" + - "\aaddress\x18\x02 \x01(\fH\x00R\aaddress\x12\x1d\n" + - "\tevent_sig\x18\x03 \x01(\fH\x00R\beventSig\x12D\n" + - "\x0fevent_by_subkey\x18\x04 \x01(\v2\x1a.loop.solana.EventBySubkeyH\x00R\reventBySubkeyB\v\n" + - "\tprimitive\"\x9b\x01\n" + + "\x05error\x18\v \x01(\tR\x05error\"\x9b\x01\n" + "\x17QueryTrackedLogsRequest\x129\n" + "\vfilterQuery\x18\x01 \x03(\v2\x17.loop.solana.ExpressionR\vfilterQuery\x12E\n" + "\x0elimit_and_sort\x18\x02 \x01(\v2\x1f.loop.chain.common.LimitAndSortR\flimitAndSort\"=\n" + @@ -4274,35 +4215,28 @@ const file_solana_proto_rawDesc = "" + "filterName\"\x1c\n" + "\x1aUnregisterLogTrackingReply\"+\n" + "\x15GetLatestLPBlockReply\x12\x12\n" + - "\x04slot\x18\x01 \x01(\x04R\x04slot*A\n" + - "\x11TransactionStatus\x12\f\n" + - "\bTX_FATAL\x10\x00\x12\x0e\n" + - "\n" + - "TX_ABORTED\x10\x01\x12\x0e\n" + - "\n" + - "TX_SUCCESS\x10\x02*\x99\x01\n" + - "\x16TransactionDetailsType\x12\x1c\n" + - "\x18TRANSACTION_DETAILS_FULL\x10\x00\x12!\n" + - "\x1dTRANSCTION_DETAILS_SIGNATURES\x10\x01\x12\x1c\n" + - "\x18TRANSACTION_DETAILS_NONE\x10\x02\x12 \n" + - "\x1cTRANSACTION_DETAILS_ACCOUNTS\x10\x03*\x91\x01\n" + - "\fEncodingType\x12\x11\n" + - "\rENCODING_NONE\x10\x00\x12\x13\n" + - "\x0fENCODING_BASE58\x10\x01\x12\x13\n" + - "\x0fENCODING_BASE64\x10\x02\x12\x17\n" + - "\x13ENCODING_BASE64_ZST\x10\x03\x12\x18\n" + - "\x14ENCODING_JSON_PARSED\x10\x04\x12\x11\n" + - "\rENCODING_JSON\x10\x05*s\n" + - "\x0eCommitmentType\x12\x13\n" + - "\x0fCOMMITMENT_NONE\x10\x00\x12\x18\n" + - "\x14COMMITMENT_FINALIZED\x10\x01\x12\x18\n" + - "\x14COMMITMENT_CONFIRMED\x10\x02\x12\x18\n" + - "\x14COMMITMENT_PROCESSED\x10\x03*\x83\x01\n" + - "\x16ConfirmationStatusType\x12\x15\n" + - "\x11CONFIRMATION_NONE\x10\x00\x12\x1a\n" + - "\x16CONFIRMATION_PROCESSED\x10\x01\x12\x1a\n" + - "\x16CONFIRMATION_CONFIRMED\x10\x02\x12\x1a\n" + - "\x16CONFIRMATION_FINALIZED\x10\x032\xad\n" + + "\x04slot\x18\x01 \x01(\x04R\x04slot*\xb0\x01\n" + + "\fEncodingType\x12\x16\n" + + "\x12ENCODING_TYPE_NONE\x10\x00\x12\x18\n" + + "\x14ENCODING_TYPE_BASE58\x10\x01\x12\x18\n" + + "\x14ENCODING_TYPE_BASE64\x10\x02\x12\x1d\n" + + "\x19ENCODING_TYPE_BASE64_ZSTD\x10\x03\x12\x1d\n" + + "\x19ENCODING_TYPE_JSON_PARSED\x10\x04\x12\x16\n" + + "\x12ENCODING_TYPE_JSON\x10\x05*\x87\x01\n" + + "\x0eCommitmentType\x12\x18\n" + + "\x14COMMITMENT_TYPE_NONE\x10\x00\x12\x1d\n" + + "\x19COMMITMENT_TYPE_FINALIZED\x10\x01\x12\x1d\n" + + "\x19COMMITMENT_TYPE_CONFIRMED\x10\x02\x12\x1d\n" + + "\x19COMMITMENT_TYPE_PROCESSED\x10\x03*\xb3\x01\n" + + "\x16ConfirmationStatusType\x12!\n" + + "\x1dCONFIRMATION_STATUS_TYPE_NONE\x10\x00\x12&\n" + + "\"CONFIRMATION_STATUS_TYPE_PROCESSED\x10\x01\x12&\n" + + "\"CONFIRMATION_STATUS_TYPE_CONFIRMED\x10\x02\x12&\n" + + "\"CONFIRMATION_STATUS_TYPE_FINALIZED\x10\x03*M\n" + + "\bTxStatus\x12\x13\n" + + "\x0fTX_STATUS_FATAL\x10\x00\x12\x15\n" + + "\x11TX_STATUS_ABORTED\x10\x01\x12\x15\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xad\n" + "\n" + "\x06Solana\x12n\n" + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + @@ -4334,171 +4268,169 @@ func file_solana_proto_rawDescGZIP() []byte { return file_solana_proto_rawDescData } -var file_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 62) +var file_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 61) var file_solana_proto_goTypes = []any{ - (TransactionStatus)(0), // 0: loop.solana.TransactionStatus - (TransactionDetailsType)(0), // 1: loop.solana.TransactionDetailsType - (EncodingType)(0), // 2: loop.solana.EncodingType - (CommitmentType)(0), // 3: loop.solana.CommitmentType - (ConfirmationStatusType)(0), // 4: loop.solana.ConfirmationStatusType - (*Account)(nil), // 5: loop.solana.Account - (*Address)(nil), // 6: loop.solana.Address - (*ComputeConfig)(nil), // 7: loop.solana.ComputeConfig - (*Context)(nil), // 8: loop.solana.Context - (*DataBytesOrJSON)(nil), // 9: loop.solana.DataBytesOrJSON - (*DataSlice)(nil), // 10: loop.solana.DataSlice - (*EventSig)(nil), // 11: loop.solana.EventSig - (*IndexedValueComparator)(nil), // 12: loop.solana.IndexedValueComparator - (*EventBySubkey)(nil), // 13: loop.solana.EventBySubkey - (*Expression)(nil), // 14: loop.solana.Expression - (*BooleanExpression)(nil), // 15: loop.solana.BooleanExpression - (*GetAccountInfoOpts)(nil), // 16: loop.solana.GetAccountInfoOpts - (*GetAccountInfoWithOptsReply)(nil), // 17: loop.solana.GetAccountInfoWithOptsReply - (*GetAccountInfoWithOptsRequest)(nil), // 18: loop.solana.GetAccountInfoWithOptsRequest - (*GetBalanceReply)(nil), // 19: loop.solana.GetBalanceReply - (*GetBalanceRequest)(nil), // 20: loop.solana.GetBalanceRequest - (*GetBlockOpts)(nil), // 21: loop.solana.GetBlockOpts - (*GetBlockReply)(nil), // 22: loop.solana.GetBlockReply - (*GetBlockRequest)(nil), // 23: loop.solana.GetBlockRequest - (*GetFeeForMessageReply)(nil), // 24: loop.solana.GetFeeForMessageReply - (*GetFeeForMessageRequest)(nil), // 25: loop.solana.GetFeeForMessageRequest - (*GetMultipleAccountsOpts)(nil), // 26: loop.solana.GetMultipleAccountsOpts - (*GetMultipleAccountsWithOptsReply)(nil), // 27: loop.solana.GetMultipleAccountsWithOptsReply - (*GetMultipleAccountsWithOptsRequest)(nil), // 28: loop.solana.GetMultipleAccountsWithOptsRequest - (*GetSignatureStatusesReply)(nil), // 29: loop.solana.GetSignatureStatusesReply - (*GetSignatureStatusesRequest)(nil), // 30: loop.solana.GetSignatureStatusesRequest - (*GetSignatureStatusesResult)(nil), // 31: loop.solana.GetSignatureStatusesResult - (*GetSlotHeightReply)(nil), // 32: loop.solana.GetSlotHeightReply - (*GetSlotHeightRequest)(nil), // 33: loop.solana.GetSlotHeightRequest - (*MessageHeader)(nil), // 34: loop.solana.MessageHeader - (*ParsedMessage)(nil), // 35: loop.solana.ParsedMessage - (*ParsedTransaction)(nil), // 36: loop.solana.ParsedTransaction - (*UiTokenAmount)(nil), // 37: loop.solana.UiTokenAmount - (*TokenBalance)(nil), // 38: loop.solana.TokenBalance - (*InnerInstruction)(nil), // 39: loop.solana.InnerInstruction - (*LoadedAddresses)(nil), // 40: loop.solana.LoadedAddresses - (*CompiledInstruction)(nil), // 41: loop.solana.CompiledInstruction - (*Data)(nil), // 42: loop.solana.Data - (*ReturnData)(nil), // 43: loop.solana.ReturnData - (*TransactionMeta)(nil), // 44: loop.solana.TransactionMeta - (*TransactionEnvelope)(nil), // 45: loop.solana.TransactionEnvelope - (*GetTransactionReply)(nil), // 46: loop.solana.GetTransactionReply - (*GetTransactionRequest)(nil), // 47: loop.solana.GetTransactionRequest - (*HashedValueComparator)(nil), // 48: loop.solana.HashedValueComparator - (*Subkeys)(nil), // 49: loop.solana.Subkeys - (*LPFilterQuery)(nil), // 50: loop.solana.LPFilterQuery - (*Log)(nil), // 51: loop.solana.Log - (*RPCContext)(nil), // 52: loop.solana.RPCContext - (*SimulateTXOpts)(nil), // 53: loop.solana.SimulateTXOpts - (*SimulateTXReply)(nil), // 54: loop.solana.SimulateTXReply - (*SimulateTXRequest)(nil), // 55: loop.solana.SimulateTXRequest - (*SimulateTransactionAccountsOpts)(nil), // 56: loop.solana.SimulateTransactionAccountsOpts - (*SubmitTransactionReply)(nil), // 57: loop.solana.SubmitTransactionReply - (*SubmitTransactionRequest)(nil), // 58: loop.solana.SubmitTransactionRequest - (*Primitive)(nil), // 59: loop.solana.Primitive - (*QueryTrackedLogsRequest)(nil), // 60: loop.solana.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 61: loop.solana.QueryTrackedLogsReply - (*RegisterLogTrackingRequest)(nil), // 62: loop.solana.RegisterLogTrackingRequest - (*RegisterLogTrackingReply)(nil), // 63: loop.solana.RegisterLogTrackingReply - (*UnregisterLogTrackingRequest)(nil), // 64: loop.solana.UnregisterLogTrackingRequest - (*UnregisterLogTrackingReply)(nil), // 65: loop.solana.UnregisterLogTrackingReply - (*GetLatestLPBlockReply)(nil), // 66: loop.solana.GetLatestLPBlockReply - (*pb.BigInt)(nil), // 67: values.v1.BigInt - (chain_common.ComparisonOperator)(0), // 68: loop.chain.common.ComparisonOperator - (chain_common.BooleanOperator)(0), // 69: loop.chain.common.BooleanOperator - (*chain_common.Primitive)(nil), // 70: loop.chain.common.Primitive - (*chain_common.LimitAndSort)(nil), // 71: loop.chain.common.LimitAndSort - (*emptypb.Empty)(nil), // 72: google.protobuf.Empty + (EncodingType)(0), // 0: loop.solana.EncodingType + (CommitmentType)(0), // 1: loop.solana.CommitmentType + (ConfirmationStatusType)(0), // 2: loop.solana.ConfirmationStatusType + (TxStatus)(0), // 3: loop.solana.TxStatus + (*Account)(nil), // 4: loop.solana.Account + (*ComputeConfig)(nil), // 5: loop.solana.ComputeConfig + (*DataBytesOrJSON)(nil), // 6: loop.solana.DataBytesOrJSON + (*DataSlice)(nil), // 7: loop.solana.DataSlice + (*GetAccountInfoOpts)(nil), // 8: loop.solana.GetAccountInfoOpts + (*GetAccountInfoWithOptsReply)(nil), // 9: loop.solana.GetAccountInfoWithOptsReply + (*GetAccountInfoWithOptsRequest)(nil), // 10: loop.solana.GetAccountInfoWithOptsRequest + (*GetBalanceReply)(nil), // 11: loop.solana.GetBalanceReply + (*GetBalanceRequest)(nil), // 12: loop.solana.GetBalanceRequest + (*GetBlockOpts)(nil), // 13: loop.solana.GetBlockOpts + (*GetBlockReply)(nil), // 14: loop.solana.GetBlockReply + (*GetBlockRequest)(nil), // 15: loop.solana.GetBlockRequest + (*GetFeeForMessageReply)(nil), // 16: loop.solana.GetFeeForMessageReply + (*GetFeeForMessageRequest)(nil), // 17: loop.solana.GetFeeForMessageRequest + (*GetMultipleAccountsOpts)(nil), // 18: loop.solana.GetMultipleAccountsOpts + (*OptionalAccountWrapper)(nil), // 19: loop.solana.OptionalAccountWrapper + (*GetMultipleAccountsWithOptsReply)(nil), // 20: loop.solana.GetMultipleAccountsWithOptsReply + (*GetMultipleAccountsWithOptsRequest)(nil), // 21: loop.solana.GetMultipleAccountsWithOptsRequest + (*GetSignatureStatusesReply)(nil), // 22: loop.solana.GetSignatureStatusesReply + (*GetSignatureStatusesRequest)(nil), // 23: loop.solana.GetSignatureStatusesRequest + (*GetSignatureStatusesResult)(nil), // 24: loop.solana.GetSignatureStatusesResult + (*GetSlotHeightReply)(nil), // 25: loop.solana.GetSlotHeightReply + (*GetSlotHeightRequest)(nil), // 26: loop.solana.GetSlotHeightRequest + (*MessageHeader)(nil), // 27: loop.solana.MessageHeader + (*ParsedMessage)(nil), // 28: loop.solana.ParsedMessage + (*ParsedTransaction)(nil), // 29: loop.solana.ParsedTransaction + (*UiTokenAmount)(nil), // 30: loop.solana.UiTokenAmount + (*TokenBalance)(nil), // 31: loop.solana.TokenBalance + (*InnerInstruction)(nil), // 32: loop.solana.InnerInstruction + (*LoadedAddresses)(nil), // 33: loop.solana.LoadedAddresses + (*CompiledInstruction)(nil), // 34: loop.solana.CompiledInstruction + (*Data)(nil), // 35: loop.solana.Data + (*ReturnData)(nil), // 36: loop.solana.ReturnData + (*TransactionMeta)(nil), // 37: loop.solana.TransactionMeta + (*TransactionEnvelope)(nil), // 38: loop.solana.TransactionEnvelope + (*GetTransactionReply)(nil), // 39: loop.solana.GetTransactionReply + (*GetTransactionRequest)(nil), // 40: loop.solana.GetTransactionRequest + (*RPCContext)(nil), // 41: loop.solana.RPCContext + (*SimulateTXOpts)(nil), // 42: loop.solana.SimulateTXOpts + (*SimulateTXReply)(nil), // 43: loop.solana.SimulateTXReply + (*SimulateTXRequest)(nil), // 44: loop.solana.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 45: loop.solana.SimulateTransactionAccountsOpts + (*SubmitTransactionReply)(nil), // 46: loop.solana.SubmitTransactionReply + (*SubmitTransactionRequest)(nil), // 47: loop.solana.SubmitTransactionRequest + (*EventSig)(nil), // 48: loop.solana.EventSig + (*IndexedValueComparator)(nil), // 49: loop.solana.IndexedValueComparator + (*EventBySubkey)(nil), // 50: loop.solana.EventBySubkey + (*Expression)(nil), // 51: loop.solana.Expression + (*BooleanExpression)(nil), // 52: loop.solana.BooleanExpression + (*Primitive)(nil), // 53: loop.solana.Primitive + (*HashedValueComparator)(nil), // 54: loop.solana.HashedValueComparator + (*Subkeys)(nil), // 55: loop.solana.Subkeys + (*LPFilterQuery)(nil), // 56: loop.solana.LPFilterQuery + (*Log)(nil), // 57: loop.solana.Log + (*QueryTrackedLogsRequest)(nil), // 58: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 59: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 60: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 61: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 62: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 63: loop.solana.UnregisterLogTrackingReply + (*GetLatestLPBlockReply)(nil), // 64: loop.solana.GetLatestLPBlockReply + (*pb.BigInt)(nil), // 65: values.v1.BigInt + (chain_common.ComparisonOperator)(0), // 66: loop.chain.common.ComparisonOperator + (chain_common.BooleanOperator)(0), // 67: loop.chain.common.BooleanOperator + (*chain_common.Primitive)(nil), // 68: loop.chain.common.Primitive + (*chain_common.LimitAndSort)(nil), // 69: loop.chain.common.LimitAndSort + (*emptypb.Empty)(nil), // 70: google.protobuf.Empty } var file_solana_proto_depIdxs = []int32{ - 9, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON - 67, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt - 2, // 2: loop.solana.DataBytesOrJSON.raw_data_encoding:type_name -> loop.solana.EncodingType - 48, // 3: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator - 68, // 4: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator - 12, // 5: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator - 59, // 6: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive - 15, // 7: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression - 69, // 8: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator - 14, // 9: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression - 2, // 10: loop.solana.GetAccountInfoOpts.encoding:type_name -> loop.solana.EncodingType - 3, // 11: loop.solana.GetAccountInfoOpts.commitment:type_name -> loop.solana.CommitmentType - 10, // 12: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice - 52, // 13: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext - 5, // 14: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account - 16, // 15: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts - 3, // 16: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType - 3, // 17: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType - 21, // 18: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts - 3, // 19: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType - 2, // 20: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 3, // 21: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType - 10, // 22: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice - 52, // 23: loop.solana.GetMultipleAccountsWithOptsReply.r_p_c_context:type_name -> loop.solana.RPCContext - 5, // 24: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.Account - 26, // 25: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts - 31, // 26: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult - 4, // 27: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType - 3, // 28: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType - 34, // 29: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader - 41, // 30: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction - 35, // 31: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage - 37, // 32: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount - 41, // 33: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction - 2, // 34: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType - 42, // 35: loop.solana.ReturnData.data:type_name -> loop.solana.Data - 38, // 36: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance - 38, // 37: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance - 39, // 38: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction - 40, // 39: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses - 43, // 40: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData - 36, // 41: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction - 45, // 42: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope - 44, // 43: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta - 49, // 44: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys - 8, // 45: loop.solana.RPCContext.context:type_name -> loop.solana.Context - 3, // 46: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType - 56, // 47: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts - 5, // 48: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account - 53, // 49: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts - 2, // 50: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 0, // 51: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TransactionStatus - 7, // 52: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig - 70, // 53: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 13, // 54: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey - 14, // 55: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression - 71, // 56: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 51, // 57: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log - 50, // 58: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery - 18, // 59: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest - 20, // 60: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest - 23, // 61: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest - 25, // 62: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest - 28, // 63: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest - 30, // 64: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest - 33, // 65: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest - 47, // 66: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 60, // 67: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest - 62, // 68: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest - 55, // 69: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 58, // 70: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest - 64, // 71: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest - 72, // 72: loop.solana.Solana.GetLatestLPBlock:input_type -> google.protobuf.Empty - 17, // 73: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply - 19, // 74: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply - 22, // 75: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply - 24, // 76: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply - 27, // 77: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply - 29, // 78: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply - 32, // 79: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply - 46, // 80: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply - 61, // 81: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply - 63, // 82: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply - 54, // 83: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply - 57, // 84: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply - 65, // 85: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply - 66, // 86: loop.solana.Solana.GetLatestLPBlock:output_type -> loop.solana.GetLatestLPBlockReply + 6, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON + 65, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt + 0, // 2: loop.solana.DataBytesOrJSON.encoding:type_name -> loop.solana.EncodingType + 0, // 3: loop.solana.GetAccountInfoOpts.encoding:type_name -> loop.solana.EncodingType + 1, // 4: loop.solana.GetAccountInfoOpts.commitment:type_name -> loop.solana.CommitmentType + 7, // 5: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice + 41, // 6: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 4, // 7: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account + 8, // 8: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts + 1, // 9: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType + 1, // 10: loop.solana.GetBlockOpts.commitment:type_name -> loop.solana.CommitmentType + 13, // 11: loop.solana.GetBlockRequest.opts:type_name -> loop.solana.GetBlockOpts + 1, // 12: loop.solana.GetFeeForMessageRequest.commitment:type_name -> loop.solana.CommitmentType + 0, // 13: loop.solana.GetMultipleAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 1, // 14: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType + 7, // 15: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice + 4, // 16: loop.solana.OptionalAccountWrapper.account:type_name -> loop.solana.Account + 41, // 17: loop.solana.GetMultipleAccountsWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 19, // 18: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.OptionalAccountWrapper + 18, // 19: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts + 24, // 20: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult + 2, // 21: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType + 1, // 22: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType + 27, // 23: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader + 34, // 24: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction + 28, // 25: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage + 30, // 26: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount + 34, // 27: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction + 0, // 28: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType + 35, // 29: loop.solana.ReturnData.data:type_name -> loop.solana.Data + 31, // 30: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance + 31, // 31: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance + 32, // 32: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction + 33, // 33: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses + 36, // 34: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData + 29, // 35: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction + 38, // 36: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope + 37, // 37: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta + 1, // 38: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType + 45, // 39: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 4, // 40: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 42, // 41: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 0, // 42: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 3, // 43: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TxStatus + 5, // 44: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 54, // 45: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator + 66, // 46: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 49, // 47: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator + 53, // 48: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 52, // 49: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression + 67, // 50: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 51, // 51: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression + 68, // 52: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 50, // 53: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey + 55, // 54: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys + 51, // 55: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 69, // 56: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 57, // 57: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log + 56, // 58: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 10, // 59: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 12, // 60: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest + 15, // 61: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest + 17, // 62: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 21, // 63: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 23, // 64: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 26, // 65: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 40, // 66: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 58, // 67: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest + 60, // 68: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest + 44, // 69: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 47, // 70: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest + 62, // 71: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest + 70, // 72: loop.solana.Solana.GetLatestLPBlock:input_type -> google.protobuf.Empty + 9, // 73: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 11, // 74: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply + 14, // 75: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply + 16, // 76: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 20, // 77: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 22, // 78: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 25, // 79: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 39, // 80: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply + 59, // 81: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply + 61, // 82: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply + 43, // 83: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply + 46, // 84: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply + 63, // 85: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply + 64, // 86: loop.solana.Solana.GetLatestLPBlock:output_type -> loop.solana.GetLatestLPBlockReply 73, // [73:87] is the sub-list for method output_type 59, // [59:73] is the sub-list for method input_type 59, // [59:59] is the sub-list for extension type_name @@ -4511,15 +4443,26 @@ func file_solana_proto_init() { if File_solana_proto != nil { return } - file_solana_proto_msgTypes[9].OneofWrappers = []any{ - (*Expression_Primitive)(nil), - (*Expression_BooleanExpression)(nil), - } - file_solana_proto_msgTypes[40].OneofWrappers = []any{ + file_solana_proto_msgTypes[2].OneofWrappers = []any{ + (*DataBytesOrJSON_Raw)(nil), + (*DataBytesOrJSON_Json)(nil), + } + file_solana_proto_msgTypes[5].OneofWrappers = []any{} + file_solana_proto_msgTypes[10].OneofWrappers = []any{} + file_solana_proto_msgTypes[15].OneofWrappers = []any{} + file_solana_proto_msgTypes[20].OneofWrappers = []any{} + file_solana_proto_msgTypes[27].OneofWrappers = []any{} + file_solana_proto_msgTypes[33].OneofWrappers = []any{} + file_solana_proto_msgTypes[34].OneofWrappers = []any{ (*TransactionEnvelope_Raw)(nil), (*TransactionEnvelope_Parsed)(nil), } - file_solana_proto_msgTypes[54].OneofWrappers = []any{ + file_solana_proto_msgTypes[35].OneofWrappers = []any{} + file_solana_proto_msgTypes[47].OneofWrappers = []any{ + (*Expression_Primitive)(nil), + (*Expression_BooleanExpression)(nil), + } + file_solana_proto_msgTypes[49].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_Address)(nil), (*Primitive_EventSig)(nil), @@ -4530,8 +4473,8 @@ func file_solana_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc)), - NumEnums: 5, - NumMessages: 62, + NumEnums: 4, + NumMessages: 61, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index b3b06bddcc..257f4da70b 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -24,45 +24,37 @@ service Solana { rpc GetLatestLPBlock(google.protobuf.Empty) returns (GetLatestLPBlockReply); } -// Transaction execution status returned by submitters/simulations. -enum TransactionStatus { - TX_FATAL = 0; // unrecoverable failure - TX_ABORTED = 1; // not executed / dropped - TX_SUCCESS = 2; // executed successfully -} - -// Level of tx details in block response. -enum TransactionDetailsType { - TRANSACTION_DETAILS_FULL = 0; // tx + meta - TRANSCTION_DETAILS_SIGNATURES = 1; // signatures only - TRANSACTION_DETAILS_NONE = 2; // no txs - TRANSACTION_DETAILS_ACCOUNTS = 3; // account keys only -} - // Account/tx data encodings. enum EncodingType { - ENCODING_NONE = 0; - ENCODING_BASE58 = 1; // for data <129 bytes - ENCODING_BASE64 = 2; // any size - ENCODING_BASE64_ZST = 3; // zstd-compressed, base64-wrapped - ENCODING_JSON_PARSED = 4; // program parsers; fallback to base64 if unknown - ENCODING_JSON = 5; // raw JSON (rare; prefer JSON_PARSED) + ENCODING_TYPE_NONE = 0; + ENCODING_TYPE_BASE58 = 1; // for data <129 bytes + ENCODING_TYPE_BASE64 = 2; // any size + ENCODING_TYPE_BASE64_ZSTD = 3; // zstd-compressed, base64-wrapped + ENCODING_TYPE_JSON_PARSED = 4; // program parsers; fallback to base64 if unknown + ENCODING_TYPE_JSON = 5; // raw JSON (rare; prefer JSON_PARSED) } // Read consistency of queried state. enum CommitmentType { - COMMITMENT_NONE = 0; - COMMITMENT_FINALIZED = 1; // cluster-finalized - COMMITMENT_CONFIRMED = 2; // voted by supermajority - COMMITMENT_PROCESSED = 3; // node’s latest + COMMITMENT_TYPE_NONE = 0; + COMMITMENT_TYPE_FINALIZED = 1; // cluster-finalized + COMMITMENT_TYPE_CONFIRMED = 2; // voted by supermajority + COMMITMENT_TYPE_PROCESSED = 3; // node’s latest } // Cluster confirmation status of a tx/signature. enum ConfirmationStatusType { - CONFIRMATION_NONE = 0; - CONFIRMATION_PROCESSED = 1; - CONFIRMATION_CONFIRMED = 2; - CONFIRMATION_FINALIZED = 3; + CONFIRMATION_STATUS_TYPE_NONE = 0; + CONFIRMATION_STATUS_TYPE_PROCESSED = 1; + CONFIRMATION_STATUS_TYPE_CONFIRMED = 2; + CONFIRMATION_STATUS_TYPE_FINALIZED = 3; +} + +// Transaction execution status returned by submitters/simulations. +enum TxStatus { + TX_STATUS_FATAL = 0; // unrecoverable failure + TX_STATUS_ABORTED = 1; // not executed / dropped + TX_STATUS_SUCCESS = 2; // executed successfully } // On-chain account state. @@ -75,27 +67,19 @@ message Account { uint64 space = 6; // data length in bytes } -// 32-byte address (Pubkey). -message Address { - bytes address = 1; // 32 bytes -} - // Compute budget configuration when submitting txs. message ComputeConfig { uint32 compute_limit = 1; // max CUs (approx per-tx limit) uint64 compute_max_price = 2; // max lamports per CU } -// RPC context (slot at which state was read). -message Context { - uint64 slot = 1; -} - // Raw bytes vs parsed JSON (as returned by RPC). message DataBytesOrJSON { - EncodingType raw_data_encoding = 1; // encoding of payload - bytes as_decoded_binary = 2; // if binary encoding - bytes as_json = 3; // if JSON/JSON_PARSED + EncodingType encoding = 1; + oneof body { + bytes raw = 2; // program data (node’s base64/base58 decoded) + bytes json = 3; // json: UTF-8 bytes of the jsonParsed payload. + } } // Return a slice of account data. @@ -104,38 +88,6 @@ message DataSlice { uint64 length = 2; // number of bytes } -// Event/topic filter by hashed value(s). -message EventSig { - uint64 topic = 1; // topic index - repeated HashedValueComparator hashed_value_comparers = 2; // comparisons -} - -// Comparator for a single indexed value. -message IndexedValueComparator { - bytes value = 1; // raw bytes - loop.chain.common.ComparisonOperator operator = 2; // eq/lt/gt etc. -} - -// Filter events by a subkey path. -message EventBySubkey { - uint64 subkey_index = 1; // path element index - repeated IndexedValueComparator value_comparers = 2; -} - -// Expression tree wrapper. -message Expression { - oneof evaluator { - Primitive primitive = 1; // leaf filter - BooleanExpression boolean_expression = 2; // AND/OR of expressions - } -} - -// Boolean composition over expressions. -message BooleanExpression { - loop.chain.common.BooleanOperator boolean_operator = 1; // AND/OR - repeated Expression expression = 2; -} - // Options for GetAccountInfo. message GetAccountInfoOpts { EncodingType encoding = 1; // data encoding @@ -147,7 +99,7 @@ message GetAccountInfoOpts { // Reply for GetAccountInfoWithOpts. message GetAccountInfoWithOptsReply { RPCContext rpc_context = 1; // read slot - Account value = 2; // account (may be empty) + optional Account value = 2; // account (may be empty) } // Request for GetAccountInfoWithOpts. @@ -169,7 +121,7 @@ message GetBalanceRequest { // Options for GetBlock. message GetBlockOpts { - CommitmentType commitment = 4; // read consistency + CommitmentType commitment = 4; // read consistency } // Block response. @@ -177,8 +129,8 @@ message GetBlockReply { bytes blockhash = 1; // 32-byte block hash bytes previous_blockhash = 2; // 32-byte parent hash uint64 parent_slot = 3; - int64 block_time = 6; // unix seconds - uint64 block_height = 7; // chain height + optional int64 block_time = 4; // unix seconds, node may not report it + uint64 block_height = 5; // chain height } // Request for GetBlock. @@ -193,7 +145,7 @@ message GetFeeForMessageReply { } message GetFeeForMessageRequest { - string message = 1; // base58-encoded Message + string message = 1; // must be base58-encoded Message CommitmentType commitment = 2; // read consistency } @@ -205,10 +157,14 @@ message GetMultipleAccountsOpts { uint64 min_context_slot = 4; } +message OptionalAccountWrapper { + optional Account account = 1; +} + // Reply for GetMultipleAccountsWithOpts. message GetMultipleAccountsWithOptsReply { - RPCContext r_p_c_context = 1; // read slot - repeated Account value = 2; // accounts (nil entries allowed) + RPCContext rpc_context = 1; // read slot + repeated OptionalAccountWrapper value = 2; // accounts (nil entries allowed) } // Request for GetMultipleAccountsWithOpts. @@ -230,7 +186,7 @@ message GetSignatureStatusesRequest { // Per-signature status. message GetSignatureStatusesResult { uint64 slot = 1; // processed slot - uint64 confirmations = 2; // null->0 here + optional uint64 confirmations = 2; // null->0 here string err = 3; // error JSON string (empty on success) ConfirmationStatusType confirmation_status = 4; } @@ -275,8 +231,8 @@ message UiTokenAmount { // SPL token balance entry. message TokenBalance { uint32 account_index = 1; // index in account_keys - bytes owner = 2; // 32-byte owner (optional) - bytes program_id = 3; // 32-byte token program (optional) + optional bytes owner = 2; // 32-byte owner (optional) + optional bytes program_id = 3; // 32-byte token program (optional) bytes mint = 4; // 32-byte mint UiTokenAmount ui = 5; // formatted amounts } @@ -325,7 +281,7 @@ message TransactionMeta { repeated InnerInstruction inner_instructions = 8; LoadedAddresses loaded_addresses = 9; ReturnData return_data = 10; - uint64 compute_units_consumed = 11; // CUs + optional uint64 compute_units_consumed = 11; // CUs } // Transaction envelope: raw bytes or parsed struct. @@ -339,9 +295,9 @@ message TransactionEnvelope { // GetTransaction reply. message GetTransactionReply { uint64 slot = 1; // processed slot - int64 block_time = 2; // unix seconds - TransactionEnvelope transaction = 3; // tx bytes or parsed - TransactionMeta meta = 12; // may be omitted by node + optional int64 block_time = 2; // unix seconds + optional TransactionEnvelope transaction = 3; // tx bytes or parsed + optional TransactionMeta meta = 4; // may be omitted by node } // GetTransaction request. @@ -349,49 +305,9 @@ message GetTransactionRequest { bytes signature = 1; // 64-byte signature } -// Comparator against hashed values. -message HashedValueComparator { - repeated bytes values = 1; // hashed bytes - int64 operator = 2; // comparison op -} - -// Subkey path elements. -message Subkeys { - repeated string subkeys = 1; // e.g., ["events","0","fields","owner"] -} - -// Log-poller filter config (Solana flavor). -message LPFilterQuery { - string name = 1; // filter name/id - bytes address = 2; // 32-byte program id - string event_name = 3; // optional label - bytes event_sig = 4; // 8-byte event discriminator - int64 starting_block = 5; // start slot - bytes event_idl_json = 6; // IDL JSON bytes - repeated Subkeys subkey_paths = 7; // subkey selectors - int64 retention = 8; // seconds to keep logs - int64 max_logs_kept = 9; // 0 = unlimited - bool include_reverted = 10; // include rolled-back -} - -// Canonical log shape for tracked events. -message Log { - string chain_id = 1; // e.g., "solana-mainnet" - int64 log_index = 2; // per-block index - bytes block_hash = 3; // 32-byte - int64 block_number = 4; // slot - uint64 block_timestamp = 5; // unix seconds - bytes address = 6; // 32-byte program id - bytes event_sig = 7; // 8-byte discriminator - bytes tx_hash = 8; // 64-byte signature - bytes data = 9; // raw event bytes - int64 sequence_num = 10; // monotonic seq - string error = 11; // decode/processing error -} - // RPC read context. message RPCContext { - Context context = 1; + uint64 slot = 1; } // Simulation options. @@ -427,7 +343,7 @@ message SimulateTransactionAccountsOpts { message SubmitTransactionReply { bytes signature = 1; // 64-byte signature string idempotency_key = 2; // echo key - TransactionStatus status = 3; + TxStatus status = 3; } // Submit transaction request. @@ -437,6 +353,38 @@ message SubmitTransactionRequest { string encoded_transaction = 3; // base64/base58 tx } +// Event/topic filter by hashed value(s). +message EventSig { + uint64 topic = 1; // topic index + repeated HashedValueComparator hashed_value_comparers = 2; // comparisons +} + +// Comparator for a single indexed value. +message IndexedValueComparator { + bytes value = 1; // raw bytes + loop.chain.common.ComparisonOperator operator = 2; // eq/lt/gt etc. +} + +// Filter events by a subkey path. +message EventBySubkey { + uint64 subkey_index = 1; // path element index + repeated IndexedValueComparator value_comparers = 2; +} + +// Expression tree wrapper. +message Expression { + oneof evaluator { + Primitive primitive = 1; // leaf filter + BooleanExpression boolean_expression = 2; // AND/OR of expressions + } +} + +// Boolean composition over expressions. +message BooleanExpression { + loop.chain.common.BooleanOperator boolean_operator = 1; // AND/OR + repeated Expression expression = 2; +} + // Primitive leaf for expressions/filters. message Primitive { oneof primitive { @@ -447,6 +395,45 @@ message Primitive { } } +// Comparator against hashed values. +message HashedValueComparator { + repeated bytes values = 1; // hashed bytes + int64 operator = 2; // comparison op +} + +// Subkey path elements. +message Subkeys { + repeated string subkeys = 1; // e.g., ["events","0","fields","owner"] +} + +// Log-poller filter config (Solana flavor). +message LPFilterQuery { + string name = 1; // filter name/id + bytes address = 2; // 32-byte program id + string event_name = 3; // optional label + bytes event_sig = 4; // 8-byte event discriminator + int64 starting_block = 5; // start slot + bytes event_idl_json = 6; // IDL JSON bytes + repeated Subkeys subkey_paths = 7; // subkey selectors + int64 retention = 8; // seconds to keep logs + int64 max_logs_kept = 9; // 0 = unlimited + bool include_reverted = 10; // include rolled-back +} + +// Canonical log shape for tracked events. +message Log { + string chain_id = 1; // e.g., "solana-mainnet" + int64 log_index = 2; // per-block index + bytes block_hash = 3; // 32-byte + int64 block_number = 4; // slot + uint64 block_timestamp = 5; // unix seconds + bytes address = 6; // 32-byte program id + bytes event_sig = 7; // 8-byte discriminator + bytes tx_hash = 8; // 64-byte signature + bytes data = 9; // raw event bytes + int64 sequence_num = 10; // monotonic seq + string error = 11; // decode/processing error +} // Query tracked logs. message QueryTrackedLogsRequest { repeated Expression filterQuery = 1; // filter tree diff --git a/pkg/loop/internal/relayerset/relayerset_test.go b/pkg/loop/internal/relayerset/relayerset_test.go index 2156633ec4..f7d7f2515d 100644 --- a/pkg/loop/internal/relayerset/relayerset_test.go +++ b/pkg/loop/internal/relayerset/relayerset_test.go @@ -650,7 +650,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { mockSol.EXPECT(). GetAccountInfoWithOpts(mock.Anything, req). Return(&soltypes.GetAccountInfoReply{ - RPCContext: soltypes.RPCContext{Context: soltypes.Context{Slot: slot}}, + RPCContext: soltypes.RPCContext{Slot: slot}, Value: &soltypes.Account{ Lamports: lamports, Executable: false, @@ -660,7 +660,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { out, err := sol.GetAccountInfoWithOpts(ctx, req) require.NoError(t, err) require.Equal(t, lamports, out.Value.Lamports) - require.Equal(t, slot, out.RPCContext.Context.Slot) + require.Equal(t, slot, out.RPCContext.Slot) }, }, { @@ -678,7 +678,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { mockSol.EXPECT(). GetMultipleAccountsWithOpts(mock.Anything, req). Return(&soltypes.GetMultipleAccountsReply{ - RPCContext: soltypes.RPCContext{Context: soltypes.Context{Slot: slot}}, + RPCContext: soltypes.RPCContext{Slot: slot}, Value: []*soltypes.Account{ {Lamports: lamports}, {Lamports: lamports}, }, diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index 91f2b27ec9..c350a6ff86 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -150,13 +150,9 @@ type GetAccountInfoOpts struct { MinContextSlot *uint64 } -type Context struct { - Slot uint64 -} - // represents solana-go RPCContext type RPCContext struct { - Context Context + Slot uint64 } // represents solana-go Account From e81270604e4989001b0d18fe8c5a71ce652165a4 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Fri, 21 Nov 2025 10:33:03 -0500 Subject: [PATCH 21/21] remove unused types --- pkg/types/chains/solana/lp_types.go | 117 ---------------------------- 1 file changed, 117 deletions(-) diff --git a/pkg/types/chains/solana/lp_types.go b/pkg/types/chains/solana/lp_types.go index 4edd358919..19c5b597cc 100644 --- a/pkg/types/chains/solana/lp_types.go +++ b/pkg/types/chains/solana/lp_types.go @@ -6,126 +6,9 @@ const EventSignatureLength = 8 type EventSignature [EventSignatureLength]byte -type EventIdl EventIDLTypes - -type EventIDLTypes struct { - Event IdlEvent - Types IdlTypeDefSlice -} - -type IdlEvent struct { - Name string `json:"name"` - Fields []IdlEventField `json:"fields"` -} - -type IdlEventField struct { - Name string `json:"name"` - Type IdlType `json:"type"` - Index bool `json:"index"` -} - -type IdlTypeDefSlice []IdlTypeDef - -type IdlTypeDef struct { - Name string `json:"name"` - Type IdlTypeDefTy `json:"type"` -} - -type IdlTypeDefTy struct { - Kind IdlTypeDefTyKind `json:"kind"` - - Fields *IdlTypeDefStruct `json:"fields,omitempty"` - Variants IdlEnumVariantSlice `json:"variants,omitempty"` - Codec string `json:"codec,omitempty"` -} - -type IdlField struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Type IdlType `json:"type"` -} - -type IdlEnumVariantSlice []IdlEnumVariant - -type IdlEnumVariant struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Fields *IdlEnumFields `json:"fields,omitempty"` -} - -type IdlEnumFields struct { - IdlEnumFieldsNamed *IdlEnumFieldsNamed - IdlEnumFieldsTuple *IdlEnumFieldsTuple -} - -type IdlEnumFieldsNamed []IdlField - -type IdlEnumFieldsTuple []IdlType - -type IdlTypeDefStruct = []IdlField - -// Wrapper type: -type IdlType struct { - AsString IdlTypeAsString - AsIdlTypeVec *IdlTypeVec - asIdlTypeOption *IdlTypeOption - AsIdlTypeDefined *IdlTypeDefined - AsIdlTypeArray *IdlTypeArray -} -type IdlTypeAsString string - -const ( - IdlTypeBool IdlTypeAsString = "bool" - IdlTypeU8 IdlTypeAsString = "u8" - IdlTypeI8 IdlTypeAsString = "i8" - IdlTypeU16 IdlTypeAsString = "u16" - IdlTypeI16 IdlTypeAsString = "i16" - IdlTypeU32 IdlTypeAsString = "u32" - IdlTypeI32 IdlTypeAsString = "i32" - IdlTypeU64 IdlTypeAsString = "u64" - IdlTypeI64 IdlTypeAsString = "i64" - IdlTypeU128 IdlTypeAsString = "u128" - IdlTypeI128 IdlTypeAsString = "i128" - IdlTypeBytes IdlTypeAsString = "bytes" - IdlTypeString IdlTypeAsString = "string" - IdlTypePublicKey IdlTypeAsString = "publicKey" - - // Custom additions: - IdlTypeUnixTimestamp IdlTypeAsString = "unixTimestamp" - IdlTypeHash IdlTypeAsString = "hash" - IdlTypeDuration IdlTypeAsString = "duration" -) - -type IdlTypeVec struct { - Vec IdlType `json:"vec"` -} - -type IdlTypeOption struct { - Option IdlType `json:"option"` -} - -// User defined type. -type IdlTypeDefined struct { - Defined string `json:"defined"` -} - -// Wrapper type: -type IdlTypeArray struct { - Thing IdlType - Num int -} - // matches solana lp-types IndexedValue type IndexedValue []byte -type IdlTypeDefTyKind string - -const ( - IdlTypeDefTyKindStruct IdlTypeDefTyKind = "struct" - IdlTypeDefTyKindEnum IdlTypeDefTyKind = "enum" - IdlTypeDefTyKindCustom IdlTypeDefTyKind = "custom" -) - type SubKeyPaths [][]string // matches cache-filter