Skip to content

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

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?

optional aliasPathsToAdd?: 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?

optional collectionApprovals?: 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?

optional collectionMetadata?: 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?

optional collectionPermissions?: 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?

optional cosmosCoinWrapperPathsToAdd?: 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?

optional customData?: 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?

optional defaultBalances?: 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?

optional invariants?: 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?

optional isArchived?: 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?

optional manager?: 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?

optional mintEscrowCoinsToTransfer?: 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?

optional standards?: 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?

optional tokenMetadata?: 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?

optional updateCollectionApprovals?: 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?

optional updateCollectionMetadata?: 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?

optional updateCollectionPermissions?: 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?

optional updateCustomData?: 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?

optional updateIsArchived?: 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?

optional updateManager?: 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?

optional updateStandards?: 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?

optional updateTokenMetadata?: 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?

optional updateValidTokenIds?: 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?

optional validTokenIds?: 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

BaseNumberTypeClass.clone


convert()

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

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:103

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

MsgUniversalUpdateCollection<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/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>

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:163

Parameters

prefix

string

Returns

MsgUniversalUpdateCollection<T>


toCosmWasmPayloadString()

toCosmWasmPayloadString(): string

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:174

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

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

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:107

Returns

MsgUniversalUpdateCollection


fromJson()

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

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:110

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

MsgUniversalUpdateCollection<U>


fromJsonString()

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

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:118

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

MsgUniversalUpdateCollection<U>


fromProto()

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

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/bitbadges/tokenization/msgUniversalUpdateCollection.ts:126

Type Parameters

U

U extends NumberType

Parameters

protoMsg

MsgUniversalUpdateCollection

convertFunction

(item) => U

Returns

MsgUniversalUpdateCollection<U>

Edit this page on GitHub