Skip to content

Commit 0715e05

Browse files
V.Taleckyclaude
andcommitted
fix(examples): use canonical /api/agent/vault/deposit endpoint
- Correct the preflight instructions to the two-phase single-endpoint flow (POST /api/agent/vault/deposit with {action: "intent"|"relay"}), matching the canonical FlipCoin Agent API / OpenAPI spec. - Reference approvalRequired.operator for the ShareToken approval address (surfaced by the action provider). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5093a51 commit 0715e05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • typescript/examples/langchain-flipcoin-chatbot

typescript/examples/langchain-flipcoin-chatbot/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pnpm start autonomous # autonomous bettor mode
2828

2929
Before the agent can trade you need:
3030

31-
1. **USDC in the FlipCoin vault.** Deposit via `POST /api/agent/vault/deposit/intent`sign `/relay`. The agent-starter kit (https://github.com/flipcoin-fun/flipcoin-agent-starter) ships with a one-command helper.
32-
2. **ShareToken approval for sells only.** Call `ShareToken.setApprovalForAll(router, true)` once per chain from the trader wallet.
31+
1. **USDC in the FlipCoin vault.** Deposit via `POST /api/agent/vault/deposit` — first with `{ "action": "intent", "amount": "<raw-usdc-6-decimals>" }` to get EIP-712 typed data, sign it, then call the same endpoint again with `{ "action": "relay", "intentId": "<id>", "signature": "0x..." }`. The [agent-starter kit](https://github.com/flipcoin-fun/flipcoin-agent-starter) ships with a one-command helper.
32+
2. **ShareToken approval for sells only.** Call `ShareToken.setApprovalForAll(operator, true)` once per chain from the trader wallet. The exact `operator` address is returned in the intent response's `approvalRequired.operator` when approval is missing — the action provider surfaces it directly.
3333

3434
## Modes
3535

0 commit comments

Comments
 (0)