Skip to content

BitBadgesUserInfo is the type for accounts returned by the BitBadges API. It includes all Docrmation about an account.

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:107

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.

Extends

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

new BitBadgesUserInfo<T>(data): BitBadgesUserInfo<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:146

Parameters

data

iBitBadgesUserInfo<T>

Returns

BitBadgesUserInfo<T>

Overrides

ProfileDoc.constructor

Properties

_docId

_docId: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:547

A unique stringified document ID

Implementation of

iBitBadgesUserInfo._docId

Inherited from

ProfileDoc._docId


_id?

optional _id?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:548

A unique document ID (Mongo DB ObjectID)

Implementation of

iBitBadgesUserInfo._id

Inherited from

ProfileDoc._id


accountNumber

accountNumber: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:110

The account number of the account. This is the account number registered on the BitBadges blockchain.

WARNING (BB-34): post-v34 accounts get hash-derived account numbers larger than 2^53, which a JS number cannot hold. Use BigIntify or Stringify when converting docs that carry this field — Numberify silently corrupts it and the corrupted value is rejected by the signing pipeline.

Implementation of

iBitBadgesUserInfo.accountNumber


activity

activity: TransferActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:121

A list of transfer activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.activity


address

address: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:128

The native address of the account

Implementation of

iBitBadgesUserInfo.address


airdropped?

optional airdropped?: boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:119

Indicates whether the account has claimed their airdrop.

Implementation of

iBitBadgesUserInfo.airdropped


alias?

optional alias?: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:140

For advanced cases where you want a custom address or account for a collection or list. We map it to an account.

Experimental - For example, if you want to send a badge to a collection, you can transfer it to the alias account.

collectionId?

optional collectionId?: string

Implementation of

iBitBadgesUserInfo.alias


approvalTrackers

approvalTrackers: ApprovalTrackerDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:125

A list of approvals tracker activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.approvalTrackers


avatar?

optional avatar?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:117

The avatar of the account.

Implementation of

iBitBadgesUserInfo.avatar


balances?

optional balances?: CosmosCoin<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:112

The BADGE balance of the account and other sdk.coin balances

Implementation of

iBitBadgesUserInfo.balances


bannerImage?

optional bannerImage?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:562

The banner image URL of the account

Implementation of

iBitBadgesUserInfo.bannerImage

Inherited from

ProfileDoc.bannerImage


bitbadgesAddress

bitbadgesAddress: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:108

The BitBadges address of the account

Implementation of

iBitBadgesUserInfo.bitbadgesAddress


chain

chain: SupportedChain

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:118

The chain of the account.

Implementation of

iBitBadgesUserInfo.chain


challengeTrackers

challengeTrackers: MerkleChallengeTrackerDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:124

A list of merkle challenge activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.challengeTrackers


claimActivity?

optional claimActivity?: ClaimActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:122

A list of claim activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.claimActivity


collected

collected: BalanceDocWithDetails<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:120

A list of tokens that the account has collected. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.collected


createdAt?

optional createdAt?: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:551

The timestamp of when this account was created (milliseconds since epoch)

Implementation of

iBitBadgesUserInfo.createdAt

Inherited from

ProfileDoc.createdAt


creatorCredits?

optional creatorCredits?: CreatorCreditsDoc<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:143

The credits for the account.

Implementation of

iBitBadgesUserInfo.creatorCredits


discord?

optional discord?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:552

The Discord username of the account

Implementation of

iBitBadgesUserInfo.discord

Inherited from

ProfileDoc.discord


ethAddress

ethAddress: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:109

The Eth address of the account

Implementation of

iBitBadgesUserInfo.ethAddress


fetchedProfile?

optional fetchedProfile?: "full" | "partial"

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:549

Whether we have already fetched the profile or not

Implementation of

iBitBadgesUserInfo.fetchedProfile

Inherited from

ProfileDoc.fetchedProfile


github?

optional github?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:554

The GitHub username of the account

Implementation of

iBitBadgesUserInfo.github

Inherited from

ProfileDoc.github


hiddenTokens?

optional hiddenTokens?: BatchTokenDetailsArray<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:557

The hidden tokens of the account

Implementation of

iBitBadgesUserInfo.hiddenTokens

Inherited from

ProfileDoc.hiddenTokens


latestSignedInChain?

optional latestSignedInChain?: SupportedChain

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:560

The latest chain the user signed in with

Implementation of

iBitBadgesUserInfo.latestSignedInChain

Inherited from

ProfileDoc.latestSignedInChain


notifications?

optional notifications?: NotificationPreferences<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:561

The notifications of the account

Implementation of

iBitBadgesUserInfo.notifications

Inherited from

ProfileDoc.notifications


nsfw?

optional nsfw?: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:129

Indicates whether the account is NSFW.

reason

reason: string

Implementation of

iBitBadgesUserInfo.nsfw


pointsActivity?

optional pointsActivity?: PointsActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:123

A list of points activity items for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.pointsActivity


profilePicUrl?

optional profilePicUrl?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:558

The profile picture URL of the account

Implementation of

iBitBadgesUserInfo.profilePicUrl

Inherited from

ProfileDoc.profilePicUrl


pubKeyType

pubKeyType: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:113

The public key type of the account

Implementation of

iBitBadgesUserInfo.pubKeyType


publicKey

publicKey: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:114

The public key of the account

Implementation of

iBitBadgesUserInfo.publicKey


readme?

optional readme?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:556

The readme of the account

Implementation of

iBitBadgesUserInfo.readme

Inherited from

ProfileDoc.readme


reported?

optional reported?: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:130

Indicates whether the account has been reported.

reason

reason: string

Implementation of

iBitBadgesUserInfo.reported


resolvedName?

optional resolvedName?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:116

The resolved name of the account (e.g. ENS name).

Implementation of

iBitBadgesUserInfo.resolvedName


seenActivity?

optional seenActivity?: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:550

The timestamp of the last activity seen for this account (milliseconds since epoch)

Implementation of

iBitBadgesUserInfo.seenActivity

Inherited from

ProfileDoc.seenActivity


sequence?

optional sequence?: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:111

The sequence of the account. This is the nonce for the blockchain for this account.

WARNING (BB-34): post-v34 unordered-tx nonces can be nanosecond timestamps larger than 2^53 — same rule as accountNumber: convert with BigIntify/Stringify, never Numberify.

Implementation of

iBitBadgesUserInfo.sequence


siwbbRequests

siwbbRequests: SIWBBRequestDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:126

A list of SIWBB requests for the account. Paginated and fetched as needed. To be used in conjunction with views.

Implementation of

iBitBadgesUserInfo.siwbbRequests


tags?

optional tags?: string[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:144

The tags for the account. Extra descriptors for what this address is used for (e.g. "Pool", "Governance", etc).

Implementation of

iBitBadgesUserInfo.tags


telegram?

optional telegram?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:555

The Telegram username of the account

Implementation of

iBitBadgesUserInfo.telegram

Inherited from

ProfileDoc.telegram


twitter?

optional twitter?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:553

The Twitter username of the account

Implementation of

iBitBadgesUserInfo.twitter

Inherited from

ProfileDoc.twitter


username?

optional username?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:559

The username of the account

Implementation of

iBitBadgesUserInfo.username

Inherited from

ProfileDoc.username


views

views: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:131

The views for this collection and their pagination Doc. Views will only include the doc _ids. Use the pagination to fetch more. 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.

Index Signature

[viewId: string]: { ids: string[]; pagination: PaginationInfo; type: string; } | undefined

Implementation of

iBitBadgesUserInfo.views

Methods

clone()

clone(): BitBadgesUserInfo<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:179

Deep copies the object and returns a new instance.

Returns

BitBadgesUserInfo<T>

Implementation of

CustomType.clone

Overrides

ProfileDoc.clone


convert()

convert<U>(convertFunction, options?): BitBadgesUserInfo<U>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:175

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

BitBadgesUserInfo<U>

Implementation of

CustomType.convert

Overrides

ProfileDoc.convert


equals()

equals<U>(other, normalizeNumberTypes?): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:147

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").

Type Parameters

U

U extends CustomType<U>

Parameters

other

CustomType<U> | null | undefined

normalizeNumberTypes?

boolean

Returns

boolean

Implementation of

CustomType.equals

Inherited from

ProfileDoc.equals


fetchAllForView()

fetchAllForView(api, viewType, viewId): Promise<void>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:433

Fetches until the view has no more items. 1 second delay between each fetch for rate limiting.

Parameters

api

BaseBitBadgesApi<T>

viewType

AccountViewKey

viewId

string

Returns

Promise<void>


fetchAndUpdate()

fetchAndUpdate(api, options, forceful?): Promise<void>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:364

Fetch the user's information via an API request and updates the current BitBadgesUserInfo object. This will handle all paginations, etc. behind the scenes.

Parameters

api

BaseBitBadgesApi<T>

options

Omit<AccountFetchDetails, "address" | "username">

forceful?

boolean

Returns

Promise<void>


fetchBalances()

fetchBalances(api, collectionId, forceful?): Promise<BalanceDocWithDetails<T>>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:311

Fetch 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.

Parameters

api

BaseBitBadgesApi<T>

collectionId

string

forceful?

boolean

Returns

Promise<BalanceDocWithDetails<T>>


fetchNextForView()

fetchNextForView(api, viewType, viewId, specificCollections?, oldestFirst?, standard?): Promise<void>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:406

Fetches the next page of a view for a user. If view has no more items, it will do nothing.

Parameters

api

BaseBitBadgesApi<T>

viewType

AccountViewKey

viewId

string

specificCollections?

BatchTokenDetails<NumberType>[]

oldestFirst?

boolean

standard?

string

Returns

Promise<void>


getAccountActivityView()

getAccountActivityView(viewId): TransferActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:486

Parameters

viewId

string

Returns

TransferActivityDoc<T>[]


getAccountBalancesView()

getAccountBalancesView(viewId): BalanceDocWithDetails<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:492

Parameters

viewId

string

Returns

BalanceDocWithDetails<T>[]


getBalanceInfo()

getBalanceInfo(collectionId): BalanceDocWithDetails<T> | undefined

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:262

Gets the balance doc for a user by address.

This returns the cached data if it exists. If you want to fetch, use fetchBalances.

Parameters

collectionId

string

Returns

BalanceDocWithDetails<T> | undefined

Example

ts
const res = user.getBalanceInfo(123n);
console.log(res.balances);

getBalances()

getBalances(collectionId): BalanceArray<T> | undefined

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:303

Fetch balances for a collection and updates the user's collected array. Must pass in a valid API instance.

Parameters

collectionId

string

Returns

BalanceArray<T> | undefined

Example

ts
const res = await user.fetchBalances(api, 123n);
console.log(res.balances);

getClaimActivityView()

getClaimActivityView(viewId): ClaimActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:468

Parameters

viewId

string

Returns

ClaimActivityDoc<T>[]


getNumberFieldNames()

getNumberFieldNames(): string[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:183

Internal helper method to convert the number fields of the object to a different NumberType equivalent.

Returns

string[]

Implementation of

CustomType.getNumberFieldNames

Overrides

ProfileDoc.getNumberFieldNames


getPointsActivityView()

getPointsActivityView(viewId): PointsActivityDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:474

Parameters

viewId

string

Returns

PointsActivityDoc<T>[]


getSIWBBRequestsView()

getSIWBBRequestsView(viewId): SIWBBRequestDoc<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:480

Parameters

viewId

string

Returns

SIWBBRequestDoc<T>[]


getView()

getView<KeyType>(viewType, viewId): AccountViewData<T>[KeyType]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:443

Type agnostic get view function. Uses the viewType to determine the type of view to fetch and docs to return.

Type Parameters

KeyType

KeyType extends AccountViewKey

Parameters

viewType

KeyType

viewId

string

Returns

AccountViewData<T>[KeyType]


getViewBookmark()

getViewBookmark(viewId): string | undefined

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:399

Parameters

viewId

string

Returns

string | undefined


getViewPagination()

getViewPagination(viewId): PaginationInfo | undefined

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:395

Parameters

viewId

string

Returns

PaginationInfo | undefined


hasNumberFields()

hasNumberFields(): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161

Checks if the object has number fields.

Returns

boolean

Implementation of

CustomType.hasNumberFields

Inherited from

ProfileDoc.hasNumberFields


isRedundantRequest()

isRedundantRequest(options): boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:328

Returns if a get account request body is redundant for this user (meaning we have everything already).

Parameters

options

Omit<AccountFetchDetails, "address" | "username">

Returns

boolean


mustGetBalanceInfo()

mustGetBalanceInfo(collectionId): BalanceDocWithDetails<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:275

Wrapper for getBalanceInfo that throws if not fetched yet.

Parameters

collectionId

string

Returns

BalanceDocWithDetails<T>

Example

ts
const res = user.mustGetBalanceInfo(123n);
console.log(res.balances);

mustGetBalances()

mustGetBalances(collectionId): BalanceArray<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:290

Gets the balances for a user by address. Throws if not fetched yet. To fetch, use fetchBalances.

Wrapper for getBalances that throws if not fetched yet.

Parameters

collectionId

string

Returns

BalanceArray<T>

Example

ts
const res = user.mustGetBalances(123n);
console.log(res); // [{ ... }] Balances

***

### onList()

> **onList**(`addressList`): `boolean`

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:501](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L501)

Checks if this user is on a given address list.

#### Parameters

##### addressList

[`iAddressList`](/sdk/reference/interfaces/i-address-list)

#### Returns

`boolean`

***

### pruneBody()

> **pruneBody**(`options`): [`AccountFetchDetails`](/sdk/reference/type-aliases/account-fetch-details)

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:351](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L351)

Prunes the request body to remove any redundant fetches.

#### Parameters

##### options

`Omit`\<[`AccountFetchDetails`](/sdk/reference/type-aliases/account-fetch-details), `"address"` \| `"username"`\>

#### Returns

[`AccountFetchDetails`](/sdk/reference/type-aliases/account-fetch-details)

***

### toJson()

> **toJson**(): `JsonObject`

Defined in: [packages/bitbadgesjs-sdk/src/common/base.ts:139](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/common/base.ts#L139)

Converts the object to a JSON object with all primitive types.

#### Returns

`JsonObject`

#### Implementation of

[`CustomType`](/sdk/reference/interfaces/custom-type).[`toJson`](/sdk/reference/interfaces/custom-type#tojson)

#### Inherited from

[`ProfileDoc`](/sdk/reference/classes/profile-doc).[`toJson`](/sdk/reference/classes/profile-doc#tojson)

***

### toJsonString()

> **toJsonString**(): `string`

Defined in: [packages/bitbadgesjs-sdk/src/common/base.ts:143](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/common/base.ts#L143)

Converts the object to a JSON string.

#### Returns

`string`

#### Implementation of

[`CustomType`](/sdk/reference/interfaces/custom-type).[`toJsonString`](/sdk/reference/interfaces/custom-type#tojsonstring)

#### Inherited from

[`ProfileDoc`](/sdk/reference/classes/profile-doc).[`toJsonString`](/sdk/reference/classes/profile-doc#tojsonstring)

***

### updateWithNewResponse()

> **updateWithNewResponse**(`newResponse`, `forceful?`): `void`

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:379](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L379)

Logic for updating the current BitBadgesUserInfo object with a new API response. If forceful is true, it will overwrite everything.

#### Parameters

##### newResponse

`BitBadgesUserInfo`\<`T`\>

##### forceful?

`boolean`

#### Returns

`void`

***

### viewHasMore()

> **viewHasMore**(`viewId`): `boolean`

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:391](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L391)

#### Parameters

##### viewId

`string`

#### Returns

`boolean`

***

### BlankUserInfo()

> `static` **BlankUserInfo**(): `BitBadgesUserInfo`\<`bigint`\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:541](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L541)

Returns a BitBadgesUserInfo object with all fields set to blank.

#### Returns

`BitBadgesUserInfo`\<`bigint`\>

#### Remarks

By default, it uses \<bigint> type for all number fields, but you can convert with the `.convert` method.

***

### FetchAndInitialize()

> `static` **FetchAndInitialize**\<`T`\>(`api`, `options`): `Promise`\<`BitBadgesUserInfo`\<`T`\>\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:190](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L190)

Fetches the user's information from the API and initializes a new BitBadgesUserInfo object.

#### Type Parameters

##### T

`T` *extends* [`NumberType`](/sdk/reference/type-aliases/number-type)

#### Parameters

##### api

[`BaseBitBadgesApi`](/sdk/reference/classes/base-bit-badges-api)\<`T`\>

##### options

[`AccountFetchDetails`](/sdk/reference/type-aliases/account-fetch-details)

#### Returns

`Promise`\<`BitBadgesUserInfo`\<`T`\>\>

***

### FetchAndInitializeBatch()

> `static` **FetchAndInitializeBatch**\<`T`\>(`api`, `options`): `Promise`\<`BitBadgesUserInfo`\<`T`\>[]\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:198](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L198)

Fetches users' information from the API and initializes a new BitBadgesUserInfo object for each.

#### Type Parameters

##### T

`T` *extends* [`NumberType`](/sdk/reference/type-aliases/number-type)

#### Parameters

##### api

[`BaseBitBadgesApi`](/sdk/reference/classes/base-bit-badges-api)\<`T`\>

##### options

[`AccountFetchDetails`](/sdk/reference/type-aliases/account-fetch-details)[]

#### Returns

`Promise`\<`BitBadgesUserInfo`\<`T`\>[]\>

***

### GetAccount()

> `static` **GetAccount**\<`T`\>(`api`, `params`): `Promise`\<[`GetAccountSuccessResponse`](/sdk/reference/classes/get-account-success-response)\<`T`\>\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:227](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L227)

Gets an account by address or username from the API.

#### Type Parameters

##### T

`T` *extends* [`NumberType`](/sdk/reference/type-aliases/number-type)

#### Parameters

##### api

[`BaseBitBadgesApi`](/sdk/reference/classes/base-bit-badges-api)\<`T`\>

##### params

[`iGetAccountPayload`](/sdk/reference/interfaces/i-get-account-payload)

#### Returns

`Promise`\<[`GetAccountSuccessResponse`](/sdk/reference/classes/get-account-success-response)\<`T`\>\>

***

### GetAccounts()

> `static` **GetAccounts**\<`T`\>(`api`, `params`): `Promise`\<[`GetAccountsSuccessResponse`](/sdk/reference/classes/get-accounts-success-response)\<`T`\>\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:206](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L206)

Gets accounts by address or username from the API.

#### Type Parameters

##### T

`T` *extends* [`NumberType`](/sdk/reference/type-aliases/number-type)

#### Parameters

##### api

[`BaseBitBadgesApi`](/sdk/reference/classes/base-bit-badges-api)\<`T`\>

##### params

[`iGetAccountsPayload`](/sdk/reference/interfaces/i-get-accounts-payload)

#### Returns

`Promise`\<[`GetAccountsSuccessResponse`](/sdk/reference/classes/get-accounts-success-response)\<`T`\>\>

***

### MintAccount()

> `static` **MintAccount**(): `BitBadgesUserInfo`\<`bigint`\>

Defined in: [packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts:511](https://github.com/BitBadges/bitbadgesjs/blob/master/packages/bitbadgesjs-sdk/src/api-indexer/BitBadgesUserInfo.ts#L511)

Returns a BitBadgesUserInfo object with all fields set for the Mint address.

#### Returns

`BitBadgesUserInfo`\<`bigint`\>

#### Remarks

By default, it uses \<bigint> type for all number fields, but you can convert with the `.convert` method.

Edit this page on GitHub