@longdotxyz/shared 0.0.61 → 0.0.63
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/auction-template.contract.d.ts +0 -32
- package/dist/contracts/auction-template.contract.js +0 -14
- package/dist/contracts/auction-template.contract.js.map +1 -1
- package/dist/contracts/index.d.ts +48 -32
- package/dist/contracts/index.js +3 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/sponsorship.contract.d.ts +48 -0
- package/dist/contracts/sponsorship.contract.js +33 -0
- package/dist/contracts/sponsorship.contract.js.map +1 -0
- package/package.json +1 -1
|
@@ -176,40 +176,16 @@ declare const auctionTemplateContract: {
|
|
|
176
176
|
token_symbol: z.ZodString;
|
|
177
177
|
token_uri: z.ZodDefault<z.ZodString>;
|
|
178
178
|
user_address: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
179
|
-
beneficiaries: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
180
|
-
beneficiary: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
181
|
-
shares: z.ZodNumber;
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
beneficiary: `0x${string}`;
|
|
184
|
-
shares: number;
|
|
185
|
-
}, {
|
|
186
|
-
beneficiary: string;
|
|
187
|
-
shares: number;
|
|
188
|
-
}>, "many">, {
|
|
189
|
-
beneficiary: `0x${string}`;
|
|
190
|
-
shares: number;
|
|
191
|
-
}[], {
|
|
192
|
-
beneficiary: string;
|
|
193
|
-
shares: number;
|
|
194
|
-
}[]>>;
|
|
195
179
|
}, "strip", z.ZodTypeAny, {
|
|
196
180
|
token_name: string;
|
|
197
181
|
token_symbol: string;
|
|
198
182
|
token_uri: string;
|
|
199
183
|
user_address: `0x${string}`;
|
|
200
|
-
beneficiaries?: {
|
|
201
|
-
beneficiary: `0x${string}`;
|
|
202
|
-
shares: number;
|
|
203
|
-
}[] | undefined;
|
|
204
184
|
}, {
|
|
205
185
|
token_name: string;
|
|
206
186
|
token_symbol: string;
|
|
207
187
|
user_address: string;
|
|
208
188
|
token_uri?: string | undefined;
|
|
209
|
-
beneficiaries?: {
|
|
210
|
-
beneficiary: string;
|
|
211
|
-
shares: number;
|
|
212
|
-
}[] | undefined;
|
|
213
189
|
}>;
|
|
214
190
|
}, "strip", z.ZodTypeAny, {
|
|
215
191
|
metadata: {
|
|
@@ -217,10 +193,6 @@ declare const auctionTemplateContract: {
|
|
|
217
193
|
token_symbol: string;
|
|
218
194
|
token_uri: string;
|
|
219
195
|
user_address: `0x${string}`;
|
|
220
|
-
beneficiaries?: {
|
|
221
|
-
beneficiary: `0x${string}`;
|
|
222
|
-
shares: number;
|
|
223
|
-
}[] | undefined;
|
|
224
196
|
};
|
|
225
197
|
template_id: string;
|
|
226
198
|
debug: boolean;
|
|
@@ -230,10 +202,6 @@ declare const auctionTemplateContract: {
|
|
|
230
202
|
token_symbol: string;
|
|
231
203
|
user_address: string;
|
|
232
204
|
token_uri?: string | undefined;
|
|
233
|
-
beneficiaries?: {
|
|
234
|
-
beneficiary: string;
|
|
235
|
-
shares: number;
|
|
236
|
-
}[] | undefined;
|
|
237
205
|
};
|
|
238
206
|
template_id: string;
|
|
239
207
|
debug?: boolean | undefined;
|
|
@@ -80,20 +80,6 @@ const auctionTemplateContract = contract.router({
|
|
|
80
80
|
token_symbol: zod_1.default.string().describe("The symbol of the token (e.g. 'MTK')"),
|
|
81
81
|
token_uri: zod_1.default.string().startsWith("ipfs://").default("ipfs://").describe("The URI of the token (e.g. 'ipfs://...')"),
|
|
82
82
|
user_address: zod_1.default.string().pipe(types_1.hex).describe("The address of the owner of the token (e.g. '0x123...')"),
|
|
83
|
-
beneficiaries: zod_1.default
|
|
84
|
-
.array(zod_1.default.object({
|
|
85
|
-
beneficiary: zod_1.default.string().pipe(types_1.hex).describe("The beneficiary address"),
|
|
86
|
-
shares: zod_1.default.number().int().min(0).max(10000).describe("Shares in basis points (10000 = 100%)"),
|
|
87
|
-
}))
|
|
88
|
-
.min(1, "At least one beneficiary is required")
|
|
89
|
-
.refine((beneficiaries) => {
|
|
90
|
-
const totalShares = beneficiaries.reduce((sum, b) => sum + b.shares, 0);
|
|
91
|
-
return totalShares === 10000;
|
|
92
|
-
}, {
|
|
93
|
-
message: "Beneficiary shares must sum to exactly 10000 basis points (100%)",
|
|
94
|
-
})
|
|
95
|
-
.optional()
|
|
96
|
-
.describe("Beneficiaries for multicurve auctions (required for multicurve, ignored for dynamic)"),
|
|
97
83
|
}),
|
|
98
84
|
}),
|
|
99
85
|
responses: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auction-template.contract.js","sourceRoot":"","sources":["../../src/contracts/auction-template.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAAwC;AAExC,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AAEhC,MAAM,6BAA6B,GAAG,aAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,aAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;IAChB,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auction-template.contract.js","sourceRoot":"","sources":["../../src/contracts/auction-template.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAAwC;AAExC,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AAEhC,MAAM,6BAA6B,GAAG,aAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,aAAC,CAAC,MAAM,EAAE;IACd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16 @@ export declare const rootContract: {
|
|
|
3075
3075
|
token_symbol: import("zod").ZodString;
|
|
3076
3076
|
token_uri: import("zod").ZodDefault<import("zod").ZodString>;
|
|
3077
3077
|
user_address: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
3078
|
-
beneficiaries: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodArray<import("zod").ZodObject<{
|
|
3079
|
-
beneficiary: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
3080
|
-
shares: import("zod").ZodNumber;
|
|
3081
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
3082
|
-
beneficiary: `0x${string}`;
|
|
3083
|
-
shares: number;
|
|
3084
|
-
}, {
|
|
3085
|
-
beneficiary: string;
|
|
3086
|
-
shares: number;
|
|
3087
|
-
}>, "many">, {
|
|
3088
|
-
beneficiary: `0x${string}`;
|
|
3089
|
-
shares: number;
|
|
3090
|
-
}[], {
|
|
3091
|
-
beneficiary: string;
|
|
3092
|
-
shares: number;
|
|
3093
|
-
}[]>>;
|
|
3094
3078
|
}, "strip", import("zod").ZodTypeAny, {
|
|
3095
3079
|
token_name: string;
|
|
3096
3080
|
token_symbol: string;
|
|
3097
3081
|
token_uri: string;
|
|
3098
3082
|
user_address: `0x${string}`;
|
|
3099
|
-
beneficiaries?: {
|
|
3100
|
-
beneficiary: `0x${string}`;
|
|
3101
|
-
shares: number;
|
|
3102
|
-
}[] | undefined;
|
|
3103
3083
|
}, {
|
|
3104
3084
|
token_name: string;
|
|
3105
3085
|
token_symbol: string;
|
|
3106
3086
|
user_address: string;
|
|
3107
3087
|
token_uri?: string | undefined;
|
|
3108
|
-
beneficiaries?: {
|
|
3109
|
-
beneficiary: string;
|
|
3110
|
-
shares: number;
|
|
3111
|
-
}[] | undefined;
|
|
3112
3088
|
}>;
|
|
3113
3089
|
}, "strip", import("zod").ZodTypeAny, {
|
|
3114
3090
|
metadata: {
|
|
@@ -3116,10 +3092,6 @@ export declare const rootContract: {
|
|
|
3116
3092
|
token_symbol: string;
|
|
3117
3093
|
token_uri: string;
|
|
3118
3094
|
user_address: `0x${string}`;
|
|
3119
|
-
beneficiaries?: {
|
|
3120
|
-
beneficiary: `0x${string}`;
|
|
3121
|
-
shares: number;
|
|
3122
|
-
}[] | undefined;
|
|
3123
3095
|
};
|
|
3124
3096
|
template_id: string;
|
|
3125
3097
|
debug: boolean;
|
|
@@ -3129,10 +3101,6 @@ export declare const rootContract: {
|
|
|
3129
3101
|
token_symbol: string;
|
|
3130
3102
|
user_address: string;
|
|
3131
3103
|
token_uri?: string | undefined;
|
|
3132
|
-
beneficiaries?: {
|
|
3133
|
-
beneficiary: string;
|
|
3134
|
-
shares: number;
|
|
3135
|
-
}[] | undefined;
|
|
3136
3104
|
};
|
|
3137
3105
|
template_id: string;
|
|
3138
3106
|
debug?: boolean | undefined;
|
|
@@ -3744,6 +3712,53 @@ export declare const rootContract: {
|
|
|
3744
3712
|
};
|
|
3745
3713
|
};
|
|
3746
3714
|
};
|
|
3715
|
+
sponsorships: {
|
|
3716
|
+
broadcastSponsored: {
|
|
3717
|
+
description: "Broadcast a transaction with gas sponsorship using Privy server wallet";
|
|
3718
|
+
method: "POST";
|
|
3719
|
+
body: import("zod").ZodObject<{
|
|
3720
|
+
encoded_payload: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
3721
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
3722
|
+
encoded_payload: `0x${string}`;
|
|
3723
|
+
}, {
|
|
3724
|
+
encoded_payload: string;
|
|
3725
|
+
}>;
|
|
3726
|
+
path: "/sponsor";
|
|
3727
|
+
responses: {
|
|
3728
|
+
200: import("zod").ZodObject<{
|
|
3729
|
+
result: import("zod").ZodObject<{
|
|
3730
|
+
transaction_hash: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
3731
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
3732
|
+
transaction_hash: `0x${string}`;
|
|
3733
|
+
}, {
|
|
3734
|
+
transaction_hash: string;
|
|
3735
|
+
}>;
|
|
3736
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
3737
|
+
result: {
|
|
3738
|
+
transaction_hash: `0x${string}`;
|
|
3739
|
+
};
|
|
3740
|
+
}, {
|
|
3741
|
+
result: {
|
|
3742
|
+
transaction_hash: string;
|
|
3743
|
+
};
|
|
3744
|
+
}>;
|
|
3745
|
+
400: import("zod").ZodObject<{
|
|
3746
|
+
message: import("zod").ZodString;
|
|
3747
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
3748
|
+
message: string;
|
|
3749
|
+
}, {
|
|
3750
|
+
message: string;
|
|
3751
|
+
}>;
|
|
3752
|
+
500: import("zod").ZodObject<{
|
|
3753
|
+
message: import("zod").ZodString;
|
|
3754
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
3755
|
+
message: string;
|
|
3756
|
+
}, {
|
|
3757
|
+
message: string;
|
|
3758
|
+
}>;
|
|
3759
|
+
};
|
|
3760
|
+
};
|
|
3761
|
+
};
|
|
3747
3762
|
};
|
|
3748
3763
|
export * from "./asset.contract";
|
|
3749
3764
|
export * from "./auction.contract";
|
|
@@ -3751,3 +3766,4 @@ export * from "./auction-template.contract";
|
|
|
3751
3766
|
export * from "./community.contract";
|
|
3752
3767
|
export * from "./ipfs.contract";
|
|
3753
3768
|
export * from "./quote.contract";
|
|
3769
|
+
export * from "./sponsorship.contract";
|
package/dist/contracts/index.js
CHANGED
|
@@ -22,6 +22,7 @@ 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
24
|
const quote_contract_1 = require("./quote.contract");
|
|
25
|
+
const sponsorship_contract_1 = require("./sponsorship.contract");
|
|
25
26
|
const contract = (0, core_1.initContract)();
|
|
26
27
|
exports.rootContract = contract.router({
|
|
27
28
|
assets: asset_contract_1.assetContract,
|
|
@@ -30,6 +31,7 @@ exports.rootContract = contract.router({
|
|
|
30
31
|
communities: community_contract_1.communityContract,
|
|
31
32
|
ipfs: ipfs_contract_1.ipfsContract,
|
|
32
33
|
quotes: quote_contract_1.quoteContract,
|
|
34
|
+
sponsorships: sponsorship_contract_1.sponsorshipContract,
|
|
33
35
|
});
|
|
34
36
|
__exportStar(require("./asset.contract"), exports);
|
|
35
37
|
__exportStar(require("./auction.contract"), exports);
|
|
@@ -37,4 +39,5 @@ __exportStar(require("./auction-template.contract"), exports);
|
|
|
37
39
|
__exportStar(require("./community.contract"), exports);
|
|
38
40
|
__exportStar(require("./ipfs.contract"), exports);
|
|
39
41
|
__exportStar(require("./quote.contract"), exports);
|
|
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,qDAAiD;
|
|
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,qDAAiD;AACjD,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,MAAM,EAAE,8BAAa;IACrB,YAAY,EAAE,0CAAmB;CACpC,CAAC,CAAC;AAEH,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,yDAAuC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const sponsorshipContract: {
|
|
3
|
+
broadcastSponsored: {
|
|
4
|
+
description: "Broadcast a transaction with gas sponsorship using Privy server wallet";
|
|
5
|
+
method: "POST";
|
|
6
|
+
body: z.ZodObject<{
|
|
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: "/sponsor";
|
|
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
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sponsorshipContract = 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
|
+
exports.sponsorshipContract = contract.router({
|
|
9
|
+
broadcastSponsored: {
|
|
10
|
+
method: "POST",
|
|
11
|
+
path: "",
|
|
12
|
+
body: zod_1.default.object({
|
|
13
|
+
encoded_payload: zod_1.default.string().pipe(types_1.hex).describe("The encoded payload from the encode endpoint"),
|
|
14
|
+
}),
|
|
15
|
+
responses: {
|
|
16
|
+
200: zod_1.default.object({
|
|
17
|
+
result: zod_1.default.object({
|
|
18
|
+
transaction_hash: zod_1.default.string().pipe(types_1.hex).describe("The transaction hash of the broadcasted transaction"),
|
|
19
|
+
}),
|
|
20
|
+
}),
|
|
21
|
+
400: zod_1.default.object({
|
|
22
|
+
message: zod_1.default.string(),
|
|
23
|
+
}),
|
|
24
|
+
500: zod_1.default.object({
|
|
25
|
+
message: zod_1.default.string(),
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
description: "Broadcast a transaction with gas sponsorship using Privy server wallet",
|
|
29
|
+
},
|
|
30
|
+
}, {
|
|
31
|
+
pathPrefix: "/sponsor",
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=sponsorship.contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sponsorship.contract.js","sourceRoot":"","sources":["../../src/contracts/sponsorship.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAA+B;AAE/B,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AAEnB,QAAA,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAC9C;IACI,kBAAkB,EAAE;QAChB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,aAAC,CAAC,MAAM,CAAC;YACX,eAAe,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAG,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;SACjG,CAAC;QACF,SAAS,EAAE;YACP,GAAG,EAAE,aAAC,CAAC,MAAM,CAAC;gBACV,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;oBACb,gBAAgB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAG,CAAC,CAAC,QAAQ,CAAC,qDAAqD,CAAC;iBACzG,CAAC;aACL,CAAC;YACF,GAAG,EAAE,aAAC,CAAC,MAAM,CAAC;gBACV,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;aACtB,CAAC;YACF,GAAG,EAAE,aAAC,CAAC,MAAM,CAAC;gBACV,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;aACtB,CAAC;SACL;QACD,WAAW,EAAE,wEAAwE;KACxF;CACJ,EACD;IACI,UAAU,EAAE,UAAU;CACzB,CACJ,CAAC"}
|