For the complete documentation index, see llms.txt. This page is also available as Markdown.

BuildSetBondAdminArgs

The call-specific argument of buildSetBondAdmin: the principal to install as the new bond-admin. The builder takes it intersected with TxParams and calls pox-5 set-bond-admin.


Usage

import { buildSetBondAdmin, fetchBondAdmin } from '@stacks/bitcoin-staking';

const currentAdmin = await fetchBondAdmin({ network: 'mainnet' });

const tx = await buildSetBondAdmin({
  newAdmin: 'SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR',
  publicKey: currentAdminPublicKey,
  fee: 10_000n,
  nonce,
  network: 'mainnet',
});

Notes

  • Only the current bond-admin can call set-bond-admin. Any other caller fails with ERR_UNAUTHORIZED (u1). Read the current value with fetchBondAdmin.

Reference Link


Definition


Properties

Property
Type
Description

newAdmin

string

Standard or contract principal to install as the new bond-admin

Was this helpful?