-
Couldn't load subscription status.
- Fork 300
Open
Copy link
Description
Feature Description
Create a TypeScript script in the examples/ts folder that reads a JSON file containing an array of claims, each with a broadcastableMessage string. The script should:
- Parse the JSON structure as provided.
- Extract the
broadcastableMessagefields from each claim. - Use
deserializeBIP322BroadcastableMessage()to deserialize each message. - Pass the deserialized message to
generateBIP322MessageListAndVerifyFromMessageBroadcastable(). - Print or log the results.
Motivation
This will provide a clear usage example for handling BIP322 broadcastable messages with the relevant BitGo utilities. It will help developers understand how to process airdrop claim data and verify messages in a production-like scenario.
Context
Sample JSON structure:
{
"status": "success",
"claims": [
{
"id": "...",
...
"broadcastableMessage": "...",
...
}
],
"count": 1,
"pagination": {
"limit": 100,
"hasNext": false
}
}
The script should be added to examples/ts/. Functions to use: deserializeBIP322BroadcastableMessage, generateBIP322MessageListAndVerifyFromMessageBroadcastable.
Copilot