Documentation
¶
Index ¶
- Constants
- Variables
- func Slices(compressedPubkey []byte) (res [4][]byte, err error)
- func ToBigBase(value *big.Int, base uint64) (res [](uint64))
- func ToBigInt(t *testing.T, str string) *big.Int
- func ToColorID(pubkey string) (int64, error)
- func ToCompressedKey(pubkey string) ([]byte, error)
- func Validate(preferences *ProfileShowcasePreferences) error
- type ProfileShowcase
- type ProfileShowcaseAccount
- type ProfileShowcaseAccountPreference
- type ProfileShowcaseCollectible
- type ProfileShowcaseCollectiblePreference
- type ProfileShowcaseCommunity
- type ProfileShowcaseCommunityPreference
- type ProfileShowcaseMembershipStatus
- type ProfileShowcasePreferences
- type ProfileShowcaseSocialLink
- type ProfileShowcaseSocialLinkPreference
- type ProfileShowcaseUnverifiedToken
- type ProfileShowcaseUnverifiedTokenPreference
- type ProfileShowcaseVerifiedToken
- type ProfileShowcaseVerifiedTokenPreference
- type ProfileShowcaseVisibility
Constants ¶
View Source
const ( TwitterID = "__twitter" PersonalSiteID = "__personal_site" GithubID = "__github" YoutubeID = "__youtube" DiscordID = "__discord" TelegramID = "__telegram" )
View Source
const MaxProfileShowcaseEntriesLimit = 100
View Source
const MaxProfileShowcaseSocialLinksLimit = 20
Variables ¶
View Source
var ErrorExceedMaxProfileShowcaseAccountsLimit = errors.New("exeed maximum profile showcase accounts limit")
View Source
var ErrorExceedMaxProfileShowcaseCollectiblesLimit = errors.New("exeed maximum profile showcase collectibles limit")
View Source
var ErrorExceedMaxProfileShowcaseCommunitiesLimit = errors.New("exeed maximum profile showcase communities limit")
View Source
var ErrorExceedMaxProfileShowcaseSocialLinksLimit = errors.New("exeed maximum profile showcase communities limit")
View Source
var ErrorExceedMaxProfileShowcaseUnverifiedTokensLimit = errors.New("exeed maximum profile showcase unverified tokens limit")
View Source
var ErrorExceedMaxProfileShowcaseVerifiedTokensLimit = errors.New("exeed maximum profile showcase verified tokens limit")
View Source
var ErrorNoAccountProvidedWithTokenOrCollectible = errors.New("no account provided with tokens or collectible")
Functions ¶
func Slices ¶
compressedPubKey = |1.5 bytes chars cutoff|20 bytes emoji hash|10 bytes color hash|1.5 bytes chars cutoff|
func ToCompressedKey ¶
func Validate ¶ added in v0.174.8
func Validate(preferences *ProfileShowcasePreferences) error
Types ¶
type ProfileShowcase ¶ added in v0.174.8
type ProfileShowcase struct {
ContactID string `json:"contactId"`
Communities []*ProfileShowcaseCommunity `json:"communities"`
Accounts []*ProfileShowcaseAccount `json:"accounts"`
Collectibles []*ProfileShowcaseCollectible `json:"collectibles"`
VerifiedTokens []*ProfileShowcaseVerifiedToken `json:"verifiedTokens"`
UnverifiedTokens []*ProfileShowcaseUnverifiedToken `json:"unverifiedTokens"`
SocialLinks []*ProfileShowcaseSocialLink `json:"socialLinks"`
}
type ProfileShowcaseAccount ¶ added in v0.174.8
type ProfileShowcaseAccountPreference ¶ added in v0.174.8
type ProfileShowcaseAccountPreference struct {
Address string `json:"address"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseCollectible ¶ added in v0.174.8
type ProfileShowcaseCollectiblePreference ¶ added in v0.174.8
type ProfileShowcaseCollectiblePreference struct {
ContractAddress string `json:"contractAddress"`
ChainID uint64 `json:"chainId"`
TokenID string `json:"tokenId"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseCommunity ¶ added in v0.174.8
type ProfileShowcaseCommunity struct {
CommunityID string `json:"communityId"`
Order int `json:"order"`
MembershipStatus ProfileShowcaseMembershipStatus `json:"membershipStatus"`
Grant []byte `json:"grant,omitempty"`
}
type ProfileShowcaseCommunityPreference ¶ added in v0.174.8
type ProfileShowcaseCommunityPreference struct {
CommunityID string `json:"communityId"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseMembershipStatus ¶ added in v0.174.8
type ProfileShowcaseMembershipStatus int
const ( ProfileShowcaseMembershipStatusUnproven ProfileShowcaseMembershipStatus = iota ProfileShowcaseMembershipStatusProvenMember ProfileShowcaseMembershipStatusNotAMember )
type ProfileShowcasePreferences ¶ added in v0.174.8
type ProfileShowcasePreferences struct {
Clock uint64 `json:"clock"`
Communities []*ProfileShowcaseCommunityPreference `json:"communities"`
Accounts []*ProfileShowcaseAccountPreference `json:"accounts"`
Collectibles []*ProfileShowcaseCollectiblePreference `json:"collectibles"`
VerifiedTokens []*ProfileShowcaseVerifiedTokenPreference `json:"verifiedTokens"`
UnverifiedTokens []*ProfileShowcaseUnverifiedTokenPreference `json:"unverifiedTokens"`
SocialLinks []*ProfileShowcaseSocialLinkPreference `json:"socialLinks"`
}
type ProfileShowcaseSocialLink ¶ added in v0.176.1
type ProfileShowcaseSocialLinkPreference ¶ added in v0.176.1
type ProfileShowcaseSocialLinkPreference struct {
URL string `json:"url"`
Text string `json:"text"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseUnverifiedToken ¶ added in v0.174.8
type ProfileShowcaseUnverifiedTokenPreference ¶ added in v0.174.8
type ProfileShowcaseUnverifiedTokenPreference struct {
ContractAddress string `json:"contractAddress"`
ChainID uint64 `json:"chainId"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseVerifiedToken ¶ added in v0.174.8
type ProfileShowcaseVerifiedTokenPreference ¶ added in v0.174.8
type ProfileShowcaseVerifiedTokenPreference struct {
Symbol string `json:"symbol"`
ShowcaseVisibility ProfileShowcaseVisibility `json:"showcaseVisibility"`
Order int `json:"order"`
}
type ProfileShowcaseVisibility ¶ added in v0.174.8
type ProfileShowcaseVisibility int
const ( ProfileShowcaseVisibilityNoOne ProfileShowcaseVisibility = iota ProfileShowcaseVisibilityIDVerifiedContacts ProfileShowcaseVisibilityContacts ProfileShowcaseVisibilityEveryone )
Click to show internal directories.
Click to hide internal directories.