Skip to main content
Version: 1.16.0

Class: SetTokenAuthority

Defined in: cct/solana/token/operations/set-token-authority.ts:78

Immediately sets mint authority, freeze authority, or both for an SPL Token mint; there is no propose-and-accept step.

Remarks​

⚠️ IRREVERSIBLE: Setting newAuthority to null permanently revokes the selected roles. Once revoked, a revoked mint or freeze authority cannot be recovered, transferred, or restored.

Once confirmed, the current authority loses the selected roles. All selected roles must have the same current authority. Supply multisigSigners when that authority is an SPL Token multisig. Atomic: All selected roles update in one transaction. If any selected update fails, none are committed.

Extends​

  • SolanaOperation<SetTokenAuthorityParams, UnsignedSolanaTx, ParsedSetTokenAuthorityParams>

Constructors​

Constructor​

new SetTokenAuthority(): SetTokenAuthority

Returns​

SetTokenAuthority

Inherited from​

SolanaOperation< SetTokenAuthorityParams, UnsignedSolanaTx, ParsedSetTokenAuthorityParams >.constructor

Properties​

name​

readonly name: "setTokenAuthority" = 'setTokenAuthority'

Defined in: cct/solana/token/operations/set-token-authority.ts:83

camelCase id; matches the token-manager facade method and error context.

Overrides​

SolanaOperation.name


splitMode​

protected readonly splitMode: SolanaSplitMode = 'atomic'

Defined in: cct/solana/operation.ts:36

Multi-transaction safety policy; resource splitting requires an operation-specific audit.

Inherited from​

SolanaOperation.splitMode

Methods​

buildUnsigned()​

protected buildUnsigned(chain: SolanaChain, opts: ParsedSetTokenAuthorityParams): Promise<UnsignedSolanaTx>

Defined in: cct/solana/token/operations/set-token-authority.ts:130

Builds one SPL Token SetAuthority instruction for each selected authority role.

Parameters​

ParameterType
chainSolanaChain
optsParsedSetTokenAuthorityParams

Returns​

Promise<UnsignedSolanaTx>

Overrides​

SolanaOperation.buildUnsigned


execute()​

execute(chain: SolanaChain, params: ExecuteSetTokenAuthorityParams): Promise<TransactionResult>

Defined in: cct/solana/token/operations/set-token-authority.ts:196

Generate, sign, simulate, send, and confirm with the current authority wallet.

Parameters​

ParameterType
chainSolanaChain
paramsExecuteSetTokenAuthorityParams

Returns​

Promise<TransactionResult>

Throws​

If authority types or authority validation is invalid, or multisig signers are supplied for signed execution.

Throws​

If mint data cannot be parsed.

Throws​

CCTTxFailedError If simulation or on-chain execution fails.

Throws​

CCTTxNotConfirmedError If the submitted transaction is not confirmed in time.

Overrides​

SolanaOperation.execute


generate()​

generate(chain: SolanaChain, params: SolanaGenerateParams<SetTokenAuthorityParams>): Promise<UnsignedSolanaTx>

Defined in: cct/solana/operation.ts:42

Run prepare and buildUnsigned; no signing.

Parameters​

ParameterType
chainSolanaChain
paramsSolanaGenerateParams<SetTokenAuthorityParams>

Returns​

Promise<UnsignedSolanaTx>

Inherited from​

SolanaOperation.generate


prepare()​

protected prepare(params: GenerateSetTokenAuthorityParams): ParsedSetTokenAuthorityParams

Defined in: cct/solana/token/operations/set-token-authority.ts:86

Parses public keys and validates the selected authority roles.

Parameters​

ParameterType
paramsGenerateSetTokenAuthorityParams

Returns​

ParsedSetTokenAuthorityParams

Overrides​

SolanaOperation.prepare


prepareWalletExecution()​

protected prepareWalletExecution(params: SolanaExecuteParams<SetTokenAuthorityParams>): { computeUnits: number | undefined; parsed: ParsedSetTokenAuthorityParams; payer: PublicKey; wallet: Wallet; }

Defined in: cct/solana/operation.ts:47

Validates the wallet and prepares signed execution parameters with it as payer.

Parameters​

ParameterType
paramsSolanaExecuteParams<SetTokenAuthorityParams>

Returns​

{ computeUnits: number | undefined; parsed: ParsedSetTokenAuthorityParams; payer: PublicKey; wallet: Wallet; }

computeUnits​

computeUnits: number | undefined

parsed​

parsed: ParsedSetTokenAuthorityParams

payer​

payer: PublicKey

wallet​

wallet: Wallet

Inherited from​

SolanaOperation.prepareWalletExecution