Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Models = []storage.Model{ &State{}, &Address{}, &StarknetId{}, &Domain{}, &Subdomain{}, &Field{}, }
Models - list all models
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { bun.BaseModel `bun:"address" comment:"Address table"` Id uint64 `bun:"id,notnull,type:bigint,pk" comment:"Unique internal identity"` Hash []byte `comment:"Starknet hash address"` Height uint64 `comment:"Block number of the first address occurrence."` ClassId *uint64 `bun:",nullzero" comment:"Internal class identity"` }
Address -
type Domain ¶
type Domain struct { bun.BaseModel `bun:"domain" comment:"Domains table"` Id uint64 `bun:"id,pk,autoincrement" comment:"Unique internal identity"` AddressId uint64 `comment:"Address id from main indexer"` AddressHash []byte `comment:"Address hash"` Domain string `bun:",unique" comment:"Domain string"` Owner decimal.Decimal `bun:",type:numeric" comment:"Owner's starknet id"` Expiry time.Time `comment:"Expiration time"` Address Address `bun:"-" hasura:"table:address,field:address_id,remote_field:id,type:oto,name:address"` StarknetId StarknetId `bun:"-" hasura:"table:starknet_id,field:owner,remote_field:id,type:oto,name:starknet_id"` }
Domain -
type Field ¶
type Field struct { bun.BaseModel `bun:"field" comment:"Field table"` Id uint64 `bun:"id,pk,autoincrement" comment:"Unique internal identity"` OwnerId decimal.Decimal `bun:",type:numeric" comment:"Starknet Id (token id)"` Namespace FieldNamespace `bun:",type:SMALLINT" comment:"Kind of namespace"` Name string `comment:"Field name"` Value []byte `comment:"Field value"` Owner StarknetId `bun:"-" hasura:"table:starknet_id,field:owner_id,remote_field:id,type:oto,name:starknet_id"` }
Field
type FieldNamespace ¶
type FieldNamespace int
FieldNamespace -
const ( FieldNamespaceVerifier FieldNamespace = iota + 1 FieldNamespaceUser )
FieldNamespace values
type IAddress ¶
type IAddress interface { storage.Table[*Address] GetByHash(ctx context.Context, hash []byte) (Address, error) }
IAddress -
type IState ¶
type IState interface { storage.Table[*State] ByName(ctx context.Context, name string) (State, error) }
IState -
type ISubdomain ¶
type ISubdomain interface { storage.Table[*Subdomain] GetByResolverId(ctx context.Context, resolverId uint64) (result Subdomain, err error) }
ISubdomain -
type StarknetId ¶
type StarknetId struct { bun.BaseModel `bun:"starknet_id" comment:"Starknet id table"` Id uint64 `bun:"id,pk,autoincrement" comment:"Unique internal identity"` StarknetId decimal.Decimal `bun:",unique,type:numeric" comment:"Starknet Id (token id)"` OwnerAddress []byte `comment:"Address hash of token owner"` OwnerId uint64 `comment:"Owner identity of address"` Owner Address `bun:"-" hasura:"table:address,field:owner_id,remote_field:id,type:oto,name:owner"` Fields []Field `bun:"-" hasura:"table:field,field:starknet_id,remote_field:owner_id,type:otm,name:fields"` }
StarknetId -
type State ¶
type State struct { bun.BaseModel `bun:"state" comment:"Table contains current indexer's state"` ID uint64 `bun:"id,pk,autoincrement" comment:"Unique internal identity"` Name string `bun:",unique:state_name" comment:"Indexer human-readable name"` LastHeight uint64 `comment:"Last block height"` LastTime time.Time `comment:"Time of last block"` }
State -
type Subdomain ¶
type Subdomain struct { bun.BaseModel `bun:"subdomain" comment:"Subdomain's table"` Id uint64 `bun:"id,pk,autoincrement" comment:"Unique internal identity"` RegistrationHeight uint64 `comment:"Height of first event about subdomain registration"` RegistrationDate time.Time `comment:"Date of first event about subdomain registration"` ResolverId uint64 `comment:"Resolver's address id from main indexer"` Subdomain string `bun:",unique" comment:"Subdomain string"` Resolver Address `bun:"-" hasura:"table:address,field:resolver_id,remote_field:id,type:oto,name:resolver"` }
Subdomain -
Source Files
¶
Click to show internal directories.
Click to hide internal directories.