Add TS script to read and process broadcastable messages from JSON in examples/ts #6892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive TypeScript script that demonstrates how to process BIP322 broadcastable messages from JSON files containing airdrop claim data. The implementation provides a clear usage example for BitGo's BIP322 utilities as requested.
New Files Added
examples/ts/process-bip322-claims.ts
A complete CLI script that:
broadcastableMessage
fieldsdeserializeBIP322BroadcastableMessage()
generateBIP322MessageListAndVerifyFromMessageBroadcastable()
btc
andtbtc4
coin typesexamples/ts/sample-claims.json
Sample JSON data demonstrating the expected structure:
examples/ts/BIP322_CLAIMS_README.md
Comprehensive documentation covering:
Key Features
Usage Example
cd examples/ts npx tsx process-bip322-claims.ts sample-claims.json btc
The script demonstrates the complete workflow from reading JSON claim data to extracting verified address/message pairs, providing developers with a clear understanding of how to process airdrop claim data using BitGo's BIP322 utilities.
Fixes #6891.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io
/usr/local/bin/node index.js --exec install
(dns block)https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/722234/chrome-linux.zip
/usr/local/bin/node install.js
(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.