@argent/x-shared 1.65.0 → 1.66.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/dist/index.cjs +1 -1
- package/dist/index.js +407 -402
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs +1 -0
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js +6 -0
- package/dist/src/accountNameGenerator/x-names.json.js +1 -1
- package/dist/src/chains/starknet/network.cjs +1 -1
- package/dist/src/chains/starknet/network.d.ts +1 -0
- package/dist/src/chains/starknet/network.js +18 -10
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.d.ts +0 -1
- package/dist/src/features/paymaster/PaymasterService.js +19 -25
- package/dist/src/features/swap/models/execute.model.d.ts +35 -0
- package/dist/src/features/swap/models/index.d.ts +1 -0
- package/dist/src/features/swap/services/ISwapTransactionService.d.ts +10 -0
- package/dist/src/features/swap/services/{implementation.d.ts → SwapSharedService.d.ts} +1 -1
- package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -0
- package/dist/src/features/swap/services/SwapTransactionService.d.ts +15 -0
- package/dist/src/features/swap/services/SwapTransactionService.js +60 -0
- package/dist/src/features/swap/services/index.d.ts +4 -2
- package/dist/src/transactions/index.d.ts +1 -0
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -0
- package/dist/src/transactions/transactionExecuteTypes.d.ts +114 -0
- package/dist/src/transactions/transactionExecuteTypes.js +23 -0
- package/dist/swap.cjs +1 -1
- package/dist/swap.js +20 -18
- package/package.json +11 -11
- /package/dist/src/features/swap/services/{interface.d.ts → ISwapSharedService.d.ts} +0 -0
- /package/dist/src/features/swap/services/{implementation.cjs → SwapSharedService.cjs} +0 -0
- /package/dist/src/features/swap/services/{implementation.js → SwapSharedService.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z as t } from "zod";
|
|
2
|
+
const o = t.object({
|
|
3
|
+
tokenType: t.string(),
|
|
4
|
+
tokenAddress: t.string(),
|
|
5
|
+
tokenAmount: t.string()
|
|
6
|
+
}), n = t.object({
|
|
7
|
+
type: t.enum(["lootbox"]),
|
|
8
|
+
status: t.enum(["notEligible", "win", "loss", "disabled"]),
|
|
9
|
+
prizes: t.array(o).nullable().optional()
|
|
10
|
+
// need to support null values too
|
|
11
|
+
}), a = t.object({
|
|
12
|
+
transactionState: t.enum(["submitted", "rejected"]).optional(),
|
|
13
|
+
transactionHash: t.string(),
|
|
14
|
+
rejectReason: t.string().nullable().optional(),
|
|
15
|
+
// need to support null values too
|
|
16
|
+
promotions: t.array(n).nullable().optional()
|
|
17
|
+
// need to support null values too
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
a as transactionExecutionResponseSchema,
|
|
21
|
+
o as transactionPromotionPrizeSchema,
|
|
22
|
+
n as transactionPromotionSchema
|
|
23
|
+
};
|
package/dist/swap.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./src/features/swap/services/SwapSharedService.cjs"),S=require("./src/features/swap/services/SwapTransactionService.cjs"),r=require("./src/features/swap/models/order.model.cjs"),e=require("./src/features/swap/models/quote.model.cjs"),a=require("./src/features/swap/models/trade.model.cjs"),c=require("./src/features/swap/utils/totalFee.cjs"),t=require("./src/features/swap/utils/slippage.cjs");exports.SharedSwapService=o.SharedSwapService;exports.SwapTransactionService=S.SwapTransactionService;exports.SwapOrderRequestSchema=r.SwapOrderRequestSchema;exports.SwapOrderResponseSchema=r.SwapOrderResponseSchema;exports.SwapDataSchema=e.SwapDataSchema;exports.SwapQuoteResponseSchema=e.SwapQuoteResponseSchema;exports.SwapQuoteRouteSchema=e.SwapQuoteRouteSchema;exports.TradeSchema=a.TradeSchema;Object.defineProperty(exports,"TradeType",{enumerable:!0,get:()=>a.TradeType});exports.TradeTypeSchema=a.TradeTypeSchema;exports.calculateTotalFee=c.calculateTotalFee;exports.maximumAmountInForTrade=t.maximumAmountInForTrade;exports.minimumAmountOutFromTrade=t.minimumAmountOutFromTrade;
|
package/dist/swap.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { SharedSwapService as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { SharedSwapService as a } from "./src/features/swap/services/SwapSharedService.js";
|
|
2
|
+
import { SwapTransactionService as m } from "./src/features/swap/services/SwapTransactionService.js";
|
|
3
|
+
import { SwapOrderRequestSchema as t, SwapOrderResponseSchema as S } from "./src/features/swap/models/order.model.js";
|
|
4
|
+
import { SwapDataSchema as u, SwapQuoteResponseSchema as T, SwapQuoteRouteSchema as d } from "./src/features/swap/models/quote.model.js";
|
|
5
|
+
import { TradeSchema as n, TradeType as x, TradeTypeSchema as f } from "./src/features/swap/models/trade.model.js";
|
|
6
|
+
import { calculateTotalFee as i } from "./src/features/swap/utils/totalFee.js";
|
|
7
|
+
import { maximumAmountInForTrade as R, minimumAmountOutFromTrade as l } from "./src/features/swap/utils/slippage.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
x as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
a as SharedSwapService,
|
|
10
|
+
u as SwapDataSchema,
|
|
11
|
+
t as SwapOrderRequestSchema,
|
|
12
|
+
S as SwapOrderResponseSchema,
|
|
13
|
+
T as SwapQuoteResponseSchema,
|
|
14
|
+
d as SwapQuoteRouteSchema,
|
|
15
|
+
m as SwapTransactionService,
|
|
16
|
+
n as TradeSchema,
|
|
17
|
+
x as TradeType,
|
|
18
|
+
f as TradeTypeSchema,
|
|
19
|
+
i as calculateTotalFee,
|
|
20
|
+
R as maximumAmountInForTrade,
|
|
21
|
+
l as minimumAmountOutFromTrade
|
|
20
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.66.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -54,28 +54,28 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@amplitude/analytics-types": "2.8.4",
|
|
57
|
-
"@commitlint/cli": "19.
|
|
58
|
-
"@commitlint/config-conventional": "19.
|
|
57
|
+
"@commitlint/cli": "19.7.1",
|
|
58
|
+
"@commitlint/config-conventional": "19.7.1",
|
|
59
59
|
"@rollup/plugin-typescript": "12.1.2",
|
|
60
60
|
"@semantic-release/git": "10.0.1",
|
|
61
61
|
"@types/async-retry": "1.4.9",
|
|
62
62
|
"@types/lodash-es": "4.17.12",
|
|
63
63
|
"@types/numeral": "2.0.5",
|
|
64
64
|
"@types/ua-parser-js": "0.7.39",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
66
|
-
"@typescript-eslint/parser": "8.
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "8.23.0",
|
|
66
|
+
"@typescript-eslint/parser": "8.23.0",
|
|
67
67
|
"eslint": "8.57.1",
|
|
68
68
|
"eslint-config-prettier": "10.0.1",
|
|
69
69
|
"eslint-plugin-import": "2.31.0",
|
|
70
70
|
"husky": "9.1.7",
|
|
71
|
-
"lint-staged": "15.
|
|
72
|
-
"msw": "2.
|
|
71
|
+
"lint-staged": "15.4.3",
|
|
72
|
+
"msw": "2.7.0",
|
|
73
73
|
"prettier": "3.4.2",
|
|
74
|
-
"semantic-release": "24.2.
|
|
74
|
+
"semantic-release": "24.2.1",
|
|
75
75
|
"ts-to-zod": "3.15.0",
|
|
76
|
-
"typescript": "5.7.
|
|
77
|
-
"vite": "6.0.
|
|
78
|
-
"vite-plugin-dts": "4.
|
|
76
|
+
"typescript": "5.7.3",
|
|
77
|
+
"vite": "6.0.11",
|
|
78
|
+
"vite-plugin-dts": "4.5.0",
|
|
79
79
|
"vitest": "3.0.5"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|