Optional
_idA unique document ID (Mongo DB ObjectID)
The addresses of the address list. If this is a tracker list, the addresses are the tracker IDs.
Optional
aliasThe alias BitBadges address of the address list.
The claims of the address list.
The block number when this list was created
The BitBadges address of the user who created this list
Arbitrary custom data that can be stored on-chain.
The timestamp of when this list was last updated (milliseconds since epoch)
The ID of the address list.
The activity of the address list.
Optional
metadataThe metadata of the address list.
Optional
nsfwThe NSFW reason if this list is NSFW
Optional
privateTrue if this list is private and will not show up in search results
Optional
reportedThe reported reason if this list is reported
The update history of this list
The URI where to fetch the address list metadata from.
Optional
viewableTrue if this list is viewable if queried by the list ID directly
The views of the address list.
Whether or not to include ONLY the addresses or include all EXCEPT the addresses.
Deep copies the object and returns a new instance.
Converts the object to a different NumberType equivalent.
Optional
options: ConvertOptionsCompares 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 all the documents for a specific view. 1 second delay between each fetch to avoid rate limiting.
Fetches the next batch of documents for a specific view. 25 documents are fetched at a time. This updates the view in the class instance, as well as handling the pagination.
Gets the documents array for a specific view.
Gets the overlap details for two address lists. Returns [inFirstListButNotSecond, inBothLists, inSecondListButNotFirst].
Gets the addresses that are in both lists.
Note the returned value can be a whitelist or a blacklist, depending on the input lists. For example, all addresses except Bob (blacklist) overlap or just Bob (whitelist) overlap.
Type safe method to get the documents array for a specific view.
Gets the pagination for a specific view ({ bookmark, hasMore }).
Returns true if the address list is stored off-chain. Off-chain lists are stored in the database and are not part of the blockchain. They are updatable, deletable, and can be used for surveys. On-chain lists are immutable and are created through blockchain transactions.
Removes addresses from the list in-place.
If this is a whitelist, the address will be removed (if it is currently added). If this is a blacklist, the address will be added (if it is not currently added). Otherwise, it is a no-op since it is already removed.
Returns a new list with the addresses inverted.
Wrapper for remove that returns a new list instead of modifying the current one.
Updates the current list with a new response
Optional
forceful: booleanStatic
AllReturns the reserved 'All' address list.
Static
CreateCreates a new address list off-chain. On-chain lists are created through blockchain transactions.
Behind the scenes, this is just an alias for UpdateAddressList.
Static
DeleteDeletes an off-chain address list. On-chain lists are deleted through blockchain transactions.
Static
FetchFetches and initializes a BitBadgesAddressList from the API. Must pass in a valid BitBadgesApi instance.
Optional
viewsStatic
FetchFetches and initializes a batch of BitBadgesAddressList from the API. Must pass in a valid BitBadgesApi instance.
Static
GetGets address lists from the API.
Static
ReservedReturns a reserved address list by ID.
Static
UpdateUpdates an off-chain address list. On-chain lists are updated through blockchain transactions.
Static
fromOptional
options: Partial<JsonReadOptions>Static
fromOptional
options: Partial<JsonReadOptions>Static
fromStatic
generateGenerates a list ID for a given address list.
The address list to generate the ID for
Static
getGets the overlap details between two address lists. Returns [inFirstButNotSecond, overlaps, inSecondButNotFirst].
Static
getReturns the address list for a list ID, if it is a reserved ID (i.e. Mint, Manager, All, None, validly formatted address, ...)
Static
getReturns the tracker list for a tracker ID list. Little different logic because tracker ID lists can only be reserved IDs (no storage) and can be nonvalid addresses
A unique stringified document ID