@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.
@@ -0,0 +1,33 @@
1
+ # Flash SDK Bridge
2
+
3
+ This package is the repo-owned local bridge between `agent-wallet` and Flash Trade's official `flash-sdk`.
4
+
5
+ Current goals:
6
+
7
+ - keep Flash Trade SDK usage isolated from the Python wallet runtime
8
+ - preserve `agent-wallet` custody, approval, signing, and execution policy
9
+ - provide a stable stdin/stdout JSON contract that the Python backend can call
10
+
11
+ ## Modes
12
+
13
+ - `FLASH_SDK_BRIDGE_MODE=mock`
14
+ Returns deterministic payloads for local smoke checks without installing SDK dependencies.
15
+ - `FLASH_SDK_BRIDGE_MODE=real`
16
+ Loads `flash-sdk` and validates runtime config. This mode now supports market discovery, user-position discovery, open/close previews, and unsigned transaction preparation for the current same-collateral Flash perps MVP.
17
+
18
+ ## Command
19
+
20
+ Recommended `agent-wallet` setting:
21
+
22
+ ```bash
23
+ FLASH_SDK_BRIDGE_COMMAND="node /absolute/path/to/agent-wallet/scripts/flash-sdk-bridge/bridge.mjs"
24
+ ```
25
+
26
+ For local smoke:
27
+
28
+ ```bash
29
+ FLASH_SDK_BRIDGE_MODE=mock \
30
+ node agent-wallet/scripts/flash-sdk-bridge/bridge.mjs <<'EOF'
31
+ {"action":"preview_open_position_same_collateral","owner":"Fake11111111111111111111111111111111111111111","pool_name":"Crypto.1","market_symbol":"SOL","collateral_symbol":"SOL","collateral_amount_raw":"100000000","leverage":"5","side":"long","network":"mainnet"}
32
+ EOF
33
+ ```