Documentation ¶
Index ¶
- Constants
- func FetchAlgoAddressesFromPackedValue(data []byte) ([]string, error)
- func FetchBToIFromState(appState []models.TealKeyValue, key string) (uint64, bool)
- func FetchUInt64sFromPackedValue(data []byte) ([]uint64, error)
- func FetchUint64sFromState(appState []models.TealKeyValue, key string) ([]uint64, error)
- func FindNFDAppIDByName(algoClient *algod.Client, ctx context.Context, registryAppID uint64, ...) (uint64, error)
- func FindNFDAppIDsByAddress(algoClient *algod.Client, ctx context.Context, registryAppID uint64, ...) ([]uint64, error)
- func GetApplicationBoxes(algoClient *algod.Client, ctx context.Context, appID uint64) (map[string][]byte, error)
- func GetIPFSData(url string) ([]byte, error)
- func GetNFDSigNameLSIG(nfdName string, registryAppID uint64) (crypto.LogicSigAccount, error)
- func GetNFDSigRevAddressLSIG(pointedToAddress types.Address, registryAppID uint64) (crypto.LogicSigAccount, error)
- func GetRegistryBoxNameForAddress(algoAddress types.Address) []byte
- func GetRegistryBoxNameForNFD(nfdName string) []byte
- func MergeNFDProperties(properties map[string]string) map[string]string
- func PrintNFD(properties *NFDProperties)
- func RawPKAsAddress(byteData []byte) types.Address
- type NFDProperties
- type NFDProvider
- func (p *NFDProvider) CatchUp(dbConn *sqlx.DB, algodClient *algod.Client, startingRound uint64, ...) error
- func (p *NFDProvider) Init(network string, dbConn *sqlx.DB, algodClient *algod.Client) error
- func (p *NFDProvider) IsProviderApp(appID uint64) bool
- func (p *NFDProvider) Process(appID uint64) error
- func (p *NFDProvider) ProcessBlock(stxn types.SignedTxnInBlock, round uint64) error
- func (p *NFDProvider) SyncNFDByAppID(appID uint64, currentBlock uint64) error
- func (p *NFDProvider) Type() string
Constants ¶
const NFDMainNetRegistryAppID uint64 = 760937186
const NFDTestNetRegistryAppID uint64 = 84366825
Variables ¶
This section is empty.
Functions ¶
func FetchAlgoAddressesFromPackedValue ¶
FetchAlgoAddressesFromPackedValue returns all non-zero Algorand 32-byte PKs encoded in a value (up to 3)
func FetchBToIFromState ¶
func FetchBToIFromState(appState []models.TealKeyValue, key string) (uint64, bool)
FetchBToIFromState fetches a specific key from application state - stored as big-endian 64-bit value Returns value,and whether it w found or not.
func FetchUInt64sFromPackedValue ¶
FetchUInt64sFromPackedValue returns all non-zero 64-bit ints contained in the slice (up to 15 for a single local-state fetch for example)
func FetchUint64sFromState ¶
func FetchUint64sFromState(appState []models.TealKeyValue, key string) ([]uint64, error)
FetchUint64sFromState fetches a specific key from application state - stored as set of 64-bit values (up to 15) // Returns array of values, and optional error
func FindNFDAppIDByName ¶
func FindNFDAppIDsByAddress ¶
func GetApplicationBoxes ¶
func GetIPFSData ¶
func GetNFDSigNameLSIG ¶
func GetNFDSigNameLSIG(nfdName string, registryAppID uint64) (crypto.LogicSigAccount, error)
func GetNFDSigRevAddressLSIG ¶
func MergeNFDProperties ¶
MergeNFDProperties - take a set of 'split' values spread across multiple keys like address_00, address_01 and merge into single address value, combining the values into single 'address'.
func PrintNFD ¶
func PrintNFD(properties *NFDProperties)
func RawPKAsAddress ¶
RawPKAsAddress is simplified version of types.EncodeAddress and that returns Address type, not string verison.
Types ¶
type NFDProperties ¶
type NFDProperties struct { AppID uint64 `json:"appID"` Internal map[string]string `json:"internal"` UserDefined map[string]string `json:"userDefined"` Verified map[string]string `json:"verified"` }
func FetchAllStateAsNFDProperties ¶
func FetchAllStateAsNFDProperties(appState []models.TealKeyValue, boxData map[string][]byte) NFDProperties
func GetNFDData ¶
type NFDProvider ¶
type NFDProvider struct { DB *sqlx.DB Algod *algod.Client SyncMap *sync.Map // contains filtered or unexported fields }
func (*NFDProvider) IsProviderApp ¶
func (p *NFDProvider) IsProviderApp(appID uint64) bool
func (*NFDProvider) Process ¶
func (p *NFDProvider) Process(appID uint64) error
func (*NFDProvider) ProcessBlock ¶
func (p *NFDProvider) ProcessBlock(stxn types.SignedTxnInBlock, round uint64) error
func (*NFDProvider) SyncNFDByAppID ¶
func (p *NFDProvider) SyncNFDByAppID(appID uint64, currentBlock uint64) error
helpers
func (*NFDProvider) Type ¶
func (p *NFDProvider) Type() string