package
0.0.0-20241029140512-d94937b65e9e
Repository: https://github.com/dipdup-io/starknet-indexer.git
Documentation: pkg.go.dev

# README

Protocol Documentation

Table of Contents

Top

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

AddressFilter

FieldTypeLabelDescription
idIntegerFilter
only_starknetbool
heightIntegerFilter

DeclareFilters

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
versionEnumFilter
idIntegerFilter

DeployAccountFilters

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
classBytesFilter
parsed_calldataDeployAccountFilters.ParsedCalldataEntryrepeated
idIntegerFilter

DeployAccountFilters.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

DeployFilters

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
classBytesFilter
parsed_calldataDeployFilters.ParsedCalldataEntryrepeated
idIntegerFilter

DeployFilters.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

EventFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
contractBytesFilter
fromBytesFilter
nameStringFilter
parsed_dataEventFilter.ParsedDataEntryrepeated
idIntegerFilter

EventFilter.ParsedDataEntry

FieldTypeLabelDescription
keystring
valuestring

FeeFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
contractBytesFilter
callerBytesFilter
classBytesFilter
selectorEqualityFilter
entrypointStringFilter
entrypoint_typeEnumFilter
call_typeEnumFilter
parsed_calldataFeeFilter.ParsedCalldataEntryrepeated
idIntegerFilter

FeeFilter.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

InternalFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
contractBytesFilter
callerBytesFilter
classBytesFilter
selectorEqualityFilter
entrypointStringFilter
entrypoint_typeEnumFilter
call_typeEnumFilter
parsed_calldataInternalFilter.ParsedCalldataEntryrepeated
idIntegerFilter

InternalFilter.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

InvokeFilters

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
versionEnumFilter
contractBytesFilter
selectorEqualityFilter
entrypointStringFilter
parsed_calldataInvokeFilters.ParsedCalldataEntryrepeated
idIntegerFilter

InvokeFilters.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

L1HandlerFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
statusEnumFilter
contractBytesFilter
selectorEqualityFilter
entrypointStringFilter
parsed_calldataL1HandlerFilter.ParsedCalldataEntryrepeated
idIntegerFilter

L1HandlerFilter.ParsedCalldataEntry

FieldTypeLabelDescription
keystring
valuestring

MessageFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
contractBytesFilter
fromBytesFilter
toBytesFilter
selectorEqualityFilter
idIntegerFilter

StorageDiffFilter

FieldTypeLabelDescription
heightIntegerFilter
contractBytesFilter
keyEqualityFilter
idIntegerFilter

TokenBalanceFilter

FieldTypeLabelDescription
ownerBytesFilter
contractBytesFilter
token_idStringFilter

TokenFilter

FieldTypeLabelDescription
contractBytesFilter
token_idStringFilter
typeEnumStringFilter
idIntegerFilter

TransferFilter

FieldTypeLabelDescription
heightIntegerFilter
timeTimeFilter
contractBytesFilter
fromBytesFilter
toBytesFilter
token_idStringFilter
idIntegerFilter

Top

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

CallType

Call type of transactions

NameNumberDescription
CALL_TYPE_RESERVED0unused
CALL_TYPE_UNKNOWN1used only if entity has unknown call type for the system
CALL_TYPE_CALL2call
CALL_TYPE_DELEGATE3delegate call

EntrypointType

Entrypoint type of transactions

NameNumberDescription
ENTRYPOINT_TYPE_RESERVED0unused
ENTRYPOINT_TYPE_UNKNOWN1used only if entity has unknown entrypoint type for the system
ENTRYPOINT_TYPE_EXTERNAL2external entrypoint type
ENTRYPOINT_TYPE_CONSTRUCTOR3constructor entrypoint type
ENTRYPOINT_TYPE_L1_HANDLER4l1 handler entrypoint type

Status

Block status

NameNumberDescription
STATUS_RESERVED0unused
STATUS_UNKNOWN1used only if entity has unknown status for the system
STATUS_NOT_RECEIVED2not received
STATUS_RECEIVED3received
STATUS_PENDING4pending
STATUS_REJECTED5rejected
STATUS_ACCEPTED_ON_L26accepted on L2
STATUS_ACCEPTED_ON_L17accepted 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.

FieldTypeLabelDescription
fromuint64from value
touint64to value

BytesArray

Wrapper over bytes array for using repeated option

FieldTypeLabelDescription
arrbytesrepeatedarray

BytesFilter

Set of bytes filters

FieldTypeLabelDescription
eqbytesequals
inBytesArraycheck the value is in array x IN (\x00, \x0010)

EnumFilter

Set of filters for enumerations

FieldTypeLabelDescription
equint64equals
nequint64not equals
inIntegerArraycheck the value is in array x IN (1,2,3,4)
notinIntegerArraycheck the value is not in array x NOT IN (1,2,3,4)

EnumStringFilter

Set of filters for string enumerations

FieldTypeLabelDescription
eqstringequals
neqstringnot equals
inStringArraycheck the value is in array x IN (a, abc)
notinStringArraycheck the value is not in array x NOT IN (a, abc)

EqualityFilter

Equality filters

FieldTypeLabelDescription
eqstringequals
neqstringnot equals

EqualityIntegerFilter

Equality filters for integer values

FieldTypeLabelDescription
equint64equals
nequint64not equals

IntegerArray

Wrapper over integer array for using repeated option

FieldTypeLabelDescription
arruint64repeatedarray

IntegerFilter

Set of integer filters

FieldTypeLabelDescription
gtuint64greater than
gteuint64greater than or equals
ltuint64less than
lteuint64less than or equals
equint64equals
nequint64not equals
betweenBetweenIntegerbetween

StringArray

Wrapper over string array for using repeated option

FieldTypeLabelDescription
arrstringrepeatedarray

StringFilter

Set of string filters

FieldTypeLabelDescription
eqstringequals
inStringArraycheck the value is in array x IN (a, abc)

TimeFilter

Set of time filters

FieldTypeLabelDescription
gtuint64greater than
gteuint64greater than or equals
ltuint64less than
lteuint64less than or equals
betweenBetweenIntegerbetween

Top

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

Bytes

Bytes array

FieldTypeLabelDescription
databytesarray

JsonSchema

Json schema entity

FieldTypeLabelDescription
functionsJsonSchemaItemrepeatedlist of functions json schema
l1_handlersJsonSchemaItemrepeatedlist of l1 handlers json schema
constructorsJsonSchemaItemrepeatedlist of contructors json schema
eventsJsonSchemaItemrepeatedlist of events json schema
structsJsonSchemaItemrepeatedlist of declared structures json schema

JsonSchemaItem

Json schema item

FieldTypeLabelDescription
namestringname of json schema item
schemabytesjson schema

ProxyRequest

Request message for GetProxy method

FieldTypeLabelDescription
hashBytes
selectorBytes

SubscribeRequest

List of requested subscriptions

FieldTypeLabelDescription
headbool
invokesInvokeFiltersrepeated
declaresDeclareFiltersrepeated
deploysDeployFiltersrepeated
deploy_accountsDeployAccountFiltersrepeated
l1_handlersL1HandlerFilterrepeated
internalsInternalFilterrepeated
feesFeeFilterrepeated
eventsEventFilterrepeated
msgsMessageFilterrepeated
transfersTransferFilterrepeated
storage_diffsStorageDiffFilterrepeated
token_balancesTokenBalanceFilterrepeated
tokensTokenFilterrepeated
addressesAddressFilterrepeated

Subscription

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

FieldTypeLabelDescription
responseSubscribeResponsemessage containing subscription id
blockBlock
declareDeclare
deployDeploy
deploy_accountDeployAccount
eventEvent
feeFee
internalInternal
invokeInvoke
l1_handlerL1Handler
messageStarknetMessage
storage_diffStorageDiff
token_balanceTokenBalance
transferTransfer
tokenToken
addressAddress
end_of_blockEndOfBlockmessage which signals about block data ends

IndexerService

Desription of server interface

Method NameRequest TypeResponse TypeDescription
SubscribeSubscribeRequestSubscription streamSubscribe to live notification from indexer
UnsubscribeUnsubscribeRequestUnsubscribeResponseUnsubscribe from live notification from indexer
JSONSchemaForClassBytesBytesReceives JSON schema of class ABI by class hash
JSONSchemaForContractBytesBytesReceives JSON schema of class ABI by contract hash
GetProxyProxyRequestProxyReceives entity under proxy if it exists

Top

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

Address

FieldTypeLabelDescription
iduint64
hashbytes
class_iduint64optional
heightuint64

Block

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
versionstring
tx_countuint64
invokes_countuint64
declares_countuint64
deploys_countuint64
deploy_account_countuint64
l1_handlers_countuint64
storage_diffs_countuint64
statusuint64
hashbytes
parent_hashbytes
new_rootbytes
sequencer_addressbytes

Class

FieldTypeLabelDescription
iduint64
hashbytes

Declare

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
versionuint64
positionuint64
senderAddressoptional
contractAddressoptional
statusuint64
classClass
hashbytes
max_feestring
noncestring

Deploy

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
positionuint64
contractAddress
statusuint64
classClass
hashbytes
saltbytes
calldatastringrepeated
parsed_calldatabytes

DeployAccount

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
positionuint64
contractAddress
statusuint64
classClass
hashbytes
saltbytes
max_feestring
noncestring
calldatastringrepeated
parsed_calldatabytes

EndOfBlock

FieldTypeLabelDescription
heightuint64

Event

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
orderuint64
contractAddress
fromAddress
keysstringrepeated
datastringrepeated
namestring
parsed_databytes

Fee

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
contractAddress
callerAddress
classClass
selectorbytes
entrypoint_typeuint64
call_typeuint64
calldatastringrepeated
resultstringrepeated
entrypointstring
parsed_calldatabytes

Internal

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
statusuint64
hashbytes
contractAddress
callerAddress
classClass
selectorbytes
entrypoint_typeuint64
call_typeuint64
calldatastringrepeated
resultstringrepeated
entrypointstring
parsed_calldatabytes
parsed_resultbytes

Invoke

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
statusuint64
hashbytes
versionuint64
positionuint64
contractAddress
selectorbytes
max_feestring
noncestring
calldatastringrepeated
entrypointstring
parsed_calldatabytes

L1Handler

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
statusuint64
hashbytes
positionuint64
contractAddress
selectorbytes
max_feestring
noncestring
calldatastringrepeated
entrypointstring
parsed_calldatabytes

Proxy

FieldTypeLabelDescription
iduint64
hashbytes
typeuint32

StarknetMessage

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
contractAddress
fromAddress
toAddress
selectorstring
noncestring
payloadstringrepeated

StorageDiff

FieldTypeLabelDescription
iduint64
heightuint64
contractAddress
keybytes
valuebytes

Token

FieldTypeLabelDescription
iduint64
first_heightuint64
contractAddress
token_idstring
typestring

TokenBalance

FieldTypeLabelDescription
ownerAddress
contractAddress
token_idstring
balancestring

Transfer

FieldTypeLabelDescription
iduint64
heightuint64
timeuint64
contractAddress
fromAddress
toAddress
amountstring
token_idstring

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)

# Packages

No description provided by the author
No description provided by the author

# Functions

Address -.
Block -.
Class -.
Declare -.
Deploy -.
DeployAccount -.
EndOfBlock -.
Event -.
Fee -.
Internal -.
Invoke -.
L1Handler -.
Message -.
NewClient -.
NewClientWithServerAddress -.
NewServer -.
NewStream -.
StorageDiff -.
SubscriptionAddress -.
SubscriptionBlock -.
SubscriptionDeclare -.
SubscriptionDeploy -.
SubscriptionDeployAccount -.
SubscriptionEnd -.
SubscriptionEvent -.
SubscriptionFee -.
SubscriptionInternal -.
SubscriptionInvoke -.
SubscriptionL1Handler -.
SubscriptionMessage -.
SubscriptionStorageDiff -.
SubscriptionToken -.
SubscriptionTokenBalance -.
SubscriptionTransfer -.
Token -.
TokenBalance -.
Transfer -.

# Constants

input names.
No description provided by the author
No description provided by the author

# Structs

AddressFilter -.
BetweenInteger -.
BytesFilter -.
Client -.
ClientConfig -.
DeclareFilters -.
DeployAccountFilters -.
DeployFilters -.
EnumFilter -.
EnumStringFilter -.
EqualityFilter -.
EventFilter -.
FeeFilters -.
IntegerFilter -.
InternalFilters -.
InvokeFilters -.
L1HandlerFilters -.
MessageFilter -.
Server -.
StorageDiffFilter -.
Stream -.
StringFilter -.
Subscription -.
TimeFilter -.
TokenBalanceFilter -.
TokenFilter -.
TransferFilter -.

# Type aliases

Bytes -.