Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bankr-agent/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bankr-agent",
"version": "1.1.1",
"version": "1.1.2",
"description": "Integration with Bankr API for crypto trading, market analysis, and Polymarket predictions",
"author": {
"name": "Bankr Team"
Expand Down
47 changes: 46 additions & 1 deletion bankr-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,51 @@ You can also use the `/bankr-agent` command directly:

The plugin uses the Bankr Agent API:

- `POST /agent/prompt` - Submit a prompt
### Asynchronous Endpoints (Job-based)
- `POST /agent/prompt` - Submit a natural language prompt
- `GET /agent/job/{jobId}` - Check job status
- `POST /agent/job/{jobId}/cancel` - Cancel a job

### Synchronous Endpoints
- `POST /agent/sign` - Sign messages, typed data, or transactions
- `POST /agent/submit` - Submit raw transactions to the blockchain

### Sign Endpoint

Sign messages without broadcasting:

```bash
curl -X POST https://api.bankr.bot/agent/sign \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"signatureType": "personal_sign",
"message": "Hello, Bankr!"
}'
```

**Supported signature types:**
- `personal_sign` - Sign plain text messages
- `eth_signTypedData_v4` - Sign EIP-712 typed data (permits, etc.)
- `eth_signTransaction` - Sign transactions without broadcasting

### Submit Endpoint

Submit raw transactions directly:

```bash
curl -X POST https://api.bankr.bot/agent/submit \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"to": "0x...",
"chainId": 8453,
"value": "1000000000000000000",
"data": "0x..."
},
"waitForConfirmation": true
}'
```

Full API documentation: [docs.bankr.bot/agent-api](https://docs.bankr.bot/agent-api/overview)
35 changes: 35 additions & 0 deletions bankr-agent/skills/bankr-arbitrary-transaction/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,38 @@ Submit transaction with value:
| Invalid calldata | Ensure proper hex encoding with 0x prefix |
| Transaction reverted | Check calldata encoding and contract state |
| Insufficient funds | Ensure wallet has enough ETH/MATIC for gas + value |

## Direct API Alternative: POST /agent/submit

For programmatic transaction submission without AI processing, use the synchronous submit endpoint:

```bash
curl -X POST https://api.bankr.bot/agent/submit \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"to": "0x1234567890abcdef1234567890abcdef12345678",
"chainId": 8453,
"value": "0",
"data": "0xa9059cbb..."
},
"description": "ERC20 transfer",
"waitForConfirmation": true
}'
```

**Response:**
```json
{
"success": true,
"transactionHash": "0x...",
"status": "success",
"blockNumber": "12345678",
"gasUsed": "21000",
"signer": "0x...",
"chainId": 8453
}
```

This endpoint returns immediately without the async job workflow.
28 changes: 28 additions & 0 deletions bankr-agent/skills/bankr-job-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,31 @@ If polling fails:
1. Retry after brief delay
2. Job continues server-side regardless
3. Can resume polling with same jobId

## Synchronous Endpoints (Alternative)

For direct operations without AI processing, use these synchronous endpoints:

### POST /agent/sign
Sign messages, typed data, or transactions without broadcasting.

```bash
curl -X POST https://api.bankr.bot/agent/sign \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"signatureType": "personal_sign", "message": "Hello!"}'
```

**Signature types**: `personal_sign`, `eth_signTypedData_v4`, `eth_signTransaction`

### POST /agent/submit
Submit raw transactions directly to the blockchain.

```bash
curl -X POST https://api.bankr.bot/agent/submit \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"transaction": {"to": "0x...", "chainId": 8453, "value": "1000000000000000000"}}'
```

These endpoints return immediately (no polling required).