@evergonlabs/tmi-protocol-api 0.10.0 → 0.10.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/app.d.ts +1 -23
- package/dist/app.d.ts.map +1 -1
- package/dist/client.d.ts +0 -24
- package/dist/client.d.ts.map +1 -1
- package/dist/fractions/index.d.ts +1 -23
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/platforms/index.d.ts +1 -23
- package/dist/fractions/platforms/index.d.ts.map +1 -1
- package/dist/fractions/platforms/index.js +1 -3
- package/dist/fractions/platforms/initCompilot.routes.js +1 -1
- package/package.json +10 -9
- package/dist/fractions/fractions/approveWrapper.route.d.ts +0 -88
- package/dist/fractions/fractions/approveWrapper.route.d.ts.map +0 -1
- package/dist/fractions/fractions/approveWrapper.route.js +0 -92
- package/dist/fractions/fractions/index.d.ts +0 -72
- package/dist/fractions/fractions/index.d.ts.map +0 -1
- package/dist/fractions/fractions/index.js +0 -9
- package/dist/fractions/platforms/initNid.route.d.ts +0 -28
- package/dist/fractions/platforms/initNid.route.d.ts.map +0 -1
- package/dist/fractions/platforms/initNid.route.js +0 -32
- package/dist/issuance/erc721/nextTokenId.d.ts +0 -19
- package/dist/issuance/erc721/nextTokenId.d.ts.map +0 -1
- package/dist/issuance/erc721/nextTokenId.js +0 -79
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts +0 -33
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts.map +0 -1
- package/dist/next/fractions/lending/purchase/directPurchase.route.js +0 -34
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts +0 -39
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +0 -1
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.js +0 -40
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts +0 -26
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts.map +0 -1
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.js +0 -24
- package/dist/next/fractions/sales/purchase.routes.d.ts +0 -27
- package/dist/next/fractions/sales/purchase.routes.d.ts.map +0 -1
- package/dist/next/fractions/sales/purchase.routes.js +0 -37
package/dist/app.d.ts
CHANGED
|
@@ -1314,28 +1314,6 @@ export declare function buildApps(config?: IAppConfig): {
|
|
|
1314
1314
|
};
|
|
1315
1315
|
};
|
|
1316
1316
|
}, "/deployNid"> | import("hono/types").MergeSchemaPath<{
|
|
1317
|
-
"/": {
|
|
1318
|
-
$get: {
|
|
1319
|
-
input: {
|
|
1320
|
-
query: {
|
|
1321
|
-
market: string;
|
|
1322
|
-
};
|
|
1323
|
-
};
|
|
1324
|
-
output: {
|
|
1325
|
-
data: `0x${string}`;
|
|
1326
|
-
to: `0x${string}`;
|
|
1327
|
-
details: {
|
|
1328
|
-
functionName: string;
|
|
1329
|
-
address: `0x${string}`;
|
|
1330
|
-
abi: any[];
|
|
1331
|
-
args: any[];
|
|
1332
|
-
};
|
|
1333
|
-
};
|
|
1334
|
-
outputFormat: "json";
|
|
1335
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1336
|
-
};
|
|
1337
|
-
};
|
|
1338
|
-
}, "/initCompilot"> | import("hono/types").MergeSchemaPath<{
|
|
1339
1317
|
"/": {
|
|
1340
1318
|
$get: {
|
|
1341
1319
|
input: {
|
|
@@ -1358,7 +1336,7 @@ export declare function buildApps(config?: IAppConfig): {
|
|
|
1358
1336
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1359
1337
|
};
|
|
1360
1338
|
};
|
|
1361
|
-
}, "/
|
|
1339
|
+
}, "/initCompilot">, "/platforms"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
1362
1340
|
"/": {
|
|
1363
1341
|
$get: {
|
|
1364
1342
|
input: {};
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B5C;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;AAEjE,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1497,30 +1497,6 @@ export declare function buildClients(basePath: string, options?: ClientRequestOp
|
|
|
1497
1497
|
} & {
|
|
1498
1498
|
platforms: {
|
|
1499
1499
|
initCompilot: import("hono/client").ClientRequest<string, "/platforms/initCompilot", {
|
|
1500
|
-
$get: {
|
|
1501
|
-
input: {
|
|
1502
|
-
query: {
|
|
1503
|
-
market: string;
|
|
1504
|
-
};
|
|
1505
|
-
};
|
|
1506
|
-
output: {
|
|
1507
|
-
data: `0x${string}`;
|
|
1508
|
-
to: `0x${string}`;
|
|
1509
|
-
details: {
|
|
1510
|
-
functionName: string;
|
|
1511
|
-
address: `0x${string}`;
|
|
1512
|
-
abi: any[];
|
|
1513
|
-
args: any[];
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
outputFormat: "json";
|
|
1517
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1518
|
-
};
|
|
1519
|
-
}>;
|
|
1520
|
-
};
|
|
1521
|
-
} & {
|
|
1522
|
-
platforms: {
|
|
1523
|
-
initNftFractionsCompilot: import("hono/client").ClientRequest<string, "/platforms/initNftFractionsCompilot", {
|
|
1524
1500
|
$get: {
|
|
1525
1501
|
input: {
|
|
1526
1502
|
query: {
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAM,MAAM,aAAa,CAAC;AAMvD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAM,MAAM,aAAa,CAAC;AAMvD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACnD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAU3D,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -253,28 +253,6 @@ export declare const FractionsApi: import("../common/controller.js").IApi<import
|
|
|
253
253
|
};
|
|
254
254
|
};
|
|
255
255
|
}, "/deployNid"> | import("hono/types").MergeSchemaPath<{
|
|
256
|
-
"/": {
|
|
257
|
-
$get: {
|
|
258
|
-
input: {
|
|
259
|
-
query: {
|
|
260
|
-
market: string;
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
output: {
|
|
264
|
-
data: `0x${string}`;
|
|
265
|
-
to: `0x${string}`;
|
|
266
|
-
details: {
|
|
267
|
-
functionName: string;
|
|
268
|
-
address: `0x${string}`;
|
|
269
|
-
abi: any[];
|
|
270
|
-
args: any[];
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
outputFormat: "json";
|
|
274
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
}, "/initCompilot"> | import("hono/types").MergeSchemaPath<{
|
|
278
256
|
"/": {
|
|
279
257
|
$get: {
|
|
280
258
|
input: {
|
|
@@ -297,7 +275,7 @@ export declare const FractionsApi: import("../common/controller.js").IApi<import
|
|
|
297
275
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
298
276
|
};
|
|
299
277
|
};
|
|
300
|
-
}, "/
|
|
278
|
+
}, "/initCompilot">, "/platforms"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
301
279
|
"/": {
|
|
302
280
|
$get: {
|
|
303
281
|
input: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fractions/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fractions/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAYvB,CAAC"}
|
|
@@ -148,28 +148,6 @@ export declare const PlatformsController: import("../../common/controller.js").I
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
}, "/deployNid"> | import("hono/types").MergeSchemaPath<{
|
|
151
|
-
"/": {
|
|
152
|
-
$get: {
|
|
153
|
-
input: {
|
|
154
|
-
query: {
|
|
155
|
-
market: string;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
output: {
|
|
159
|
-
data: `0x${string}`;
|
|
160
|
-
to: `0x${string}`;
|
|
161
|
-
details: {
|
|
162
|
-
functionName: string;
|
|
163
|
-
address: `0x${string}`;
|
|
164
|
-
abi: any[];
|
|
165
|
-
args: any[];
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
outputFormat: "json";
|
|
169
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
}, "/initCompilot"> | import("hono/types").MergeSchemaPath<{
|
|
173
151
|
"/": {
|
|
174
152
|
$get: {
|
|
175
153
|
input: {
|
|
@@ -192,5 +170,5 @@ export declare const PlatformsController: import("../../common/controller.js").I
|
|
|
192
170
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
193
171
|
};
|
|
194
172
|
};
|
|
195
|
-
}, "/
|
|
173
|
+
}, "/initCompilot">, "/", "/">>;
|
|
196
174
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/platforms/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/platforms/index.ts"],"names":[],"mappings":"AAQA,cAAc,0BAA0B,CAAC;AAEzC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAS9B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createController } from "../../common/controller.js";
|
|
2
2
|
import { DeployCompilotMarketV0, DeployContinuousWithdrawMarketV0, DeployContinuousWithdrawNidMarketV0, DeployMarketV0, } from "./deployMarket.routes.js";
|
|
3
3
|
import { InitCompilotV0 } from "./initCompilot.routes.js";
|
|
4
|
-
import { InitNidV0 } from "./initNid.route.js";
|
|
5
4
|
export * from "./deployMarket.schema.js";
|
|
6
5
|
export const PlatformsController = createController({
|
|
7
6
|
build: (factory) => factory
|
|
@@ -10,6 +9,5 @@ export const PlatformsController = createController({
|
|
|
10
9
|
.route("/deployContinuousWithdraw", DeployContinuousWithdrawMarketV0.build(factory))
|
|
11
10
|
.route("/deployContinuousWithdrawNid", DeployContinuousWithdrawNidMarketV0.build(factory))
|
|
12
11
|
.route("/deployNid", DeployCompilotMarketV0.build(factory))
|
|
13
|
-
.route("/initCompilot",
|
|
14
|
-
.route("/initNftFractionsCompilot", InitCompilotV0.build(factory)),
|
|
12
|
+
.route("/initCompilot", InitCompilotV0.build(factory)),
|
|
15
13
|
});
|
|
@@ -6,7 +6,7 @@ import { createController } from "../../common/controller.js";
|
|
|
6
6
|
import { AddressSchema, DEFAULT_COMPILOT_SIGNER, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
7
7
|
const route = describeRoute({
|
|
8
8
|
summary: "Initialize ComPilot signer for NFT Fractions market",
|
|
9
|
-
description: "Returns transaction data for initializing the ComPilot signer on
|
|
9
|
+
description: "Returns transaction data for initializing the ComPilot signer on market. " +
|
|
10
10
|
"This must be called after deploying the market to enable compliance gating.",
|
|
11
11
|
tags: ["Platforms"],
|
|
12
12
|
responses: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evergonlabs/tmi-protocol-api",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"viem": "2.46.2",
|
|
40
40
|
"zod": "^4.3.6",
|
|
41
41
|
"zod-openapi": "^5.4.6",
|
|
42
|
-
"@evergonlabs/tmi-protocol-
|
|
43
|
-
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.
|
|
44
|
-
"@evergonlabs/tmi-protocol-
|
|
45
|
-
"@evergonlabs/tmi-protocol-shared": "0.10.
|
|
46
|
-
"@evergonlabs/tmi-protocol-
|
|
47
|
-
"@evergonlabs/tmi-protocol-
|
|
48
|
-
"@evergonlabs/tmi-protocol-
|
|
42
|
+
"@evergonlabs/tmi-protocol-contracts": "0.10.1",
|
|
43
|
+
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.1",
|
|
44
|
+
"@evergonlabs/tmi-protocol-indexer": "0.10.1",
|
|
45
|
+
"@evergonlabs/tmi-protocol-shared": "0.10.1",
|
|
46
|
+
"@evergonlabs/tmi-protocol-staking-sdk": "0.10.1",
|
|
47
|
+
"@evergonlabs/tmi-protocol-types": "0.10.1",
|
|
48
|
+
"@evergonlabs/tmi-protocol-utils": "0.10.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@evergonlabs/tmi-eslint-config": "0.3.0",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"clean": "rimraf ./dist ./artifacts",
|
|
81
81
|
"docs:upload": "pnpm run env -- pnpm run tsx:oa -- ./scripts/generateAndUpload/bin.ts",
|
|
82
82
|
"docs:upload-all": "pnpm run env -- pnpm run tsx:oa -- ./scripts/generateAndUpload/uploadAll.ts",
|
|
83
|
+
"docs:upload-all:ci": "pnpm run tsx:oa -- ./scripts/generateAndUpload/uploadAll.ts --ci",
|
|
83
84
|
"env": "dotenv -e ../../.env",
|
|
84
85
|
"lint": "eslint .",
|
|
85
86
|
"lint:fix": "eslint . --fix",
|
|
@@ -87,6 +88,6 @@
|
|
|
87
88
|
"serve": "pnpm run env -- pnpm run tsx:oa -- ./src/serve.ts",
|
|
88
89
|
"tsx:oa": "tsx --import @hono/zod-openapi",
|
|
89
90
|
"test": "pnpm run env -- vitest run",
|
|
90
|
-
"test:
|
|
91
|
+
"test:e2e": "pnpm run env -- vitest run -c vitest.config.e2e.ts"
|
|
91
92
|
}
|
|
92
93
|
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const ApproveWrapperRequestSchema: z.ZodObject<{
|
|
3
|
-
marketAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
-
wrapperAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
-
}, z.core.$strip>;
|
|
6
|
-
export declare const ApproveErc20SpendingToWrapper: z.ZodObject<{
|
|
7
|
-
wrapperAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
-
erc20Address: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
9
|
-
amount: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export declare const ApproveErc721SpendingToWrapper: z.ZodObject<{
|
|
12
|
-
wrapperAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
13
|
-
erc721Address: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export declare const ApproveWrapperV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
16
|
-
"/": {
|
|
17
|
-
$post: {
|
|
18
|
-
input: {
|
|
19
|
-
json: {
|
|
20
|
-
marketAddress: string;
|
|
21
|
-
wrapperAddress: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
output: {
|
|
25
|
-
data: `0x${string}`;
|
|
26
|
-
to: `0x${string}`;
|
|
27
|
-
details: {
|
|
28
|
-
functionName: string;
|
|
29
|
-
address: `0x${string}`;
|
|
30
|
-
abi: any[];
|
|
31
|
-
args: any[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
}, "/", "/">>;
|
|
39
|
-
export declare const ApproveErc20SpendingToWrapperV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
40
|
-
"/": {
|
|
41
|
-
$post: {
|
|
42
|
-
input: {
|
|
43
|
-
json: {
|
|
44
|
-
wrapperAddress: string;
|
|
45
|
-
erc20Address: string;
|
|
46
|
-
amount: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
output: {
|
|
50
|
-
data: `0x${string}`;
|
|
51
|
-
to: `0x${string}`;
|
|
52
|
-
details: {
|
|
53
|
-
functionName: string;
|
|
54
|
-
address: `0x${string}`;
|
|
55
|
-
abi: any[];
|
|
56
|
-
args: any[];
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
outputFormat: "json";
|
|
60
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}, "/", "/">>;
|
|
64
|
-
export declare const ApproveErc721SpendingToWrapperV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
65
|
-
"/": {
|
|
66
|
-
$post: {
|
|
67
|
-
input: {
|
|
68
|
-
json: {
|
|
69
|
-
wrapperAddress: string;
|
|
70
|
-
erc721Address: string;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
output: {
|
|
74
|
-
data: `0x${string}`;
|
|
75
|
-
to: `0x${string}`;
|
|
76
|
-
details: {
|
|
77
|
-
functionName: string;
|
|
78
|
-
address: `0x${string}`;
|
|
79
|
-
abi: any[];
|
|
80
|
-
args: any[];
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
outputFormat: "json";
|
|
84
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
}, "/", "/">>;
|
|
88
|
-
//# sourceMappingURL=approveWrapper.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approveWrapper.route.d.ts","sourceRoot":"","sources":["../../../src/fractions/fractions/approveWrapper.route.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAC;AAkBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;aAc3B,CAAC;AAkBH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;aAc1C,CAAC;AAkBH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;aAc3C,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { buildApproveErc20SpendingToWrapperTx, buildApproveErc721SpendingToWrapperTx, buildApproveWrapperTx, } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
5
|
-
import { createController } from "../../common/controller.js";
|
|
6
|
-
import { AddressSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
7
|
-
import { Int256BigInt } from "../../common/int256.js";
|
|
8
|
-
export const ApproveWrapperRequestSchema = z.object({
|
|
9
|
-
marketAddress: AddressSchema,
|
|
10
|
-
wrapperAddress: AddressSchema,
|
|
11
|
-
});
|
|
12
|
-
export const ApproveErc20SpendingToWrapper = z.object({
|
|
13
|
-
wrapperAddress: AddressSchema,
|
|
14
|
-
erc20Address: AddressSchema,
|
|
15
|
-
amount: Int256BigInt(),
|
|
16
|
-
});
|
|
17
|
-
export const ApproveErc721SpendingToWrapper = z.object({
|
|
18
|
-
wrapperAddress: AddressSchema,
|
|
19
|
-
erc721Address: AddressSchema,
|
|
20
|
-
});
|
|
21
|
-
const route = describeRoute({
|
|
22
|
-
summary: "Approve a wrapper",
|
|
23
|
-
description: "Returns transaction data for approving a wrapper",
|
|
24
|
-
tags: ["Fractions Approvals"],
|
|
25
|
-
responses: {
|
|
26
|
-
200: {
|
|
27
|
-
description: "Returns transaction data for approving a wrapper",
|
|
28
|
-
content: {
|
|
29
|
-
"application/json": {
|
|
30
|
-
schema: resolver(TransactionSchema),
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
export const ApproveWrapperV0 = createController({
|
|
37
|
-
build: (factory) => factory
|
|
38
|
-
.createApp()
|
|
39
|
-
.post("/", route, validator("json", ApproveWrapperRequestSchema.openapi("ApproveWrapperRequestSchema")), async (c) => {
|
|
40
|
-
const { marketAddress, wrapperAddress } = c.req.valid("json");
|
|
41
|
-
const tx = buildApproveWrapperTx(marketAddress, wrapperAddress);
|
|
42
|
-
return c.json(toTransaction(tx));
|
|
43
|
-
}),
|
|
44
|
-
});
|
|
45
|
-
const route_erc20 = describeRoute({
|
|
46
|
-
summary: "Approve wrapped ERC20 spending",
|
|
47
|
-
description: "Returns transaction data for approving a wrapper as a spender of wrapped ERC20",
|
|
48
|
-
tags: ["Fractions Approvals"],
|
|
49
|
-
responses: {
|
|
50
|
-
200: {
|
|
51
|
-
description: "Returns transaction data for approving a wrapper",
|
|
52
|
-
content: {
|
|
53
|
-
"application/json": {
|
|
54
|
-
schema: resolver(TransactionSchema),
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
export const ApproveErc20SpendingToWrapperV0 = createController({
|
|
61
|
-
build: (factory) => factory
|
|
62
|
-
.createApp()
|
|
63
|
-
.post("/", route_erc20, validator("json", ApproveErc20SpendingToWrapper.openapi("ApproveErc20SpendingToWrapper")), async (c) => {
|
|
64
|
-
const { wrapperAddress, erc20Address, amount } = c.req.valid("json");
|
|
65
|
-
const tx = buildApproveErc20SpendingToWrapperTx(wrapperAddress, erc20Address, amount);
|
|
66
|
-
return c.json(toTransaction(tx));
|
|
67
|
-
}),
|
|
68
|
-
});
|
|
69
|
-
const routeErc721 = describeRoute({
|
|
70
|
-
summary: "Approve wrapped ERC721 spending",
|
|
71
|
-
description: "Returns transaction data for approving a wrapper",
|
|
72
|
-
tags: ["Fractions Approvals"],
|
|
73
|
-
responses: {
|
|
74
|
-
200: {
|
|
75
|
-
description: "Returns transaction data for approving a wrapper",
|
|
76
|
-
content: {
|
|
77
|
-
"application/json": {
|
|
78
|
-
schema: resolver(TransactionSchema),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
export const ApproveErc721SpendingToWrapperV0 = createController({
|
|
85
|
-
build: (factory) => factory
|
|
86
|
-
.createApp()
|
|
87
|
-
.post("/", routeErc721, validator("json", ApproveErc721SpendingToWrapper.openapi("ApproveErc721SpendingToWrapper")), async (c) => {
|
|
88
|
-
const { wrapperAddress, erc721Address } = c.req.valid("json");
|
|
89
|
-
const tx = buildApproveErc721SpendingToWrapperTx(wrapperAddress, erc721Address);
|
|
90
|
-
return c.json(toTransaction(tx));
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare const FractionsSubController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
|
-
"/": {
|
|
3
|
-
$post: {
|
|
4
|
-
input: {
|
|
5
|
-
json: {
|
|
6
|
-
marketAddress: string;
|
|
7
|
-
wrapperAddress: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
output: {
|
|
11
|
-
data: `0x${string}`;
|
|
12
|
-
to: `0x${string}`;
|
|
13
|
-
details: {
|
|
14
|
-
functionName: string;
|
|
15
|
-
address: `0x${string}`;
|
|
16
|
-
abi: any[];
|
|
17
|
-
args: any[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
outputFormat: "json";
|
|
21
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
}, "/approveWrapper"> | import("hono/types").MergeSchemaPath<{
|
|
25
|
-
"/": {
|
|
26
|
-
$post: {
|
|
27
|
-
input: {
|
|
28
|
-
json: {
|
|
29
|
-
wrapperAddress: string;
|
|
30
|
-
erc20Address: string;
|
|
31
|
-
amount: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
output: {
|
|
35
|
-
data: `0x${string}`;
|
|
36
|
-
to: `0x${string}`;
|
|
37
|
-
details: {
|
|
38
|
-
functionName: string;
|
|
39
|
-
address: `0x${string}`;
|
|
40
|
-
abi: any[];
|
|
41
|
-
args: any[];
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
outputFormat: "json";
|
|
45
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
}, "/approveWrapperAsErc20Spender"> | import("hono/types").MergeSchemaPath<{
|
|
49
|
-
"/": {
|
|
50
|
-
$post: {
|
|
51
|
-
input: {
|
|
52
|
-
json: {
|
|
53
|
-
wrapperAddress: string;
|
|
54
|
-
erc721Address: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
output: {
|
|
58
|
-
data: `0x${string}`;
|
|
59
|
-
to: `0x${string}`;
|
|
60
|
-
details: {
|
|
61
|
-
functionName: string;
|
|
62
|
-
address: `0x${string}`;
|
|
63
|
-
abi: any[];
|
|
64
|
-
args: any[];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
outputFormat: "json";
|
|
68
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
}, "/approveWrapperAsErc721Spender">, "/", "/">>;
|
|
72
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/fractions/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAOjC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createController } from "../../common/controller.js";
|
|
2
|
-
import { ApproveErc20SpendingToWrapperV0, ApproveErc721SpendingToWrapperV0, ApproveWrapperV0, } from "./approveWrapper.route.js";
|
|
3
|
-
export const FractionsSubController = createController({
|
|
4
|
-
build: (factory) => factory
|
|
5
|
-
.createApp()
|
|
6
|
-
.route("/approveWrapper", ApproveWrapperV0.build(factory))
|
|
7
|
-
.route("/approveWrapperAsErc20Spender", ApproveErc20SpendingToWrapperV0.build(factory))
|
|
8
|
-
.route("/approveWrapperAsErc721Spender", ApproveErc721SpendingToWrapperV0.build(factory)),
|
|
9
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const InitCompilotRequestSchema: z.ZodObject<{
|
|
3
|
-
market: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
-
}, z.core.$strip>;
|
|
5
|
-
export declare const InitNidV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
6
|
-
"/": {
|
|
7
|
-
$get: {
|
|
8
|
-
input: {
|
|
9
|
-
query: {
|
|
10
|
-
market: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
output: {
|
|
14
|
-
data: `0x${string}`;
|
|
15
|
-
to: `0x${string}`;
|
|
16
|
-
details: {
|
|
17
|
-
functionName: string;
|
|
18
|
-
address: `0x${string}`;
|
|
19
|
-
abi: any[];
|
|
20
|
-
args: any[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
outputFormat: "json";
|
|
24
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}, "/", "/">>;
|
|
28
|
-
//# sourceMappingURL=initNid.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initNid.route.d.ts","sourceRoot":"","sources":["../../../src/fractions/platforms/initNid.route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;aASpB,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { getEnv } from "@evergonlabs/internal/node/getEnv";
|
|
5
|
-
import { initCompilotSigner } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
6
|
-
import { createController } from "../../common/controller.js";
|
|
7
|
-
import { AddressSchema, DEFAULT_COMPILOT_SIGNER, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
8
|
-
const route = describeRoute({
|
|
9
|
-
summary: "Deploy a market with continuous withdraw",
|
|
10
|
-
description: "Returns transaction data for deploying a market with continuous withdraw capability",
|
|
11
|
-
tags: ["Platforms"],
|
|
12
|
-
responses: {
|
|
13
|
-
200: {
|
|
14
|
-
description: "Returns transaction data for deploying a market with continuous withdraw",
|
|
15
|
-
content: {
|
|
16
|
-
"application/json": {
|
|
17
|
-
schema: resolver(TransactionSchema),
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
export const InitCompilotRequestSchema = z.object({
|
|
24
|
-
market: AddressSchema,
|
|
25
|
-
});
|
|
26
|
-
export const InitNidV0 = createController({
|
|
27
|
-
build: (factory) => factory.createApp().get("/", route, validator("query", InitCompilotRequestSchema), async (c) => {
|
|
28
|
-
const { market } = c.req.valid("query");
|
|
29
|
-
const tx = initCompilotSigner(market, getEnv("PLATFORM_COMPILOT_SIGNER", DEFAULT_COMPILOT_SIGNER));
|
|
30
|
-
return c.json(toTransaction(tx));
|
|
31
|
-
}),
|
|
32
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const NextTokenIdErc721: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
2
|
-
"/": {
|
|
3
|
-
$get: {
|
|
4
|
-
input: {
|
|
5
|
-
query: {
|
|
6
|
-
chainId: string | string[];
|
|
7
|
-
tokenAddress: string | string[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
output: {
|
|
11
|
-
nextTokenId: string;
|
|
12
|
-
totalMinted: number;
|
|
13
|
-
};
|
|
14
|
-
outputFormat: "json";
|
|
15
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}, "/", "/">>;
|
|
19
|
-
//# sourceMappingURL=nextTokenId.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextTokenId.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/nextTokenId.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;aAsD5B,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { zeroAddress } from "viem";
|
|
4
|
-
import { getContractEvents } from "viem/actions";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
7
|
-
import { getPublicClient } from "../../common/blockchain.js";
|
|
8
|
-
import { createController } from "../../common/controller.js";
|
|
9
|
-
import { AddressSchema } from "../../common/index.js";
|
|
10
|
-
import { FactoryChainIdQuery } from "../common/factories.js";
|
|
11
|
-
const QuerySchema = z.object({
|
|
12
|
-
chainId: FactoryChainIdQuery.openapi({
|
|
13
|
-
param: {
|
|
14
|
-
name: "chainId",
|
|
15
|
-
in: "query",
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
tokenAddress: AddressSchema.openapi({
|
|
19
|
-
param: {
|
|
20
|
-
name: "tokenAddress",
|
|
21
|
-
in: "query",
|
|
22
|
-
},
|
|
23
|
-
description: "ERC721 contract address",
|
|
24
|
-
}),
|
|
25
|
-
});
|
|
26
|
-
const ResponseSchema = z.object({
|
|
27
|
-
nextTokenId: z.string().openapi({
|
|
28
|
-
description: "Next available token ID (max minted tokenId + 1, or '0' if none minted)",
|
|
29
|
-
example: "42",
|
|
30
|
-
}),
|
|
31
|
-
totalMinted: z.number().int().nonnegative().openapi({
|
|
32
|
-
description: "Total number of tokens minted (Transfer events from address(0))",
|
|
33
|
-
example: 41,
|
|
34
|
-
}),
|
|
35
|
-
});
|
|
36
|
-
export const NextTokenIdErc721 = createController({
|
|
37
|
-
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
38
|
-
summary: "Get next ERC721 token ID",
|
|
39
|
-
description: "Scans all Transfer events from address(0) (mints) for the given ERC721 contract and returns the next available token ID (highest minted ID + 1). If no tokens have been minted, returns '0'.",
|
|
40
|
-
tags: ["Issuance"],
|
|
41
|
-
responses: {
|
|
42
|
-
200: {
|
|
43
|
-
description: "Returns the next token ID and total minted count",
|
|
44
|
-
content: {
|
|
45
|
-
"application/json": {
|
|
46
|
-
schema: resolver(ResponseSchema),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
}), validator("query", QuerySchema), async (c) => {
|
|
52
|
-
const params = c.req.valid("query");
|
|
53
|
-
const client = getPublicClient(params.chainId, c.env.config);
|
|
54
|
-
const mintEvents = await getContractEvents(client, {
|
|
55
|
-
address: params.tokenAddress,
|
|
56
|
-
abi: abis.erc721PausableRecoverableUpgradeableAbi,
|
|
57
|
-
eventName: "Transfer",
|
|
58
|
-
args: {
|
|
59
|
-
from: zeroAddress,
|
|
60
|
-
},
|
|
61
|
-
fromBlock: "earliest",
|
|
62
|
-
toBlock: "latest",
|
|
63
|
-
});
|
|
64
|
-
if (mintEvents.length === 0) {
|
|
65
|
-
return c.json({
|
|
66
|
-
nextTokenId: "0",
|
|
67
|
-
totalMinted: 0,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
const maxTokenId = mintEvents.reduce((max, event) => {
|
|
71
|
-
const tokenId = event.args.tokenId;
|
|
72
|
-
return tokenId > max ? tokenId : max;
|
|
73
|
-
}, 0n);
|
|
74
|
-
return c.json({
|
|
75
|
-
nextTokenId: (maxTokenId + 1n).toString(),
|
|
76
|
-
totalMinted: mintEvents.length,
|
|
77
|
-
});
|
|
78
|
-
}),
|
|
79
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const DirectPurchaseRequestSchema: import("zod").ZodObject<{
|
|
2
|
-
market: import("zod").ZodPipe<import("zod").ZodString & import("zod").ZodType<`0x${string}`, string, import("zod/v4/core").$ZodTypeInternals<`0x${string}`, string>>, import("zod").ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
3
|
-
campaignId: import("zod").ZodPipe<import("zod/v4/core").$ZodBranded<import("zod").ZodString, "Int256", "out">, import("zod").ZodTransform<bigint, string & import("zod").$brand<"Int256">>>;
|
|
4
|
-
chainId: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodUnion<[import("zod").ZodLiteral<1 | 11155111 | 31337 | 72080>, import("zod").ZodLiteral<1 | 11155111 | 31337 | 72080>, ...import("zod").ZodLiteral<1 | 11155111 | 31337 | 72080>[]]>>;
|
|
5
|
-
amountToBuy: import("zod/v4/core").$ZodBranded<import("zod").ZodString, "Int256", "out">;
|
|
6
|
-
}, import("zod/v4/core").$strip>;
|
|
7
|
-
export declare const DirectPurchaseV0: import("../../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../../common/context.js").AppContext, {
|
|
8
|
-
"/": {
|
|
9
|
-
$post: {
|
|
10
|
-
input: {
|
|
11
|
-
json: {
|
|
12
|
-
market: string;
|
|
13
|
-
campaignId: string;
|
|
14
|
-
chainId: unknown;
|
|
15
|
-
amountToBuy: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
output: {
|
|
19
|
-
data: `0x${string}`;
|
|
20
|
-
to: `0x${string}`;
|
|
21
|
-
details: {
|
|
22
|
-
functionName: string;
|
|
23
|
-
address: `0x${string}`;
|
|
24
|
-
abi: any[];
|
|
25
|
-
args: any[];
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
outputFormat: "json";
|
|
29
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}, "/", "/">>;
|
|
33
|
-
//# sourceMappingURL=directPurchase.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directPurchase.route.d.ts","sourceRoot":"","sources":["../../../../../src/next/fractions/lending/purchase/directPurchase.route.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,2BAA2B;;;;;gCAGtC,CAAC;AAkBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;aAU3B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { buildDirectPurchaseTx } from "@evergonlabs/tmi-protocol-fractions-sdk/next";
|
|
4
|
-
import { Int256Json } from "@evergonlabs/tmi-utils/models";
|
|
5
|
-
import { createController } from "../../../../common/controller.js";
|
|
6
|
-
import { FractionsChainId, SaleIdSchema, toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
7
|
-
export const DirectPurchaseRequestSchema = SaleIdSchema.extend({
|
|
8
|
-
chainId: FractionsChainId,
|
|
9
|
-
amountToBuy: Int256Json,
|
|
10
|
-
});
|
|
11
|
-
const route = describeRoute({
|
|
12
|
-
summary: "Make a purchase",
|
|
13
|
-
description: "Returns transaction data for making a purchase",
|
|
14
|
-
tags: ["Buy-back"],
|
|
15
|
-
responses: {
|
|
16
|
-
200: {
|
|
17
|
-
description: "Returns transaction data for making a purchase",
|
|
18
|
-
content: {
|
|
19
|
-
"application/json": {
|
|
20
|
-
schema: resolver(TransactionSchema),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
export const DirectPurchaseV0 = createController({
|
|
27
|
-
build: (factory) => factory
|
|
28
|
-
.createApp()
|
|
29
|
-
.post("/", route, validator("json", DirectPurchaseRequestSchema.openapi("PurchaseRequestSchema")), async (c) => {
|
|
30
|
-
const { chainId, market, campaignId, amountToBuy } = c.req.valid("json");
|
|
31
|
-
const tx = buildDirectPurchaseTx(chainId, market, campaignId, BigInt(amountToBuy));
|
|
32
|
-
return c.json(toTransaction(tx));
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Controller for deploying an NFT Fractions market
|
|
3
|
-
*/
|
|
4
|
-
export declare const DeployNftFractionsMarketV0: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
5
|
-
"/": {
|
|
6
|
-
$post: {
|
|
7
|
-
input: {
|
|
8
|
-
json: {
|
|
9
|
-
chainId: unknown;
|
|
10
|
-
adminAddress: string;
|
|
11
|
-
acceptedFundingTokens: string[];
|
|
12
|
-
ownerAddress?: string | undefined;
|
|
13
|
-
compilotSignerAddress?: string | undefined;
|
|
14
|
-
cap?: {
|
|
15
|
-
maxHardCap: string;
|
|
16
|
-
} | undefined;
|
|
17
|
-
fee?: {
|
|
18
|
-
percent: number;
|
|
19
|
-
collectorAddress: string;
|
|
20
|
-
feeAdmin: string;
|
|
21
|
-
} | undefined;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
output: {
|
|
25
|
-
data: `0x${string}`;
|
|
26
|
-
to: `0x${string}`;
|
|
27
|
-
details: {
|
|
28
|
-
functionName: string;
|
|
29
|
-
address: `0x${string}`;
|
|
30
|
-
abi: any[];
|
|
31
|
-
args: any[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
}, "/", "/">>;
|
|
39
|
-
//# sourceMappingURL=deployNftFractionsMarket.routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deployNftFractionsMarket.routes.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/platforms/deployNftFractionsMarket.routes.ts"],"names":[],"mappings":"AAyBA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkBrC,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { createNftFractionsPlatform } from "@evergonlabs/tmi-protocol-fractions-sdk/next";
|
|
4
|
-
import { createController } from "../../../common/controller.js";
|
|
5
|
-
import { DEFAULT_COMPILOT_SIGNER, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
6
|
-
import { DeployNftFractionsMarketRequestSchema } from "./deployNftFractionsMarket.schema.js";
|
|
7
|
-
const route = describeRoute({
|
|
8
|
-
summary: "Deploy an NFT Fractions market",
|
|
9
|
-
description: "Returns transaction data for deploying an NFT Fractions market with ComPilot gating. " +
|
|
10
|
-
"This market type supports wrapping ERC-721 tokens and fractionalizing them into ERC-20 compatible tokens.",
|
|
11
|
-
tags: ["NFT Fractions"],
|
|
12
|
-
responses: {
|
|
13
|
-
200: {
|
|
14
|
-
description: "Returns transaction data for deploying an NFT Fractions market",
|
|
15
|
-
content: {
|
|
16
|
-
"application/json": {
|
|
17
|
-
schema: resolver(TransactionSchema),
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Controller for deploying an NFT Fractions market
|
|
25
|
-
*/
|
|
26
|
-
export const DeployNftFractionsMarketV0 = createController({
|
|
27
|
-
build: (factory) => factory.createApp().post("/", route, validator("json", DeployNftFractionsMarketRequestSchema), async (c) => {
|
|
28
|
-
const { chainId, adminAddress, ownerAddress, compilotSignerAddress, cap, fee, acceptedFundingTokens } = c.req.valid("json");
|
|
29
|
-
const tx = createNftFractionsPlatform({
|
|
30
|
-
chainId: chainId,
|
|
31
|
-
adminAddress: adminAddress,
|
|
32
|
-
ownerAddress: ownerAddress ?? adminAddress,
|
|
33
|
-
compilotSignerAddress: compilotSignerAddress ?? DEFAULT_COMPILOT_SIGNER,
|
|
34
|
-
fee: fee ?? null,
|
|
35
|
-
maxHardCap: cap ? cap.maxHardCap : null,
|
|
36
|
-
acceptedFundingTokens: acceptedFundingTokens,
|
|
37
|
-
});
|
|
38
|
-
return c.json(toTransaction(tx));
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* Cap configuration schema for market limits
|
|
4
|
-
*/
|
|
5
|
-
export declare const CapConfigSchema: z.ZodObject<{
|
|
6
|
-
maxHardCap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
/**
|
|
9
|
-
* Request schema for deploying an NFT Fractions market
|
|
10
|
-
*/
|
|
11
|
-
export declare const DeployNftFractionsMarketRequestSchema: z.ZodObject<{
|
|
12
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 72080>, z.ZodLiteral<11155111 | 31337 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 72080>[]]>>;
|
|
13
|
-
adminAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
14
|
-
ownerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
15
|
-
compilotSignerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
16
|
-
cap: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
maxHardCap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
19
|
-
fee: z.ZodOptional<z.ZodObject<{
|
|
20
|
-
percent: z.ZodNumber;
|
|
21
|
-
collectorAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
22
|
-
feeAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
23
|
-
}, z.core.$strip>>;
|
|
24
|
-
acceptedFundingTokens: z.ZodArray<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
//# sourceMappingURL=deployNftFractionsMarket.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deployNftFractionsMarket.schema.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/platforms/deployNftFractionsMarket.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,eAAO,MAAM,eAAe;;iBAE1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;iBAcC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AddressSchema, NextFractionsChainId } from "../../../common/index.js";
|
|
3
|
-
import { Int256BigInt } from "../../../common/int256.js";
|
|
4
|
-
import { FeeConfigSchema } from "../../../fractions/platforms/deployMarket.schema.js";
|
|
5
|
-
/**
|
|
6
|
-
* Cap configuration schema for market limits
|
|
7
|
-
*/
|
|
8
|
-
export const CapConfigSchema = z.object({
|
|
9
|
-
maxHardCap: Int256BigInt(z.bigint().min(BigInt(1))).describe("Maximum hard cap for the market"),
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* Request schema for deploying an NFT Fractions market
|
|
13
|
-
*/
|
|
14
|
-
export const DeployNftFractionsMarketRequestSchema = z
|
|
15
|
-
.object({
|
|
16
|
-
chainId: NextFractionsChainId.describe("Chain ID where the market will be deployed"),
|
|
17
|
-
adminAddress: AddressSchema.describe("Address of the market administrator"),
|
|
18
|
-
ownerAddress: AddressSchema.optional().describe("Address of the market owner. Defaults to adminAddress if not provided"),
|
|
19
|
-
compilotSignerAddress: AddressSchema.optional().describe("ComPilot signer address. Uses platform default if not provided"),
|
|
20
|
-
cap: CapConfigSchema.optional().describe("Optional cap configuration"),
|
|
21
|
-
fee: FeeConfigSchema.optional().describe("Optional fee configuration"),
|
|
22
|
-
acceptedFundingTokens: z.array(AddressSchema).describe("Accepted funding token addresses"),
|
|
23
|
-
})
|
|
24
|
-
.openapi("DeployNftFractionsMarketRequestSchema");
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const PurchaseNextV0: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
2
|
-
"/": {
|
|
3
|
-
$post: {
|
|
4
|
-
input: {
|
|
5
|
-
json: {
|
|
6
|
-
chainId: unknown;
|
|
7
|
-
market: string;
|
|
8
|
-
campaignId: string;
|
|
9
|
-
amountToBuy: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
output: {
|
|
13
|
-
data: `0x${string}`;
|
|
14
|
-
to: `0x${string}`;
|
|
15
|
-
details: {
|
|
16
|
-
functionName: string;
|
|
17
|
-
address: `0x${string}`;
|
|
18
|
-
abi: any[];
|
|
19
|
-
args: any[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
outputFormat: "json";
|
|
23
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}, "/", "/">>;
|
|
27
|
-
//# sourceMappingURL=purchase.routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"purchase.routes.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/purchase.routes.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;aAOzB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { buildDirectPurchaseTx } from "@evergonlabs/tmi-protocol-fractions-sdk/next";
|
|
5
|
-
import { createController } from "../../../common/controller.js";
|
|
6
|
-
import { AddressSchema, NextFractionsChainId, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
7
|
-
import { Int256BigInt } from "../../../common/int256.js";
|
|
8
|
-
const PurchaseRequestSchema = z
|
|
9
|
-
.object({
|
|
10
|
-
chainId: NextFractionsChainId,
|
|
11
|
-
market: AddressSchema.describe("Address of the market"),
|
|
12
|
-
campaignId: Int256BigInt().describe("Campaign ID"),
|
|
13
|
-
amountToBuy: Int256BigInt().describe("Amount of fractions to buy"),
|
|
14
|
-
})
|
|
15
|
-
.openapi("NextPurchaseRequestSchema");
|
|
16
|
-
const route = describeRoute({
|
|
17
|
-
summary: "Make a purchase (next)",
|
|
18
|
-
description: "Returns transaction data for purchasing fractions on a next-gen market (no discount).",
|
|
19
|
-
tags: ["NFT Fractions"],
|
|
20
|
-
responses: {
|
|
21
|
-
200: {
|
|
22
|
-
description: "Returns transaction data for making a purchase",
|
|
23
|
-
content: {
|
|
24
|
-
"application/json": {
|
|
25
|
-
schema: resolver(TransactionSchema),
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
export const PurchaseNextV0 = createController({
|
|
32
|
-
build: (factory) => factory.createApp().post("/", route, validator("json", PurchaseRequestSchema), async (c) => {
|
|
33
|
-
const { chainId, market, campaignId, amountToBuy } = c.req.valid("json");
|
|
34
|
-
const tx = buildDirectPurchaseTx(chainId, market, campaignId, amountToBuy);
|
|
35
|
-
return c.json(toTransaction(tx));
|
|
36
|
-
}),
|
|
37
|
-
});
|