Skip to content

UserOutgoingApprovalPermission represents the permissions of a user and whether they can update their approved outgoing transfers.

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

UserOutgoingApprovalPermission represents the permissions of a user and whether they can update their approved outgoing transfers.

Extends

Extended by

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

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

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

Parameters

msg

iUserOutgoingApprovalPermission<T>

Returns

UserOutgoingApprovalPermission<T>

Overrides

BaseNumberTypeClass.constructor

Properties

approvalId

approvalId: string

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

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

Implementation of

iUserOutgoingApprovalPermission.approvalId


initiatedByListId

initiatedByListId: string

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

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

Implementation of

iUserOutgoingApprovalPermission.initiatedByListId


ownershipTimes

ownershipTimes: UintRangeArray<T>

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

The owned times of the approved outgoing transfers.

Implementation of

iUserOutgoingApprovalPermission.ownershipTimes


permanentlyForbiddenTimes

permanentlyForbiddenTimes: UintRangeArray<T>

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

The forbidden times of the approved outgoing transfers.

Implementation of

iUserOutgoingApprovalPermission.permanentlyForbiddenTimes


permanentlyPermittedTimes

permanentlyPermittedTimes: UintRangeArray<T>

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

The permitted times of the approved outgoing transfers.

Implementation of

iUserOutgoingApprovalPermission.permanentlyPermittedTimes


tokenIds

tokenIds: UintRangeArray<T>

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

The token IDs of the approved outgoing transfers.

Implementation of

iUserOutgoingApprovalPermission.tokenIds


toListId

toListId: string

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

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

Implementation of

iUserOutgoingApprovalPermission.toListId


transferTimes

transferTimes: UintRangeArray<T>

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

The transfer times of the approved outgoing transfers.

Implementation of

iUserOutgoingApprovalPermission.transferTimes

Methods

castToCollectionApprovalPermission()

castToCollectionApprovalPermission(address): CollectionApprovalPermission<T>

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

Parameters

address

string

Returns

CollectionApprovalPermission<T>


clone()

clone(): UserOutgoingApprovalPermission

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

Deep copies the object and returns a new instance.

Returns

UserOutgoingApprovalPermission

Inherited from

BaseNumberTypeClass.clone


convert()

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

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

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

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

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

Parameters

prefix

string

Returns

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

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

Returns

UserOutgoingApprovalPermission


check()

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

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

Checks if a certain approvals can be updated based on the permissions.

Type Parameters

U

U extends NumberType

Parameters

details

object[]

permissions

UserOutgoingApprovalPermissionWithDetails<U>[]

time?

U

Returns

Error | null


fromJson()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserOutgoingApprovalPermission<U>


fromJsonString()

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

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

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

UserOutgoingApprovalPermission<U>


fromProto()

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

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

Type Parameters

U

U extends NumberType

Parameters

protoMsg

UserOutgoingApprovalPermission

convertFunction

(item) => U

Returns

UserOutgoingApprovalPermission<U>


validateUpdate()

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

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

Validates the update of the user outgoing approval permissions from old to new. No permanently frozen times can be edited.

Type Parameters

U

U extends NumberType

Parameters

permissions

UserOutgoingApprovalPermissionWithDetails<U>[]

newPermission

UserOutgoingApprovalPermissionWithDetails<U>[]

Returns

Error | null

Edit this page on GitHub