Skip to content

UserIncomingApproval represents a user's approved incoming transfer.

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

UserIncomingApproval represents a user's approved incoming transfer.

Extends

Extended by

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

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

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

Parameters

msg

iUserIncomingApproval<T>

Returns

UserIncomingApproval<T>

Overrides

BaseNumberTypeClass.constructor

Properties

approvalCriteria?

optional approvalCriteria?: IncomingApprovalCriteria<T>

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

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

iUserIncomingApproval.approvalCriteria


approvalId

approvalId: string

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

The ID of the approval. Must not be a duplicate of another approval ID in the same timeline.

Implementation of

iUserIncomingApproval.approvalId


customData?

optional customData?: string

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

Arbitrary custom data of the approval

Implementation of

iUserIncomingApproval.customData


fromListId

fromListId: string

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

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

iUserIncomingApproval.fromListId


initiatedByListId

initiatedByListId: string

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

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

iUserIncomingApproval.initiatedByListId


ownershipTimes

ownershipTimes: UintRangeArray<T>

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

The ownership times of the tokens being transferred.

Implementation of

iUserIncomingApproval.ownershipTimes


tokenIds

tokenIds: UintRangeArray<T>

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

The token IDs to be transferred.

Implementation of

iUserIncomingApproval.tokenIds


transferTimes

transferTimes: UintRangeArray<T>

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

The times allowed for the transfer transaction.

Implementation of

iUserIncomingApproval.transferTimes


uri?

optional uri?: string

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

The URI of the approval.

Implementation of

iUserIncomingApproval.uri


version

version: T

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

The version of the approval.

Implementation of

iUserIncomingApproval.version

Methods

castToCollectionTransfer()

castToCollectionTransfer(toAddress): CollectionApproval<T>

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

Parameters

toAddress

string

Returns

CollectionApproval<T>


clone()

clone(): UserIncomingApproval

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

Deep copies the object and returns a new instance.

Returns

UserIncomingApproval

Inherited from

BaseNumberTypeClass.clone


convert()

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

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

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

UserIncomingApproval<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:1076

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

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

Parameters

prefix

string

Returns

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

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

Returns

UserIncomingApproval


fromJson()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserIncomingApproval<U>


fromJsonString()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserIncomingApproval<U>


fromProto()

static fromProto<U>(item, convertFunction): UserIncomingApproval<U>

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

Type Parameters

U

U extends NumberType

Parameters

item

UserIncomingApproval

convertFunction

(item) => U

Returns

UserIncomingApproval<U>

Edit this page on GitHub