Class: MsgTransferTokens<T>
MsgTransferTokens represents a message to transfer tokens from one user to another. For a transfer to be successful, the transfer has to satisfy the following…
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:27
MsgTransferTokens represents a message to transfer tokens from one user to another. For a transfer to be successful, the transfer has to satisfy the following conditions:
- Be approved on the collection level
- Be approved by the recipient's incoming transfers (if not forcefully overriden by the collection)
- Be approved by the sender's outgoing transfers (if not forcefully overriden by the collection)
- The sender must have enough tokens to transfer
- All restrictions and challenges for each approval must be satisfied (merkle challenges, approved amounts, max num transfers, ...)
Note that the transfer transaction is atomic, meaning that either all transfers succeed or all fail.
Extends
BaseNumberTypeClass<MsgTransferTokens<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new MsgTransferTokens<
T>(msg):MsgTransferTokens<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:32
Parameters
msg
Returns
MsgTransferTokens<T>
Overrides
BaseNumberTypeClass.constructor
Properties
collectionId
collectionId:
string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:29
The ID of the collection to transfer tokens from.
Implementation of
iMsgTransferTokens.collectionId
creator
creator:
string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:28
The creator of the transaction.
Implementation of
transfers
transfers:
Transfer<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:30
The transfers to perform.
Implementation of
Methods
clone()
clone():
MsgTransferTokens
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
MsgTransferTokens
Inherited from
convert()
convert<
U>(convertFunction,options?):MsgTransferTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:39
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
MsgTransferTokens<U>
Overrides
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
getNumberFieldNames()
getNumberFieldNames():
string[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:43
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):MsgTransferTokens<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:75
Parameters
prefix
string
Returns
MsgTransferTokens<T>
toCosmWasmPayloadString()
toCosmWasmPayloadString():
string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:83
Returns
string
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
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():
MsgTransferTokens
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:47
Returns
MsgTransferTokens
fromJson()
staticfromJson<U>(jsonValue,convertFunction,options?):MsgTransferTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:51
Type Parameters
U
U extends NumberType
Parameters
jsonValue
JsonValue
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MsgTransferTokens<U>
fromJsonString()
staticfromJsonString<U>(jsonString,convertFunction,options?):MsgTransferTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:59
Type Parameters
U
U extends NumberType
Parameters
jsonString
string
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MsgTransferTokens<U>
fromProto()
staticfromProto<U>(protoMsg,convertFunction):MsgTransferTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgTransferTokens.ts:67
Type Parameters
U
U extends NumberType
Parameters
protoMsg
MsgTransferTokens
convertFunction
(item) => U
Returns
MsgTransferTokens<U>