> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/pox-5/development/advanced.md).

# Advanced

Topics in this section aren't part of the typical integration journey. They're here for integrators with a specific need: a custodial wrapper that calls PoX-5 on behalf of users, or an operator running signer infrastructure.

All examples use `@stacks/bitcoin-staking` for the PoX-5 surface and `@stacks/transactions` for signing and broadcast.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Signers</strong></td><td>Signer-key grants and revocations for operators running signer infrastructure on behalf of stakers.</td><td><a href="/pages/4pkFr21gpMpXWonNPr25">/pages/4pkFr21gpMpXWonNPr25</a></td></tr></tbody></table>

### Calling PoX-5 from another contract

PoX-5 identifies the staker as `tx-sender` and imposes no contract-caller gate on the staker-facing entrypoints (`register-for-bond`, `update-bond-registration`, `stake`, `stake-update`, `unstake`, `unstake-sbtc`). They can be invoked directly by the staker or routed through an intermediary contract — a wallet's batching helper, a relayer, a custodial wrapper — with no pre-authorization step. The wrapper must carry the appropriate STX/sBTC post-conditions on the originating transaction, since `tx-sender` is the principal whose assets move.

A few entrypoints do constrain the caller: `announce-l1-early-exit` requires the staker to call it directly (`contract-caller == tx-sender == staker`); `claim-rewards` and `claim-staker-rewards-for-signer` treat `contract-caller` as the signer-manager principal; and the signer-key grant/revoke, bond-admin (`set-bond-admin`), and pause-admin (`set-pause-admin`, `pause-rewards`) entrypoints assert their respective `contract-caller`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stacks.co/pox-5/development/advanced.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
