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 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
Variables ¶
View Source
var ErrorAccountVisibilityLowerThanCollectible = errors.New("account visibility lower than collectible")
View Source
var ErrorDublicateAccountAddress = errors.New("duplicate account address")
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"` }
type ProfileShowcaseAccount ¶ added in v0.174.8
type ProfileShowcaseAccountPreference ¶ added in v0.174.8
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"` CommunityID string `json:"communityId"` AccountAddress string `json:"accountAddress"` 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"` }
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"` CommunityID string `json:"communityId"` 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.