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

BuildRevokeSignerKeyTxArgs

The arguments of buildRevokeSignerGrant: TxParams plus the signer key and the signer-manager whose grant to revoke. The builder calls pox-5 revoke-signer-grant with them.


Usage

import { buildRevokeSignerGrant } from '@stacks/bitcoin-staking';

const tx = await buildRevokeSignerGrant({
  signerKey: signerPublicKey,
  signerManager: 'SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.my-signer-manager',
  publicKey: signerPublicKey, // the sender must be the address of signerKey
  fee: 10_000n,
  nonce,
  network: 'mainnet',
});

Notes

  • The sender must be the single-sig Stacks address derived from signerKey. Any other caller fails with ERR_UNAUTHORIZED (u1). Set publicKey to the signer key and sign with the signer's private key. fetchEligibleRevokeSignerGrant checks this read-only.

  • Revoking a grant that does not exist succeeds. The result's existed field is false in that case.

  • After a revoke, stake and register-for-bond to a signer-manager registered with that key fail with ERR_SIGNER_KEY_GRANT_NOT_FOUND (u17), because both re-check the grant with verify-signer-key-grant. Existing positions stay in place until they expire.


Definition


Properties

Property
Type
Description

signerKey

Uint8Array | string

Signer's compressed secp256k1 public key, 33 bytes, as bytes or hex. Sent as signer-key (buff 33)

signerManager

string

Contract principal of the signer-manager whose grant is revoked. Sent as signer-manager

The transaction fields come from TxParams.

Was this helpful?