@agentlayer.tech/wallet 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openclaw/extensions/agent-wallet/dist/index.js +117 -1
- package/.openclaw/extensions/agent-wallet/index.ts +117 -1
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +4 -0
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/.openclaw/extensions/pay-bridge/package.json +1 -1
- package/CHANGELOG.md +14 -0
- package/RELEASING.md +97 -0
- package/agent-wallet/.env.example +5 -0
- package/agent-wallet/README.md +24 -0
- package/agent-wallet/agent_wallet/config.py +4 -0
- package/agent-wallet/agent_wallet/openclaw_adapter.py +504 -0
- package/agent-wallet/agent_wallet/providers/flash.py +186 -0
- package/agent-wallet/agent_wallet/providers/flash_sdk_bridge.py +251 -0
- package/agent-wallet/agent_wallet/transaction_policy.py +79 -0
- package/agent-wallet/agent_wallet/wallet_layer/base.py +78 -0
- package/agent-wallet/agent_wallet/wallet_layer/solana.py +623 -1
- package/agent-wallet/pyproject.toml +1 -1
- package/agent-wallet/scripts/flash-sdk-bridge/README.md +33 -0
- package/agent-wallet/scripts/flash-sdk-bridge/bridge.mjs +1179 -0
- package/agent-wallet/scripts/flash-sdk-bridge/package-lock.json +2377 -0
- package/agent-wallet/scripts/flash-sdk-bridge/package.json +12 -0
- package/agent-wallet/scripts/install_agent_wallet.py +46 -11
- package/agent-wallet/scripts/install_openclaw_local_config.py +4 -0
- package/package.json +2 -1
|
@@ -14,7 +14,12 @@ let selectedEvmNetwork = null;
|
|
|
14
14
|
let selectedBtcNetwork = null;
|
|
15
15
|
const PREVIEW_CACHE_TTL_MS = 15 * 60 * 1000;
|
|
16
16
|
const PRIVATE_SWAP_CACHE_TTL_MS = 35 * 60 * 1000;
|
|
17
|
-
const PREVIEW_BOUND_SWAP_TOOLS = new Set([
|
|
17
|
+
const PREVIEW_BOUND_SWAP_TOOLS = new Set([
|
|
18
|
+
"swap_solana_tokens",
|
|
19
|
+
"swap_solana_privately",
|
|
20
|
+
"flash_trade_open_position",
|
|
21
|
+
"flash_trade_close_position",
|
|
22
|
+
]);
|
|
18
23
|
const PRIVATE_SWAP_APPROVAL_TOOL_NAME = "swap_solana_privately";
|
|
19
24
|
const approvalPreviewCache = new Map();
|
|
20
25
|
const privateSwapOrderCache = new Map();
|
|
@@ -1026,6 +1031,38 @@ const solanaToolDefinitions = [
|
|
|
1026
1031
|
additionalProperties: false,
|
|
1027
1032
|
},
|
|
1028
1033
|
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "get_flash_trade_markets",
|
|
1036
|
+
description: "List Flash Trade perpetual markets currently available on Solana mainnet.",
|
|
1037
|
+
parameters: {
|
|
1038
|
+
type: "object",
|
|
1039
|
+
properties: {
|
|
1040
|
+
pool_name: {
|
|
1041
|
+
type: "string",
|
|
1042
|
+
description: "Optional Flash pool identifier such as Crypto.1.",
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
additionalProperties: false,
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: "get_flash_trade_positions",
|
|
1050
|
+
description: "Get Flash Trade perpetual positions for a Solana wallet on mainnet.",
|
|
1051
|
+
parameters: {
|
|
1052
|
+
type: "object",
|
|
1053
|
+
properties: {
|
|
1054
|
+
owner: {
|
|
1055
|
+
type: "string",
|
|
1056
|
+
description: "Optional Solana wallet address override. If omitted, use the configured wallet.",
|
|
1057
|
+
},
|
|
1058
|
+
pool_name: {
|
|
1059
|
+
type: "string",
|
|
1060
|
+
description: "Optional Flash pool identifier such as Crypto.1.",
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
additionalProperties: false,
|
|
1064
|
+
},
|
|
1065
|
+
},
|
|
1029
1066
|
{
|
|
1030
1067
|
name: "get_kamino_lend_markets",
|
|
1031
1068
|
description: "List Kamino lending markets currently available on Solana mainnet.",
|
|
@@ -1409,6 +1446,85 @@ const solanaToolDefinitions = [
|
|
|
1409
1446
|
additionalProperties: false,
|
|
1410
1447
|
},
|
|
1411
1448
|
},
|
|
1449
|
+
{
|
|
1450
|
+
name: "flash_trade_open_position",
|
|
1451
|
+
description: "Preview, prepare, or execute a Flash Trade same-collateral perpetual open on Solana mainnet.",
|
|
1452
|
+
optional: true,
|
|
1453
|
+
parameters: {
|
|
1454
|
+
type: "object",
|
|
1455
|
+
properties: {
|
|
1456
|
+
pool_name: {
|
|
1457
|
+
type: "string",
|
|
1458
|
+
description: "Flash pool identifier such as Crypto.1.",
|
|
1459
|
+
},
|
|
1460
|
+
market_symbol: {
|
|
1461
|
+
type: "string",
|
|
1462
|
+
description: "Flash market symbol such as SOL or BTC.",
|
|
1463
|
+
},
|
|
1464
|
+
collateral_symbol: {
|
|
1465
|
+
type: "string",
|
|
1466
|
+
description: "Collateral symbol. Current integration requires the same symbol as market_symbol.",
|
|
1467
|
+
},
|
|
1468
|
+
collateral_amount_raw: {
|
|
1469
|
+
type: "string",
|
|
1470
|
+
description: "Collateral amount in raw token units.",
|
|
1471
|
+
},
|
|
1472
|
+
leverage: {
|
|
1473
|
+
type: "string",
|
|
1474
|
+
description: "Requested leverage as a decimal string such as 5 or 7.5.",
|
|
1475
|
+
},
|
|
1476
|
+
side: {
|
|
1477
|
+
type: "string",
|
|
1478
|
+
enum: ["long", "short"],
|
|
1479
|
+
description: "Position direction.",
|
|
1480
|
+
},
|
|
1481
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1482
|
+
purpose: { type: "string" },
|
|
1483
|
+
user_intent: { type: "boolean" },
|
|
1484
|
+
approval_token: { type: "string" },
|
|
1485
|
+
},
|
|
1486
|
+
required: [
|
|
1487
|
+
"pool_name",
|
|
1488
|
+
"market_symbol",
|
|
1489
|
+
"collateral_symbol",
|
|
1490
|
+
"collateral_amount_raw",
|
|
1491
|
+
"leverage",
|
|
1492
|
+
"side",
|
|
1493
|
+
"mode",
|
|
1494
|
+
"purpose",
|
|
1495
|
+
],
|
|
1496
|
+
additionalProperties: false,
|
|
1497
|
+
},
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
name: "flash_trade_close_position",
|
|
1501
|
+
description: "Preview, prepare, or execute a Flash Trade same-collateral perpetual close on Solana mainnet.",
|
|
1502
|
+
optional: true,
|
|
1503
|
+
parameters: {
|
|
1504
|
+
type: "object",
|
|
1505
|
+
properties: {
|
|
1506
|
+
pool_name: {
|
|
1507
|
+
type: "string",
|
|
1508
|
+
description: "Flash pool identifier such as Crypto.1.",
|
|
1509
|
+
},
|
|
1510
|
+
market_symbol: {
|
|
1511
|
+
type: "string",
|
|
1512
|
+
description: "Flash market symbol such as SOL or BTC.",
|
|
1513
|
+
},
|
|
1514
|
+
side: {
|
|
1515
|
+
type: "string",
|
|
1516
|
+
enum: ["long", "short"],
|
|
1517
|
+
description: "Position direction to close.",
|
|
1518
|
+
},
|
|
1519
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1520
|
+
purpose: { type: "string" },
|
|
1521
|
+
user_intent: { type: "boolean" },
|
|
1522
|
+
approval_token: { type: "string" },
|
|
1523
|
+
},
|
|
1524
|
+
required: ["pool_name", "market_symbol", "side", "mode", "purpose"],
|
|
1525
|
+
additionalProperties: false,
|
|
1526
|
+
},
|
|
1527
|
+
},
|
|
1412
1528
|
{
|
|
1413
1529
|
name: "close_empty_token_accounts",
|
|
1414
1530
|
description: "Preview or execute closing zero-balance token accounts. Execute requires a host-issued approval token bound to the previewed operation.",
|
|
@@ -14,7 +14,12 @@ let selectedEvmNetwork = null;
|
|
|
14
14
|
let selectedBtcNetwork = null;
|
|
15
15
|
const PREVIEW_CACHE_TTL_MS = 15 * 60 * 1000;
|
|
16
16
|
const PRIVATE_SWAP_CACHE_TTL_MS = 35 * 60 * 1000;
|
|
17
|
-
const PREVIEW_BOUND_SWAP_TOOLS = new Set([
|
|
17
|
+
const PREVIEW_BOUND_SWAP_TOOLS = new Set([
|
|
18
|
+
"swap_solana_tokens",
|
|
19
|
+
"swap_solana_privately",
|
|
20
|
+
"flash_trade_open_position",
|
|
21
|
+
"flash_trade_close_position",
|
|
22
|
+
]);
|
|
18
23
|
const PRIVATE_SWAP_APPROVAL_TOOL_NAME = "swap_solana_privately";
|
|
19
24
|
const approvalPreviewCache = new Map();
|
|
20
25
|
const privateSwapOrderCache = new Map();
|
|
@@ -1026,6 +1031,38 @@ const solanaToolDefinitions = [
|
|
|
1026
1031
|
additionalProperties: false,
|
|
1027
1032
|
},
|
|
1028
1033
|
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "get_flash_trade_markets",
|
|
1036
|
+
description: "List Flash Trade perpetual markets currently available on Solana mainnet.",
|
|
1037
|
+
parameters: {
|
|
1038
|
+
type: "object",
|
|
1039
|
+
properties: {
|
|
1040
|
+
pool_name: {
|
|
1041
|
+
type: "string",
|
|
1042
|
+
description: "Optional Flash pool identifier such as Crypto.1.",
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
additionalProperties: false,
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: "get_flash_trade_positions",
|
|
1050
|
+
description: "Get Flash Trade perpetual positions for a Solana wallet on mainnet.",
|
|
1051
|
+
parameters: {
|
|
1052
|
+
type: "object",
|
|
1053
|
+
properties: {
|
|
1054
|
+
owner: {
|
|
1055
|
+
type: "string",
|
|
1056
|
+
description: "Optional Solana wallet address override. If omitted, use the configured wallet.",
|
|
1057
|
+
},
|
|
1058
|
+
pool_name: {
|
|
1059
|
+
type: "string",
|
|
1060
|
+
description: "Optional Flash pool identifier such as Crypto.1.",
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
additionalProperties: false,
|
|
1064
|
+
},
|
|
1065
|
+
},
|
|
1029
1066
|
{
|
|
1030
1067
|
name: "get_kamino_lend_markets",
|
|
1031
1068
|
description: "List Kamino lending markets currently available on Solana mainnet.",
|
|
@@ -1409,6 +1446,85 @@ const solanaToolDefinitions = [
|
|
|
1409
1446
|
additionalProperties: false,
|
|
1410
1447
|
},
|
|
1411
1448
|
},
|
|
1449
|
+
{
|
|
1450
|
+
name: "flash_trade_open_position",
|
|
1451
|
+
description: "Preview, prepare, or execute a Flash Trade same-collateral perpetual open on Solana mainnet.",
|
|
1452
|
+
optional: true,
|
|
1453
|
+
parameters: {
|
|
1454
|
+
type: "object",
|
|
1455
|
+
properties: {
|
|
1456
|
+
pool_name: {
|
|
1457
|
+
type: "string",
|
|
1458
|
+
description: "Flash pool identifier such as Crypto.1.",
|
|
1459
|
+
},
|
|
1460
|
+
market_symbol: {
|
|
1461
|
+
type: "string",
|
|
1462
|
+
description: "Flash market symbol such as SOL or BTC.",
|
|
1463
|
+
},
|
|
1464
|
+
collateral_symbol: {
|
|
1465
|
+
type: "string",
|
|
1466
|
+
description: "Collateral symbol. Current integration requires the same symbol as market_symbol.",
|
|
1467
|
+
},
|
|
1468
|
+
collateral_amount_raw: {
|
|
1469
|
+
type: "string",
|
|
1470
|
+
description: "Collateral amount in raw token units.",
|
|
1471
|
+
},
|
|
1472
|
+
leverage: {
|
|
1473
|
+
type: "string",
|
|
1474
|
+
description: "Requested leverage as a decimal string such as 5 or 7.5.",
|
|
1475
|
+
},
|
|
1476
|
+
side: {
|
|
1477
|
+
type: "string",
|
|
1478
|
+
enum: ["long", "short"],
|
|
1479
|
+
description: "Position direction.",
|
|
1480
|
+
},
|
|
1481
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1482
|
+
purpose: { type: "string" },
|
|
1483
|
+
user_intent: { type: "boolean" },
|
|
1484
|
+
approval_token: { type: "string" },
|
|
1485
|
+
},
|
|
1486
|
+
required: [
|
|
1487
|
+
"pool_name",
|
|
1488
|
+
"market_symbol",
|
|
1489
|
+
"collateral_symbol",
|
|
1490
|
+
"collateral_amount_raw",
|
|
1491
|
+
"leverage",
|
|
1492
|
+
"side",
|
|
1493
|
+
"mode",
|
|
1494
|
+
"purpose",
|
|
1495
|
+
],
|
|
1496
|
+
additionalProperties: false,
|
|
1497
|
+
},
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
name: "flash_trade_close_position",
|
|
1501
|
+
description: "Preview, prepare, or execute a Flash Trade same-collateral perpetual close on Solana mainnet.",
|
|
1502
|
+
optional: true,
|
|
1503
|
+
parameters: {
|
|
1504
|
+
type: "object",
|
|
1505
|
+
properties: {
|
|
1506
|
+
pool_name: {
|
|
1507
|
+
type: "string",
|
|
1508
|
+
description: "Flash pool identifier such as Crypto.1.",
|
|
1509
|
+
},
|
|
1510
|
+
market_symbol: {
|
|
1511
|
+
type: "string",
|
|
1512
|
+
description: "Flash market symbol such as SOL or BTC.",
|
|
1513
|
+
},
|
|
1514
|
+
side: {
|
|
1515
|
+
type: "string",
|
|
1516
|
+
enum: ["long", "short"],
|
|
1517
|
+
description: "Position direction to close.",
|
|
1518
|
+
},
|
|
1519
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1520
|
+
purpose: { type: "string" },
|
|
1521
|
+
user_intent: { type: "boolean" },
|
|
1522
|
+
approval_token: { type: "string" },
|
|
1523
|
+
},
|
|
1524
|
+
required: ["pool_name", "market_symbol", "side", "mode", "purpose"],
|
|
1525
|
+
additionalProperties: false,
|
|
1526
|
+
},
|
|
1527
|
+
},
|
|
1412
1528
|
{
|
|
1413
1529
|
name: "close_empty_token_accounts",
|
|
1414
1530
|
description: "Preview or execute closing zero-balance token accounts. Execute requires a host-issued approval token bound to the previewed operation.",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"claim_bags_fees",
|
|
9
9
|
"close_empty_token_accounts",
|
|
10
10
|
"continue_solana_private_swap",
|
|
11
|
+
"flash_trade_close_position",
|
|
12
|
+
"flash_trade_open_position",
|
|
11
13
|
"get_active_wallet_backend",
|
|
12
14
|
"get_bags_claimable_positions",
|
|
13
15
|
"get_bags_fee_analytics",
|
|
@@ -26,6 +28,8 @@
|
|
|
26
28
|
"get_evm_token_balance",
|
|
27
29
|
"get_evm_token_metadata",
|
|
28
30
|
"get_evm_transaction_receipt",
|
|
31
|
+
"get_flash_trade_markets",
|
|
32
|
+
"get_flash_trade_positions",
|
|
29
33
|
"get_jupiter_earn_earnings",
|
|
30
34
|
"get_jupiter_earn_positions",
|
|
31
35
|
"get_jupiter_earn_tokens",
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## v0.1.16 - 2026-05-16
|
|
6
|
+
|
|
7
|
+
- Added Flash Trade perpetuals support to the Solana wallet flow, including
|
|
8
|
+
market discovery, position lookup, preview, prepare, open, and close tools.
|
|
9
|
+
- Kept Flash perps wallet-native inside the existing Solana backend instead of
|
|
10
|
+
introducing a separate custodial trading account flow.
|
|
11
|
+
- Added a repo-owned Flash SDK bridge for real quote, prepare, and execution
|
|
12
|
+
planning against Flash Trade from the local runtime.
|
|
13
|
+
- Fixed OpenClaw runtime packaging and plugin contract sync so Flash Trade
|
|
14
|
+
tools are exposed correctly from the installed runtime.
|
|
15
|
+
- Bound Flash execute approvals to the exact approved preview payload, so
|
|
16
|
+
host-issued approvals remain valid across small quote drift between preview
|
|
17
|
+
and execution.
|
|
18
|
+
|
|
5
19
|
- Added ClawHub-publishable OpenClaw plugin package metadata for
|
|
6
20
|
`.openclaw/extensions/agent-wallet` and `.openclaw/extensions/pay-bridge`,
|
|
7
21
|
including required `openclaw.compat`, `openclaw.build`, and
|
package/RELEASING.md
CHANGED
|
@@ -284,3 +284,100 @@ https://github.com/lopushok9/Agent-Layer.git
|
|
|
284
284
|
|
|
285
285
|
Do not use `NPM_TOKEN` unless Trusted Publishing is unavailable. Token-based
|
|
286
286
|
publishes can fail with `EOTP` when npm requires two-factor authentication.
|
|
287
|
+
|
|
288
|
+
## ClawHub Release Workflow
|
|
289
|
+
|
|
290
|
+
This repo also includes a separate GitHub Actions workflow for the OpenClaw
|
|
291
|
+
plugin packages:
|
|
292
|
+
|
|
293
|
+
```text
|
|
294
|
+
.github/workflows/clawhub-plugins.yml
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
It publishes these ClawHub packages:
|
|
298
|
+
|
|
299
|
+
```text
|
|
300
|
+
@agentlayertech/agent-wallet-plugin
|
|
301
|
+
@agentlayertech/pay-bridge-plugin
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Triggers
|
|
305
|
+
|
|
306
|
+
- `pull_request`
|
|
307
|
+
- runs ClawHub publish in `--dry-run` mode for both plugin packages
|
|
308
|
+
- `workflow_dispatch`
|
|
309
|
+
- supports manual runs with a `dry_run` boolean input
|
|
310
|
+
- `push` on git tags matching `v*`
|
|
311
|
+
- publishes both plugin packages to ClawHub
|
|
312
|
+
|
|
313
|
+
### Required secret
|
|
314
|
+
|
|
315
|
+
The workflow requires this repository Actions secret:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
CLAWHUB_TOKEN
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
That token is created in the ClawHub web UI and must belong to an account with
|
|
322
|
+
publisher access to:
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
@agentlayertech
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Family mapping
|
|
329
|
+
|
|
330
|
+
The workflow currently publishes:
|
|
331
|
+
|
|
332
|
+
- `.openclaw/extensions/agent-wallet` as `bundle-plugin`
|
|
333
|
+
- `.openclaw/extensions/pay-bridge` as `code-plugin`
|
|
334
|
+
|
|
335
|
+
`agent-wallet` remains on `bundle-plugin` because the package
|
|
336
|
+
`@agentlayertech/agent-wallet-plugin` was first created in ClawHub with that
|
|
337
|
+
family, and ClawHub does not allow family changes for an existing package name.
|
|
338
|
+
|
|
339
|
+
### Release flow with tags
|
|
340
|
+
|
|
341
|
+
If you want one git tag to publish both npm and ClawHub surfaces together:
|
|
342
|
+
|
|
343
|
+
1. Keep these versions aligned:
|
|
344
|
+
|
|
345
|
+
```text
|
|
346
|
+
package.json
|
|
347
|
+
agent-wallet/pyproject.toml
|
|
348
|
+
.openclaw/extensions/agent-wallet/package.json
|
|
349
|
+
.openclaw/extensions/pay-bridge/package.json
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
2. Commit the release version bump.
|
|
353
|
+
|
|
354
|
+
3. Push `main`.
|
|
355
|
+
|
|
356
|
+
4. Create and push the tag:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
git tag -a v0.1.16 -m "v0.1.16"
|
|
360
|
+
git push origin v0.1.16
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
That tag will trigger:
|
|
364
|
+
|
|
365
|
+
- `.github/workflows/npm-installer.yml`
|
|
366
|
+
- `.github/workflows/clawhub-plugins.yml`
|
|
367
|
+
|
|
368
|
+
### Manual verification without publishing
|
|
369
|
+
|
|
370
|
+
To verify the ClawHub workflow and token without creating a new release:
|
|
371
|
+
|
|
372
|
+
1. Open GitHub Actions
|
|
373
|
+
2. Select `ClawHub plugins`
|
|
374
|
+
3. Click `Run workflow`
|
|
375
|
+
4. Choose branch `main`
|
|
376
|
+
5. Set `dry_run=true`
|
|
377
|
+
6. Run it
|
|
378
|
+
|
|
379
|
+
Expected result:
|
|
380
|
+
|
|
381
|
+
- both matrix jobs succeed
|
|
382
|
+
- ClawHub login succeeds
|
|
383
|
+
- both package publishes resolve in dry-run mode without uploading
|
|
@@ -65,6 +65,11 @@ HOUDINI_USER_IP=
|
|
|
65
65
|
HOUDINI_USER_AGENT=AgentLayer/0.1.12
|
|
66
66
|
HOUDINI_USER_TIMEZONE=UTC
|
|
67
67
|
|
|
68
|
+
# Flash Trade perps
|
|
69
|
+
FLASH_API_BASE_URL=
|
|
70
|
+
FLASH_SDK_BRIDGE_COMMAND=
|
|
71
|
+
FLASH_SDK_BRIDGE_MODE=real
|
|
72
|
+
|
|
68
73
|
# Kamino REST lending
|
|
69
74
|
KAMINO_API_BASE_URL=https://api.kamino.finance
|
|
70
75
|
KAMINO_PROGRAM_ID=KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
|
package/agent-wallet/README.md
CHANGED
|
@@ -524,6 +524,30 @@ Operational notes:
|
|
|
524
524
|
- Jupiter `Portfolio` implementation remains in the backend, but the agent-facing tools are temporarily disabled.
|
|
525
525
|
- The Jupiter config fields and provider code are intentionally kept so these surfaces can be restored later without rebuilding the integration from scratch.
|
|
526
526
|
|
|
527
|
+
## Flash Trade coverage
|
|
528
|
+
|
|
529
|
+
Current Flash Trade integration is intentionally phase-scoped:
|
|
530
|
+
|
|
531
|
+
- read-only `markets` and `positions` hooks are now wired through the Solana backend and OpenClaw adapter
|
|
532
|
+
- the transport is provider-driven, so Flash can be added through `provider-gateway` without introducing a new wallet runtime
|
|
533
|
+
|
|
534
|
+
Operational notes:
|
|
535
|
+
|
|
536
|
+
- current agent-facing tools are `get_flash_trade_markets` and `get_flash_trade_positions`
|
|
537
|
+
- these reads are mainnet-only
|
|
538
|
+
- Flash perpetual opens/closes now follow the existing `preview -> prepare -> execute` approval model instead of a separate trading wallet flow
|
|
539
|
+
- Flash reads expect either hosted/self-hosted gateway routes on `PROVIDER_GATEWAY_URL` or a direct `FLASH_API_BASE_URL`
|
|
540
|
+
- if those HTTP routes are unavailable, the Solana backend now falls back to the local `flash-sdk-bridge` for market discovery and user-position discovery
|
|
541
|
+
- Phase 2 now also adds `flash_trade_open_position` and `flash_trade_close_position` in `preview` / `prepare` / `execute`
|
|
542
|
+
- those preview/prepare/execute flows are produced by a local bridge command configured via `FLASH_SDK_BRIDGE_COMMAND`
|
|
543
|
+
- the bridge is expected to return machine JSON on stdout; `agent-wallet/tests/smoke_flash_sdk_bridge.py` documents the minimal contract shape
|
|
544
|
+
- a repo-owned Node bridge now lives at `agent-wallet/scripts/flash-sdk-bridge/bridge.mjs`
|
|
545
|
+
- install its pinned SDK dependencies with `cd agent-wallet/scripts/flash-sdk-bridge && npm install`
|
|
546
|
+
- `FLASH_SDK_BRIDGE_MODE=mock` provides deterministic smoke behavior without SDK dependencies
|
|
547
|
+
- `FLASH_SDK_BRIDGE_MODE=real` now produces real Flash SDK quotes for preview and real versioned transaction builds for prepare/execute
|
|
548
|
+
- the backend locally verifies the provider-built Flash transaction, applies only the wallet signature, and requires a host-issued approval token before broadcast; tool-level `prepare` still strips signed transaction bytes before returning to the agent
|
|
549
|
+
- current real-mode constraints are intentionally narrow: mainnet only, same-collateral `market_symbol == collateral_symbol`, and whole-number leverage strings for opens
|
|
550
|
+
|
|
527
551
|
## Native staking coverage
|
|
528
552
|
|
|
529
553
|
Current native Solana staking integration now includes:
|
|
@@ -60,6 +60,10 @@ class Settings(BaseSettings):
|
|
|
60
60
|
houdini_user_ip: str = ""
|
|
61
61
|
houdini_user_agent: str = "AgentLayer/0.1.12"
|
|
62
62
|
houdini_user_timezone: str = "UTC"
|
|
63
|
+
flash_api_base_url: str = ""
|
|
64
|
+
flash_sdk_bridge_command: str = ""
|
|
65
|
+
flash_sdk_bridge_mode: str = "mock"
|
|
66
|
+
flash_sdk_bridge_timeout_seconds: float = 20.0
|
|
63
67
|
kamino_api_base_url: str = "https://api.kamino.finance"
|
|
64
68
|
kamino_program_id: str = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"
|
|
65
69
|
alchemy_api_key: str = ""
|