Class: CollectionApproval<T>
CollectionApproval represents a collection's approved transfer.
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1298
CollectionApproval represents a collection's approved transfer.
Extends
BaseNumberTypeClass<CollectionApproval<T>>
Extended by
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new CollectionApproval<
T>(msg):CollectionApproval<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1311
Parameters
msg
Returns
CollectionApproval<T>
Overrides
BaseNumberTypeClass.constructor
Properties
approvalCriteria?
optionalapprovalCriteria?:ApprovalCriteria<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1308
The criteria to be met. These represent the restrictions that must be obeyed such as the total amount approved, max num transfers, merkle challenges, must own tokens, etc.
Implementation of
iCollectionApproval.approvalCriteria
approvalId
approvalId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1305
The ID of the approval. Must not be a duplicate of another approval ID in the same timeline.
Implementation of
iCollectionApproval.approvalId
customData?
optionalcustomData?:string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1307
Arbitrary custom data of the approval
Implementation of
iCollectionApproval.customData
fromListId
fromListId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1300
The list ID for the user(s) who is sending the tokens. The ID is either registered on-chain for reusability or follows the reserved ID system.
Implementation of
iCollectionApproval.fromListId
initiatedByListId
initiatedByListId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1301
The list ID for the user(s) who initiate the transfer. The ID is either registered on-chain for reusability or follows the reserved ID system.
Implementation of
iCollectionApproval.initiatedByListId
ownershipTimes
ownershipTimes:
UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1304
The ownership times of the tokens being transferred.
Implementation of
iCollectionApproval.ownershipTimes
tokenIds
tokenIds:
UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1303
The token IDs to be transferred.
Implementation of
toListId
toListId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1299
The list ID for the user(s) who is receiving the tokens. The ID is either registered on-chain for reusability or follows the reserved ID system.
Implementation of
transferTimes
transferTimes:
UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1302
The times allowed for the transfer transaction.
Implementation of
iCollectionApproval.transferTimes
uri?
optionaluri?:string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1306
The URI of the approval.
Implementation of
version
version:
T
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1309
The version of the approval.0
Implementation of
Methods
castToIncomingApproval()
castToIncomingApproval():
UserIncomingApproval<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1395
Returns
castToOutgoingApproval()
castToOutgoingApproval():
UserOutgoingApproval<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1382
Returns
clone()
clone():
CollectionApproval
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
CollectionApproval
Inherited from
convert()
convert<
U>(convertFunction,options?):CollectionApproval<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1342
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
CollectionApproval<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/approvals.ts:1338
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
toBech32Addresses()
toBech32Addresses(
prefix):CollectionApproval<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1408
Parameters
prefix
string
Returns
CollectionApproval<T>
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():
CollectionApproval
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1346
Returns
CollectionApproval
fromJson()
staticfromJson<U>(jsonValue,convertFunction,options?):CollectionApproval<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1350
Type Parameters
U
U extends NumberType
Parameters
jsonValue
JsonValue
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
CollectionApproval<U>
fromJsonString()
staticfromJsonString<U>(jsonString,convertFunction,options?):CollectionApproval<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1358
Type Parameters
U
U extends NumberType
Parameters
jsonString
string
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
CollectionApproval<U>
fromProto()
staticfromProto<U>(item,convertFunction):CollectionApproval<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1366
Type Parameters
U
U extends NumberType
Parameters
item
CollectionApproval
convertFunction
(item) => U
Returns
CollectionApproval<U>
validateUpdate()
staticvalidateUpdate<U>(oldApprovals,newApprovals,canUpdateCollectionApprovals):Error|null
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1326
Type Parameters
U
U extends NumberType
Parameters
oldApprovals
CollectionApprovalWithDetails<U>[]
newApprovals
CollectionApprovalWithDetails<U>[]
canUpdateCollectionApprovals
CollectionApprovalPermissionWithDetails<U>[]
Returns
Error | null