@longdotxyz/shared 0.0.131 → 0.0.133
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/contracts/asset.contract.d.ts +3519 -3547
- package/dist/contracts/asset.contract.js +57 -94
- package/dist/contracts/asset.contract.js.map +1 -1
- package/dist/contracts/auction-template.contract.d.ts +208 -186
- package/dist/contracts/auction-template.contract.js +54 -64
- package/dist/contracts/auction-template.contract.js.map +1 -1
- package/dist/contracts/auction.contract.d.ts +113 -133
- package/dist/contracts/auction.contract.js +31 -51
- package/dist/contracts/auction.contract.js.map +1 -1
- package/dist/contracts/charts.contract.d.ts +91 -119
- package/dist/contracts/charts.contract.js +13 -32
- package/dist/contracts/charts.contract.js.map +1 -1
- package/dist/contracts/community.contract.d.ts +73 -86
- package/dist/contracts/community.contract.js +7 -27
- package/dist/contracts/community.contract.js.map +1 -1
- package/dist/contracts/github-activity.contract.d.ts +507 -0
- package/dist/contracts/github-activity.contract.js +43 -0
- package/dist/contracts/github-activity.contract.js.map +1 -0
- package/dist/contracts/index.d.ts +6071 -6159
- package/dist/contracts/index.js +5 -4
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/ipfs.contract.d.ts +66 -83
- package/dist/contracts/ipfs.contract.js +30 -49
- package/dist/contracts/ipfs.contract.js.map +1 -1
- package/dist/contracts/market.contract.d.ts +1268 -1418
- package/dist/contracts/market.contract.js +69 -132
- package/dist/contracts/market.contract.js.map +1 -1
- package/dist/contracts/pathfinding.contract.d.ts +191 -202
- package/dist/contracts/pathfinding.contract.js +13 -23
- package/dist/contracts/pathfinding.contract.js.map +1 -1
- package/dist/contracts/sponsorship.contract.d.ts +230 -331
- package/dist/contracts/sponsorship.contract.js +78 -138
- package/dist/contracts/sponsorship.contract.js.map +1 -1
- package/dist/contracts/tokens.contract.d.ts +62 -61
- package/dist/contracts/tokens.contract.js +42 -51
- package/dist/contracts/tokens.contract.js.map +1 -1
- package/package.json +4 -3
package/dist/contracts/index.js
CHANGED
|
@@ -15,35 +15,36 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.rootContract = void 0;
|
|
18
|
-
const core_1 = require("@ts-rest/core");
|
|
19
18
|
const asset_contract_1 = require("./asset.contract");
|
|
20
19
|
const auction_template_contract_1 = require("./auction-template.contract");
|
|
21
20
|
const auction_contract_1 = require("./auction.contract");
|
|
22
21
|
const charts_contract_1 = require("./charts.contract");
|
|
23
22
|
const community_contract_1 = require("./community.contract");
|
|
23
|
+
const github_activity_contract_1 = require("./github-activity.contract");
|
|
24
24
|
const ipfs_contract_1 = require("./ipfs.contract");
|
|
25
25
|
const market_contract_1 = require("./market.contract");
|
|
26
26
|
const pathfinding_contract_1 = require("./pathfinding.contract");
|
|
27
27
|
const sponsorship_contract_1 = require("./sponsorship.contract");
|
|
28
28
|
const tokens_contract_1 = require("./tokens.contract");
|
|
29
|
-
|
|
30
|
-
exports.rootContract = contract.router({
|
|
29
|
+
exports.rootContract = {
|
|
31
30
|
assets: asset_contract_1.assetContract,
|
|
32
31
|
auctions: auction_contract_1.auctionContract,
|
|
33
32
|
auctionTemplates: auction_template_contract_1.auctionTemplateContract,
|
|
34
33
|
charts: charts_contract_1.chartsContract,
|
|
35
34
|
communities: community_contract_1.communityContract,
|
|
35
|
+
githubActivity: github_activity_contract_1.githubActivityContract,
|
|
36
36
|
ipfs: ipfs_contract_1.ipfsContract,
|
|
37
37
|
market: market_contract_1.marketContract,
|
|
38
38
|
pathfinding: pathfinding_contract_1.pathfindingContract,
|
|
39
39
|
sponsorships: sponsorship_contract_1.sponsorshipContract,
|
|
40
40
|
tokens: tokens_contract_1.tokensContract,
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
__exportStar(require("./asset.contract"), exports);
|
|
43
43
|
__exportStar(require("./auction.contract"), exports);
|
|
44
44
|
__exportStar(require("./auction-template.contract"), exports);
|
|
45
45
|
__exportStar(require("./charts.contract"), exports);
|
|
46
46
|
__exportStar(require("./community.contract"), exports);
|
|
47
|
+
__exportStar(require("./github-activity.contract"), exports);
|
|
47
48
|
__exportStar(require("./ipfs.contract"), exports);
|
|
48
49
|
__exportStar(require("./market.contract"), exports);
|
|
49
50
|
__exportStar(require("./pathfinding.contract"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAiD;AACjD,2EAAsE;AACtE,yDAAqD;AACrD,uDAAmD;AACnD,6DAAyD;AACzD,yEAAoE;AACpE,mDAA+C;AAC/C,uDAAmD;AACnD,iEAA6D;AAC7D,iEAA6D;AAC7D,uDAAmD;AAEtC,QAAA,YAAY,GAAG;IACxB,MAAM,EAAE,8BAAa;IACrB,QAAQ,EAAE,kCAAe;IACzB,gBAAgB,EAAE,mDAAuB;IACzC,MAAM,EAAE,gCAAc;IACtB,WAAW,EAAE,sCAAiB;IAC9B,cAAc,EAAE,iDAAsB;IACtC,IAAI,EAAE,4BAAY;IAClB,MAAM,EAAE,gCAAc;IACtB,WAAW,EAAE,0CAAmB;IAChC,YAAY,EAAE,0CAAmB;IACjC,MAAM,EAAE,gCAAc;CACzB,CAAC;AAEF,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,oDAAkC;AAClC,uDAAqC;AACrC,6DAA2C;AAC3C,kDAAgC;AAChC,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC"}
|
|
@@ -1,90 +1,73 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
import { AssetCategory } from "../types/constants";
|
|
3
3
|
declare const ipfsContract: {
|
|
4
|
-
uploadImage: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
uploadMetadata: {
|
|
21
|
-
description: "Upload metadata to IPFS";
|
|
22
|
-
method: "POST";
|
|
23
|
-
body: z.ZodObject<{
|
|
24
|
-
name: z.ZodString;
|
|
25
|
-
description: z.ZodString;
|
|
26
|
-
image_hash: z.ZodString;
|
|
27
|
-
social_links: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
-
label: z.ZodString;
|
|
29
|
-
url: z.ZodString;
|
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
label: string;
|
|
32
|
-
url: string;
|
|
33
|
-
}, {
|
|
34
|
-
label: string;
|
|
35
|
-
url: string;
|
|
36
|
-
}>, "many">>>;
|
|
37
|
-
vesting_recipients: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
-
address: z.ZodString;
|
|
39
|
-
amount: z.ZodNumber;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
address: string;
|
|
42
|
-
amount: number;
|
|
43
|
-
}, {
|
|
44
|
-
address: string;
|
|
45
|
-
amount: number;
|
|
46
|
-
}>, "many">>>;
|
|
47
|
-
fee_receiver: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
48
|
-
categories: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AssetCategory>, "many">>>;
|
|
4
|
+
uploadImage: import("@orpc/contract", { with: { "resolution-mode": "import" } }).ContractProcedureBuilderWithInputOutput<z.ZodAny, z.ZodObject<{
|
|
5
|
+
result: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
result: string;
|
|
8
|
+
}, {
|
|
9
|
+
result: string;
|
|
10
|
+
}>, Record<never, never>, Record<never, never>>;
|
|
11
|
+
uploadMetadata: import("@orpc/contract", { with: { "resolution-mode": "import" } }).ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
description: z.ZodString;
|
|
14
|
+
image_hash: z.ZodString;
|
|
15
|
+
social_links: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
label: z.ZodString;
|
|
17
|
+
url: z.ZodString;
|
|
49
18
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
image_hash: string;
|
|
53
|
-
fee_receiver: string;
|
|
54
|
-
social_links: {
|
|
55
|
-
label: string;
|
|
56
|
-
url: string;
|
|
57
|
-
}[];
|
|
58
|
-
vesting_recipients: {
|
|
59
|
-
address: string;
|
|
60
|
-
amount: number;
|
|
61
|
-
}[];
|
|
62
|
-
categories: AssetCategory[];
|
|
19
|
+
label: string;
|
|
20
|
+
url: string;
|
|
63
21
|
}, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
|
|
22
|
+
label: string;
|
|
23
|
+
url: string;
|
|
24
|
+
}>, "many">>>;
|
|
25
|
+
vesting_recipients: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
address: z.ZodString;
|
|
27
|
+
amount: z.ZodNumber;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
address: string;
|
|
30
|
+
amount: number;
|
|
31
|
+
}, {
|
|
32
|
+
address: string;
|
|
33
|
+
amount: number;
|
|
34
|
+
}>, "many">>>;
|
|
35
|
+
fee_receiver: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
36
|
+
categories: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AssetCategory>, "many">>>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
image_hash: string;
|
|
41
|
+
fee_receiver: string;
|
|
42
|
+
social_links: {
|
|
43
|
+
label: string;
|
|
44
|
+
url: string;
|
|
45
|
+
}[];
|
|
46
|
+
vesting_recipients: {
|
|
47
|
+
address: string;
|
|
48
|
+
amount: number;
|
|
49
|
+
}[];
|
|
50
|
+
categories: AssetCategory[];
|
|
51
|
+
}, {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
image_hash: string;
|
|
55
|
+
fee_receiver?: string | undefined;
|
|
56
|
+
social_links?: {
|
|
57
|
+
label: string;
|
|
58
|
+
url: string;
|
|
59
|
+
}[] | undefined;
|
|
60
|
+
vesting_recipients?: {
|
|
61
|
+
address: string;
|
|
62
|
+
amount: number;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
categories?: AssetCategory[] | undefined;
|
|
65
|
+
}>, z.ZodObject<{
|
|
66
|
+
result: z.ZodString;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
result: string;
|
|
69
|
+
}, {
|
|
70
|
+
result: string;
|
|
71
|
+
}>, Record<never, never>, Record<never, never>>;
|
|
89
72
|
};
|
|
90
73
|
export { ipfsContract };
|
|
@@ -4,57 +4,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ipfsContract = void 0;
|
|
7
|
-
const
|
|
7
|
+
const contract_1 = require("@orpc/contract");
|
|
8
8
|
const zod_1 = __importDefault(require("zod"));
|
|
9
9
|
const constants_1 = require("../types/constants");
|
|
10
|
-
const contract = (0, core_1.initContract)();
|
|
11
10
|
const assetCategorySchema = zod_1.default.nativeEnum(constants_1.AssetCategory);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
address: zod_1.default.string(),
|
|
42
|
-
amount: zod_1.default.number(),
|
|
43
|
-
}))
|
|
44
|
-
.optional()
|
|
45
|
-
.default([]),
|
|
46
|
-
fee_receiver: zod_1.default.string().optional().default(""),
|
|
47
|
-
categories: zod_1.default.array(assetCategorySchema).optional().default([]),
|
|
48
|
-
}),
|
|
49
|
-
responses: {
|
|
50
|
-
200: zod_1.default.object({
|
|
51
|
-
result: zod_1.default.string(),
|
|
52
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
description: "Upload metadata to IPFS",
|
|
55
|
-
},
|
|
56
|
-
}, {
|
|
57
|
-
pathPrefix: "/ipfs",
|
|
58
|
-
});
|
|
11
|
+
const uploadImage = contract_1.oc
|
|
12
|
+
.route({ method: "POST", path: "/ipfs/upload-image", description: "Upload an image to IPFS", tags: ["ipfs"] })
|
|
13
|
+
.input(zod_1.default.any())
|
|
14
|
+
.output(zod_1.default.object({ result: zod_1.default.string() }));
|
|
15
|
+
const uploadMetadata = contract_1.oc
|
|
16
|
+
.route({ method: "POST", path: "/ipfs/upload-metadata", description: "Upload metadata to IPFS", tags: ["ipfs"] })
|
|
17
|
+
.input(zod_1.default.object({
|
|
18
|
+
name: zod_1.default.string(),
|
|
19
|
+
description: zod_1.default.string(),
|
|
20
|
+
image_hash: zod_1.default.string(),
|
|
21
|
+
social_links: zod_1.default
|
|
22
|
+
.array(zod_1.default.object({
|
|
23
|
+
label: zod_1.default.string(),
|
|
24
|
+
url: zod_1.default.string(),
|
|
25
|
+
}))
|
|
26
|
+
.optional()
|
|
27
|
+
.default([]),
|
|
28
|
+
vesting_recipients: zod_1.default
|
|
29
|
+
.array(zod_1.default.object({
|
|
30
|
+
address: zod_1.default.string(),
|
|
31
|
+
amount: zod_1.default.number(),
|
|
32
|
+
}))
|
|
33
|
+
.optional()
|
|
34
|
+
.default([]),
|
|
35
|
+
fee_receiver: zod_1.default.string().optional().default(""),
|
|
36
|
+
categories: zod_1.default.array(assetCategorySchema).optional().default([]),
|
|
37
|
+
}))
|
|
38
|
+
.output(zod_1.default.object({ result: zod_1.default.string() }));
|
|
39
|
+
const ipfsContract = { uploadImage, uploadMetadata };
|
|
59
40
|
exports.ipfsContract = ipfsContract;
|
|
60
41
|
//# sourceMappingURL=ipfs.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipfs.contract.js","sourceRoot":"","sources":["../../src/contracts/ipfs.contract.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ipfs.contract.js","sourceRoot":"","sources":["../../src/contracts/ipfs.contract.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAoC;AACpC,8CAAoB;AAEpB,kDAAmD;AAGnD,MAAM,mBAAmB,GAAG,aAAC,CAAC,UAAU,CAAC,yBAAa,CAAC,CAAC;AAExD,MAAM,WAAW,GAAG,aAAE;KACjB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7G,KAAK,CAAC,aAAC,CAAC,GAAG,EAAE,CAAC;KACd,MAAM,CAAC,aAAC,CAAC,MAAM,CAA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