Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const requestBodySchemaV5 = Type.Intersect([
currency: Type.Optional(Type.String()),
validityStartTimestamp: Type.Integer({ minimum: 0 }),
validityEndTimestamp: Type.Optional(Type.Integer({ minimum: 0 })),
tokenId: Type.Optional(Type.String()),
uid: Type.Optional(Type.String()),
}),
Type.Union([
Expand Down Expand Up @@ -145,6 +146,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
currency,
validityStartTimestamp,
validityEndTimestamp,
tokenId,
uid,
} = args;

Expand Down Expand Up @@ -183,6 +185,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
royaltyBps,
primarySaleRecipient,
pricePerToken,
tokenId: maybeBigInt(tokenId),
pricePerTokenWei: maybeBigInt(pricePerTokenWei),
currency,
validityStartTimestamp: new Date(validityStartTimestamp * 1000),
Expand Down Expand Up @@ -223,6 +226,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
royaltyBps,
royaltyRecipient,
uid,
tokenId,
} = request.body as Static<typeof requestBodySchemaV4>;

const contract = await getContractV4({
Expand All @@ -247,6 +251,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
royaltyBps,
royaltyRecipient,
uid,
tokenId,
});

const signedPayload = await contract.erc1155.signature.generate(payload);
Expand Down
6 changes: 6 additions & 0 deletions src/server/schemas/nft/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ export const signature1155InputSchema = Type.Object({
Type.Integer({ minimum: 0 }),
]),
),
tokenId: Type.Optional(
Type.String({
description:
"The token id to mint. If not provided, a new token id will be generated.",
}),
),
});

export const signature1155OutputSchema = Type.Object({
Expand Down
Loading