Class: DynamicStore<T>
DynamicStore is a flexible storage object that can store arbitrary data. It is identified by a unique ID assigned by the blockchain, which is a uint64 that…
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1572
DynamicStore is a flexible storage object that can store arbitrary data. It is identified by a unique ID assigned by the blockchain, which is a uint64 that increments. Dynamic stores are created by users and can only be updated or deleted by their creator. They provide a way to store custom data on-chain with proper access control.
Extends
BaseNumberTypeClass<DynamicStore<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new DynamicStore<
T>(dynamicStore):DynamicStore<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1580
Parameters
dynamicStore
Returns
DynamicStore<T>
Overrides
BaseNumberTypeClass.constructor
Properties
createdBy
createdBy:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1574
The address of the creator of this dynamic store.
Implementation of
customData
customData:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1578
Custom data field for storing arbitrary data associated with this dynamic store.
Implementation of
defaultValue
defaultValue:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1575
The default value for uninitialized addresses (true/false).
Implementation of
globalEnabled
globalEnabled:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1576
Global kill switch state (defaults to true on creation, can be toggled via UpdateDynamicStore). When false, all approvals using this store via DynamicStoreChallenge will fail immediately.
Implementation of
storeId
storeId:
T
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1573
The unique identifier for this dynamic store. This is assigned by the blockchain.
Implementation of
uri
uri:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1577
URI for additional metadata or resources associated with this dynamic store.
Implementation of
Methods
clone()
clone():
DynamicStore
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
DynamicStore
Inherited from
convert()
convert<
U>(convertFunction,options?):DynamicStore<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1594
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
DynamicStore<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/core/misc.ts:1590
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
Inherited from
BaseNumberTypeClass.toJsonString
toProto()
toProto():
DynamicStore
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1609
Returns
DynamicStore
fromProto()
staticfromProto<U>(item,convertFunction):DynamicStore<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1598
Type Parameters
U
U extends NumberType
Parameters
item
DynamicStore
convertFunction
(item) => U
Returns
DynamicStore<U>