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
- type SocialLink
- type SocialLinks
- type SocialLinksInfo
Constants ¶
View Source
const ( TwitterID = "__twitter" PersonalSiteID = "__personal_site" GithubID = "__github" YoutubeID = "__youtube" DiscordID = "__discord" TelegramID = "__telegram" )
static links which need to be decorated by the UI clients
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"` }
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 )
type SocialLink ¶ added in v0.105.1
func (*SocialLink) Equal ¶ added in v0.156.1
func (s *SocialLink) Equal(link *SocialLink) bool
func (*SocialLink) ToProtobuf ¶ added in v0.156.1
func (s *SocialLink) ToProtobuf() *protobuf.SocialLink
type SocialLinks ¶ added in v0.105.1
type SocialLinks []*SocialLink
func NewSocialLinks ¶ added in v0.105.1
func NewSocialLinks(links []*protobuf.SocialLink) SocialLinks
func (*SocialLinks) Contains ¶ added in v0.156.1
func (s *SocialLinks) Contains(link *SocialLink) bool
func (*SocialLinks) Equal ¶ added in v0.156.1
func (s *SocialLinks) Equal(links SocialLinks) bool
Equal means the same links at the same order
func (*SocialLinks) Serialize ¶ added in v0.105.1
func (s *SocialLinks) Serialize() ([]byte, error)
func (*SocialLinks) ToProtobuf ¶ added in v0.105.1
func (s *SocialLinks) ToProtobuf() []*protobuf.SocialLink
func (*SocialLinks) ToSyncProtobuf ¶ added in v0.156.1
func (s *SocialLinks) ToSyncProtobuf(clock uint64) *protobuf.SyncSocialLinks
type SocialLinksInfo ¶ added in v0.156.1
type SocialLinksInfo struct { Links []*SocialLink `json:"links"` Removed bool `json:"removed"` }
Click to show internal directories.
Click to hide internal directories.