aegis-swap-widget 0.6.0 → 0.8.0
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/CHANGELOG.md +17 -0
- package/README.md +41 -7
- package/dist/aegis-swap-widget.js +4473 -4431
- package/dist/styles.css +1 -1
- package/dist/widget/types.d.ts +12 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 127be2b: Add trusted Aegis Engine v1.0.3 deployment support for Robinhood Chain, upgrade the Engine SDK to 0.33.0, and bundle Robinhood Chain network artwork in the widget. Redeem quotes now return execution fields only for an SDK-verified frame, and an execution-gated redeem that the Engine assessed above the post-redeem utilization cap reports `utilization-blocked`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [127be2b]
|
|
12
|
+
- @aegis-engine/core@0.4.0
|
|
13
|
+
|
|
14
|
+
## 0.7.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 0416588: Add controlled Engine market lookup by exact token resource identity so partner apps can switch Lend and Borrow markets without storing Engine market ids.
|
|
19
|
+
|
|
3
20
|
## 0.6.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,9 @@ Embed Amplifi Swap or Aegis Engine directly in a React application. Import the
|
|
|
4
4
|
component and CSS, then configure networks, REST data, wallet handoff, and host
|
|
5
5
|
styling through props.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Choose `<AegisSwapWidget />` for a swap-only embed or
|
|
8
|
+
`<AegisEngineWidget />` for Buy, Borrow, Lend, and Positions. Quoting, token
|
|
9
|
+
approval, Permit2 signing, and transaction submission stay inside the widget.
|
|
8
10
|
|
|
9
11
|
In the direct-pool widget, typing in the Sell field creates an exact-input swap
|
|
10
12
|
and typing in the Buy field creates an exact-output swap. Active quotes refresh
|
|
@@ -60,6 +62,9 @@ export function Engine({ account, provider }) {
|
|
|
60
62
|
|
|
61
63
|
## Partner context and host action requirements
|
|
62
64
|
|
|
65
|
+
Wolf Game partners can use the canonical
|
|
66
|
+
[live Wolf preview](https://swap.widget.aegis.markets/wolf).
|
|
67
|
+
|
|
63
68
|
`partnerContext` adds optional, display-only facts from a game or partner. The
|
|
64
69
|
host must normalize this data on its server. Do not pass API keys, private
|
|
65
70
|
vendor responses, or wallet-specific context through shared URLs.
|
|
@@ -164,13 +169,41 @@ silent unless the host supplies an `actionRequirement`; then the widget places
|
|
|
164
169
|
one compact purpose row beside the active Buy or Borrow transaction content.
|
|
165
170
|
Partner identity, weather, aggregate balances, activities, secondary details,
|
|
166
171
|
and navigation remain available only in the default `showroom` variant. If the
|
|
167
|
-
host already owns resource selection, pass
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
host already owns resource selection, pass the selected token through
|
|
173
|
+
`marketResource`. The widget resolves its eligible Lend/Borrow market from live
|
|
174
|
+
Engine discovery on the active chain by exact address and symbol:
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
const wolfResources = {
|
|
178
|
+
WATER: {
|
|
179
|
+
chainId: 1,
|
|
180
|
+
address: '0x828B22c9ea1c20B551EeFC6198174C4bb7a8CBF6',
|
|
181
|
+
symbol: 'WATER',
|
|
182
|
+
},
|
|
183
|
+
// WOOD, GRASS, and STONE use the same shape.
|
|
184
|
+
} as const
|
|
185
|
+
|
|
186
|
+
<AegisEngineWidget
|
|
187
|
+
chainId={1}
|
|
188
|
+
enabledChainIds={[1]}
|
|
189
|
+
marketResource={wolfResources[selectedResource]}
|
|
190
|
+
/>
|
|
191
|
+
```
|
|
171
192
|
|
|
172
|
-
|
|
173
|
-
|
|
193
|
+
The resource chain must be the widget's active chain; Valley uses `chainId={1}`.
|
|
194
|
+
This controlled form hides the widget market picker. It selects only one exact,
|
|
195
|
+
surface-compatible match and fails closed when discovery returns none or more
|
|
196
|
+
than one. The host does not need to store Engine market ids. `marketResource`
|
|
197
|
+
locates the market; it does not lock which of the market's two tokens the user
|
|
198
|
+
chooses inside Lend or Borrow. If several Engine markets intentionally use the
|
|
199
|
+
same resource, add `marketId` only to disambiguate within those matches. A
|
|
200
|
+
mismatched id never bypasses resource identity. Use `defaultMarketId` when the
|
|
201
|
+
widget should own selection. The nested Buy surface remains independently
|
|
202
|
+
controlled through `buySwapConfig`; one-shot partner Buy intents already
|
|
203
|
+
resolve their matching direct pool.
|
|
204
|
+
|
|
205
|
+
Wolf Game's aggregate API provides game-wide balances plus weather and
|
|
206
|
+
harvesting data for a selected community. It does not provide wallet-specific inventory, claimable
|
|
174
207
|
resources, energy timing, or a concrete action requirement. A Wolf host must
|
|
175
208
|
therefore create `actionRequirement` only from real game state. Do not derive it
|
|
176
209
|
from aggregate weather or inventory alone.
|
|
@@ -900,6 +933,7 @@ No other props changed. See the [CHANGELOG](./CHANGELOG.md) for the full entry.
|
|
|
900
933
|
- `title`: optional widget heading. Swap and Engine default to empty for compact embedded chrome.
|
|
901
934
|
- `showNetworkSelector`: Engine header-network visibility: `'never'` (default), `'auto'`, or `'always'`. Cross-chain markets and tokens remain available in the full selectors when the header rail is hidden.
|
|
902
935
|
- `onSurfaceChange`: Engine callback fired when the active unified tab changes (`'buy'`, `'borrow'`, `'lend'`, or `'positions'`).
|
|
936
|
+
- `marketResource`: controlled Lend/Borrow market locator (`chainId`, token `address`, and `symbol`). On the active chain, the widget resolves one eligible Engine market, hides its picker, and fails closed on missing or ambiguous matches. It does not lock token direction. Use `marketId` only as an optional disambiguator for the same resource.
|
|
903
937
|
- `buySwapConfig`: optional host overrides for the nested Engine Buy surface only. Use it to constrain Buy to a chain, pool set, or controlled `poolId` without changing Engine market discovery or the Lend/Borrow/Positions surfaces.
|
|
904
938
|
- `showBuySettings`: show the Engine Buy surface's slippage-settings control. Defaults to `false`.
|
|
905
939
|
- `showAmountSlider`: amount-slider visibility on the Engine lend/borrow amount boxes: `'auto'` (default) shows sliders on the borrow surface only, sized against the wallet's borrowing limit; `'always'` adds the lend deposit slider; `'never'` hides every amount slider.
|