@evergonlabs/tmi-protocol-api 0.10.1 → 0.11.0-rc.0
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 +384 -76
- package/dist/app.d.ts.map +1 -1
- package/dist/client.d.ts +408 -76
- package/dist/client.d.ts.map +1 -1
- package/dist/common/blockchain.d.ts +8700 -64
- package/dist/common/blockchain.d.ts.map +1 -1
- package/dist/common/blockchain.js +5 -1
- package/dist/common/config.d.ts +5 -0
- package/dist/common/config.d.ts.map +1 -1
- package/dist/common/config.js +5 -0
- package/dist/common/indexer/client.d.ts.map +1 -1
- package/dist/common/indexer/schemas.d.ts.map +1 -1
- package/dist/common/models/asset.d.ts +1 -1
- package/dist/common/models/base/chainId.d.ts +5 -5
- package/dist/common/models/base/chainId.d.ts.map +1 -1
- package/dist/common/models/chainId.d.ts +5 -5
- package/dist/common/models/chainId.d.ts.map +1 -1
- package/dist/common/models/transaction.d.ts +1 -1
- package/dist/fractions/index.d.ts +18 -57
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/markets/common/platform.d.ts +2 -2
- package/dist/fractions/markets/deployMarket.routes.d.ts.map +1 -0
- package/dist/fractions/{platforms → markets}/deployMarket.routes.js +16 -16
- package/dist/fractions/{platforms → markets}/deployMarket.schema.d.ts +1 -1
- package/dist/fractions/markets/deployMarket.schema.d.ts.map +1 -0
- package/dist/fractions/markets/getMarket/getMarket.d.ts +1 -1
- package/dist/fractions/markets/getMarket/index.d.ts +1 -1
- package/dist/fractions/markets/index.d.ts +1 -1
- package/dist/fractions/markets/initCompilot.routes.d.ts.map +1 -0
- package/dist/fractions/{platforms → markets}/initCompilot.routes.js +4 -5
- package/dist/fractions/platforms/index.d.ts +4 -4
- package/dist/fractions/platforms/index.d.ts.map +1 -1
- package/dist/fractions/platforms/index.js +4 -4
- package/dist/fractions/roles/grantRole.schema.d.ts +1 -1
- package/dist/fractions/sales/activityUtils.d.ts +1 -1
- package/dist/fractions/sales/approveWrapper.route.d.ts +0 -58
- package/dist/fractions/sales/approveWrapper.route.d.ts.map +1 -1
- package/dist/fractions/sales/approveWrapper.route.js +1 -59
- package/dist/fractions/sales/common/fractionsSale.d.ts +4 -4
- package/dist/fractions/sales/createFractions.schema.d.ts +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +2 -2
- package/dist/fractions/sales/getFractionSaleStatistics.route.js +1 -1
- package/dist/fractions/sales/getVaultAddress.d.ts +1 -1
- package/dist/fractions/sales/index.d.ts +6 -53
- package/dist/fractions/sales/index.d.ts.map +1 -1
- package/dist/fractions/sales/index.js +1 -3
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +2 -2
- package/dist/fractions/sales/purchase.route.d.ts +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.d.ts +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.js +1 -1
- package/dist/fractions/sales/searchActivity.route.d.ts +1 -1
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts +3 -3
- package/dist/fractions/sig/getAuthData.d.ts +1 -1
- package/dist/fractions/sig/getNonce.route.d.ts +1 -1
- package/dist/fractions/statistics/index.d.ts +8 -0
- package/dist/fractions/statistics/index.d.ts.map +1 -1
- package/dist/fractions/statistics/networkStatistics.route.d.ts +8 -0
- package/dist/fractions/statistics/networkStatistics.route.d.ts.map +1 -1
- package/dist/issuance/common/factories.base.d.ts +649 -5
- package/dist/issuance/common/factories.base.d.ts.map +1 -1
- package/dist/issuance/common/factories.base.js +2 -2
- package/dist/issuance/common/factories.d.ts +1 -1
- package/dist/issuance/common/factories.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/deploy.d.ts +2 -2
- package/dist/issuance/erc1155/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc1155/getMintedTokenId.d.ts +18 -0
- package/dist/issuance/erc1155/getMintedTokenId.d.ts.map +1 -0
- package/dist/issuance/erc1155/getMintedTokenId.js +81 -0
- package/dist/issuance/erc1155/index.d.ts +19 -3
- package/dist/issuance/erc1155/index.d.ts.map +1 -1
- package/dist/issuance/erc1155/index.js +3 -1
- package/dist/issuance/erc20/default/deploy.d.ts +2 -2
- package/dist/issuance/erc20/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc20/index.d.ts +2 -2
- package/dist/issuance/erc721/default/deploy.d.ts +2 -2
- package/dist/issuance/erc721/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc721/getMintedTokenId.d.ts +18 -0
- package/dist/issuance/erc721/getMintedTokenId.d.ts.map +1 -0
- package/dist/issuance/erc721/getMintedTokenId.js +79 -0
- package/dist/issuance/erc721/index.d.ts +19 -3
- package/dist/issuance/erc721/index.d.ts.map +1 -1
- package/dist/issuance/erc721/index.js +3 -1
- package/dist/issuance/index.d.ts +40 -8
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/next/fractions/index.d.ts +319 -4
- package/dist/next/fractions/index.d.ts.map +1 -1
- package/dist/next/fractions/index.js +3 -1
- package/dist/next/fractions/lending/buyback/buyback.schema.d.ts +1 -1
- package/dist/next/fractions/lending/createLendingSale.d.ts +1 -1
- package/dist/next/fractions/lending/schemas.d.ts +1 -1
- package/dist/next/fractions/lending/schemas.js +1 -1
- package/dist/next/fractions/platforms/default/deployNftFractionsMarket.schema.d.ts +1 -1
- package/dist/next/fractions/platforms/default/deployNftFractionsMarket.schema.js +1 -1
- package/dist/next/fractions/platforms/gated/deployNftFractionsMarket.schema.d.ts +1 -1
- package/dist/next/fractions/platforms/gated/deployNftFractionsMarket.schema.js +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts +13 -3
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts.map +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.js +16 -8
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts +14 -11
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts.map +1 -1
- package/dist/next/fractions/sales/createNftFractions.schema.js +2 -8
- package/dist/next/fractions/sales/index.d.ts +13 -3
- package/dist/next/fractions/sales/index.d.ts.map +1 -1
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.d.ts +25 -0
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.js +35 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.d.ts +52 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.js +50 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.d.ts +43 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.js +48 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.d.ts +39 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.js +39 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.d.ts +23 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.js +29 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.d.ts +51 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.js +74 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.d.ts +51 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.js +75 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.d.ts +19 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.js +52 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.d.ts +23 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.js +67 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.d.ts +20 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.js +59 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.d.ts +21 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.js +63 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.d.ts +307 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.js +27 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.d.ts +26 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.js +41 -0
- package/dist/staking/index.d.ts +7 -7
- package/dist/staking/platforms/common/platform.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/index.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +1 -1
- package/dist/staking/platforms/index.d.ts +2 -2
- package/dist/staking/platforms/searchPlatforms/index.d.ts +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +1 -1
- package/dist/staking/pools/common/pool.d.ts +1 -1
- package/dist/staking/pools/getPool/index.d.ts +1 -1
- package/dist/staking/pools/getPool/v0/getPool.d.ts +1 -1
- package/dist/staking/pools/index.d.ts +2 -2
- package/dist/staking/pools/searchPools/index.d.ts +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +1 -1
- package/dist/staking/roles/common/roleAssignment.d.ts +1 -1
- package/dist/staking/roles/common/roleEvent.d.ts +1 -1
- package/dist/staking/roles/index.d.ts +2 -2
- package/dist/staking/roles/searchRoleEvents/index.d.ts +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +1 -1
- package/dist/staking/roles/searchRoles/index.d.ts +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +1 -1
- package/dist/staking/stakes/common/stake.d.ts +1 -1
- package/dist/staking/stakes/common/stakeEvent.d.ts +1 -1
- package/dist/staking/stakes/index.d.ts +1 -1
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +1 -1
- package/package.json +10 -10
- package/dist/fractions/platforms/deployMarket.routes.d.ts.map +0 -1
- package/dist/fractions/platforms/deployMarket.schema.d.ts.map +0 -1
- package/dist/fractions/platforms/initCompilot.routes.d.ts.map +0 -1
- /package/dist/fractions/{platforms → markets}/deployMarket.routes.d.ts +0 -0
- /package/dist/fractions/{platforms → markets}/deployMarket.schema.js +0 -0
- /package/dist/fractions/{platforms → markets}/initCompilot.routes.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories.base.d.ts","sourceRoot":"","sources":["../../../src/issuance/common/factories.base.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"factories.base.d.ts","sourceRoot":"","sources":["../../../src/issuance/common/factories.base.ts"],"names":[],"mappings":"AAMA,eAAO,MAA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;;;CAb3ia,CAAC;AAE3F,eAAO,MAAM,eAAe,8BAAmF,CAAC;AAChH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,wBAAgB,YAAY,CAAC,CAAC,SAAS,eAAe,EAAE,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EAO5D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { sepolia } from "viem/chains";
|
|
1
|
+
import { baseSepolia, sepolia } from "viem/chains";
|
|
2
2
|
import { constants } from "@evergonlabs/tmi-factories-sdk";
|
|
3
3
|
import { nexeraTestnet } from "@evergonlabs/tmi-protocol-types/evm";
|
|
4
4
|
import { createSupportedChains } from "@evergonlabs/tmi-utils/models";
|
|
5
5
|
import { HttpError } from "../../common/http-error.js";
|
|
6
|
-
export const FactoryChainId = createSupportedChains([sepolia, nexeraTestnet]);
|
|
6
|
+
export const FactoryChainId = createSupportedChains([sepolia, baseSepolia, nexeraTestnet]);
|
|
7
7
|
export const factoryChainIds = FactoryChainId.chainIds;
|
|
8
8
|
export function getFactories(id) {
|
|
9
9
|
if (id in constants.factoryAddresses) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { FactoryChainId, factoryChainIds, getFactories, type IFactoryChainId } from "./factories.base.js";
|
|
2
|
-
export declare const FactoryChainIdQuery: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodUnion<[import("zod").ZodLiteral<11155111 | 72080>, import("zod").ZodLiteral<11155111 | 72080>, ...import("zod").ZodLiteral<11155111 | 72080>[]]>>;
|
|
2
|
+
export declare const FactoryChainIdQuery: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodUnion<[import("zod").ZodLiteral<11155111 | 84532 | 72080>, import("zod").ZodLiteral<11155111 | 84532 | 72080>, ...import("zod").ZodLiteral<11155111 | 84532 | 72080>[]]>>;
|
|
3
3
|
//# sourceMappingURL=factories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/issuance/common/factories.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1G,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/issuance/common/factories.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1G,eAAO,MAAM,mBAAmB,gQAAsC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployErc1155RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
baseURI: z.ZodString;
|
|
5
5
|
defaultTokenAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
6
|
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
@@ -10,7 +10,7 @@ export declare const CreateErc1155Token: import("../../../common/controller.js")
|
|
|
10
10
|
$post: {
|
|
11
11
|
input: {
|
|
12
12
|
json: {
|
|
13
|
-
chainId: 11155111 | 72080;
|
|
13
|
+
chainId: 11155111 | 84532 | 72080;
|
|
14
14
|
baseURI: string;
|
|
15
15
|
defaultTokenAdmin: string;
|
|
16
16
|
minter: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployGatedErc1155RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
baseURI: z.ZodString;
|
|
5
5
|
defaultTokenAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
6
|
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
@@ -11,7 +11,7 @@ export declare const CreateGatedErc1155Token: import("../../../common/controller
|
|
|
11
11
|
$post: {
|
|
12
12
|
input: {
|
|
13
13
|
json: {
|
|
14
|
-
chainId: 11155111 | 72080;
|
|
14
|
+
chainId: 11155111 | 84532 | 72080;
|
|
15
15
|
baseURI: string;
|
|
16
16
|
defaultTokenAdmin: string;
|
|
17
17
|
minter: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const GetMintedTokenId: 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
|
+
hash: string | string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
tokenId: string;
|
|
12
|
+
};
|
|
13
|
+
outputFormat: "json";
|
|
14
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}, "/", "/">>;
|
|
18
|
+
//# sourceMappingURL=getMintedTokenId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMintedTokenId.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc1155/getMintedTokenId.ts"],"names":[],"mappings":"AAwDA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;aAyC3B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { parseEventLogs } from "viem";
|
|
4
|
+
import { waitForTransactionReceipt } from "viem/actions";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { getPublicClient } from "../../common/blockchain.js";
|
|
7
|
+
import { createController } from "../../common/controller.js";
|
|
8
|
+
import { HttpError } from "../../common/http-error.js";
|
|
9
|
+
import { HashSchema } from "../../common/index.js";
|
|
10
|
+
import { FactoryChainIdQuery } from "../common/factories.js";
|
|
11
|
+
import { erc1155Tag } from "./tag.js";
|
|
12
|
+
const erc1155TransferSingleAbi = [
|
|
13
|
+
{
|
|
14
|
+
type: "event",
|
|
15
|
+
name: "TransferSingle",
|
|
16
|
+
inputs: [
|
|
17
|
+
{ type: "address", name: "operator", indexed: true },
|
|
18
|
+
{ type: "address", name: "from", indexed: true },
|
|
19
|
+
{ type: "address", name: "to", indexed: true },
|
|
20
|
+
{ type: "uint256", name: "id", indexed: false },
|
|
21
|
+
{ type: "uint256", name: "value", indexed: false },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
function extractTokenIdFromMintReceipt(receipt) {
|
|
26
|
+
const [event] = parseEventLogs({
|
|
27
|
+
abi: erc1155TransferSingleAbi,
|
|
28
|
+
eventName: "TransferSingle",
|
|
29
|
+
logs: receipt.logs,
|
|
30
|
+
});
|
|
31
|
+
if (!event) {
|
|
32
|
+
throw new Error("Could not extract tokenId from mint transaction receipt");
|
|
33
|
+
}
|
|
34
|
+
return event.args.id.toString();
|
|
35
|
+
}
|
|
36
|
+
const QuerySchema = z.object({
|
|
37
|
+
chainId: FactoryChainIdQuery.openapi({
|
|
38
|
+
param: {
|
|
39
|
+
name: "chainId",
|
|
40
|
+
in: "query",
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
hash: HashSchema.openapi({
|
|
44
|
+
param: {
|
|
45
|
+
name: "hash",
|
|
46
|
+
in: "query",
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
export const GetMintedTokenId = createController({
|
|
51
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
52
|
+
summary: "Get minted ERC1155 token ID",
|
|
53
|
+
description: "Gets the transaction receipt by hash and extracts the minted token ID from the TransferSingle event emitted by the token contract.",
|
|
54
|
+
tags: [erc1155Tag.tag],
|
|
55
|
+
responses: {
|
|
56
|
+
200: {
|
|
57
|
+
description: "Returns the minted token ID",
|
|
58
|
+
content: {
|
|
59
|
+
"application/json": {
|
|
60
|
+
schema: resolver(z.object({
|
|
61
|
+
tokenId: z.string(),
|
|
62
|
+
})),
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}), validator("query", QuerySchema), async (c) => {
|
|
68
|
+
const { chainId, hash } = c.req.valid("query");
|
|
69
|
+
const receipt = await waitForTransactionReceipt(getPublicClient(chainId, c.env.config), { hash });
|
|
70
|
+
try {
|
|
71
|
+
return c.json({ tokenId: extractTokenIdFromMintReceipt(receipt) });
|
|
72
|
+
}
|
|
73
|
+
catch (cause) {
|
|
74
|
+
throw new HttpError(500, {
|
|
75
|
+
message: "Could not extract tokenId from mint transaction receipt. Make sure you're passing a mint transaction hash.",
|
|
76
|
+
name: "UnableToExtractMintedTokenId",
|
|
77
|
+
cause: cause,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
@@ -3,7 +3,7 @@ export declare const Erc1155Controller: import("../../common/controller.js").ICo
|
|
|
3
3
|
$post: {
|
|
4
4
|
input: {
|
|
5
5
|
json: {
|
|
6
|
-
chainId: 11155111 | 72080;
|
|
6
|
+
chainId: 11155111 | 84532 | 72080;
|
|
7
7
|
baseURI: string;
|
|
8
8
|
defaultTokenAdmin: string;
|
|
9
9
|
minter: string;
|
|
@@ -72,7 +72,7 @@ export declare const Erc1155Controller: import("../../common/controller.js").ICo
|
|
|
72
72
|
$post: {
|
|
73
73
|
input: {
|
|
74
74
|
json: {
|
|
75
|
-
chainId: 11155111 | 72080;
|
|
75
|
+
chainId: 11155111 | 84532 | 72080;
|
|
76
76
|
baseURI: string;
|
|
77
77
|
defaultTokenAdmin: string;
|
|
78
78
|
minter: string;
|
|
@@ -357,5 +357,21 @@ export declare const Erc1155Controller: import("../../common/controller.js").ICo
|
|
|
357
357
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
358
358
|
};
|
|
359
359
|
};
|
|
360
|
-
}, "/renounceRole"
|
|
360
|
+
}, "/renounceRole"> | import("hono/types").MergeSchemaPath<{
|
|
361
|
+
"/": {
|
|
362
|
+
$get: {
|
|
363
|
+
input: {
|
|
364
|
+
query: {
|
|
365
|
+
chainId: string | string[];
|
|
366
|
+
hash: string | string[];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
output: {
|
|
370
|
+
tokenId: string;
|
|
371
|
+
};
|
|
372
|
+
outputFormat: "json";
|
|
373
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
}, "/getMintedTokenId">, "/", "/">>;
|
|
361
377
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc1155/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc1155/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAuB5B,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { CreateGatedErc1155Token } from "./gated/deploy.js";
|
|
|
6
6
|
import { InitializeGatedErc1155 } from "./gated/initialize.js";
|
|
7
7
|
import { ParseGatedErc1155DeployEvent } from "./gated/parseDeployEvent.js";
|
|
8
8
|
import { BurnErc1155 } from "./burn.js";
|
|
9
|
+
import { GetMintedTokenId } from "./getMintedTokenId.js";
|
|
9
10
|
import { GrantRoleErc1155 } from "./grantRole.js";
|
|
10
11
|
import { MintErc1155 } from "./mint.js";
|
|
11
12
|
import { RecoverErc1155 } from "./recover.js";
|
|
@@ -34,5 +35,6 @@ export const Erc1155Controller = createController({
|
|
|
34
35
|
.route("/recover", RecoverErc1155.build(factory))
|
|
35
36
|
.route("/grantRole", GrantRoleErc1155.build(factory))
|
|
36
37
|
.route("/revokeRole", RevokeRoleErc1155.build(factory))
|
|
37
|
-
.route("/renounceRole", RenounceRoleErc1155.build(factory))
|
|
38
|
+
.route("/renounceRole", RenounceRoleErc1155.build(factory))
|
|
39
|
+
.route("/getMintedTokenId", GetMintedTokenId.build(factory)),
|
|
38
40
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployErc20RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
tokenName: z.ZodString;
|
|
5
5
|
tokenSymbol: z.ZodString;
|
|
6
6
|
supplyCap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
@@ -12,7 +12,7 @@ export declare const CreateErc20Token: import("../../../common/controller.js").I
|
|
|
12
12
|
$post: {
|
|
13
13
|
input: {
|
|
14
14
|
json: {
|
|
15
|
-
chainId: 11155111 | 72080;
|
|
15
|
+
chainId: 11155111 | 84532 | 72080;
|
|
16
16
|
tokenName: string;
|
|
17
17
|
tokenSymbol: string;
|
|
18
18
|
supplyCap: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployGatedErc20RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
tokenName: z.ZodString;
|
|
5
5
|
tokenSymbol: z.ZodString;
|
|
6
6
|
supplyCap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
@@ -13,7 +13,7 @@ export declare const CreateGatedErc20Token: import("../../../common/controller.j
|
|
|
13
13
|
$post: {
|
|
14
14
|
input: {
|
|
15
15
|
json: {
|
|
16
|
-
chainId: 11155111 | 72080;
|
|
16
|
+
chainId: 11155111 | 84532 | 72080;
|
|
17
17
|
tokenName: string;
|
|
18
18
|
tokenSymbol: string;
|
|
19
19
|
supplyCap: string;
|
|
@@ -3,7 +3,7 @@ export declare const Erc20Controller: import("../../common/controller.js").ICont
|
|
|
3
3
|
$post: {
|
|
4
4
|
input: {
|
|
5
5
|
json: {
|
|
6
|
-
chainId: 11155111 | 72080;
|
|
6
|
+
chainId: 11155111 | 84532 | 72080;
|
|
7
7
|
tokenName: string;
|
|
8
8
|
tokenSymbol: string;
|
|
9
9
|
supplyCap: string;
|
|
@@ -78,7 +78,7 @@ export declare const Erc20Controller: import("../../common/controller.js").ICont
|
|
|
78
78
|
$post: {
|
|
79
79
|
input: {
|
|
80
80
|
json: {
|
|
81
|
-
chainId: 11155111 | 72080;
|
|
81
|
+
chainId: 11155111 | 84532 | 72080;
|
|
82
82
|
tokenName: string;
|
|
83
83
|
tokenSymbol: string;
|
|
84
84
|
supplyCap: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployErc721RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
tokenName: z.ZodString;
|
|
5
5
|
tokenSymbol: z.ZodString;
|
|
6
6
|
baseURI: z.ZodString;
|
|
@@ -12,7 +12,7 @@ export declare const CreateErc721Token: import("../../../common/controller.js").
|
|
|
12
12
|
$post: {
|
|
13
13
|
input: {
|
|
14
14
|
json: {
|
|
15
|
-
chainId: 11155111 | 72080;
|
|
15
|
+
chainId: 11155111 | 84532 | 72080;
|
|
16
16
|
tokenName: string;
|
|
17
17
|
tokenSymbol: string;
|
|
18
18
|
baseURI: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployGatedErc721RequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 84532 | 72080>, z.ZodLiteral<11155111 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 84532 | 72080>[]]>;
|
|
4
4
|
tokenName: z.ZodString;
|
|
5
5
|
tokenSymbol: z.ZodString;
|
|
6
6
|
baseURI: z.ZodString;
|
|
@@ -13,7 +13,7 @@ export declare const CreateGatedErc721Token: import("../../../common/controller.
|
|
|
13
13
|
$post: {
|
|
14
14
|
input: {
|
|
15
15
|
json: {
|
|
16
|
-
chainId: 11155111 | 72080;
|
|
16
|
+
chainId: 11155111 | 84532 | 72080;
|
|
17
17
|
tokenName: string;
|
|
18
18
|
tokenSymbol: string;
|
|
19
19
|
baseURI: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const GetMintedTokenId: 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
|
+
hash: string | string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
tokenId: string;
|
|
12
|
+
};
|
|
13
|
+
outputFormat: "json";
|
|
14
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}, "/", "/">>;
|
|
18
|
+
//# sourceMappingURL=getMintedTokenId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMintedTokenId.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/getMintedTokenId.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;aAyC3B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { parseEventLogs } from "viem";
|
|
4
|
+
import { waitForTransactionReceipt } from "viem/actions";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { getPublicClient } from "../../common/blockchain.js";
|
|
7
|
+
import { createController } from "../../common/controller.js";
|
|
8
|
+
import { HttpError } from "../../common/http-error.js";
|
|
9
|
+
import { HashSchema } from "../../common/index.js";
|
|
10
|
+
import { FactoryChainIdQuery } from "../common/factories.js";
|
|
11
|
+
import { erc721Tag } from "./tag.js";
|
|
12
|
+
const erc721TransferAbi = [
|
|
13
|
+
{
|
|
14
|
+
type: "event",
|
|
15
|
+
name: "Transfer",
|
|
16
|
+
inputs: [
|
|
17
|
+
{ type: "address", name: "from", indexed: true },
|
|
18
|
+
{ type: "address", name: "to", indexed: true },
|
|
19
|
+
{ type: "uint256", name: "tokenId", indexed: true },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
function extractTokenIdFromMintReceipt(receipt) {
|
|
24
|
+
const [event] = parseEventLogs({
|
|
25
|
+
abi: erc721TransferAbi,
|
|
26
|
+
eventName: "Transfer",
|
|
27
|
+
logs: receipt.logs,
|
|
28
|
+
});
|
|
29
|
+
if (!event) {
|
|
30
|
+
throw new Error("Could not extract tokenId from mint transaction receipt");
|
|
31
|
+
}
|
|
32
|
+
return event.args.tokenId.toString();
|
|
33
|
+
}
|
|
34
|
+
const QuerySchema = z.object({
|
|
35
|
+
chainId: FactoryChainIdQuery.openapi({
|
|
36
|
+
param: {
|
|
37
|
+
name: "chainId",
|
|
38
|
+
in: "query",
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
hash: HashSchema.openapi({
|
|
42
|
+
param: {
|
|
43
|
+
name: "hash",
|
|
44
|
+
in: "query",
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
export const GetMintedTokenId = createController({
|
|
49
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
50
|
+
summary: "Get minted ERC721 token ID",
|
|
51
|
+
description: "Gets the transaction receipt by hash and extracts the minted token ID from the Transfer event emitted by the token contract.",
|
|
52
|
+
tags: [erc721Tag.tag],
|
|
53
|
+
responses: {
|
|
54
|
+
200: {
|
|
55
|
+
description: "Returns the minted token ID",
|
|
56
|
+
content: {
|
|
57
|
+
"application/json": {
|
|
58
|
+
schema: resolver(z.object({
|
|
59
|
+
tokenId: z.string(),
|
|
60
|
+
})),
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}), validator("query", QuerySchema), async (c) => {
|
|
66
|
+
const { chainId, hash } = c.req.valid("query");
|
|
67
|
+
const receipt = await waitForTransactionReceipt(getPublicClient(chainId, c.env.config), { hash });
|
|
68
|
+
try {
|
|
69
|
+
return c.json({ tokenId: extractTokenIdFromMintReceipt(receipt) });
|
|
70
|
+
}
|
|
71
|
+
catch (cause) {
|
|
72
|
+
throw new HttpError(500, {
|
|
73
|
+
message: "Could not extract tokenId from mint transaction receipt. Make sure you're passing a mint transaction hash.",
|
|
74
|
+
name: "UnableToExtractMintedTokenId",
|
|
75
|
+
cause: cause,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
});
|
|
@@ -3,7 +3,7 @@ export declare const Erc721Controller: import("../../common/controller.js").ICon
|
|
|
3
3
|
$post: {
|
|
4
4
|
input: {
|
|
5
5
|
json: {
|
|
6
|
-
chainId: 11155111 | 72080;
|
|
6
|
+
chainId: 11155111 | 84532 | 72080;
|
|
7
7
|
tokenName: string;
|
|
8
8
|
tokenSymbol: string;
|
|
9
9
|
baseURI: string;
|
|
@@ -78,7 +78,7 @@ export declare const Erc721Controller: import("../../common/controller.js").ICon
|
|
|
78
78
|
$post: {
|
|
79
79
|
input: {
|
|
80
80
|
json: {
|
|
81
|
-
chainId: 11155111 | 72080;
|
|
81
|
+
chainId: 11155111 | 84532 | 72080;
|
|
82
82
|
tokenName: string;
|
|
83
83
|
tokenSymbol: string;
|
|
84
84
|
baseURI: string;
|
|
@@ -389,5 +389,21 @@ export declare const Erc721Controller: import("../../common/controller.js").ICon
|
|
|
389
389
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
|
-
}, "/setTokenURI"
|
|
392
|
+
}, "/setTokenURI"> | import("hono/types").MergeSchemaPath<{
|
|
393
|
+
"/": {
|
|
394
|
+
$get: {
|
|
395
|
+
input: {
|
|
396
|
+
query: {
|
|
397
|
+
chainId: string | string[];
|
|
398
|
+
hash: string | string[];
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
output: {
|
|
402
|
+
tokenId: string;
|
|
403
|
+
};
|
|
404
|
+
outputFormat: "json";
|
|
405
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
}, "/getMintedTokenId">, "/", "/">>;
|
|
393
409
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAwB3B,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { InitializeGatedErc721 } from "./gated/initialize.js";
|
|
|
7
7
|
import { ParseGatedErc721DeployEvent } from "./gated/parseDeployEvent.js";
|
|
8
8
|
import { ApproveErc721 } from "./approve.js";
|
|
9
9
|
import { BurnErc721 } from "./burn.js";
|
|
10
|
+
import { GetMintedTokenId } from "./getMintedTokenId.js";
|
|
10
11
|
import { GrantRoleErc721 } from "./grantRole.js";
|
|
11
12
|
import { MintErc721 } from "./mint.js";
|
|
12
13
|
import { RecoverErc721 } from "./recover.js";
|
|
@@ -36,5 +37,6 @@ export const Erc721Controller = createController({
|
|
|
36
37
|
.route("/revokeRole", RevokeRoleErc721.build(factory))
|
|
37
38
|
.route("/renounceRole", RenounceRoleErc721.build(factory))
|
|
38
39
|
.route("/setBaseURI", SetBaseURIErc721.build(factory))
|
|
39
|
-
.route("/setTokenURI", SetTokenURIErc721.build(factory))
|
|
40
|
+
.route("/setTokenURI", SetTokenURIErc721.build(factory))
|
|
41
|
+
.route("/getMintedTokenId", GetMintedTokenId.build(factory)),
|
|
40
42
|
});
|
package/dist/issuance/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
3
3
|
$post: {
|
|
4
4
|
input: {
|
|
5
5
|
json: {
|
|
6
|
-
chainId: 11155111 | 72080;
|
|
6
|
+
chainId: 11155111 | 84532 | 72080;
|
|
7
7
|
tokenName: string;
|
|
8
8
|
tokenSymbol: string;
|
|
9
9
|
supplyCap: string;
|
|
@@ -78,7 +78,7 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
78
78
|
$post: {
|
|
79
79
|
input: {
|
|
80
80
|
json: {
|
|
81
|
-
chainId: 11155111 | 72080;
|
|
81
|
+
chainId: 11155111 | 84532 | 72080;
|
|
82
82
|
tokenName: string;
|
|
83
83
|
tokenSymbol: string;
|
|
84
84
|
supplyCap: string;
|
|
@@ -421,7 +421,7 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
421
421
|
$post: {
|
|
422
422
|
input: {
|
|
423
423
|
json: {
|
|
424
|
-
chainId: 11155111 | 72080;
|
|
424
|
+
chainId: 11155111 | 84532 | 72080;
|
|
425
425
|
tokenName: string;
|
|
426
426
|
tokenSymbol: string;
|
|
427
427
|
baseURI: string;
|
|
@@ -496,7 +496,7 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
496
496
|
$post: {
|
|
497
497
|
input: {
|
|
498
498
|
json: {
|
|
499
|
-
chainId: 11155111 | 72080;
|
|
499
|
+
chainId: 11155111 | 84532 | 72080;
|
|
500
500
|
tokenName: string;
|
|
501
501
|
tokenSymbol: string;
|
|
502
502
|
baseURI: string;
|
|
@@ -807,12 +807,28 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
807
807
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
808
808
|
};
|
|
809
809
|
};
|
|
810
|
-
}, "/setTokenURI"
|
|
810
|
+
}, "/setTokenURI"> | import("hono/types").MergeSchemaPath<{
|
|
811
|
+
"/": {
|
|
812
|
+
$get: {
|
|
813
|
+
input: {
|
|
814
|
+
query: {
|
|
815
|
+
chainId: string | string[];
|
|
816
|
+
hash: string | string[];
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
output: {
|
|
820
|
+
tokenId: string;
|
|
821
|
+
};
|
|
822
|
+
outputFormat: "json";
|
|
823
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
}, "/getMintedTokenId">, "/erc721"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
811
827
|
"/": {
|
|
812
828
|
$post: {
|
|
813
829
|
input: {
|
|
814
830
|
json: {
|
|
815
|
-
chainId: 11155111 | 72080;
|
|
831
|
+
chainId: 11155111 | 84532 | 72080;
|
|
816
832
|
baseURI: string;
|
|
817
833
|
defaultTokenAdmin: string;
|
|
818
834
|
minter: string;
|
|
@@ -881,7 +897,7 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
881
897
|
$post: {
|
|
882
898
|
input: {
|
|
883
899
|
json: {
|
|
884
|
-
chainId: 11155111 | 72080;
|
|
900
|
+
chainId: 11155111 | 84532 | 72080;
|
|
885
901
|
baseURI: string;
|
|
886
902
|
defaultTokenAdmin: string;
|
|
887
903
|
minter: string;
|
|
@@ -1166,7 +1182,23 @@ export declare const IssuanceApi: import("../common/controller.js").IApi<import(
|
|
|
1166
1182
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1167
1183
|
};
|
|
1168
1184
|
};
|
|
1169
|
-
}, "/renounceRole"
|
|
1185
|
+
}, "/renounceRole"> | import("hono/types").MergeSchemaPath<{
|
|
1186
|
+
"/": {
|
|
1187
|
+
$get: {
|
|
1188
|
+
input: {
|
|
1189
|
+
query: {
|
|
1190
|
+
chainId: string | string[];
|
|
1191
|
+
hash: string | string[];
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
output: {
|
|
1195
|
+
tokenId: string;
|
|
1196
|
+
};
|
|
1197
|
+
outputFormat: "json";
|
|
1198
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1201
|
+
}, "/getMintedTokenId">, "/erc1155"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
1170
1202
|
"/": {
|
|
1171
1203
|
$get: {
|
|
1172
1204
|
input: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/issuance/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/issuance/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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