- Home
- Skills
- Bankrbot
- Claude Plugins
- Bankr Client Patterns
bankr-client-patterns_skill
- JavaScript
70
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill bankrbot/claude-plugins --skill bankr-client-patterns- SKILL.md10.3 KB
Overview
This skill provides reusable TypeScript client code and common project files for integrating with the Bankr API. It packages a ready-to-use bankr-client.ts with types, helper functions (submitPrompt, getJobStatus, cancelJob, waitForCompletion, execute) and curated project templates like package.json, tsconfig.json, .env.example, and .gitignore. Use it to accelerate multi-chain DeFi integrations and standardize API interactions across Bankr projects.
How this skill works
The client module wraps Bankr HTTP endpoints and exposes typed helpers to submit prompts, poll job status, cancel jobs, and wait for completion with progress callbacks. It includes detailed response and transaction types (swap, approval, transfers, NFT flows, cross-chain swaps, staking) and rich-data shapes to make downstream handling predictable. Environment-driven configuration (BANKR_API_KEY, BANKR_API_URL) and a small polling strategy let you integrate synchronous flows with asynchronous agent jobs.
When to use it
- You need a reusable TypeScript API client for Bankr agent prompts and job management.
- Creating a new Bankr integration or example project (web service, CLI, or serverless).
- You want typed transaction and response models for consistent handling of DeFi actions.
- Bootstrapping project scaffolding: package.json, tsconfig, .env.example, .gitignore.
- Implementing automated prompt submission + polling workflows with progress updates.
Best practices
- Store BANKR_API_KEY and optional BANKR_WALLET_ADDRESS in environment variables, never in source control.
- Use the execute helper for simple submit-and-wait flows; use submitPrompt + waitForCompletion for manual control or timeouts.
- Pass an onProgress callback to surface statusUpdates to users or logs during long-running jobs.
- Respect maxAttempts and pollInterval when polling to avoid unnecessary API load; tune values per app needs.
- Validate and inspect transaction metadata.__ORIGINAL_TX_DATA__ before signing or broadcasting any on-chain transactions.
Example use cases
- Server-side worker that submits analysis prompts and processes returned transactions for execution.
- CLI utility to submit trading or swap prompts and print human-readable progress and results.
- Express/Fastify microservice that accepts user prompts, returns jobId, and streams status updates via websockets.
- Example repo template for Bankr integrations including TypeScript build scripts and development tooling.
FAQ
Set BANKR_API_KEY and optionally BANKR_API_URL and BANKR_WALLET_ADDRESS. The client throws if API key is missing.
How do I handle long-running jobs?
Use waitForCompletion with onProgress to receive updates. Adjust pollInterval and maxAttempts to control timeout behavior.