Skip to content

UserOutgoingApproval defines the rules for the approval of an outgoing transfer from a user.

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

UserOutgoingApproval defines the rules for the approval of an outgoing transfer from a user.

Extends

Extended by

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

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

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

Parameters

msg

iUserOutgoingApproval<T>

Returns

UserOutgoingApproval<T>

Overrides

BaseNumberTypeClass.constructor

Properties

approvalCriteria?

optional approvalCriteria?: OutgoingApprovalCriteria<T>

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

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

iUserOutgoingApproval.approvalCriteria


approvalId

approvalId: string

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

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

Implementation of

iUserOutgoingApproval.approvalId


customData?

optional customData?: string

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

Arbitrary custom data of the approval

Implementation of

iUserOutgoingApproval.customData


initiatedByListId

initiatedByListId: string

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

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

iUserOutgoingApproval.initiatedByListId


ownershipTimes

ownershipTimes: UintRangeArray<T>

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

The ownership times of the tokens being transferred.

Implementation of

iUserOutgoingApproval.ownershipTimes


tokenIds

tokenIds: UintRangeArray<T>

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

The token IDs to be transferred.

Implementation of

iUserOutgoingApproval.tokenIds


toListId

toListId: string

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

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

iUserOutgoingApproval.toListId


transferTimes

transferTimes: UintRangeArray<T>

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

The times allowed for the transfer transaction.

Implementation of

iUserOutgoingApproval.transferTimes


uri?

optional uri?: string

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

The URI of the approval.

Implementation of

iUserOutgoingApproval.uri


version

version: T

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

The version of the approval.

Implementation of

iUserOutgoingApproval.version

Methods

castToCollectionTransfer()

castToCollectionTransfer(fromListId): CollectionApproval<T>

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

Parameters

fromListId

string

Returns

CollectionApproval<T>


clone()

clone(): UserOutgoingApproval

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

Deep copies the object and returns a new instance.

Returns

UserOutgoingApproval

Inherited from

BaseNumberTypeClass.clone


convert()

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

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

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

UserOutgoingApproval<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:237

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

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

Parameters

prefix

string

Returns

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

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

Returns

UserOutgoingApproval


fromJson()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserOutgoingApproval<U>


fromJsonString()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserOutgoingApproval<U>


fromProto()

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

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

Type Parameters

U

U extends NumberType

Parameters

item

UserOutgoingApproval

convertFunction

(item) => U

Returns

UserOutgoingApproval<U>

Edit this page on GitHub