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 withERR_UNAUTHORIZED (u1). SetpublicKeyto 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
existedfield isfalsein that case.After a revoke,
stakeandregister-for-bondto a signer-manager registered with that key fail withERR_SIGNER_KEY_GRANT_NOT_FOUND (u17), because both re-check the grant withverify-signer-key-grant. Existing positions stay in place until they expire.
Definition
Properties
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?