grpc

package
v0.0.0-...-5c1b0c9 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 20 Imported by: 2

README

Protocol Documentation

Table of Contents

Top

github.com/dipdup-io/starknet-indexer/pkg/grpc/proto/entity_filters.proto

AddressFilter
Field Type Label Description
id IntegerFilter
only_starknet bool
height IntegerFilter

DeclareFilters
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
version EnumFilter
id IntegerFilter

DeployAccountFilters
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
class BytesFilter
parsed_calldata DeployAccountFilters.ParsedCalldataEntry repeated
id IntegerFilter

DeployAccountFilters.ParsedCalldataEntry
Field Type Label Description
key string
value string

DeployFilters
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
class BytesFilter
parsed_calldata DeployFilters.ParsedCalldataEntry repeated
id IntegerFilter

DeployFilters.ParsedCalldataEntry
Field Type Label Description
key string
value string

EventFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
contract BytesFilter
from BytesFilter
name StringFilter
parsed_data EventFilter.ParsedDataEntry repeated
id IntegerFilter

EventFilter.ParsedDataEntry
Field Type Label Description
key string
value string

FeeFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
contract BytesFilter
caller BytesFilter
class BytesFilter
selector EqualityFilter
entrypoint StringFilter
entrypoint_type EnumFilter
call_type EnumFilter
parsed_calldata FeeFilter.ParsedCalldataEntry repeated
id IntegerFilter

FeeFilter.ParsedCalldataEntry
Field Type Label Description
key string
value string

InternalFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
contract BytesFilter
caller BytesFilter
class BytesFilter
selector EqualityFilter
entrypoint StringFilter
entrypoint_type EnumFilter
call_type EnumFilter
parsed_calldata InternalFilter.ParsedCalldataEntry repeated
id IntegerFilter

InternalFilter.ParsedCalldataEntry
Field Type Label Description
key string
value string

InvokeFilters
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
version EnumFilter
contract BytesFilter
selector EqualityFilter
entrypoint StringFilter
parsed_calldata InvokeFilters.ParsedCalldataEntry repeated
id IntegerFilter

InvokeFilters.ParsedCalldataEntry
Field Type Label Description
key string
value string

L1HandlerFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
status EnumFilter
contract BytesFilter
selector EqualityFilter
entrypoint StringFilter
parsed_calldata L1HandlerFilter.ParsedCalldataEntry repeated
id IntegerFilter

L1HandlerFilter.ParsedCalldataEntry
Field Type Label Description
key string
value string

MessageFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
contract BytesFilter
from BytesFilter
to BytesFilter
selector EqualityFilter
id IntegerFilter

StorageDiffFilter
Field Type Label Description
height IntegerFilter
contract BytesFilter
key EqualityFilter
id IntegerFilter

TokenBalanceFilter
Field Type Label Description
owner BytesFilter
contract BytesFilter
token_id StringFilter

TokenFilter
Field Type Label Description
contract BytesFilter
token_id StringFilter
type EnumStringFilter
id IntegerFilter

TransferFilter
Field Type Label Description
height IntegerFilter
time TimeFilter
contract BytesFilter
from BytesFilter
to BytesFilter
token_id StringFilter
id IntegerFilter

Top

github.com/dipdup-io/starknet-indexer/pkg/grpc/proto/enum.proto

CallType

Call type of transactions

Name Number Description
CALL_TYPE_RESERVED 0 unused
CALL_TYPE_UNKNOWN 1 used only if entity has unknown call type for the system
CALL_TYPE_CALL 2 call
CALL_TYPE_DELEGATE 3 delegate call

EntrypointType

Entrypoint type of transactions

Name Number Description
ENTRYPOINT_TYPE_RESERVED 0 unused
ENTRYPOINT_TYPE_UNKNOWN 1 used only if entity has unknown entrypoint type for the system
ENTRYPOINT_TYPE_EXTERNAL 2 external entrypoint type
ENTRYPOINT_TYPE_CONSTRUCTOR 3 constructor entrypoint type
ENTRYPOINT_TYPE_L1_HANDLER 4 l1 handler entrypoint type

Status

Block status

Name Number Description
STATUS_RESERVED 0 unused
STATUS_UNKNOWN 1 used only if entity has unknown status for the system
STATUS_NOT_RECEIVED 2 not received
STATUS_RECEIVED 3 received
STATUS_PENDING 4 pending
STATUS_REJECTED 5 rejected
STATUS_ACCEPTED_ON_L2 6 accepted on L2
STATUS_ACCEPTED_ON_L1 7 accepted on L1

Top

github.com/dipdup-io/starknet-indexer/pkg/grpc/proto/filters.proto

BetweenInteger

Between unsigned interger filter. Equals to SQL expression: x BETWEEN from AND to.

Field Type Label Description
from uint64 from value
to uint64 to value

BytesArray

Wrapper over bytes array for using repeated option

Field Type Label Description
arr bytes repeated array

BytesFilter

Set of bytes filters

Field Type Label Description
eq bytes equals
in BytesArray check the value is in array x IN (\x00, \x0010)

EnumFilter

Set of filters for enumerations

Field Type Label Description
eq uint64 equals
neq uint64 not equals
in IntegerArray check the value is in array x IN (1,2,3,4)
notin IntegerArray check the value is not in array x NOT IN (1,2,3,4)

EnumStringFilter

Set of filters for string enumerations

Field Type Label Description
eq string equals
neq string not equals
in StringArray check the value is in array x IN (a, abc)
notin StringArray check the value is not in array x NOT IN (a, abc)

EqualityFilter

Equality filters

Field Type Label Description
eq string equals
neq string not equals

EqualityIntegerFilter

Equality filters for integer values

Field Type Label Description
eq uint64 equals
neq uint64 not equals

IntegerArray

Wrapper over integer array for using repeated option

Field Type Label Description
arr uint64 repeated array

IntegerFilter

Set of integer filters

Field Type Label Description
gt uint64 greater than
gte uint64 greater than or equals
lt uint64 less than
lte uint64 less than or equals
eq uint64 equals
neq uint64 not equals
between BetweenInteger between

StringArray

Wrapper over string array for using repeated option

Field Type Label Description
arr string repeated array

StringFilter

Set of string filters

Field Type Label Description
eq string equals
in StringArray check the value is in array x IN (a, abc)

TimeFilter

Set of time filters

Field Type Label Description
gt uint64 greater than
gte uint64 greater than or equals
lt uint64 less than
lte uint64 less than or equals
between BetweenInteger between

Top

github.com/dipdup-io/starknet-indexer/pkg/grpc/proto/indexer.proto

Bytes

Bytes array

Field Type Label Description
data bytes array

JsonSchema

Json schema entity

Field Type Label Description
functions JsonSchemaItem repeated list of functions json schema
l1_handlers JsonSchemaItem repeated list of l1 handlers json schema
constructors JsonSchemaItem repeated list of contructors json schema
events JsonSchemaItem repeated list of events json schema
structs JsonSchemaItem repeated list of declared structures json schema

JsonSchemaItem

Json schema item

Field Type Label Description
name string name of json schema item
schema bytes json schema

ProxyRequest

Request message for GetProxy method

Field Type Label Description
hash Bytes
selector Bytes

SubscribeRequest

List of requested subscriptions

Field Type Label Description
head bool
invokes InvokeFilters repeated
declares DeclareFilters repeated
deploys DeployFilters repeated
deploy_accounts DeployAccountFilters repeated
l1_handlers L1HandlerFilter repeated
internals InternalFilter repeated
fees FeeFilter repeated
events EventFilter repeated
msgs MessageFilter repeated
transfers TransferFilter repeated
storage_diffs StorageDiffFilter repeated
token_balances TokenBalanceFilter repeated
tokens TokenFilter repeated
addresses AddressFilter repeated

Subscription

Subscription entity. It contains subscription id and subscription's live notifications. It's response on Subscribe request.

Field Type Label Description
response SubscribeResponse message containing subscription id
block Block
declare Declare
deploy Deploy
deploy_account DeployAccount
event Event
fee Fee
internal Internal
invoke Invoke
l1_handler L1Handler
message StarknetMessage
storage_diff StorageDiff
token_balance TokenBalance
transfer Transfer
token Token
address Address
end_of_block EndOfBlock message which signals about block data ends

IndexerService

Description of server interface

Method Name Request Type Response Type Description
Subscribe SubscribeRequest Subscription stream Subscribe to live notification from indexer
Unsubscribe UnsubscribeRequest UnsubscribeResponse Unsubscribe from live notification from indexer
JSONSchemaForClass Bytes Bytes Receives JSON schema of class ABI by class hash
JSONSchemaForContract Bytes Bytes Receives JSON schema of class ABI by contract hash
GetProxy ProxyRequest Proxy Receives entity under proxy if it exists

Top

github.com/dipdup-io/starknet-indexer/pkg/grpc/proto/response.proto

Address
Field Type Label Description
id uint64
hash bytes
class_id uint64 optional
height uint64

Block
Field Type Label Description
id uint64
height uint64
time uint64
version string
tx_count uint64
invokes_count uint64
declares_count uint64
deploys_count uint64
deploy_account_count uint64
l1_handlers_count uint64
storage_diffs_count uint64
status uint64
hash bytes
parent_hash bytes
new_root bytes
sequencer_address bytes

Class
Field Type Label Description
id uint64
hash bytes

Declare
Field Type Label Description
id uint64
height uint64
time uint64
version uint64
position uint64
sender Address optional
contract Address optional
status uint64
class Class
hash bytes
max_fee string
nonce string

Deploy
Field Type Label Description
id uint64
height uint64
time uint64
position uint64
contract Address
status uint64
class Class
hash bytes
salt bytes
calldata string repeated
parsed_calldata bytes

DeployAccount
Field Type Label Description
id uint64
height uint64
time uint64
position uint64
contract Address
status uint64
class Class
hash bytes
salt bytes
max_fee string
nonce string
calldata string repeated
parsed_calldata bytes

EndOfBlock
Field Type Label Description
height uint64

Event
Field Type Label Description
id uint64
height uint64
time uint64
order uint64
contract Address
from Address
keys string repeated
data string repeated
name string
parsed_data bytes

Fee
Field Type Label Description
id uint64
height uint64
time uint64
contract Address
caller Address
class Class
selector bytes
entrypoint_type uint64
call_type uint64
calldata string repeated
result string repeated
entrypoint string
parsed_calldata bytes

Internal
Field Type Label Description
id uint64
height uint64
time uint64
status uint64
hash bytes
contract Address
caller Address
class Class
selector bytes
entrypoint_type uint64
call_type uint64
calldata string repeated
result string repeated
entrypoint string
parsed_calldata bytes
parsed_result bytes

Invoke
Field Type Label Description
id uint64
height uint64
time uint64
status uint64
hash bytes
version uint64
position uint64
contract Address
selector bytes
max_fee string
nonce string
calldata string repeated
entrypoint string
parsed_calldata bytes

L1Handler
Field Type Label Description
id uint64
height uint64
time uint64
status uint64
hash bytes
position uint64
contract Address
selector bytes
max_fee string
nonce string
calldata string repeated
entrypoint string
parsed_calldata bytes

Proxy
Field Type Label Description
id uint64
hash bytes
type uint32

StarknetMessage
Field Type Label Description
id uint64
height uint64
time uint64
contract Address
from Address
to Address
selector string
nonce string
payload string repeated

StorageDiff
Field Type Label Description
id uint64
height uint64
contract Address
key bytes
value bytes

Token
Field Type Label Description
id uint64
first_height uint64
contract Address
token_id string
type string

TokenBalance
Field Type Label Description
owner Address
contract Address
token_id string
balance string

Transfer
Field Type Label Description
id uint64
height uint64
time uint64
contract Address
from Address
to Address
amount string
token_id string

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Documentation

Index

Constants

View Source
const (
	OutputMessages = "messages"
	ModuleName     = "layer1_grpc_client"
)
View Source
const (
	InputBlocks = "blocks"
)

input names

Variables

This section is empty.

Functions

func Address

func Address(model *storage.Address) *pb.Address

Address -

func Block

func Block(block *storage.Block) *pb.Block

Block -

func Class

func Class(model *storage.Class) *pb.Class

Class -

func Declare

func Declare(model *storage.Declare) *pb.Declare

Declare -

func Deploy

func Deploy(model *storage.Deploy) *pb.Deploy

Deploy -

func DeployAccount

func DeployAccount(model *storage.DeployAccount) *pb.DeployAccount

DeployAccount -

func EndOfBlock

func EndOfBlock(model *subscriptions.EndOfBlock) *pb.EndOfBlock

EndOfBlock -

func Event

func Event(model *storage.Event) *pb.Event

Event -

func Fee

func Fee(model *storage.Fee) *pb.Fee

Fee -

func Internal

func Internal(model *storage.Internal) *pb.Internal

Internal -

func Invoke

func Invoke(model *storage.Invoke) *pb.Invoke

Invoke -

func L1Handler

func L1Handler(model *storage.L1Handler) *pb.L1Handler

L1Handler -

func Message

func Message(model *storage.Message) *pb.StarknetMessage

Message -

func StorageDiff

func StorageDiff(model *storage.StorageDiff) *pb.StorageDiff

StorageDiff -

func SubscriptionAddress

func SubscriptionAddress(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionAddress -

func SubscriptionBlock

func SubscriptionBlock(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionBlock -

func SubscriptionDeclare

func SubscriptionDeclare(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionDeclare -

func SubscriptionDeploy

func SubscriptionDeploy(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionDeploy -

func SubscriptionDeployAccount

func SubscriptionDeployAccount(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionDeployAccount -

func SubscriptionEnd

func SubscriptionEnd(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionEnd -

func SubscriptionEvent

func SubscriptionEvent(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionEvent -

func SubscriptionFee

func SubscriptionFee(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionFee -

func SubscriptionInternal

func SubscriptionInternal(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionInternal -

func SubscriptionInvoke

func SubscriptionInvoke(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionInvoke -

func SubscriptionL1Handler

func SubscriptionL1Handler(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionL1Handler -

func SubscriptionMessage

func SubscriptionMessage(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionMessage -

func SubscriptionStorageDiff

func SubscriptionStorageDiff(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionStorageDiff -

func SubscriptionToken

func SubscriptionToken(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionToken -

func SubscriptionTokenBalance

func SubscriptionTokenBalance(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionTokenBalance -

func SubscriptionTransfer

func SubscriptionTransfer(id uint64, msg *subscriptions.Message) *pb.Subscription

SubscriptionTransfer -

func Token

func Token(model *storage.Token) *pb.Token

Token -

func TokenBalance

func TokenBalance(model *storage.TokenBalance) *pb.TokenBalance

TokenBalance -

func Transfer

func Transfer(model *storage.Transfer) *pb.Transfer

Transfer -

Types

type AddressFilter

type AddressFilter struct {
	Id           *IntegerFilter `yaml:"id" validate:"omitempty"`
	Height       *IntegerFilter `yaml:"height" validate:"omitempty"`
	OnlyStarknet bool           `yaml:"only_starknet" validate:"omitempty"`
}

AddressFilter -

func (AddressFilter) ToGrpcFilter

func (f AddressFilter) ToGrpcFilter() *pb.AddressFilter

ToGrpcFilter -

type BetweenInteger

type BetweenInteger struct {
	From uint64 `yaml:"from" validate:"required"`
	To   uint64 `yaml:"to" validate:"required"`
}

BetweenInteger -

func (BetweenInteger) ToGrpcFilter

func (f BetweenInteger) ToGrpcFilter() *pb.BetweenInteger

ToGrpcFilter -

type Bytes

type Bytes []byte

Bytes -

func (*Bytes) UnmarshalYAML

func (b *Bytes) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML -

type BytesFilter

type BytesFilter struct {
	Eq Bytes   `yaml:"eq" validate:"omitempty"`
	In []Bytes `yaml:"in" validate:"omitempty"`
}

BytesFilter -

func (BytesFilter) ToGrpcFilter

func (f BytesFilter) ToGrpcFilter() *pb.BytesFilter

ToGrpcFilter -

type Client

type Client struct {
	modules.BaseModule
	// contains filtered or unexported fields
}

Client -

func NewClient

func NewClient(cfg ClientConfig) *Client

NewClient -

func NewClientWithServerAddress

func NewClientWithServerAddress(address string) *Client

NewClientWithServerAddress -

func (*Client) Close

func (client *Client) Close() error

Close - closes client

func (*Client) Connect

func (client *Client) Connect(ctx context.Context, opts ...grpcSDK.ConnectOption) error

Connect -

func (*Client) GetProxy

func (client *Client) GetProxy(ctx context.Context, hash, selector []byte) (*pb.Proxy, error)

GetProxy -

func (*Client) JsonSchemaForClass

func (client *Client) JsonSchemaForClass(ctx context.Context, req *pb.Bytes) (*pb.Bytes, error)

JsonSchemaForClass -

func (*Client) JsonSchemaForContract

func (client *Client) JsonSchemaForContract(ctx context.Context, req *pb.Bytes) (*pb.Bytes, error)

JsonSchemaForContract -

func (*Client) Reconnect

func (client *Client) Reconnect() <-chan uint64

Reconnect -

func (*Client) Start

func (client *Client) Start(ctx context.Context)

Start -

func (*Client) Subscribe

func (client *Client) Subscribe(ctx context.Context, req *pb.SubscribeRequest) (uint64, error)

Subscribe -

func (*Client) Unsubscribe

func (client *Client) Unsubscribe(ctx context.Context, id uint64) error

Unsubscribe -

type ClientConfig

type ClientConfig struct {
	ServerAddress string                  `yaml:"server_address" validate:"required"`
	Subscriptions map[string]Subscription `yaml:"subscriptions" validate:"omitempty"`
}

ClientConfig -

type DeclareFilters

type DeclareFilters struct {
	Height  *IntegerFilter `yaml:"height" validate:"omitempty"`
	Time    *TimeFilter    `yaml:"time" validate:"omitempty"`
	Status  *EnumFilter    `yaml:"status" validate:"omitempty"`
	Version *EnumFilter    `yaml:"version" validate:"omitempty"`
	Id      *IntegerFilter `yaml:"id" validate:"omitempty"`
}

DeclareFilters -

func (DeclareFilters) ToGrpcFilter

func (f DeclareFilters) ToGrpcFilter() *pb.DeclareFilters

ToGrpcFilter -

type DeployAccountFilters

type DeployAccountFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Class          *BytesFilter      `yaml:"class" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

DeployAccountFilters -

func (DeployAccountFilters) ToGrpcFilter

func (f DeployAccountFilters) ToGrpcFilter() *pb.DeployAccountFilters

ToGrpcFilter -

type DeployFilters

type DeployFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Class          *BytesFilter      `yaml:"class" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

DeployFilters -

func (DeployFilters) ToGrpcFilter

func (f DeployFilters) ToGrpcFilter() *pb.DeployFilters

ToGrpcFilter -

type EnumFilter

type EnumFilter struct {
	Eq    uint64   `yaml:"eq" validate:"omitempty"`
	Neq   uint64   `yaml:"neq" validate:"omitempty"`
	In    []uint64 `yaml:"in" validate:"omitempty"`
	Notin []uint64 `yaml:"notin" validate:"omitempty"`
}

EnumFilter -

func (EnumFilter) ToGrpcFilter

func (f EnumFilter) ToGrpcFilter() *pb.EnumFilter

ToGrpcFilter -

type EnumStringFilter

type EnumStringFilter struct {
	Eq    string   `yaml:"eq" validate:"omitempty"`
	Neq   string   `yaml:"neq" validate:"omitempty"`
	In    []string `yaml:"in" validate:"omitempty"`
	Notin []string `yaml:"notin" validate:"omitempty"`
}

EnumStringFilter -

func (EnumStringFilter) ToGrpcFilter

func (f EnumStringFilter) ToGrpcFilter() *pb.EnumStringFilter

ToGrpcFilter -

type EqualityFilter

type EqualityFilter struct {
	Eq  string `yaml:"eq" validate:"omitempty"`
	Neq string `yaml:"neq" validate:"omitempty"`
}

EqualityFilter -

func (EqualityFilter) ToGrpcFilter

func (f EqualityFilter) ToGrpcFilter() *pb.EqualityFilter

ToGrpcFilter -

type EventFilter

type EventFilter struct {
	Height     *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time       *TimeFilter       `yaml:"time" validate:"omitempty"`
	Contract   *BytesFilter      `yaml:"contract" validate:"omitempty"`
	From       *BytesFilter      `yaml:"from" validate:"omitempty"`
	Name       *StringFilter     `yaml:"name" validate:"omitempty"`
	ParsedData map[string]string `yaml:"parsed_data" validate:"omitempty"`
	Id         *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

EventFilter -

func (EventFilter) ToGrpcFilter

func (f EventFilter) ToGrpcFilter() *pb.EventFilter

ToGrpcFilter -

type FeeFilters

type FeeFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Contract       *BytesFilter      `yaml:"contract" validate:"omitempty"`
	Caller         *BytesFilter      `yaml:"caller" validate:"omitempty"`
	Class          *BytesFilter      `yaml:"class" validate:"omitempty"`
	Selector       *EqualityFilter   `yaml:"selector" validate:"omitempty"`
	Entrypoint     *StringFilter     `yaml:"entrypoint" validate:"omitempty"`
	EntrypointType *EnumFilter       `yaml:"entrypoint_type" validate:"omitempty"`
	CallType       *EnumFilter       `yaml:"call_type" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

FeeFilters -

func (FeeFilters) ToGrpcFilter

func (f FeeFilters) ToGrpcFilter() *pb.FeeFilter

ToGrpcFilter -

type IntegerFilter

type IntegerFilter struct {
	Gt      uint64          `yaml:"gt" validate:"omitempty"`
	Gte     uint64          `yaml:"gte" validate:"omitempty"`
	Lt      uint64          `yaml:"lt" validate:"omitempty"`
	Lte     uint64          `yaml:"lte" validate:"omitempty"`
	Eq      uint64          `yaml:"eq" validate:"omitempty"`
	Neq     uint64          `yaml:"neq" validate:"omitempty"`
	Between *BetweenInteger `yaml:"between" validate:"omitempty"`
}

IntegerFilter -

func (IntegerFilter) ToGrpcFilter

func (f IntegerFilter) ToGrpcFilter() *pb.IntegerFilter

ToGrpcFilter -

type InternalFilters

type InternalFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Contract       *BytesFilter      `yaml:"contract" validate:"omitempty"`
	Caller         *BytesFilter      `yaml:"caller" validate:"omitempty"`
	Class          *BytesFilter      `yaml:"class" validate:"omitempty"`
	Selector       *EqualityFilter   `yaml:"selector" validate:"omitempty"`
	Entrypoint     *StringFilter     `yaml:"entrypoint" validate:"omitempty"`
	EntrypointType *EnumFilter       `yaml:"entrypoint_type" validate:"omitempty"`
	CallType       *EnumFilter       `yaml:"call_type" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

InternalFilters -

func (InternalFilters) ToGrpcFilter

func (f InternalFilters) ToGrpcFilter() *pb.InternalFilter

ToGrpcFilter -

type InvokeFilters

type InvokeFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Version        *EnumFilter       `yaml:"version" validate:"omitempty"`
	Contract       *BytesFilter      `yaml:"contract" validate:"omitempty"`
	Selector       *EqualityFilter   `yaml:"selector" validate:"omitempty"`
	Entrypoint     *StringFilter     `yaml:"entrypoint" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

InvokeFilters -

func (InvokeFilters) ToGrpcFilter

func (f InvokeFilters) ToGrpcFilter() *pb.InvokeFilters

ToGrpcFilter -

type L1HandlerFilters

type L1HandlerFilters struct {
	Height         *IntegerFilter    `yaml:"height" validate:"omitempty"`
	Time           *TimeFilter       `yaml:"time" validate:"omitempty"`
	Status         *EnumFilter       `yaml:"status" validate:"omitempty"`
	Contract       *BytesFilter      `yaml:"contract" validate:"omitempty"`
	Selector       *EqualityFilter   `yaml:"selector" validate:"omitempty"`
	Entrypoint     *StringFilter     `yaml:"entrypoint" validate:"omitempty"`
	ParsedCalldata map[string]string `yaml:"parsed_calldata" validate:"omitempty"`
	Id             *IntegerFilter    `yaml:"id" validate:"omitempty"`
}

L1HandlerFilters -

func (L1HandlerFilters) ToGrpcFilter

func (f L1HandlerFilters) ToGrpcFilter() *pb.L1HandlerFilter

ToGrpcFilter -

type MessageFilter

type MessageFilter struct {
	Height   *IntegerFilter  `yaml:"height" validate:"omitempty"`
	Time     *TimeFilter     `yaml:"time" validate:"omitempty"`
	Contract *BytesFilter    `yaml:"contract" validate:"omitempty"`
	From     *BytesFilter    `yaml:"from" validate:"omitempty"`
	To       *BytesFilter    `yaml:"to" validate:"omitempty"`
	Selector *EqualityFilter `yaml:"selector" validate:"omitempty"`
	Id       *IntegerFilter  `yaml:"id" validate:"omitempty"`
}

MessageFilter -

func (MessageFilter) ToGrpcFilter

func (f MessageFilter) ToGrpcFilter() *pb.MessageFilter

ToGrpcFilter -

type Server

type Server struct {
	modules.BaseModule
	pb.UnimplementedIndexerServiceServer

	GRPC *grpcSDK.Server
	// contains filtered or unexported fields
}

Server -

func NewServer

func NewServer(
	cfg *grpcSDK.ServerConfig,
	db postgres.Storage,
) (*Server, error)

NewServer -

func (*Server) Close

func (module *Server) Close() error

Close -

func (*Server) GetProxy

func (module *Server) GetProxy(ctx context.Context, req *pb.ProxyRequest) (*pb.Proxy, error)

GetProxy -

func (*Server) JSONSchemaForClass

func (module *Server) JSONSchemaForClass(ctx context.Context, req *pb.Bytes) (*pb.Bytes, error)

JSONSchemaForClass -

func (*Server) JSONSchemaForContract

func (module *Server) JSONSchemaForContract(ctx context.Context, req *pb.Bytes) (*pb.Bytes, error)

JSONSchemaForContract -

func (*Server) Start

func (module *Server) Start(ctx context.Context)

Start -

func (*Server) Subscribe

func (module *Server) Subscribe(req *pb.SubscribeRequest, stream pb.IndexerService_SubscribeServer) error

Subscribe -

func (*Server) Unsubscribe

Unsubscribe -

type StorageDiffFilter

type StorageDiffFilter struct {
	Height   *IntegerFilter  `yaml:"height" validate:"omitempty"`
	Contract *BytesFilter    `yaml:"contract" validate:"omitempty"`
	Key      *EqualityFilter `yaml:"key" validate:"omitempty"`
	Id       *IntegerFilter  `yaml:"id" validate:"omitempty"`
}

StorageDiffFilter -

func (StorageDiffFilter) ToGrpcFilter

func (f StorageDiffFilter) ToGrpcFilter() *pb.StorageDiffFilter

ToGrpcFilter -

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

Stream -

func NewStream

func NewStream(stream *grpcSDK.Stream[pb.Subscription], request *pb.SubscribeRequest, id uint64) *Stream

NewStream -

type StringFilter

type StringFilter struct {
	Eq string   `yaml:"eq" validate:"omitempty"`
	In []string `yaml:"in" validate:"omitempty"`
}

StringFilter -

func (StringFilter) ToGrpcFilter

func (f StringFilter) ToGrpcFilter() *pb.StringFilter

ToGrpcFilter -

type Subscription

type Subscription struct {
	Head                 bool                    `yaml:"head" validate:"omitempty"`
	InvokeFilters        []*InvokeFilters        `yaml:"invokes" validate:"omitempty"`
	DeclareFilters       []*DeclareFilters       `yaml:"declares" validate:"omitempty"`
	DeployFilters        []*DeployFilters        `yaml:"deploys" validate:"omitempty"`
	DeployAccountFilters []*DeployAccountFilters `yaml:"deploy_accounts" validate:"omitempty"`
	L1HandlerFilter      []*L1HandlerFilters     `yaml:"l1_handlers" validate:"omitempty"`
	InternalFilter       []*InternalFilters      `yaml:"internals" validate:"omitempty"`
	FeeFilter            []*FeeFilters           `yaml:"fees" validate:"omitempty"`
	EventFilter          []*EventFilter          `yaml:"events" validate:"omitempty"`
	MessageFilter        []*MessageFilter        `yaml:"messages" validate:"omitempty"`
	TransferFilter       []*TransferFilter       `yaml:"transfers" validate:"omitempty"`
	StorageDiffFilter    []*StorageDiffFilter    `yaml:"storage_diffs" validate:"omitempty"`
	TokenBalanceFilter   []*TokenBalanceFilter   `yaml:"token_balances" validate:"omitempty"`
	AddressFilter        []*AddressFilter        `yaml:"addresses" validate:"omitempty"`
	TokenFilter          []*TokenFilter          `yaml:"tokens" validate:"omitempty"`
}

Subscription -

func (Subscription) ToGrpcFilter

func (f Subscription) ToGrpcFilter() *pb.SubscribeRequest

ToGrpcFilter -

type TimeFilter

type TimeFilter struct {
	Gt      uint64          `yaml:"gt" validate:"omitempty"`
	Gte     uint64          `yaml:"gte" validate:"omitempty"`
	Lt      uint64          `yaml:"lt" validate:"omitempty"`
	Lte     uint64          `yaml:"lte" validate:"omitempty"`
	Between *BetweenInteger `yaml:"between" validate:"omitempty"`
}

TimeFilter -

func (TimeFilter) ToGrpcFilter

func (f TimeFilter) ToGrpcFilter() *pb.TimeFilter

ToGrpcFilter -

type TokenBalanceFilter

type TokenBalanceFilter struct {
	Owner    *BytesFilter  `yaml:"owner" validate:"omitempty"`
	Contract *BytesFilter  `yaml:"contract" validate:"omitempty"`
	TokenId  *StringFilter `yaml:"token_id" validate:"omitempty"`
}

TokenBalanceFilter -

func (TokenBalanceFilter) ToGrpcFilter

func (f TokenBalanceFilter) ToGrpcFilter() *pb.TokenBalanceFilter

ToGrpcFilter -

type TokenFilter

type TokenFilter struct {
	TokenId  *StringFilter     `yaml:"token_id" validate:"omitempty"`
	Contract *BytesFilter      `yaml:"contract" validate:"omitempty"`
	Id       *IntegerFilter    `yaml:"id" validate:"omitempty"`
	Type     *EnumStringFilter `yaml:"type" validate:"omitempty"`
}

TokenFilter -

func (TokenFilter) ToGrpcFilter

func (f TokenFilter) ToGrpcFilter() *pb.TokenFilter

ToGrpcFilter -

type TransferFilter

type TransferFilter struct {
	Height   *IntegerFilter `yaml:"height" validate:"omitempty"`
	Time     *TimeFilter    `yaml:"time" validate:"omitempty"`
	Contract *BytesFilter   `yaml:"contract" validate:"omitempty"`
	From     *BytesFilter   `yaml:"from" validate:"omitempty"`
	To       *BytesFilter   `yaml:"to" validate:"omitempty"`
	TokenId  *StringFilter  `yaml:"token_id" validate:"omitempty"`
	Id       *IntegerFilter `yaml:"id" validate:"omitempty"`
}

TransferFilter -

func (TransferFilter) ToGrpcFilter

func (f TransferFilter) ToGrpcFilter() *pb.TransferFilter

ToGrpcFilter -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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