Skip to main content
Version: 1.15.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:128

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:194

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


parse()​

protected parse(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.parse


prepare()​

protected prepare(params: SolanaGenerateParams): ParsedSetTokenAuthorityParams

Defined in: cct/operation.ts:48

validate then parse — the single pre-RPC step, before any chain access.

Parameters​

ParameterType
paramsSolanaGenerateParams

Returns​

ParsedSetTokenAuthorityParams

Inherited from​

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


validate()​

protected validate(_params: SolanaGenerateParams): void

Defined in: cct/operation.ts:36

Reject invalid params before any chain RPC. No-op by default: an op that normalizes as it checks does that work in parse instead, and needs no empty stub here.

Parameters​

ParameterType
_paramsSolanaGenerateParams

Returns​

void

Inherited from​

SolanaOperation.validate