@longdotxyz/shared 0.0.74 → 0.0.76

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.
@@ -21,6 +21,7 @@ const auction_template_contract_1 = require("./auction-template.contract");
21
21
  const auction_contract_1 = require("./auction.contract");
22
22
  const community_contract_1 = require("./community.contract");
23
23
  const ipfs_contract_1 = require("./ipfs.contract");
24
+ const pathfinding_contract_1 = require("./pathfinding.contract");
24
25
  const sponsorship_contract_1 = require("./sponsorship.contract");
25
26
  const contract = (0, core_1.initContract)();
26
27
  exports.rootContract = contract.router({
@@ -29,6 +30,7 @@ exports.rootContract = contract.router({
29
30
  auctionTemplates: auction_template_contract_1.auctionTemplateContract,
30
31
  communities: community_contract_1.communityContract,
31
32
  ipfs: ipfs_contract_1.ipfsContract,
33
+ pathfinding: pathfinding_contract_1.pathfindingContract,
32
34
  sponsorships: sponsorship_contract_1.sponsorshipContract,
33
35
  });
34
36
  __exportStar(require("./asset.contract"), exports);
@@ -36,5 +38,6 @@ __exportStar(require("./auction.contract"), exports);
36
38
  __exportStar(require("./auction-template.contract"), exports);
37
39
  __exportStar(require("./community.contract"), exports);
38
40
  __exportStar(require("./ipfs.contract"), exports);
41
+ __exportStar(require("./pathfinding.contract"), exports);
39
42
  __exportStar(require("./sponsorship.contract"), exports);
40
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAA6C;AAE7C,qDAAiD;AACjD,2EAAsE;AACtE,yDAAqD;AACrD,6DAAyD;AACzD,mDAA+C;AAC/C,iEAA6D;AAE7D,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AACnB,QAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,8BAAa;IACrB,QAAQ,EAAE,kCAAe;IACzB,gBAAgB,EAAE,mDAAuB;IACzC,WAAW,EAAE,sCAAiB;IAC9B,IAAI,EAAE,4BAAY;IAClB,YAAY,EAAE,0CAAmB;CACpC,CAAC,CAAC;AAEH,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,uDAAqC;AACrC,kDAAgC;AAChC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAA6C;AAE7C,qDAAiD;AACjD,2EAAsE;AACtE,yDAAqD;AACrD,6DAAyD;AACzD,mDAA+C;AAC/C,iEAA6D;AAC7D,iEAA6D;AAE7D,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AACnB,QAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,8BAAa;IACrB,QAAQ,EAAE,kCAAe;IACzB,gBAAgB,EAAE,mDAAuB;IACzC,WAAW,EAAE,sCAAiB;IAC9B,IAAI,EAAE,4BAAY;IAClB,WAAW,EAAE,0CAAmB;IAChC,YAAY,EAAE,0CAAmB;CACpC,CAAC,CAAC;AAEH,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,uDAAqC;AACrC,kDAAgC;AAChC,yDAAuC;AACvC,yDAAuC"}
@@ -1,14 +1,22 @@
1
1
  import z from "zod";
2
2
  declare const ipfsContract: {
3
3
  uploadImage: {
4
- [x: string]: any;
5
4
  description: "Upload an image to IPFS";
6
5
  method: "POST";
7
6
  contentType: "multipart/form-data";
8
7
  body: z.ZodAny;
8
+ path: "/ipfs/upload-image";
9
+ responses: {
10
+ 200: z.ZodObject<{
11
+ result: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ result: string;
14
+ }, {
15
+ result: string;
16
+ }>;
17
+ };
9
18
  };
10
19
  uploadMetadata: {
11
- [x: string]: any;
12
20
  description: "Upload metadata to IPFS";
13
21
  method: "POST";
14
22
  body: z.ZodObject<{
@@ -18,13 +26,61 @@ declare const ipfsContract: {
18
26
  social_links: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
19
27
  label: z.ZodString;
20
28
  url: z.ZodString;
21
- }, z.core.$strip>>>>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ label: string;
31
+ url: string;
32
+ }, {
33
+ label: string;
34
+ url: string;
35
+ }>, "many">>>;
22
36
  vesting_recipients: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
23
37
  address: z.ZodString;
24
38
  amount: z.ZodNumber;
25
- }, z.core.$strip>>>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ address: string;
41
+ amount: number;
42
+ }, {
43
+ address: string;
44
+ amount: number;
45
+ }>, "many">>>;
26
46
  fee_receiver: z.ZodDefault<z.ZodOptional<z.ZodString>>;
27
- }, z.core.$strip>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ name: string;
49
+ description: string;
50
+ image_hash: string;
51
+ fee_receiver: string;
52
+ social_links: {
53
+ label: string;
54
+ url: string;
55
+ }[];
56
+ vesting_recipients: {
57
+ address: string;
58
+ amount: number;
59
+ }[];
60
+ }, {
61
+ name: string;
62
+ description: string;
63
+ image_hash: string;
64
+ fee_receiver?: string | undefined;
65
+ social_links?: {
66
+ label: string;
67
+ url: string;
68
+ }[] | undefined;
69
+ vesting_recipients?: {
70
+ address: string;
71
+ amount: number;
72
+ }[] | undefined;
73
+ }>;
74
+ path: "/ipfs/upload-metadata";
75
+ responses: {
76
+ 200: z.ZodObject<{
77
+ result: z.ZodString;
78
+ }, "strip", z.ZodTypeAny, {
79
+ result: string;
80
+ }, {
81
+ result: string;
82
+ }>;
83
+ };
28
84
  };
29
85
  };
30
86
  export { ipfsContract };
@@ -0,0 +1,263 @@
1
+ import z from "zod";
2
+ declare const FetchTokensPathsResponseSchema: z.ZodObject<{
3
+ token_address: z.ZodString;
4
+ paths_count: z.ZodNumber;
5
+ paths: z.ZodArray<z.ZodObject<{
6
+ start_token_address: z.ZodString;
7
+ end_token_address: z.ZodString;
8
+ score: z.ZodNumber;
9
+ total_liquidity_usd: z.ZodNumber;
10
+ total_volume_usd: z.ZodNumber;
11
+ bottleneck_liquidity_usd: z.ZodNumber;
12
+ hops: z.ZodArray<z.ZodObject<{
13
+ pool_address: z.ZodString;
14
+ token_in_address: z.ZodString;
15
+ token_out_address: z.ZodString;
16
+ protocol: z.ZodString;
17
+ fee: z.ZodNullable<z.ZodNumber>;
18
+ tick_spacing: z.ZodNullable<z.ZodNumber>;
19
+ hooks: z.ZodNullable<z.ZodString>;
20
+ liquidity_usd: z.ZodNullable<z.ZodNumber>;
21
+ volume_usd: z.ZodNullable<z.ZodNumber>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ fee: number | null;
24
+ hooks: string | null;
25
+ pool_address: string;
26
+ token_in_address: string;
27
+ token_out_address: string;
28
+ protocol: string;
29
+ tick_spacing: number | null;
30
+ liquidity_usd: number | null;
31
+ volume_usd: number | null;
32
+ }, {
33
+ fee: number | null;
34
+ hooks: string | null;
35
+ pool_address: string;
36
+ token_in_address: string;
37
+ token_out_address: string;
38
+ protocol: string;
39
+ tick_spacing: number | null;
40
+ liquidity_usd: number | null;
41
+ volume_usd: number | null;
42
+ }>, "many">;
43
+ }, "strip", z.ZodTypeAny, {
44
+ start_token_address: string;
45
+ end_token_address: string;
46
+ score: number;
47
+ total_liquidity_usd: number;
48
+ total_volume_usd: number;
49
+ bottleneck_liquidity_usd: number;
50
+ hops: {
51
+ fee: number | null;
52
+ hooks: string | null;
53
+ pool_address: string;
54
+ token_in_address: string;
55
+ token_out_address: string;
56
+ protocol: string;
57
+ tick_spacing: number | null;
58
+ liquidity_usd: number | null;
59
+ volume_usd: number | null;
60
+ }[];
61
+ }, {
62
+ start_token_address: string;
63
+ end_token_address: string;
64
+ score: number;
65
+ total_liquidity_usd: number;
66
+ total_volume_usd: number;
67
+ bottleneck_liquidity_usd: number;
68
+ hops: {
69
+ fee: number | null;
70
+ hooks: string | null;
71
+ pool_address: string;
72
+ token_in_address: string;
73
+ token_out_address: string;
74
+ protocol: string;
75
+ tick_spacing: number | null;
76
+ liquidity_usd: number | null;
77
+ volume_usd: number | null;
78
+ }[];
79
+ }>, "many">;
80
+ }, "strip", z.ZodTypeAny, {
81
+ token_address: string;
82
+ paths_count: number;
83
+ paths: {
84
+ start_token_address: string;
85
+ end_token_address: string;
86
+ score: number;
87
+ total_liquidity_usd: number;
88
+ total_volume_usd: number;
89
+ bottleneck_liquidity_usd: number;
90
+ hops: {
91
+ fee: number | null;
92
+ hooks: string | null;
93
+ pool_address: string;
94
+ token_in_address: string;
95
+ token_out_address: string;
96
+ protocol: string;
97
+ tick_spacing: number | null;
98
+ liquidity_usd: number | null;
99
+ volume_usd: number | null;
100
+ }[];
101
+ }[];
102
+ }, {
103
+ token_address: string;
104
+ paths_count: number;
105
+ paths: {
106
+ start_token_address: string;
107
+ end_token_address: string;
108
+ score: number;
109
+ total_liquidity_usd: number;
110
+ total_volume_usd: number;
111
+ bottleneck_liquidity_usd: number;
112
+ hops: {
113
+ fee: number | null;
114
+ hooks: string | null;
115
+ pool_address: string;
116
+ token_in_address: string;
117
+ token_out_address: string;
118
+ protocol: string;
119
+ tick_spacing: number | null;
120
+ liquidity_usd: number | null;
121
+ volume_usd: number | null;
122
+ }[];
123
+ }[];
124
+ }>;
125
+ declare const pathfindingContract: {
126
+ fetchTokenPaths: {
127
+ pathParams: z.ZodObject<{
128
+ tokenInAddress: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ tokenInAddress: `0x${string}`;
131
+ }, {
132
+ tokenInAddress: string;
133
+ }>;
134
+ method: "GET";
135
+ path: "paths/:tokenInAddress";
136
+ responses: {
137
+ 200: z.ZodObject<{
138
+ token_address: z.ZodString;
139
+ paths_count: z.ZodNumber;
140
+ paths: z.ZodArray<z.ZodObject<{
141
+ start_token_address: z.ZodString;
142
+ end_token_address: z.ZodString;
143
+ score: z.ZodNumber;
144
+ total_liquidity_usd: z.ZodNumber;
145
+ total_volume_usd: z.ZodNumber;
146
+ bottleneck_liquidity_usd: z.ZodNumber;
147
+ hops: z.ZodArray<z.ZodObject<{
148
+ pool_address: z.ZodString;
149
+ token_in_address: z.ZodString;
150
+ token_out_address: z.ZodString;
151
+ protocol: z.ZodString;
152
+ fee: z.ZodNullable<z.ZodNumber>;
153
+ tick_spacing: z.ZodNullable<z.ZodNumber>;
154
+ hooks: z.ZodNullable<z.ZodString>;
155
+ liquidity_usd: z.ZodNullable<z.ZodNumber>;
156
+ volume_usd: z.ZodNullable<z.ZodNumber>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ fee: number | null;
159
+ hooks: string | null;
160
+ pool_address: string;
161
+ token_in_address: string;
162
+ token_out_address: string;
163
+ protocol: string;
164
+ tick_spacing: number | null;
165
+ liquidity_usd: number | null;
166
+ volume_usd: number | null;
167
+ }, {
168
+ fee: number | null;
169
+ hooks: string | null;
170
+ pool_address: string;
171
+ token_in_address: string;
172
+ token_out_address: string;
173
+ protocol: string;
174
+ tick_spacing: number | null;
175
+ liquidity_usd: number | null;
176
+ volume_usd: number | null;
177
+ }>, "many">;
178
+ }, "strip", z.ZodTypeAny, {
179
+ start_token_address: string;
180
+ end_token_address: string;
181
+ score: number;
182
+ total_liquidity_usd: number;
183
+ total_volume_usd: number;
184
+ bottleneck_liquidity_usd: number;
185
+ hops: {
186
+ fee: number | null;
187
+ hooks: string | null;
188
+ pool_address: string;
189
+ token_in_address: string;
190
+ token_out_address: string;
191
+ protocol: string;
192
+ tick_spacing: number | null;
193
+ liquidity_usd: number | null;
194
+ volume_usd: number | null;
195
+ }[];
196
+ }, {
197
+ start_token_address: string;
198
+ end_token_address: string;
199
+ score: number;
200
+ total_liquidity_usd: number;
201
+ total_volume_usd: number;
202
+ bottleneck_liquidity_usd: number;
203
+ hops: {
204
+ fee: number | null;
205
+ hooks: string | null;
206
+ pool_address: string;
207
+ token_in_address: string;
208
+ token_out_address: string;
209
+ protocol: string;
210
+ tick_spacing: number | null;
211
+ liquidity_usd: number | null;
212
+ volume_usd: number | null;
213
+ }[];
214
+ }>, "many">;
215
+ }, "strip", z.ZodTypeAny, {
216
+ token_address: string;
217
+ paths_count: number;
218
+ paths: {
219
+ start_token_address: string;
220
+ end_token_address: string;
221
+ score: number;
222
+ total_liquidity_usd: number;
223
+ total_volume_usd: number;
224
+ bottleneck_liquidity_usd: number;
225
+ hops: {
226
+ fee: number | null;
227
+ hooks: string | null;
228
+ pool_address: string;
229
+ token_in_address: string;
230
+ token_out_address: string;
231
+ protocol: string;
232
+ tick_spacing: number | null;
233
+ liquidity_usd: number | null;
234
+ volume_usd: number | null;
235
+ }[];
236
+ }[];
237
+ }, {
238
+ token_address: string;
239
+ paths_count: number;
240
+ paths: {
241
+ start_token_address: string;
242
+ end_token_address: string;
243
+ score: number;
244
+ total_liquidity_usd: number;
245
+ total_volume_usd: number;
246
+ bottleneck_liquidity_usd: number;
247
+ hops: {
248
+ fee: number | null;
249
+ hooks: string | null;
250
+ pool_address: string;
251
+ token_in_address: string;
252
+ token_out_address: string;
253
+ protocol: string;
254
+ tick_spacing: number | null;
255
+ liquidity_usd: number | null;
256
+ volume_usd: number | null;
257
+ }[];
258
+ }[];
259
+ }>;
260
+ };
261
+ };
262
+ };
263
+ export { pathfindingContract, FetchTokensPathsResponseSchema };
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FetchTokensPathsResponseSchema = exports.pathfindingContract = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const types_1 = require("../types");
7
+ const contract = (0, core_1.initContract)();
8
+ const FetchTokensPathsResponseSchema = zod_1.default.object({
9
+ token_address: zod_1.default.string(),
10
+ paths_count: zod_1.default.number(),
11
+ paths: zod_1.default.array(zod_1.default.object({
12
+ start_token_address: zod_1.default.string(),
13
+ end_token_address: zod_1.default.string(),
14
+ score: zod_1.default.number().describe("Path score (sum of liquidity × volume for each hop)"),
15
+ total_liquidity_usd: zod_1.default.number().describe("Total liquidity in USD"),
16
+ total_volume_usd: zod_1.default.number().describe("Total volume in USD for the past 24 hours"),
17
+ bottleneck_liquidity_usd: zod_1.default.number().describe("Liquidity of the bottleneck token in USD"),
18
+ hops: zod_1.default.array(zod_1.default.object({
19
+ pool_address: zod_1.default.string(),
20
+ token_in_address: zod_1.default.string(),
21
+ token_out_address: zod_1.default.string(),
22
+ protocol: zod_1.default.string(),
23
+ fee: zod_1.default.number().nullable(),
24
+ tick_spacing: zod_1.default.number().nullable(),
25
+ hooks: zod_1.default.string().nullable(),
26
+ liquidity_usd: zod_1.default.number().nullable(),
27
+ volume_usd: zod_1.default.number().nullable(),
28
+ })),
29
+ })),
30
+ });
31
+ exports.FetchTokensPathsResponseSchema = FetchTokensPathsResponseSchema;
32
+ const pathfindingContract = contract.router({
33
+ fetchTokenPaths: {
34
+ method: "GET",
35
+ path: "paths/:tokenInAddress",
36
+ pathParams: zod_1.default.object({
37
+ tokenInAddress: zod_1.default.string().pipe(types_1.hex),
38
+ }),
39
+ responses: {
40
+ 200: FetchTokensPathsResponseSchema,
41
+ },
42
+ },
43
+ });
44
+ exports.pathfindingContract = pathfindingContract;
45
+ //# sourceMappingURL=pathfinding.contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathfinding.contract.js","sourceRoot":"","sources":["../../src/contracts/pathfinding.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAA+B;AAE/B,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AAEhC,MAAM,8BAA8B,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5C,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,aAAC,CAAC,KAAK,CACV,aAAC,CAAC,MAAM,CAAC;QACL,mBAAmB,EAAE,aAAC,CAAC,MAAM,EAAE;QAC/B,iBAAiB,EAAE,aAAC,CAAC,MAAM,EAAE;QAC7B,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;QACjF,mBAAmB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAClE,gBAAgB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QAClF,wBAAwB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;QACzF,IAAI,EAAE,aAAC,CAAC,KAAK,CACT,aAAC,CAAC,MAAM,CAAC;YACL,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE;YACxB,gBAAgB,EAAE,aAAC,CAAC,MAAM,EAAE;YAC5B,iBAAiB,EAAE,aAAC,CAAC,MAAM,EAAE;YAC7B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;YACpB,GAAG,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC1B,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACnC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACpC,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACpC,CAAC,CACL;KACJ,CAAC,CACL;CACJ,CAAC,CAAC;AAe2B,wEAA8B;AAb5D,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC;IACxC,eAAe,EAAE;QACb,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,aAAC,CAAC,MAAM,CAAC;YACjB,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAG,CAAC;SACvC,CAAC;QACF,SAAS,EAAE;YACP,GAAG,EAAE,8BAA8B;SACtC;KACJ;CACJ,CAAC,CAAC;AAEM,kDAAmB"}
@@ -1,11 +1,48 @@
1
1
  import z from "zod";
2
2
  export declare const sponsorshipContract: {
3
3
  broadcastSponsored: {
4
- [x: string]: any;
5
4
  description: "Broadcast a transaction with gas sponsorship using Privy server wallet";
6
5
  method: "POST";
7
6
  body: z.ZodObject<{
8
- encoded_payload: z.ZodPipe<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
9
- }, z.core.$strip>;
7
+ encoded_payload: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ encoded_payload: `0x${string}`;
10
+ }, {
11
+ encoded_payload: string;
12
+ }>;
13
+ path: "/sponsorship";
14
+ responses: {
15
+ 200: z.ZodObject<{
16
+ result: z.ZodObject<{
17
+ transaction_hash: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ transaction_hash: `0x${string}`;
20
+ }, {
21
+ transaction_hash: string;
22
+ }>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ result: {
25
+ transaction_hash: `0x${string}`;
26
+ };
27
+ }, {
28
+ result: {
29
+ transaction_hash: string;
30
+ };
31
+ }>;
32
+ 400: z.ZodObject<{
33
+ message: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ message: string;
36
+ }, {
37
+ message: string;
38
+ }>;
39
+ 500: z.ZodObject<{
40
+ message: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ message: string;
43
+ }, {
44
+ message: string;
45
+ }>;
46
+ };
10
47
  };
11
48
  };
@@ -1,2 +1,2 @@
1
1
  import z from "zod";
2
- export declare const coerceBigInt: z.ZodPipe<z.ZodAny, z.ZodTransform<bigint, any>>;
2
+ export declare const coerceBigInt: z.ZodEffects<z.ZodAny, bigint, any>;
@@ -15,7 +15,3 @@ export declare enum ChainID {
15
15
  BASE_MAINNET = 8453,
16
16
  BASE_TESTNET = 84532
17
17
  }
18
- export declare const MULTICURVE_HOOK_ADDRESS: {
19
- readonly 8453: "0x892d3c2b4abeaaf67d52a7b29783e2161b7cad40";
20
- readonly 84532: "0x6a1061fc558dde1e6fd0efd641b370d435b56d40";
21
- };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MULTICURVE_HOOK_ADDRESS = exports.ChainID = exports.AssetStatusQuery = exports.AssetStatus = void 0;
3
+ exports.ChainID = exports.AssetStatusQuery = exports.AssetStatus = void 0;
4
4
  var AssetStatus;
5
5
  (function (AssetStatus) {
6
6
  AssetStatus["LIVE"] = "live";
@@ -21,8 +21,4 @@ var ChainID;
21
21
  ChainID[ChainID["BASE_MAINNET"] = 8453] = "BASE_MAINNET";
22
22
  ChainID[ChainID["BASE_TESTNET"] = 84532] = "BASE_TESTNET";
23
23
  })(ChainID || (exports.ChainID = ChainID = {}));
24
- exports.MULTICURVE_HOOK_ADDRESS = {
25
- [ChainID.BASE_MAINNET]: "0x892d3c2b4abeaaf67d52a7b29783e2161b7cad40",
26
- [ChainID.BASE_TESTNET]: "0x6a1061fc558dde1e6fd0efd641b370d435b56d40",
27
- };
28
24
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,8BAAe,CAAA;AACnB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,mCAAe,CAAA;IACf,+BAAW,CAAA;AACf,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B;AAED,IAAY,OAGX;AAHD,WAAY,OAAO;IACf,wDAAmB,CAAA;IACnB,yDAAoB,CAAA;AACxB,CAAC,EAHW,OAAO,uBAAP,OAAO,QAGlB;AAMY,QAAA,uBAAuB,GAAG;IACnC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,4CAAqD;IAC7E,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,4CAAqD;CACvE,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,8BAAe,CAAA;AACnB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,mCAAe,CAAA;IACf,+BAAW,CAAA;AACf,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B;AAED,IAAY,OAGX;AAHD,WAAY,OAAO;IACf,wDAAmB,CAAA;IACnB,yDAAoB,CAAA;AACxB,CAAC,EAHW,OAAO,uBAAP,OAAO,QAGlB"}
@@ -1,3 +1,3 @@
1
1
  import z from "zod";
2
2
  export type Hex = `0x${string}`;
3
- export declare const hex: z.ZodCustom<`0x${string}`, `0x${string}`>;
3
+ export declare const hex: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
@@ -8,9 +8,21 @@ export type PoolKey = {
8
8
  hooks: Hex;
9
9
  };
10
10
  export declare const poolKeySchema: z.ZodObject<{
11
- currency0: z.ZodPipe<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
12
- currency1: z.ZodPipe<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
11
+ currency0: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
12
+ currency1: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
13
13
  fee: z.ZodNumber;
14
14
  tickSpacing: z.ZodNumber;
15
- hooks: z.ZodPipe<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
16
- }, z.core.$strip>;
15
+ hooks: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ currency0: `0x${string}`;
18
+ currency1: `0x${string}`;
19
+ fee: number;
20
+ tickSpacing: number;
21
+ hooks: `0x${string}`;
22
+ }, {
23
+ currency0: string;
24
+ currency1: string;
25
+ fee: number;
26
+ tickSpacing: number;
27
+ hooks: string;
28
+ }>;
@@ -0,0 +1,21 @@
1
+ import { Hex } from "../types";
2
+ export declare const NATIVE_ETH_ADDRESS: Hex;
3
+ export interface AddressRegistryEntry {
4
+ airlock: Hex;
5
+ tokenFactory: Hex;
6
+ governanceFactory: Hex;
7
+ v2UniswapMigrator: Hex;
8
+ v3UniswapMigrator: Hex;
9
+ v4UniswapMigrator: Hex;
10
+ v4MulticurveInitializer: Hex;
11
+ v4MulticurveHook: Hex;
12
+ migratorMulticurve: Hex;
13
+ dopplerBeneficiary: Hex;
14
+ wrappedNativeToken: Hex;
15
+ }
16
+ export interface AddressRegistry {
17
+ [chainId: number]: AddressRegistryEntry;
18
+ }
19
+ export declare const getAddressRegistry: (chainId: number) => AddressRegistryEntry;
20
+ export declare const getWETHAddress: (chainId: number) => Hex;
21
+ export declare const isNativeETH: (address: string) => boolean;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isNativeETH = exports.getWETHAddress = exports.getAddressRegistry = exports.NATIVE_ETH_ADDRESS = void 0;
4
+ const viem_1 = require("viem");
5
+ const zero_address_type_1 = require("../types/zero-address.type");
6
+ exports.NATIVE_ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
7
+ const ADDRESS_REGISTRY = {
8
+ 8453: {
9
+ airlock: (0, viem_1.getAddress)("0x660eAaEdEBc968f8f3694354FA8EC0b4c5Ba8D12"),
10
+ tokenFactory: (0, viem_1.getAddress)("0x80A27Feee1A22b9c68185ea64E7c2652286980B5"),
11
+ governanceFactory: (0, viem_1.getAddress)("0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9"),
12
+ v2UniswapMigrator: zero_address_type_1.zeroAddress,
13
+ v3UniswapMigrator: (0, viem_1.getAddress)("0x9C18A677902d2068be71e1A6bb11051fb69C74d5"),
14
+ v4UniswapMigrator: zero_address_type_1.zeroAddress,
15
+ v4MulticurveInitializer: (0, viem_1.getAddress)("0x65dE470Da664A5be139A5D812bE5FDa0d76CC951"),
16
+ v4MulticurveHook: (0, viem_1.getAddress)("0x892d3c2b4abeaaf67d52a7b29783e2161b7cad40"),
17
+ migratorMulticurve: (0, viem_1.getAddress)("0x6ddfED58D238Ca3195E49d8ac3d4cEa6386E5C33"),
18
+ dopplerBeneficiary: (0, viem_1.getAddress)("0x21E2ce70511e4FE542a97708e89520471DAa7A66"),
19
+ wrappedNativeToken: (0, viem_1.getAddress)("0x4200000000000000000000000000000000000006"),
20
+ },
21
+ 84532: {
22
+ airlock: (0, viem_1.getAddress)("0x3411306ce66c9469bff1535ba955503c4bde1c6e"),
23
+ tokenFactory: zero_address_type_1.zeroAddress,
24
+ governanceFactory: zero_address_type_1.zeroAddress,
25
+ v2UniswapMigrator: zero_address_type_1.zeroAddress,
26
+ v3UniswapMigrator: zero_address_type_1.zeroAddress,
27
+ v4UniswapMigrator: zero_address_type_1.zeroAddress,
28
+ v4MulticurveInitializer: zero_address_type_1.zeroAddress,
29
+ v4MulticurveHook: (0, viem_1.getAddress)("0x6a1061fc558dde1e6fd0efd641b370d435b56d40"),
30
+ migratorMulticurve: zero_address_type_1.zeroAddress,
31
+ dopplerBeneficiary: zero_address_type_1.zeroAddress,
32
+ wrappedNativeToken: (0, viem_1.getAddress)("0x4200000000000000000000000000000000000006"),
33
+ },
34
+ };
35
+ const getAddressRegistry = (chainId) => {
36
+ return ADDRESS_REGISTRY[chainId];
37
+ };
38
+ exports.getAddressRegistry = getAddressRegistry;
39
+ const getWETHAddress = (chainId) => {
40
+ return (0, exports.getAddressRegistry)(chainId).wrappedNativeToken;
41
+ };
42
+ exports.getWETHAddress = getWETHAddress;
43
+ const isNativeETH = (address) => {
44
+ return address.toLowerCase() === exports.NATIVE_ETH_ADDRESS.toLowerCase();
45
+ };
46
+ exports.isNativeETH = isNativeETH;
47
+ //# sourceMappingURL=address-registry.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-registry.util.js","sourceRoot":"","sources":["../../src/utils/address-registry.util.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAGlC,kEAAyD;AAE5C,QAAA,kBAAkB,GAAG,4CAAmD,CAAC;AAoBtF,MAAM,gBAAgB,GAAoB;IACtC,IAAI,EAAE;QACF,OAAO,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QACjE,YAAY,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QACtE,iBAAiB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC3E,iBAAiB,EAAE,+BAAW;QAC9B,iBAAiB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC3E,iBAAiB,EAAE,+BAAW;QAC9B,uBAAuB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QACjF,gBAAgB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC1E,kBAAkB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC5E,kBAAkB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC5E,kBAAkB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;KAC/E;IACD,KAAK,EAAE;QACH,OAAO,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QACjE,YAAY,EAAE,+BAAW;QACzB,iBAAiB,EAAE,+BAAW;QAC9B,iBAAiB,EAAE,+BAAW;QAC9B,iBAAiB,EAAE,+BAAW;QAC9B,iBAAiB,EAAE,+BAAW;QAC9B,uBAAuB,EAAE,+BAAW;QACpC,gBAAgB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;QAC1E,kBAAkB,EAAE,+BAAW;QAC/B,kBAAkB,EAAE,+BAAW;QAC/B,kBAAkB,EAAE,IAAA,iBAAU,EAAC,4CAA4C,CAAC;KAC/E;CACJ,CAAC;AAEK,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAwB,EAAE;IACxE,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B;AAEK,MAAM,cAAc,GAAG,CAAC,OAAe,EAAO,EAAE;IACnD,OAAO,IAAA,0BAAkB,EAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC;AAC1D,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEK,MAAM,WAAW,GAAG,CAAC,OAAe,EAAW,EAAE;IACpD,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,0BAAkB,CAAC,WAAW,EAAE,CAAC;AACtE,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB"}
@@ -1,4 +1,4 @@
1
+ export * from "./address-registry.util";
1
2
  export * from "./beneficiary.util";
2
3
  export * from "./migrator-encoder.util";
3
- export * from "./native-token.util";
4
4
  export * from "./pool.util";
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./address-registry.util"), exports);
17
18
  __exportStar(require("./beneficiary.util"), exports);
18
19
  __exportStar(require("./migrator-encoder.util"), exports);
19
- __exportStar(require("./native-token.util"), exports);
20
20
  __exportStar(require("./pool.util"), exports);
21
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,0DAAwC;AACxC,sDAAoC;AACpC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,qDAAmC;AACnC,0DAAwC;AACxC,8CAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longdotxyz/shared",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "Shared types and utilities for Long.xyz API",
5
5
  "files": [
6
6
  "dist"