@evergonlabs/tmi-protocol-api 0.10.0-rc.2 → 0.10.1-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 +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/common/blockchain.d.ts +2137 -766
- package/dist/common/blockchain.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/index.js +1 -1
- package/dist/fractions/markets/getDeployEvent.js +1 -1
- package/dist/fractions/markets/getMarket/getMarket.js +1 -1
- package/dist/fractions/markets/searchMarkets/searchMarkets.js +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/dist/fractions/sales/getVaultAddress.js +1 -1
- package/dist/fractions/sales/getWithdrawEvent.js +1 -1
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.js +1 -1
- package/dist/issuance/common/factories.base.d.ts +56 -14
- package/dist/issuance/common/factories.base.d.ts.map +1 -1
- package/dist/issuance/erc1155/burn.js +1 -1
- package/dist/issuance/erc1155/default/deploy.js +2 -2
- package/dist/issuance/erc1155/default/initialize.js +1 -1
- package/dist/issuance/erc1155/default/parseDeployEvent.js +2 -2
- package/dist/issuance/erc1155/gated/deploy.js +2 -2
- package/dist/issuance/erc1155/gated/initialize.js +2 -2
- package/dist/issuance/erc1155/gated/parseDeployEvent.js +2 -2
- package/dist/issuance/erc1155/grantRole.js +2 -2
- package/dist/issuance/erc1155/mint.js +1 -1
- package/dist/issuance/erc1155/recover.js +1 -1
- package/dist/issuance/erc1155/renounceRole.js +2 -2
- package/dist/issuance/erc1155/revokeRole.js +2 -2
- package/dist/issuance/erc1155/setApprovalForAll.js +2 -2
- package/dist/issuance/erc1155/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc1155/setBaseURI.js +2 -2
- package/dist/issuance/erc1155/setTokenURI.js +2 -2
- package/dist/issuance/erc20/approve.js +1 -1
- package/dist/issuance/erc20/burn.js +1 -1
- package/dist/issuance/erc20/default/deploy.js +1 -1
- package/dist/issuance/erc20/default/parseDeployEvent.js +1 -1
- package/dist/issuance/erc20/gated/deploy.js +1 -1
- package/dist/issuance/erc20/gated/initialize.js +1 -1
- package/dist/issuance/erc20/gated/parseDeployEvent.js +1 -1
- package/dist/issuance/erc20/gatedSimple/deploy.js +1 -1
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.js +1 -1
- package/dist/issuance/erc20/grantRole.js +1 -1
- package/dist/issuance/erc20/mint.js +1 -1
- package/dist/issuance/erc20/recover.js +1 -1
- package/dist/issuance/erc20/renounceRole.js +1 -1
- package/dist/issuance/erc20/revokeRole.js +1 -1
- package/dist/issuance/erc20/transfer.js +1 -1
- package/dist/issuance/erc20/transferFrom.js +1 -1
- package/dist/issuance/erc721/approve.js +1 -1
- package/dist/issuance/erc721/burn.js +1 -1
- package/dist/issuance/erc721/default/deploy.js +2 -2
- package/dist/issuance/erc721/default/initialize.js +1 -1
- package/dist/issuance/erc721/default/parseDeployEvent.js +2 -2
- package/dist/issuance/erc721/gated/deploy.js +2 -2
- package/dist/issuance/erc721/gated/initialize.js +2 -2
- package/dist/issuance/erc721/gated/parseDeployEvent.js +2 -2
- package/dist/issuance/erc721/grantRole.js +2 -2
- package/dist/issuance/erc721/mint.js +1 -1
- package/dist/issuance/erc721/recover.js +1 -1
- package/dist/issuance/erc721/renounceRole.js +2 -2
- package/dist/issuance/erc721/revokeRole.js +2 -2
- package/dist/issuance/erc721/setBaseURI.js +2 -2
- package/dist/issuance/erc721/setTokenURI.js +2 -2
- package/dist/issuance/erc721/transferFrom.js +1 -1
- package/dist/issuance/proxy/upgrade.js +1 -1
- package/dist/next/fractions/index.js +2 -2
- package/dist/next/fractions/lending/buyback/buyback.routes.js +4 -4
- package/dist/next/fractions/lending/createLendingSale.js +4 -4
- package/dist/next/fractions/lending/deployMarket/lending.routes.js +4 -4
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +3 -3
- package/dist/next/fractions/sales/parseFractionsCreatedEvent.js +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.js +2 -2
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +2 -2
- package/dist/staking/pools/getPool/v0/getPool.js +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.js +1 -1
- package/dist/staking/roles/getRoles/v0/getRoles.js +1 -1
- package/dist/staking/roles/grantRole/v0/grantRole.js +1 -1
- package/dist/staking/stakes/getStake/v0/getStake.js +1 -1
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.js +1 -1
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.js +1 -1
- package/dist/stakingTemplates/templates/common/getReward.js +3 -3
- package/dist/stakingTemplates/templates/common/getStakeEvent.js +1 -1
- package/dist/stakingTemplates/templates/common/partialUnstake.js +2 -2
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.js +3 -3
- package/dist/stakingTemplates/templates/reputation/v0/createPool.js +3 -3
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.js +3 -3
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.js +3 -3
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.js +3 -3
- package/dist/stakingTemplates/templates/rwa/v0/createPool.js +3 -3
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.js +3 -3
- package/package.json +12 -10
- 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
|
@@ -7,12 +7,12 @@ import { PlatformContractAddress, StakeIdSchema, toTransaction, TransactionSchem
|
|
|
7
7
|
export function createGetRewardController(template) {
|
|
8
8
|
return createController({
|
|
9
9
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
10
|
-
summary: "Get
|
|
11
|
-
description: "Generates a transaction for claiming all accumulated
|
|
10
|
+
summary: "Get reward",
|
|
11
|
+
description: "Generates a transaction for claiming all accumulated rewards",
|
|
12
12
|
tags: [template.tag.tag],
|
|
13
13
|
responses: {
|
|
14
14
|
200: {
|
|
15
|
-
description: "Compiled
|
|
15
|
+
description: "Compiled get rewards transaction details",
|
|
16
16
|
content: {
|
|
17
17
|
"application/json": {
|
|
18
18
|
schema: resolver(TransactionSchema),
|
|
@@ -11,7 +11,7 @@ import { AddressSchema, SentTransactionParamsSchema } from "../../../common/inde
|
|
|
11
11
|
export function createGetStakeEventController(template) {
|
|
12
12
|
return createController({
|
|
13
13
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
|
-
summary: "Get
|
|
14
|
+
summary: "Get stake event",
|
|
15
15
|
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted with corresponding \`stake\` action`,
|
|
16
16
|
tags: [template.tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -8,12 +8,12 @@ import { Int256BigInt } from "../../../common/int256.js";
|
|
|
8
8
|
export function createPartialUnstakeController(template) {
|
|
9
9
|
return createController({
|
|
10
10
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
11
|
-
summary: "Partial
|
|
11
|
+
summary: "Partial unstake",
|
|
12
12
|
description: `Generates a transaction for withdraw a portion of the staked assets and all accumulated rewards from an expired position.`,
|
|
13
13
|
tags: [template.tag.tag],
|
|
14
14
|
responses: {
|
|
15
15
|
200: {
|
|
16
|
-
description: "Compiled
|
|
16
|
+
description: "Compiled partial unstake transaction details",
|
|
17
17
|
content: {
|
|
18
18
|
"application/json": {
|
|
19
19
|
schema: resolver(TransactionSchema),
|
|
@@ -9,12 +9,12 @@ import { Erc721Schema } from "../../../../common/models/erc721.js";
|
|
|
9
9
|
import { reputation } from "../common.js";
|
|
10
10
|
export const CreateReputationPlatformV0 = createController({
|
|
11
11
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
|
-
summary: "Create
|
|
13
|
-
description: "Generates a transaction for a new
|
|
12
|
+
summary: "Create platform",
|
|
13
|
+
description: "Generates a transaction for a new platform",
|
|
14
14
|
tags: [reputation.tag.tag],
|
|
15
15
|
responses: {
|
|
16
16
|
200: {
|
|
17
|
-
description: "Compiled
|
|
17
|
+
description: "Compiled create platform transaction details",
|
|
18
18
|
content: {
|
|
19
19
|
"application/json": {
|
|
20
20
|
schema: resolver(TransactionSchema),
|
|
@@ -14,12 +14,12 @@ import { StartTimeSchema } from "../../common/time.js";
|
|
|
14
14
|
import { reputation } from "../common.js";
|
|
15
15
|
export const CreateReputationPoolV0 = createController({
|
|
16
16
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
17
|
-
summary: "Create
|
|
18
|
-
description: "Generates a transaction for a new
|
|
17
|
+
summary: "Create pool",
|
|
18
|
+
description: "Generates a transaction for a new staking pool within the platform",
|
|
19
19
|
tags: [reputation.tag.tag],
|
|
20
20
|
responses: {
|
|
21
21
|
200: {
|
|
22
|
-
description: "Compiled
|
|
22
|
+
description: "Compiled create pool transaction details",
|
|
23
23
|
content: {
|
|
24
24
|
"application/json": {
|
|
25
25
|
schema: resolver(TransactionSchema),
|
|
@@ -9,12 +9,12 @@ import { Erc721Schema } from "../../../../common/models/erc721.js";
|
|
|
9
9
|
import { reputationLock } from "../common.js";
|
|
10
10
|
export const CreateReputationLockPlatformV0 = createController({
|
|
11
11
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
|
-
summary: "Create
|
|
13
|
-
description: "Generates a transaction for a new
|
|
12
|
+
summary: "Create platform",
|
|
13
|
+
description: "Generates a transaction for a new platform",
|
|
14
14
|
tags: [reputationLock.tag.tag],
|
|
15
15
|
responses: {
|
|
16
16
|
200: {
|
|
17
|
-
description: "Compiled
|
|
17
|
+
description: "Compiled create platform transaction details",
|
|
18
18
|
content: {
|
|
19
19
|
"application/json": {
|
|
20
20
|
schema: resolver(TransactionSchema),
|
|
@@ -16,12 +16,12 @@ import { StartTimeSchema } from "../../common/time.js";
|
|
|
16
16
|
import { reputationLock } from "../common.js";
|
|
17
17
|
export const CreateReputationLockPoolV0 = createController({
|
|
18
18
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
19
|
-
summary: "Create
|
|
20
|
-
description: "Generates a transaction for a new
|
|
19
|
+
summary: "Create pool",
|
|
20
|
+
description: "Generates a transaction for a new staking pool within the platform",
|
|
21
21
|
tags: [reputationLock.tag.tag],
|
|
22
22
|
responses: {
|
|
23
23
|
200: {
|
|
24
|
-
description: "Compiled
|
|
24
|
+
description: "Compiled create pool transaction details",
|
|
25
25
|
content: {
|
|
26
26
|
"application/json": {
|
|
27
27
|
schema: resolver(TransactionSchema),
|
|
@@ -9,12 +9,12 @@ import { Erc721Schema } from "../../../../common/models/erc721.js";
|
|
|
9
9
|
import { rwa } from "../common.js";
|
|
10
10
|
export const CreateRwaPlatformV0 = createController({
|
|
11
11
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
|
-
summary: "Create
|
|
13
|
-
description: "Generates a transaction for a new
|
|
12
|
+
summary: "Create platform",
|
|
13
|
+
description: "Generates a transaction for a new platform",
|
|
14
14
|
tags: [rwa.tag.tag],
|
|
15
15
|
responses: {
|
|
16
16
|
200: {
|
|
17
|
-
description: "Compiled
|
|
17
|
+
description: "Compiled create platform transaction details",
|
|
18
18
|
content: {
|
|
19
19
|
"application/json": {
|
|
20
20
|
schema: resolver(TransactionSchema),
|
|
@@ -13,12 +13,12 @@ import { StartTimeSchema } from "../../common/time.js";
|
|
|
13
13
|
import { rwa } from "../common.js";
|
|
14
14
|
export const CreateRwaPoolV0 = createController({
|
|
15
15
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
16
|
-
summary: "Create
|
|
17
|
-
description: "Generates a transaction for a new
|
|
16
|
+
summary: "Create pool",
|
|
17
|
+
description: "Generates a transaction for a new staking pool within the platform",
|
|
18
18
|
tags: [rwa.tag.tag],
|
|
19
19
|
responses: {
|
|
20
20
|
200: {
|
|
21
|
-
description: "Compiled
|
|
21
|
+
description: "Compiled create pool transaction details",
|
|
22
22
|
content: {
|
|
23
23
|
"application/json": {
|
|
24
24
|
schema: resolver(TransactionSchema),
|
|
@@ -9,12 +9,12 @@ import { PlatformContractAddress, PoolIdSchema } from "../../../../common/models
|
|
|
9
9
|
import { rwa } from "../common.js";
|
|
10
10
|
export const DistributeRewardsRwaV0 = createController({
|
|
11
11
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
|
-
summary: "Distribute
|
|
13
|
-
description: "Generates a transaction for
|
|
12
|
+
summary: "Distribute rewards",
|
|
13
|
+
description: "Generates a transaction for rewards allocation for certain pool.",
|
|
14
14
|
tags: [rwa.tag.tag],
|
|
15
15
|
responses: {
|
|
16
16
|
200: {
|
|
17
|
-
description: "Compiled
|
|
17
|
+
description: "Compiled reward notification transaction details",
|
|
18
18
|
content: {
|
|
19
19
|
"application/json": {
|
|
20
20
|
schema: resolver(TransactionSchema),
|
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-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"hono-openapi": "^1.2.0",
|
|
37
37
|
"kysely": "^0.26.3",
|
|
38
38
|
"type-fest": "^5.0.0",
|
|
39
|
-
"viem": "
|
|
39
|
+
"viem": "2.46.2",
|
|
40
40
|
"zod": "^4.3.6",
|
|
41
41
|
"zod-openapi": "^5.4.6",
|
|
42
|
-
"@evergonlabs/tmi-protocol-contracts": "0.10.
|
|
43
|
-
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.
|
|
44
|
-
"@evergonlabs/tmi-protocol-
|
|
45
|
-
"@evergonlabs/tmi-protocol-
|
|
46
|
-
"@evergonlabs/tmi-protocol-
|
|
47
|
-
"@evergonlabs/tmi-protocol-
|
|
48
|
-
"@evergonlabs/tmi-protocol-
|
|
42
|
+
"@evergonlabs/tmi-protocol-contracts": "0.10.1-rc.0",
|
|
43
|
+
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.1-rc.0",
|
|
44
|
+
"@evergonlabs/tmi-protocol-indexer": "0.10.1-rc.0",
|
|
45
|
+
"@evergonlabs/tmi-protocol-shared": "0.10.1-rc.0",
|
|
46
|
+
"@evergonlabs/tmi-protocol-staking-sdk": "0.10.1-rc.0",
|
|
47
|
+
"@evergonlabs/tmi-protocol-types": "0.10.1-rc.0",
|
|
48
|
+
"@evergonlabs/tmi-protocol-utils": "0.10.1-rc.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@evergonlabs/tmi-eslint-config": "0.3.0",
|
|
@@ -80,12 +80,14 @@
|
|
|
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",
|
|
86
87
|
"openapi:generate": "pnpm run tsx:oa -- ./scripts/generateOpenApi/bin.ts",
|
|
87
88
|
"serve": "pnpm run env -- pnpm run tsx:oa -- ./src/serve.ts",
|
|
88
89
|
"tsx:oa": "tsx --import @hono/zod-openapi",
|
|
89
|
-
"test": "pnpm run env -- vitest run"
|
|
90
|
+
"test": "pnpm run env -- vitest run",
|
|
91
|
+
"test:e2e": "pnpm run env -- vitest run -c vitest.config.e2e.ts"
|
|
90
92
|
}
|
|
91
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"}
|