Documentation
¶
Index ¶
- Variables
- func FetchAlgoAddressesFromPackedValue(data []byte) ([]string, error)
- func FetchBToIFromState(appState []models.TealKeyValue, key string) (uint64, bool)
- func FetchUInt64sFromPackedValue(data []byte) ([]uint64, error)
- func GetNFDSigNameLSIG(nfdName string, registryAppID uint64) (crypto.LogicSigAccount, error)
- func GetRegistryBoxNameForAddress(algoAddress types.Address) []byte
- func GetRegistryBoxNameForNFD(nfdName string) []byte
- func IsContractVersionAtLeast(version string, major, minor int) bool
- func IsNFdExpired(props Properties) bool
- func IsNfdOwned(nfdAppId uint64, props Properties) bool
- func MergeNFDProperties(properties map[string]string) map[string]string
- func RawPKAsAddress(byteData []byte) types.Address
- type NfdFetcher
- type Properties
Constants ¶
This section is empty.
Variables ¶
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 big-endian integers contained in the data slice.
func GetNFDSigNameLSIG ¶
func GetNFDSigNameLSIG(nfdName string, registryAppID uint64) (crypto.LogicSigAccount, error)
func GetRegistryBoxNameForAddress ¶
GetRegistryBoxNameForAddress returns the registry box key for an Algorand address reverse lookup. The box key is sha256("addr/algo/" + raw32BytePublicKey).
func IsNFdExpired ¶
func IsNFdExpired(props Properties) bool
func IsNfdOwned ¶
func IsNfdOwned(nfdAppId uint64, props Properties) bool
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 RawPKAsAddress ¶
RawPKAsAddress is simplified version of types.EncodeAddress and that returns Address type, not string verison.
Types ¶
type NfdFetcher ¶
type NfdFetcher interface {
FetchNfdDnsVals(ctx context.Context, names []string) (map[string]Properties, error)
FetchNfdDidVals(ctx context.Context, name string) (Properties, uint64, error)
FindNFDsByAddress(ctx context.Context, address string) ([]string, error)
}
func NewNfdFetcher ¶
func NewNfdFetcher(client *algod.Client, registryID uint64) NfdFetcher
NewNfdFetcher creates a new NfdFetcher for use outside the DNS plugin (e.g., DID resolver).
type Properties ¶
type Properties struct {
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) Properties