Class: AccountDoc<T>
T extends NumberType
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:425
Extends
BaseNumberTypeClass<AccountDoc<T>>
Type Parameters
T
T extends NumberType
Implements
iAccountDoc<T>
Constructors
Constructor
new AccountDoc<
T>(data):AccountDoc<T>
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:436
Parameters
data
iAccountDoc<T>
Returns
AccountDoc<T>
Overrides
BaseNumberTypeClass.constructor
Properties
_docId
_docId:
string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:426
A unique stringified document ID
Implementation of
_id?
optional_id?:string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:427
A unique document ID (Mongo DB ObjectID)
Implementation of
accountNumber
accountNumber:
T
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:429
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
balances?
optionalbalances?:CosmosCoin<T>[]
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:434
The BADGE balance of the account and other sdk.coin balances
Implementation of
bitbadgesAddress
bitbadgesAddress:
string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:431
The BitBadges address of the account
Implementation of
ethAddress
ethAddress:
string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:432
The Eth address of the account
Implementation of
pubKeyType
pubKeyType:
string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:430
The public key type of the account
Implementation of
publicKey
publicKey:
string
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:428
The public key of the account
Implementation of
sequence?
optionalsequence?:T
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:433
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
Methods
clone()
clone():
AccountDoc
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
AccountDoc
Inherited from
convert()
convert<
U>(convertFunction,options?):AccountDoc<U>
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:453
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
AccountDoc<U>
Overrides
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
Inherited from
getNumberFieldNames()
getNumberFieldNames():
string[]
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:449
Internal helper method to convert the number fields of the object to a different NumberType equivalent.
Returns
string[]
Overrides
BaseNumberTypeClass.getNumberFieldNames
hasNumberFields()
hasNumberFields():
boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161
Checks if the object has number fields.
Returns
boolean
Inherited from
BaseNumberTypeClass.hasNumberFields
toJson()
toJson():
JsonObject
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:139
Converts the object to a JSON object with all primitive types.
Returns
JsonObject
Inherited from
toJsonString()
toJsonString():
string
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:143
Converts the object to a JSON string.
Returns
string