SDK
crossbell.js
Contract API
Character
Switch Primary Character

Switch Primary Character

Every wallet can contain multiple characters, but only one can be the designated primary character.

This primary character represents the wallet on the blockchain, and is usually the "default" character used for most operations.

You can switch your primary character at any time.

setPrimaryCharacterId

Switches the primary character to the character with the given ID.

setPrimaryCharacterId(characterId: BigNumberish, overrides?: Overrides): Promise<Result<undefined, true>>

Usage

For example, to switch primary character to the character with ID 42:

contract.setPrimaryCharacterId(42)

Note that one can only switch the primary character to a character that is owned by the wallet.

Parameters

characterId

  • Type: BigNumberish

The ID of the character to switch to.

Returns

interface Returns {
  transactionHash: string
}