Skip to content

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

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

iCollectionApproval<T>

Returns

CollectionApproval<T>

Overrides

BaseNumberTypeClass.constructor

Properties

approvalCriteria?

optional approvalCriteria?: 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?

optional customData?: 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

iCollectionApproval.tokenIds


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

iCollectionApproval.toListId


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?

optional uri?: string

Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1306

The URI of the approval.

Implementation of

iCollectionApproval.uri


version

version: T

Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1309

The version of the approval.0

Implementation of

iCollectionApproval.version

Methods

castToIncomingApproval()

castToIncomingApproval(): UserIncomingApproval<T>

Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1395

Returns

UserIncomingApproval<T>


castToOutgoingApproval()

castToOutgoingApproval(): UserOutgoingApproval<T>

Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1382

Returns

UserOutgoingApproval<T>


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

BaseNumberTypeClass.clone


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?

ConvertOptions

Returns

CollectionApproval<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/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

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

Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:1346

Returns

CollectionApproval


fromJson()

static fromJson<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()

static fromJsonString<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()

static fromProto<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()

static validateUpdate<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

Edit this page on GitHub