A unique stringified document ID
Optional
_idA unique document ID (Mongo DB ObjectID)
The account number of the account
A list of transfer activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.
The native address of the account
A list of address lists for the account. Paginated and fetched as needed. To be used in conjunction with views.
Optional
airdroppedIndicates whether the account has claimed their airdrop.
Optional
aliasThe alias for the account.
A list of approvals tracker activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.
Optional
approvedApproved ways to sign in
A list of user attestations for the account. Paginated and fetched as needed. To be used in conjunction with views.
Optional
avatarThe avatar of the account.
Optional
balanceThe balance of the account
Optional
bannerThe banner image URL of the account
The BitBadges address of the account
The Bitcoin address of the account
The chain of the account.
A list of claim alerts for the account. Paginated and fetched as needed. To be used in conjunction with views.
A list of badges that the account has collected. Paginated and fetched as needed. To be used in conjunction with views.
Optional
createdThe timestamp of when this account was created (milliseconds since epoch)
Optional
customThe custom links of the account
Optional
customThe custom pages of the account
Optional
discordThe Discord username of the account
The Eth address of the account
Optional
fetchedWhether we have already fetched the profile or not
Optional
githubThe GitHub username of the account
Optional
hiddenThe hidden badges of the account
Optional
hiddenThe hidden lists of the account
Optional
latestThe latest chain the user signed in with
A list of list activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.
A list of merkle challenge activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.
Optional
notificationsThe notifications of the account
Optional
nsfwIndicates whether the account is NSFW.
Optional
profileThe profile picture URL of the account
The public key type of the account
The public key of the account
Optional
readmeThe readme of the account
Optional
reportedIndicates whether the account has been reported.
Optional
reservedThe reserved map for the account. This is created and managed on-chain through the x/maps module.
Optional
resolvedThe resolved name of the account (e.g. ENS name).
Optional
seenThe timestamp of the last activity seen for this account (milliseconds since epoch)
Optional
sequenceThe sequence of the account
A list of SIWBB requests for the account. Paginated and fetched as needed. To be used in conjunction with views.
Optional
socialSocial connections stored for the account
The Solana address of the account.
Optional
telegramThe Telegram username of the account
Optional
twitterThe Twitter username of the account
Optional
usernameThe username of the account
The views for this collection and their pagination Doc. Views will only include the doc _ids. Use the pagination to fetch more. To be used in conjunction with activity, announcements, reviews, owners, merkleChallenges, and approvalTrackers. For example, if you want to fetch the activity for a view, you would use the view's pagination to fetch the doc _ids, then use the corresponding activity array to find the matching docs.
Optional
watchlistsThe watched lists of the account's portfolio
Deep copies the object and returns a new instance.
Converts the object to a different NumberType equivalent.
Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.
If normalizeNumberTypes
is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").
Optional
normalizeNumberTypes: booleanFetches until the view has no more items. 1 second delay between each fetch for rate limiting.
Fetch the user's information via an API request and updates the current BitBadgesUserInfo object. This will handle all paginations, etc. behind the scenes.
Optional
forceful: booleanFetch badge balances for a collection and updates the user's collected array. Must pass in a valid API instance. If forceful is true, it will fetch regardless of if it is already fetched. Else, it will only fetch if it is not already cached.
Optional
forceful: booleanFetches the next page of a view for a user. If view has no more items, it will do nothing.
Optional
specificCollections: BatchBadgeDetails<NumberType>[]Optional
specificLists: string[]Optional
oldestFirst: booleanGets the badge balance doc for a user by address.
This returns the cached data if it exists. If you want to fetch, use fetchBadgeBalances.
Fetch badge balances for a collection and updates the user's collected array. Must pass in a valid API instance.
Returns if a get account request body is redundant for this user (meaning we have everything already).
Wrapper for getBadgeBalanceInfo that throws if not fetched yet.
Gets the badge balances for a user by address. Throws if not fetched yet. To fetch, use fetchBadgeBalances.
Wrapper for getBadgeBalances that throws if not fetched yet.
Checks if this user is on a given address list.
Prunes the request body to remove any redundant fetches.
Logic for updating the current BitBadgesUserInfo object with a new API response. If forceful is true, it will overwrite everything.
Optional
forceful: booleanStatic
BlankReturns a BitBadgesUserInfo object with all fields set to blank.
Static
FetchFetches the user's information from the API and initializes a new BitBadgesUserInfo object.
Static
FetchFetches users' information from the API and initializes a new BitBadgesUserInfo object for each.
Static
GetGets accounts by address or username from the API.
Static
MintReturns a BitBadgesUserInfo object with all fields set for the Mint address.
BitBadgesUserInfo is the type for accounts returned by the BitBadges API. It includes all Docrmation about an account.
Remarks
Note that returned user Docs will only fetch what is requested. It is your responsibility to join the data together (paginations, etc). See documentation for helper functions, examples, and tutorials on handling this data and paginations.