Skip to content

CollectionApprovalPermission represents a permission that allows updating the collection approved transfers.

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:762

CollectionApprovalPermission represents a permission that allows updating the collection approved transfers.

This permission allows you to define when the approved transfers can be updated and which combinations of (from, to, initiatedBy, transferTimes, tokenIds, ownershipTimes, permanentlyPermittedTimes, permanentlyForbiddenTimes) can be updated.

Extends

Extended by

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

new CollectionApprovalPermission<T>(msg): CollectionApprovalPermission<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:776

Parameters

msg

iCollectionApprovalPermission<T>

Returns

CollectionApprovalPermission<T>

Overrides

BaseNumberTypeClass.constructor

Properties

approvalId

approvalId: string

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:772

The approval ID of the approved transfers. Can use "All" to represent all IDs, "!approvalId" to represent all IDs except approvalId, or "approvalId" to represent only approvalId.

Implementation of

iCollectionApprovalPermission.approvalId


fromListId

fromListId: string

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:766

The list ID of the from addresses of the approved transfers.

Implementation of

iCollectionApprovalPermission.fromListId


initiatedByListId

initiatedByListId: string

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:768

The list ID of the initiatedBy addresses of the approved transfers.

Implementation of

iCollectionApprovalPermission.initiatedByListId


ownershipTimes

ownershipTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:771

The owned times of the approved transfers.

Implementation of

iCollectionApprovalPermission.ownershipTimes


permanentlyForbiddenTimes

permanentlyForbiddenTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:774

The forbidden times of this permission.

Implementation of

iCollectionApprovalPermission.permanentlyForbiddenTimes


permanentlyPermittedTimes

permanentlyPermittedTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:773

The permitted times of this permission.

Implementation of

iCollectionApprovalPermission.permanentlyPermittedTimes


tokenIds

tokenIds: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:770

The token IDs of the approved transfers.

Implementation of

iCollectionApprovalPermission.tokenIds


toListId

toListId: string

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:767

The list ID of the to addresses of the approved transfers.

Implementation of

iCollectionApprovalPermission.toListId


transferTimes

transferTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:769

The transfer times of the approved transfers.

Implementation of

iCollectionApprovalPermission.transferTimes

Methods

clone()

clone(): CollectionApprovalPermission

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

Deep copies the object and returns a new instance.

Returns

CollectionApprovalPermission

Inherited from

BaseNumberTypeClass.clone


convert()

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

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:789

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

CollectionApprovalPermission<U>

Overrides

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

Inherited from

BaseNumberTypeClass.equals


getNumberFieldNames()

getNumberFieldNames(): string[]

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

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

Returns

string[]

Inherited from

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): CollectionApprovalPermission<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:889

Parameters

prefix

string

Returns

CollectionApprovalPermission<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

BaseNumberTypeClass.toJson


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(): CollectionApprovalPermission

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:805

Returns

CollectionApprovalPermission


check()

static check<U>(details, permissions, time?): Error | null

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:851

Type Parameters

U

U extends NumberType

Parameters

details

object[]

permissions

CollectionApprovalPermissionWithDetails<U>[]

time?

U

Returns

Error | null


fromJson()

static fromJson<U>(jsonValue, convertFunction, options?): CollectionApprovalPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:809

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

CollectionApprovalPermission<U>


fromJsonString()

static fromJsonString<U>(jsonString, convertFunction, options?): CollectionApprovalPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:817

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

CollectionApprovalPermission<U>


fromProto()

static fromProto<U>(protoMsg, convertFunction): CollectionApprovalPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:825

Type Parameters

U

U extends NumberType

Parameters

protoMsg

CollectionApprovalPermission

convertFunction

(item) => U

Returns

CollectionApprovalPermission<U>


validateUpdate()

static validateUpdate<U>(permissions, newPermission): Error | null

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:842

Type Parameters

U

U extends NumberType

Parameters

permissions

CollectionApprovalPermissionWithDetails<U>[]

newPermission

CollectionApprovalPermissionWithDetails<U>[]

Returns

Error | null

Edit this page on GitHub