Documentation
¶
Index ¶
- Variables
- type Client
- type Indexer
- func (indexer *Indexer) AddSCIDToIndex(scidstoadd map[string]*structures.FastSyncImport) (err error)
- func (ind *Indexer) Close()
- func (indexer *Indexer) ConvertSCIDKeys(variables []*structures.SCIDVariable) (keysstring []string, keysuint64 []uint64)
- func (indexer *Indexer) ConvertSCIDValues(variables []*structures.SCIDVariable) (valuesstring []string, valuesuint64 []uint64)
- func (indexer *Indexer) GetSCIDKeysByValue(variables []*structures.SCIDVariable, scid string, val interface{}, ...) (keysstring []string, keysuint64 []uint64)
- func (indexer *Indexer) GetSCIDValuesByKey(variables []*structures.SCIDVariable, scid string, key interface{}, ...) (valuesstring []string, valuesuint64 []uint64)
- func (indexer *Indexer) StartDaemonMode()
- func (indexer *Indexer) StartWalletMode(runType string)
- func (indexer *Indexer) ValidateSCSignature(code string, key string) (validated bool, signer string)
Constants ¶
This section is empty.
Variables ¶
var Connected bool = false
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetSCVariables ¶
func (client *Client) GetSCVariables(scid string, topoheight int64) (variables []*structures.SCIDVariable, code string, balances map[string]uint64)
Gets SC variable details
type Indexer ¶
type Indexer struct { LastIndexedHeight int64 ChainHeight int64 SearchFilter string Backend *storage.GravitonStore Closing bool RPC *Client Endpoint string RunMode string MBLLookup bool ValidatedSCs []string CloseOnDisconnect bool Fastsync bool sync.RWMutex }
func NewIndexer ¶
func (*Indexer) AddSCIDToIndex ¶
func (indexer *Indexer) AddSCIDToIndex(scidstoadd map[string]*structures.FastSyncImport) (err error)
Manually add/inject a SCID to be indexed. Checks validity and then stores within owner tree (no signer addr) and stores a set of current variables.
func (*Indexer) ConvertSCIDKeys ¶
func (indexer *Indexer) ConvertSCIDKeys(variables []*structures.SCIDVariable) (keysstring []string, keysuint64 []uint64)
Converts returned SCIDVariables KEY values who's values equates to a given interface{} (string/uint64)
func (*Indexer) ConvertSCIDValues ¶
func (indexer *Indexer) ConvertSCIDValues(variables []*structures.SCIDVariable) (valuesstring []string, valuesuint64 []uint64)
Converts returned SCIDVariables VALUE values who's values equates to a given interface{} (string/uint64)
func (*Indexer) GetSCIDKeysByValue ¶
func (indexer *Indexer) GetSCIDKeysByValue(variables []*structures.SCIDVariable, scid string, val interface{}, height int64) (keysstring []string, keysuint64 []uint64)
Gets SC variable keys at given topoheight who's value equates to a given interface{} (string/uint64)
func (*Indexer) GetSCIDValuesByKey ¶
func (indexer *Indexer) GetSCIDValuesByKey(variables []*structures.SCIDVariable, scid string, key interface{}, height int64) (valuesstring []string, valuesuint64 []uint64)
Gets SC values by key at given topoheight who's key equates to a given interface{} (string/uint64)
func (*Indexer) StartDaemonMode ¶
func (indexer *Indexer) StartDaemonMode()
func (*Indexer) StartWalletMode ¶
func (*Indexer) ValidateSCSignature ¶
func (indexer *Indexer) ValidateSCSignature(code string, key string) (validated bool, signer string)
Validates that a stored signature results in the code deployed to a SC - currently allowing any 'key' to be passed through, however intended key is 'signature' or similar