Skip to content

Transfer is used to represent a transfer of tokens. This is compatible with the MsgTransferTokens message.

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:19

Transfer is used to represent a transfer of tokens. This is compatible with the MsgTransferTokens message.

Extends

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

new Transfer<T>(transfer): Transfer<T>

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:32

Parameters

transfer

iTransfer<T>

Returns

Transfer<T>

Overrides

BaseNumberTypeClass.constructor

Properties

balances

balances: BalanceArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:22

The balances to transfer.

Implementation of

iTransfer.balances


ethSignatureProofs?

optional ethSignatureProofs?: ETHSignatureProof[]

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:25

The ETH signature proofs that satisfy the ETH signature challenges in the approvals. If the transfer deducts from multiple approvals, we check all the ETH signature proofs and assert at least one is valid for every challenge.

Implementation of

iTransfer.ethSignatureProofs


from

from: string

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:20

The address to transfer from.

Implementation of

iTransfer.from


memo?

optional memo?: string

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:26

Arbitrary memo for the transfer.

Implementation of

iTransfer.memo


merkleProofs?

optional merkleProofs?: MerkleProof[]

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:24

The merkle proofs that satisfy the mkerkle challenges in the approvals. If the transfer deducts from multiple approvals, we check all the merkle proofs and assert at least one is valid for every challenge.

Implementation of

iTransfer.merkleProofs


onlyCheckPrioritizedCollectionApprovals?

optional onlyCheckPrioritizedCollectionApprovals?: boolean

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:28

Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.

This only applies to the "collection" level approvals specified.

Implementation of

iTransfer.onlyCheckPrioritizedCollectionApprovals


onlyCheckPrioritizedIncomingApprovals?

optional onlyCheckPrioritizedIncomingApprovals?: boolean

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:29

Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.

This only applies to the "incoming" level approvals specified.

Implementation of

iTransfer.onlyCheckPrioritizedIncomingApprovals


onlyCheckPrioritizedOutgoingApprovals?

optional onlyCheckPrioritizedOutgoingApprovals?: boolean

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:30

Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.

This only applies to the "outgoing" level approvals specified.

Implementation of

iTransfer.onlyCheckPrioritizedOutgoingApprovals


precalculateBalancesFromApproval?

optional precalculateBalancesFromApproval?: PrecalculateBalancesFromApprovalDetails<T>

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:23

If specified, we will precalculate from this approval and override the balances. This can only be used when the specified approval has predeterminedBalances set.

Implementation of

iTransfer.precalculateBalancesFromApproval


prioritizedApprovals?

optional prioritizedApprovals?: ApprovalIdentifierDetails<T>[]

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:27

The prioritized approvals to use for the transfer. If specified, we will check these first.

Implementation of

iTransfer.prioritizedApprovals


toAddresses

toAddresses: string[]

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:21

The addresses to transfer to.

Implementation of

iTransfer.toAddresses

Methods

clone()

clone(): Transfer

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

Deep copies the object and returns a new instance.

Returns

Transfer

Inherited from

BaseNumberTypeClass.clone


convert()

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:56

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

Transfer<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/transfers.ts:52

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:101

Parameters

prefix

string

Returns

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:60

Returns

Transfer


fromJson()

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:64

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

Transfer<U>


fromJsonString()

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:72

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

Transfer<U>


fromProto()

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

Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:80

Type Parameters

U

U extends NumberType

Parameters

item

Transfer

convertFunction

(item) => U

Returns

Transfer<U>

Edit this page on GitHub