-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Add Docusaurus docsite in docs folder with GitHub Actions deploy wo…
…rkflow
- Loading branch information
1 parent
570102f
commit 55385ad
Showing
36 changed files
with
20,038 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .github/workflows/deploy-docs.yml | ||
name: Deploy Docusaurus Site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install Dependencies and Build Docs | ||
working-directory: docs | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Decode Transaction | ||
|
||
A tool for parsing and understanding raw Bitcoin transactions by converting them into a human-readable format. | ||
|
||
## Tool Name | ||
|
||
`decode_tx` | ||
|
||
## Description | ||
|
||
Decodes a raw Bitcoin transaction hex string into a structured format, revealing details about the transaction's inputs, outputs, and other properties. This tool is essential for transaction analysis and debugging. | ||
|
||
## Input | ||
|
||
- `rawHex`: The raw transaction data in hexadecimal format (string) | ||
|
||
## Output | ||
|
||
Returns detailed transaction information including: | ||
|
||
- Transaction ID (TXID) | ||
- Version number | ||
- Input details (previous transactions, script signatures) | ||
- Output details (amounts, recipient addresses) | ||
- Lock time | ||
- Size and weight | ||
|
||
## Example Usage | ||
|
||
Using the tool through Claude: | ||
|
||
``` | ||
Can you decode this Bitcoin transaction: 0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000 | ||
``` | ||
|
||
Example output: | ||
|
||
``` | ||
I'll decode that Bitcoin transaction using the decode_tx tool. | ||
Transaction Details: | ||
- TXID: f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 | ||
- Version: 1 | ||
- Size: 275 bytes | ||
Inputs (1): | ||
1. Previous TX: 0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9 | ||
Output Index: 0 | ||
Script: 47304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 | ||
Outputs (2): | ||
1. Amount: 10.00 BTC | ||
Address: 1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3 | ||
Script Type: P2PK | ||
2. Amount: 40.00 BTC | ||
Address: 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S | ||
Script Type: P2PK | ||
Locktime: 0 (No locktime) | ||
This is a historical transaction from 2009 where 10 BTC was sent to one address and 40 BTC was sent as change. | ||
``` | ||
|
||
## Common Use Cases | ||
|
||
- Analyzing transaction structure | ||
- Debugging transaction issues | ||
- Educational purposes | ||
- Transaction history research | ||
- Script analysis | ||
|
||
## Technical Details | ||
|
||
The tool decodes: | ||
|
||
- Transaction structure and version | ||
- Input and output counts | ||
- Script types and contents | ||
- Address formats | ||
- Bitcoin amounts | ||
- Sequence numbers | ||
- Witness data (for SegWit transactions) | ||
|
||
## Supported Transaction Types | ||
|
||
- Legacy (non-SegWit) | ||
- SegWit (native and wrapped) | ||
- Multi-signature | ||
- Time-locked transactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Generate Key | ||
|
||
A tool for generating new Bitcoin key pairs. This tool creates a complete set of Bitcoin credentials including an address, private key in WIF format, and public key. | ||
|
||
## Tool Name | ||
|
||
`generate_key` | ||
|
||
## Description | ||
|
||
Creates a new cryptographically secure Bitcoin key pair. The generated keys can be used to create wallets, sign transactions, and receive Bitcoin. The address format will match the configured network (mainnet or testnet). | ||
|
||
## Input | ||
|
||
This tool doesn't require any input parameters. | ||
|
||
## Output | ||
|
||
Returns an object containing: | ||
|
||
- `address`: The Bitcoin address derived from the public key | ||
- `privateKey`: The private key in Wallet Import Format (WIF) | ||
- `publicKey`: The public key in hexadecimal format | ||
|
||
## Example Usage | ||
|
||
Using the tool through Claude: | ||
|
||
``` | ||
Could you generate a new Bitcoin key pair for me? | ||
``` | ||
|
||
Example output: | ||
|
||
``` | ||
I'll help you generate a new Bitcoin key pair using the generate_key tool. | ||
Here are your new Bitcoin credentials: | ||
- Address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa | ||
- Private Key (WIF): 5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss | ||
- Public Key: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f | ||
Important: Keep your private key secure and never share it with anyone. The private key gives complete control over any funds sent to this address. | ||
``` | ||
|
||
## Security Considerations | ||
|
||
- The private key should be kept secure and never shared | ||
- The tool uses cryptographically secure random number generation | ||
- Generated addresses are network-specific (mainnet/testnet) | ||
- Each call generates a completely new and unique key pair | ||
|
||
## Common Use Cases | ||
|
||
- Creating new Bitcoin wallets | ||
- Generating addresses for receiving Bitcoin | ||
- Creating test credentials for development | ||
- Educational purposes to understand Bitcoin key formats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Get Latest Block | ||
|
||
A tool for retrieving information about the most recently mined Bitcoin block. | ||
|
||
## Tool Name | ||
|
||
`get_latest_block` | ||
|
||
## Description | ||
|
||
Fetches real-time information about the newest block on the Bitcoin blockchain. This tool provides insights into the current state of the network and recent transaction activity. | ||
|
||
## Input | ||
|
||
This tool doesn't require any input parameters. | ||
|
||
## Output | ||
|
||
Returns detailed block information including: | ||
|
||
- Block hash | ||
- Block height | ||
- Timestamp | ||
- Number of transactions | ||
- Size and weight | ||
- Mining difficulty | ||
- Previous block hash | ||
|
||
## Example Usage | ||
|
||
Using the tool through Claude: | ||
|
||
``` | ||
What's the latest Bitcoin block? | ||
``` | ||
|
||
Example output: | ||
|
||
``` | ||
I'll check the latest Bitcoin block using the get_latest_block tool. | ||
Latest Block Information: | ||
- Height: 831,242 | ||
- Hash: 00000000000000000002dc6f587c5f5d6bc48ea4e25a2f39f6fe7c531e4ec0d2 | ||
- Timestamp: 2024-02-15 14:23:41 UTC | ||
- Transactions: 2,891 | ||
- Size: 1.7 MB | ||
- Weight: 3.9 MWU | ||
- Difficulty: 72,324,982,270,171 | ||
This block was mined approximately 5 minutes ago and contains 2,891 transactions. | ||
``` | ||
|
||
## Common Use Cases | ||
|
||
- Monitoring blockchain synchronization | ||
- Tracking network activity | ||
- Verifying transaction confirmations | ||
- Analyzing mining difficulty changes | ||
- Educational demonstrations | ||
|
||
## Technical Details | ||
|
||
The tool provides: | ||
|
||
- Real-time block data from the Bitcoin network | ||
- Block header information | ||
- Transaction statistics | ||
- Network state indicators | ||
- Mining metrics | ||
|
||
## Network Considerations | ||
|
||
- Data is fetched from the configured Bitcoin network (mainnet/testnet) | ||
- Response time depends on network connectivity | ||
- Block information may be cached briefly for performance | ||
- Updates approximately every 10 minutes (average Bitcoin block time) |
Oops, something went wrong.