Standalone emergency unstake tool for FIP-101 staking on Fractal Bitcoin.
This tool is designed as a fallback path when the normal staking frontend or backend is unavailable. It runs the unstake flow in the browser:
- Derives the FIP-101 stake address from the connected wallet address, public key, and
indexerId - Reads stake-address and wallet-address UTXOs directly from Fractal OpenAPI
- Builds an unstake PSBT with the
FIP-101:unstakeOP_RETURN marker - Uses UniSat Wallet to sign and broadcast the transaction
- Node.js 20 or later
- UniSat wallet
- A UniSat OpenAPI key from https://developer.unisat.io/
- Fractal Bitcoin mainnet account
npm install
npm run devProduction build:
npm run buildPreview the production build:
npm run previewThis app can be hosted on GitHub Pages because it is a static client-side app.
The repository includes .github/workflows/deploy-pages.yml. To deploy:
- Push the repository to GitHub.
- In the GitHub repository, open
Settings->Pages. - Set
SourcetoGitHub Actions. - Push to
mainor run theDeploy GitHub Pagesworkflow manually.
The Vite build uses a relative base path by default, so it works on both user pages and project pages.
The default OpenAPI endpoint is:
https://open-api-fractal.unisat.io/v1/indexer
To use a different endpoint:
VITE_OPENAPI_BASE=https://open-api-fractal.unisat.io/v1/indexer npm run devOpenAPI requests require a UniSat developer key. The user enters the key in the UI. Requests include:
Authorization: Bearer YOUR_KEY
The key is stored only in the browser's localStorage for convenience. Do not commit real API keys into this repository.
- Connect UniSat and confirm the wallet is on Fractal Bitcoin mainnet.
- Enter a UniSat OpenAPI key.
- Enter the
indexerIdto unstake from. - Click
Derive Stake Address and Refresh Balance. - Confirm the derived stake address and loaded balance.
- Enter the unstake amount and fee rate.
- Click
Build PSBT. - Review inputs, outputs, and the estimated fee.
- Click
Sign and Broadcast Unstake.
The unstake output is sent to the connected wallet address. Network fees are paid by available UTXOs on the connected wallet address.
- This is a client-side tool. Review the code and build artifacts before hosting it.
- The tool never asks for seed phrases or private keys.
- The OpenAPI key is not bundled into the app; users provide it at runtime.
- Always verify the derived stake address, amount, and outputs before signing.
MIT