Class: MsgUniversalUpdateCollection<T>
MsgUniversalUpdateCollection is a universal transaction that can be used to create / update any collection. It is only executable by the manager…
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:38
MsgUniversalUpdateCollection is a universal transaction that can be used to create / update any collection. It is only executable by the manager. MsgCreateCollection and MsgUpdateCollection are special cases of this message.
Upon initial creation, you can set the default approved outgoing transfers, default approved incoming transfers, default user permissions, and balances type. However, after that, they are final and ignored in subsequent MsgUniversalUpdateCollection calls.
For a new collection, specify collectionId == "0".
Note that you must have the necessary privileges to update specific fields. If you do not have the necessary privileges, it will throw an error. We update any CollectionPermissions at the end, so the permissions checked for the current execution are the permissions BEFORE the update. In the case of the first MsgUniversalUpdateCollection, the previous permissions are by default all permitted.
To specify you would like to update a field, the corresponding update field must be set to true. If it is set to false, we ignore it.
Extends
BaseNumberTypeClass<MsgUniversalUpdateCollection<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new MsgUniversalUpdateCollection<
T>(msg):MsgUniversalUpdateCollection<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:68
Parameters
msg
iMsgUniversalUpdateCollection<T>
Returns
MsgUniversalUpdateCollection<T>
Overrides
BaseNumberTypeClass.constructor
Properties
aliasPathsToAdd?
optionalaliasPathsToAdd?:AliasPathAddObject<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:65
The alias (non-wrapping) paths to add.
Implementation of
iMsgUniversalUpdateCollection.aliasPathsToAdd
collectionApprovals?
optionalcollectionApprovals?:CollectionApproval<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:58
The new collection approved transfers. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.collectionApprovals
collectionId
collectionId:
string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:43
The ID of the collection to update.
Implementation of
iMsgUniversalUpdateCollection.collectionId
collectionMetadata?
optionalcollectionMetadata?:CollectionMetadata
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:52
The new collection metadata. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.collectionMetadata
collectionPermissions?
optionalcollectionPermissions?:CollectionPermissions<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:48
The new collection permissions. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.collectionPermissions
cosmosCoinWrapperPathsToAdd?
optionalcosmosCoinWrapperPathsToAdd?:CosmosCoinWrapperPathAddObject<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:64
The IBC wrapper paths to add.
Implementation of
iMsgUniversalUpdateCollection.cosmosCoinWrapperPathsToAdd
creator
creator:
string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:42
The creator of the transaction.
Implementation of
iMsgUniversalUpdateCollection.creator
customData?
optionalcustomData?:string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:56
The new custom data. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.customData
defaultBalances?
optionaldefaultBalances?:UserBalanceStore<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:44
The default balances for users who have not interacted with the collection yet. Only can be set on initial creation. Only used if collection has "Standard" balance type.
Implementation of
iMsgUniversalUpdateCollection.defaultBalances
invariants?
optionalinvariants?:InvariantsAddObject<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:66
Collection-level invariants that cannot be broken. These are set upon genesis and cannot be modified. Addresses are generated by the keeper.
Implementation of
iMsgUniversalUpdateCollection.invariants
isArchived?
optionalisArchived?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:62
The new is archived flag. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.isArchived
manager?
optionalmanager?:string
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:50
The new manager. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.manager
mintEscrowCoinsToTransfer?
optionalmintEscrowCoinsToTransfer?:CosmosCoin<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:63
The coins to mint to the transfer address. Only used if collection has "Non-Public" balance type.
Implementation of
iMsgUniversalUpdateCollection.mintEscrowCoinsToTransfer
standards?
optionalstandards?:string[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:60
The new standards. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg.
Implementation of
iMsgUniversalUpdateCollection.standards
tokenMetadata?
optionaltokenMetadata?:TokenMetadata<T>[]
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:54
The new token metadata. Must have the necessary permissions in future transactions to update. However, no restrictions in this genesis Msg. Note we take first-match only for token IDs, so do not define duplicates.
Implementation of
iMsgUniversalUpdateCollection.tokenMetadata
updateCollectionApprovals?
optionalupdateCollectionApprovals?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:57
Whether or not to update the collection approved transfers.
Implementation of
iMsgUniversalUpdateCollection.updateCollectionApprovals
updateCollectionMetadata?
optionalupdateCollectionMetadata?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:51
Whether or not to update the collection metadata.
Implementation of
iMsgUniversalUpdateCollection.updateCollectionMetadata
updateCollectionPermissions?
optionalupdateCollectionPermissions?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:47
Whether or not to update the collection permissions.
Implementation of
iMsgUniversalUpdateCollection.updateCollectionPermissions
updateCustomData?
optionalupdateCustomData?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:55
Whether or not to update the custom data.
Implementation of
iMsgUniversalUpdateCollection.updateCustomData
updateIsArchived?
optionalupdateIsArchived?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:61
Whether or not to update the is archived flag.
Implementation of
iMsgUniversalUpdateCollection.updateIsArchived
updateManager?
optionalupdateManager?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:49
Whether or not to update the manager.
Implementation of
iMsgUniversalUpdateCollection.updateManager
updateStandards?
optionalupdateStandards?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:59
Whether or not to update the standards.
Implementation of
iMsgUniversalUpdateCollection.updateStandards
updateTokenMetadata?
optionalupdateTokenMetadata?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:53
Whether or not to update the token metadata.
Implementation of
iMsgUniversalUpdateCollection.updateTokenMetadata
updateValidTokenIds?
optionalupdateValidTokenIds?:boolean
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:45
Whether or not to update the valid token IDs.
Implementation of
iMsgUniversalUpdateCollection.updateValidTokenIds
validTokenIds?
optionalvalidTokenIds?:UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:46
The tokens to create. Newly created tokens will be sent to the "Mint" address. Must have necessary permissions in future transactions to update. However, no restrictions in this genesis Msg. Only used if collection has "Standard" balance type.
Implementation of
iMsgUniversalUpdateCollection.validTokenIds
Methods
clone()
clone():
MsgUniversalUpdateCollection
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
MsgUniversalUpdateCollection
Inherited from
convert()
convert<
U>(convertFunction,options?):MsgUniversalUpdateCollection<U>
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
MsgUniversalUpdateCollection<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/msgUniversalUpdateCollection.ts:99
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):MsgUniversalUpdateCollection<T>
Parameters
prefix
string
Returns
MsgUniversalUpdateCollection<T>
toCosmWasmPayloadString()
toCosmWasmPayloadString():
string
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():
MsgUniversalUpdateCollection
Returns
MsgUniversalUpdateCollection
fromJson()
staticfromJson<U>(jsonValue,convertFunction,options?):MsgUniversalUpdateCollection<U>
Type Parameters
U
U extends NumberType
Parameters
jsonValue
JsonValue
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MsgUniversalUpdateCollection<U>
fromJsonString()
staticfromJsonString<U>(jsonString,convertFunction,options?):MsgUniversalUpdateCollection<U>
Type Parameters
U
U extends NumberType
Parameters
jsonString
string
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MsgUniversalUpdateCollection<U>
fromProto()
staticfromProto<U>(protoMsg,convertFunction):MsgUniversalUpdateCollection<U>
Type Parameters
U
U extends NumberType
Parameters
protoMsg
MsgUniversalUpdateCollection
convertFunction
(item) => U
Returns
MsgUniversalUpdateCollection<U>