btcd-skill-beta
Run the BTCD collateralization flow on PGP chain. Use when the user asks to run a BTCD loan, collateralization flow, create/take orders, lock BTC, submit proofs, claim BTCD tokens, or repay loans on the PGP network.
Why use this skill?
Learn to manage BTCD loans and collateralization on the PGP network using this OpenClaw agent skill. Includes setup, safety tips, and state management.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/contact-nbwfoundation/btcd-skill-betaWhat This Skill Does
The btcd-skill-beta is a comprehensive automation toolkit designed to manage the full BTCD (Bitcoin-backed tokens) collateralization lifecycle on the PGP (Elastos) network. It enables users to interface programmatically with the PGP lending ecosystem, allowing for the creation and fulfillment of lending orders, locking of BTC as collateral, submission of required cryptographic proofs, and the eventual claiming of tokens or repayment of loans. By encapsulating complex cross-chain logic into a modular Node.js workflow, this skill bridges the gap between Bitcoin-based assets and the PGP smart contract environment.
Installation
To install this skill, run the command: clawhub install openclaw/skills/skills/contact-nbwfoundation/btcd-skill-beta. After installation, copy the contents of the scripts/ directory to your local working environment. Generate your .env file from the provided .env.template.txt and populate it with your EVM private key and Bitcoin hex private key. Finally, run npm install to resolve all dependencies. Ensure your wallets are adequately funded with native BTC for collateral and PGA tokens for PGP gas fees.
Use Cases
- Initiating Loans: Create new order requests for collateralization.
- Collateral Management: Lock BTC safely on the Bitcoin network to back digital loans on PGP.
- Verification: Automate the submission of BTC transaction proofs to the PGP chain.
- Lifecycle Maintenance: Claim minted BTCD tokens upon successful collateralization or facilitate loan repayment processes.
- Recovery and Resumption: Manage long-running transactions by checking the
state/flow-state.jsonfile to safely resume interrupted sequences.
Example Prompts
- "OpenClaw, please start the BTCD collateralization flow by creating a new order on the PGP chain."
- "I have already created a loan order; check the current flow state and help me take the next step to lock my BTC collateral."
- "My BTC collateral has been locked for 3 confirmations; proceed to submit the proof to the PGP network and claim my BTCD tokens."
Tips & Limitations
- State Management: Always inspect
state/flow-state.jsonbefore executing any script to avoid double-locking assets. This file is your single source of truth for progress. - Sequential Execution: Steps must be executed in order. Do not skip or re-run steps that have already recorded a
completedAttimestamp. - Funding: Ensure you have enough gas fees on PGP before starting. Use
https://swap.pgpgas.orgto acquire necessary PGA tokens if your balance is low. - Security: The skill requires sensitive keys; ensure your
.envfile is never shared or committed to public repositories.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-contact-nbwfoundation-btcd-skill-beta": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, code-execution