@velora-dex/sdk 9.5.4-dev.0 → 9.5.4-dev.1
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/dist/examples/wagmi.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/methods/delta/helpers/orders.d.ts +16 -1
- package/dist/methods/delta/helpers/orders.d.ts.map +1 -1
- package/dist/methods/delta/helpers/types.d.ts +38 -1
- package/dist/methods/delta/helpers/types.d.ts.map +1 -1
- package/dist/sdk.cjs.development.js +19 -0
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +19 -0
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +5 -0
- package/src/methods/delta/helpers/orders.ts +26 -0
- package/src/methods/delta/helpers/types.ts +41 -2
package/dist/sdk.esm.js
CHANGED
|
@@ -7585,6 +7585,13 @@ function isExternalOrder(order) {
|
|
|
7585
7585
|
function isDeltaOrder(order) {
|
|
7586
7586
|
return !isExternalOrder(order) && 'kind' in order && typeof order.kind === 'number';
|
|
7587
7587
|
}
|
|
7588
|
+
/**
|
|
7589
|
+
* @description Checks whether an order is a Productive Delta order
|
|
7590
|
+
* (strategy-routed order without an explicit OrderKind).
|
|
7591
|
+
*/
|
|
7592
|
+
function isProductiveOrder(order) {
|
|
7593
|
+
return 'strategy' in order && typeof order.strategy === 'string';
|
|
7594
|
+
}
|
|
7588
7595
|
/**
|
|
7589
7596
|
* @description Checks whether an auction is a TWAP auction.
|
|
7590
7597
|
*/
|
|
@@ -7615,17 +7622,25 @@ function isDeltaAuction(auction) {
|
|
|
7615
7622
|
function isExternalAuction(auction) {
|
|
7616
7623
|
return auction.onChainOrderType === 'ExternalOrder';
|
|
7617
7624
|
}
|
|
7625
|
+
/**
|
|
7626
|
+
* @description Checks whether an auction is a Productive auction.
|
|
7627
|
+
*/
|
|
7628
|
+
function isProductiveAuction(auction) {
|
|
7629
|
+
return auction.onChainOrderType === 'ProductiveOrder';
|
|
7630
|
+
}
|
|
7618
7631
|
var checks = {
|
|
7619
7632
|
isTWAPOrder: isTWAPOrder,
|
|
7620
7633
|
isTWAPSellOrder: isTWAPSellOrder,
|
|
7621
7634
|
isTWAPBuyOrder: isTWAPBuyOrder,
|
|
7622
7635
|
isExternalOrder: isExternalOrder,
|
|
7623
7636
|
isDeltaOrder: isDeltaOrder,
|
|
7637
|
+
isProductiveOrder: isProductiveOrder,
|
|
7624
7638
|
isTWAPAuction: isTWAPAuction,
|
|
7625
7639
|
isTWAPSellAuction: isTWAPSellAuction,
|
|
7626
7640
|
isTWAPBuyAuction: isTWAPBuyAuction,
|
|
7627
7641
|
isDeltaAuction: isDeltaAuction,
|
|
7628
7642
|
isExternalAuction: isExternalAuction,
|
|
7643
|
+
isProductiveAuction: isProductiveAuction,
|
|
7629
7644
|
isOrderCrosschain: isOrderCrosschain,
|
|
7630
7645
|
isExecutedAuction: isExecutedAuction,
|
|
7631
7646
|
isPartiallyExecutedAuction: isPartiallyExecutedAuction,
|
|
@@ -7737,6 +7752,10 @@ function getAuctionSwapSide(auction) {
|
|
|
7737
7752
|
// TWAP orders have onChainOrderType instead of kind
|
|
7738
7753
|
return getSwapSideFromTwapOrderType(auction.onChainOrderType);
|
|
7739
7754
|
}
|
|
7755
|
+
if (isProductiveAuction(auction)) {
|
|
7756
|
+
// ProductiveOrders don't carry an explicit OrderKind; treated as SELL.
|
|
7757
|
+
return 'SELL';
|
|
7758
|
+
}
|
|
7740
7759
|
return getSwapSideFromDeltaOrder(auction.order);
|
|
7741
7760
|
}
|
|
7742
7761
|
/**
|