@evergonlabs/tmi-protocol-api 0.10.0-rc.1 → 0.10.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 +71 -71
- package/dist/client.d.ts +76 -76
- package/dist/common/blockchain.d.ts +2137 -766
- package/dist/common/blockchain.d.ts.map +1 -1
- package/dist/fractions/index.d.ts +71 -71
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/index.js +1 -3
- 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/deployMarket.routes.js +4 -4
- package/dist/fractions/platforms/initCompilot.routes.js +1 -1
- package/dist/fractions/platforms/initNid.route.js +1 -1
- package/dist/fractions/sales/approveSale.route.js +1 -1
- package/dist/fractions/sales/approveWrapper.route.d.ts +88 -0
- package/dist/fractions/sales/approveWrapper.route.d.ts.map +1 -0
- package/dist/fractions/sales/approveWrapper.route.js +92 -0
- package/dist/fractions/sales/completeSale.route.js +1 -1
- package/dist/fractions/sales/createFractions.route.js +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.js +1 -1
- package/dist/fractions/sales/getVaultAddress.js +2 -2
- package/dist/fractions/sales/getWithdrawEvent.js +2 -2
- package/dist/fractions/sales/index.d.ts +71 -1
- package/dist/fractions/sales/index.d.ts.map +1 -1
- package/dist/fractions/sales/index.js +5 -1
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +2 -2
- package/dist/fractions/sales/purchase.route.js +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.js +1 -1
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.js +2 -2
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.js +1 -1
- package/dist/fractions/sales/recoverFractions.js +1 -1
- package/dist/fractions/sales/rejectFractions.js +1 -1
- package/dist/fractions/sales/searchActivity.route.js +1 -1
- package/dist/fractions/sales/searchSales/searchSales.js +1 -1
- package/dist/fractions/sales/searchWithdrawal.route.js +1 -1
- package/dist/fractions/sales/setFeeCapLimit.js +1 -1
- package/dist/fractions/sales/unlockWrappedAssets.route.js +1 -1
- package/dist/fractions/sales/vesting/claimStatistics.route.js +1 -1
- package/dist/fractions/sales/vesting/claimVestedTokens.route.js +1 -1
- package/dist/fractions/sales/vesting/editCliff.route.js +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.js +2 -2
- package/dist/fractions/sales/withdraw.route.js +1 -1
- package/dist/fractions/statistics/networkStatistics.route.js +4 -4
- 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.d.ts.map +1 -1
- package/dist/issuance/erc1155/burn.js +3 -2
- package/dist/issuance/erc1155/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/deploy.js +4 -3
- package/dist/issuance/erc1155/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/initialize.js +3 -2
- package/dist/issuance/erc1155/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/parseDeployEvent.js +4 -3
- package/dist/issuance/erc1155/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/deploy.js +4 -3
- package/dist/issuance/erc1155/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/initialize.js +4 -3
- package/dist/issuance/erc1155/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/parseDeployEvent.js +4 -3
- package/dist/issuance/erc1155/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/grantRole.js +4 -3
- package/dist/issuance/erc1155/mint.d.ts.map +1 -1
- package/dist/issuance/erc1155/mint.js +3 -2
- package/dist/issuance/erc1155/recover.d.ts.map +1 -1
- package/dist/issuance/erc1155/recover.js +3 -2
- package/dist/issuance/erc1155/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/renounceRole.js +4 -3
- package/dist/issuance/erc1155/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/revokeRole.js +4 -3
- package/dist/issuance/erc1155/setApprovalForAll.d.ts.map +1 -1
- package/dist/issuance/erc1155/setApprovalForAll.js +4 -3
- package/dist/issuance/erc1155/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc1155/setBaseURI.js +4 -3
- package/dist/issuance/erc1155/setTokenURI.d.ts.map +1 -1
- package/dist/issuance/erc1155/setTokenURI.js +4 -3
- package/dist/issuance/erc1155/tag.d.ts +4 -0
- package/dist/issuance/erc1155/tag.d.ts.map +1 -0
- package/dist/issuance/erc1155/tag.js +2 -0
- package/dist/issuance/erc20/approve.d.ts.map +1 -1
- package/dist/issuance/erc20/approve.js +3 -2
- package/dist/issuance/erc20/burn.d.ts.map +1 -1
- package/dist/issuance/erc20/burn.js +3 -2
- package/dist/issuance/erc20/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/default/deploy.js +3 -2
- package/dist/issuance/erc20/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc20/default/initialize.js +2 -1
- package/dist/issuance/erc20/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/default/parseDeployEvent.js +3 -2
- package/dist/issuance/erc20/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/deploy.js +3 -2
- package/dist/issuance/erc20/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/initialize.js +3 -2
- package/dist/issuance/erc20/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/parseDeployEvent.js +3 -2
- package/dist/issuance/erc20/gatedSimple/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/deploy.js +3 -2
- package/dist/issuance/erc20/gatedSimple/getInitData.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/getInitData.js +2 -1
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.js +3 -2
- package/dist/issuance/erc20/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc20/grantRole.js +3 -2
- package/dist/issuance/erc20/mint.d.ts.map +1 -1
- package/dist/issuance/erc20/mint.js +3 -2
- package/dist/issuance/erc20/recover.d.ts.map +1 -1
- package/dist/issuance/erc20/recover.js +3 -2
- package/dist/issuance/erc20/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc20/renounceRole.js +3 -2
- package/dist/issuance/erc20/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc20/revokeRole.js +3 -2
- package/dist/issuance/erc20/tag.d.ts +4 -0
- package/dist/issuance/erc20/tag.d.ts.map +1 -0
- package/dist/issuance/erc20/tag.js +2 -0
- package/dist/issuance/erc20/transfer.d.ts.map +1 -1
- package/dist/issuance/erc20/transfer.js +3 -2
- package/dist/issuance/erc20/transferFrom.d.ts.map +1 -1
- package/dist/issuance/erc20/transferFrom.js +3 -2
- package/dist/issuance/erc721/approve.d.ts.map +1 -1
- package/dist/issuance/erc721/approve.js +3 -2
- package/dist/issuance/erc721/burn.d.ts.map +1 -1
- package/dist/issuance/erc721/burn.js +3 -2
- package/dist/issuance/erc721/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc721/default/deploy.js +4 -3
- package/dist/issuance/erc721/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc721/default/initialize.js +3 -2
- package/dist/issuance/erc721/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc721/default/parseDeployEvent.js +4 -3
- package/dist/issuance/erc721/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/deploy.js +4 -3
- package/dist/issuance/erc721/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/initialize.js +4 -3
- package/dist/issuance/erc721/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/parseDeployEvent.js +4 -3
- package/dist/issuance/erc721/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc721/grantRole.js +4 -3
- package/dist/issuance/erc721/mint.d.ts.map +1 -1
- package/dist/issuance/erc721/mint.js +3 -2
- package/dist/issuance/erc721/recover.d.ts.map +1 -1
- package/dist/issuance/erc721/recover.js +3 -2
- package/dist/issuance/erc721/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc721/renounceRole.js +4 -3
- package/dist/issuance/erc721/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc721/revokeRole.js +4 -3
- package/dist/issuance/erc721/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc721/setBaseURI.js +4 -3
- package/dist/issuance/erc721/setTokenURI.d.ts.map +1 -1
- package/dist/issuance/erc721/setTokenURI.js +4 -3
- package/dist/issuance/erc721/tag.d.ts +4 -0
- package/dist/issuance/erc721/tag.d.ts.map +1 -0
- package/dist/issuance/erc721/tag.js +2 -0
- package/dist/issuance/erc721/transferFrom.d.ts.map +1 -1
- package/dist/issuance/erc721/transferFrom.js +3 -2
- package/dist/issuance/proxy/deploy.d.ts.map +1 -1
- package/dist/issuance/proxy/deploy.js +3 -2
- package/dist/issuance/proxy/tag.d.ts +4 -0
- package/dist/issuance/proxy/tag.d.ts.map +1 -0
- package/dist/issuance/proxy/tag.js +2 -0
- package/dist/issuance/proxy/upgrade.d.ts.map +1 -1
- package/dist/issuance/proxy/upgrade.js +3 -2
- 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 +18 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/tag.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transferFrom.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/transferFrom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"transferFrom.d.ts","sourceRoot":"","sources":["../../../src/issuance/erc721/transferFrom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,+BAA+B;;;;;iBAK1C,CAAC;AAkBH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;aAc7B,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
|
5
5
|
import { createController } from "../../common/controller.js";
|
|
6
6
|
import { AddressSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
7
7
|
import { Int256BigInt } from "../../common/int256.js";
|
|
8
|
+
import { erc721Tag } from "./tag.js";
|
|
8
9
|
export const TransferFromErc721RequestSchema = z.object({
|
|
9
10
|
tokenAddress: AddressSchema,
|
|
10
11
|
from: AddressSchema.openapi({ description: "Address to transfer the token from" }),
|
|
@@ -13,8 +14,8 @@ export const TransferFromErc721RequestSchema = z.object({
|
|
|
13
14
|
});
|
|
14
15
|
const transferFromRoute = describeRoute({
|
|
15
16
|
summary: "Transfer ERC721",
|
|
16
|
-
description: "Returns transaction data for transferring an ERC721 token from one address to another",
|
|
17
|
-
tags: [
|
|
17
|
+
description: "[TESTNET ONLY] Returns transaction data for transferring an ERC721 token from one address to another",
|
|
18
|
+
tags: [erc721Tag.tag],
|
|
18
19
|
responses: {
|
|
19
20
|
200: {
|
|
20
21
|
description: "Returns transaction data for transferring an ERC721 token",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/issuance/proxy/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/issuance/proxy/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,uCAAuC;;;;iBASlD,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;aAa5C,CAAC;AAoBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;aAQ3B,CAAC"}
|
|
@@ -5,11 +5,12 @@ import { proxyAdminAbi, proxyAdminBytecode } from "@evergonlabs/tmi-evm-contract
|
|
|
5
5
|
import { transparentUpgradeableProxyAbi, transparentUpgradeableProxyBytecode, } from "@evergonlabs/tmi-protocol-contracts/transparentProxy";
|
|
6
6
|
import { createController } from "../../common/controller.js";
|
|
7
7
|
import { AddressSchema, DeployTransactionSchema, HexStringSchema } from "../../common/index.js";
|
|
8
|
+
import { proxyTag } from "./tag.js";
|
|
8
9
|
// Issue generic TUP contract
|
|
9
10
|
const deployTransparentProxyRoute = describeRoute({
|
|
10
11
|
summary: "Deploy TransparentUpgradeableProxy",
|
|
11
12
|
description: "Returns transaction data for deploying a TransparentUpgradeableProxy",
|
|
12
|
-
tags: [
|
|
13
|
+
tags: [proxyTag.tag],
|
|
13
14
|
responses: {
|
|
14
15
|
200: {
|
|
15
16
|
description: "Returns transaction data for deploying a TransparentUpgradeableProxy",
|
|
@@ -46,7 +47,7 @@ export const CreateTransparentUpgradeableProxy = createController({
|
|
|
46
47
|
const deployProxyAdminRoute = describeRoute({
|
|
47
48
|
summary: "Deploy ProxyAdmin",
|
|
48
49
|
description: "Returns transaction data for deploying a ProxyAdmin contract",
|
|
49
|
-
tags: [
|
|
50
|
+
tags: [proxyTag.tag],
|
|
50
51
|
responses: {
|
|
51
52
|
200: {
|
|
52
53
|
description: "Returns transaction data for deploying a ProxyAdmin contract",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/issuance/proxy/tag.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;CAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/issuance/proxy/upgrade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/issuance/proxy/upgrade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,yBAAyB;;;;;iBAapC,CAAC;AAmBH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;aAcvB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { proxyAdminAbi } from "@evergonlabs/tmi-evm-contracts/proxyAdmin";
|
|
5
5
|
import { createController } from "../../common/controller.js";
|
|
6
6
|
import { AddressSchema, HexStringSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
7
|
+
import { proxyTag } from "./tag.js";
|
|
7
8
|
export const UpgradeProxyRequestSchema = z.object({
|
|
8
9
|
proxyAdminAddress: AddressSchema.openapi({
|
|
9
10
|
description: "The address of the ProxyAdmin contract that manages the proxy",
|
|
@@ -19,9 +20,9 @@ export const UpgradeProxyRequestSchema = z.object({
|
|
|
19
20
|
}),
|
|
20
21
|
});
|
|
21
22
|
const upgradeRoute = describeRoute({
|
|
22
|
-
summary: "Upgrade
|
|
23
|
+
summary: "Upgrade transparent proxy implementation",
|
|
23
24
|
description: "Returns transaction data for upgrading the implementation of a transparent proxy contract using ProxyAdmin",
|
|
24
|
-
tags: [
|
|
25
|
+
tags: [proxyTag.tag],
|
|
25
26
|
responses: {
|
|
26
27
|
200: {
|
|
27
28
|
description: "Returns transaction data for upgrading transparent proxy implementation via ProxyAdmin",
|
|
@@ -3,8 +3,8 @@ import { LendingController } from "./lending/index.js";
|
|
|
3
3
|
import { PlatformsController } from "./platforms/index.js";
|
|
4
4
|
import { SalesController } from "./sales/index.js";
|
|
5
5
|
export const NextFractionsApi = createApi({
|
|
6
|
-
title: "Next
|
|
7
|
-
description: "NFT Fractions and
|
|
6
|
+
title: "Next Fraction API",
|
|
7
|
+
description: "NFT Fractions and Financing markets (next-gen SDK)",
|
|
8
8
|
build: (factory) => factory
|
|
9
9
|
.createApp()
|
|
10
10
|
.route("/platforms", PlatformsController.build(factory))
|
|
@@ -5,12 +5,12 @@ import { createController } from "../../../../common/controller.js";
|
|
|
5
5
|
import { toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
6
6
|
import { BuybackRequestSchema } from "./buyback.schema.js";
|
|
7
7
|
const route = describeRoute({
|
|
8
|
-
summary: "Perform buyback of
|
|
9
|
-
description: "Returns transaction data for buying back the
|
|
10
|
-
tags: ["
|
|
8
|
+
summary: "Perform buyback of financing position",
|
|
9
|
+
description: "Returns transaction data for buying back the financing position with interest",
|
|
10
|
+
tags: ["Financing"],
|
|
11
11
|
responses: {
|
|
12
12
|
200: {
|
|
13
|
-
description: "Returns transaction data for
|
|
13
|
+
description: "Returns transaction data for buy back operation",
|
|
14
14
|
content: {
|
|
15
15
|
"application/json": {
|
|
16
16
|
schema: resolver(TransactionSchema),
|
|
@@ -26,12 +26,12 @@ export const CreateLendingFractionsRequestSchema = z.object({
|
|
|
26
26
|
buyback: BuyBackConfigSchema,
|
|
27
27
|
});
|
|
28
28
|
const route = describeRoute({
|
|
29
|
-
summary: "Create
|
|
30
|
-
description: "Returns transaction data for creating
|
|
31
|
-
tags: ["
|
|
29
|
+
summary: "Create financing sale fractions",
|
|
30
|
+
description: "Returns transaction data for creating financing sale fractions",
|
|
31
|
+
tags: ["Financing"],
|
|
32
32
|
responses: {
|
|
33
33
|
200: {
|
|
34
|
-
description: "Returns transaction data for creating
|
|
34
|
+
description: "Returns transaction data for creating financing sale fractions",
|
|
35
35
|
content: {
|
|
36
36
|
"application/json": {
|
|
37
37
|
schema: resolver(TransactionSchema),
|
|
@@ -5,12 +5,12 @@ import { createController } from "../../../../common/controller.js";
|
|
|
5
5
|
import { toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
6
6
|
import { DeployLendingMarketRequestSchema } from "../schemas.js";
|
|
7
7
|
const route = describeRoute({
|
|
8
|
-
summary: "Deploy a
|
|
9
|
-
description: "Returns transaction data for deploying a
|
|
10
|
-
tags: ["
|
|
8
|
+
summary: "Deploy a financing market",
|
|
9
|
+
description: "Returns transaction data for deploying a financing market with fractionalized collateral",
|
|
10
|
+
tags: ["Financing"],
|
|
11
11
|
responses: {
|
|
12
12
|
200: {
|
|
13
|
-
description: "Returns transaction data for deploying a
|
|
13
|
+
description: "Returns transaction data for deploying a financing market",
|
|
14
14
|
content: {
|
|
15
15
|
"application/json": {
|
|
16
16
|
schema: resolver(TransactionSchema),
|
|
@@ -5,9 +5,9 @@ import { createController } from "../../../../common/controller.js";
|
|
|
5
5
|
import { toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
6
6
|
import { SetCollateralPriceRequestSchema } from "./setCollateralPrice.schema.js";
|
|
7
7
|
const route = describeRoute({
|
|
8
|
-
summary: "Set collateral price for
|
|
9
|
-
description: "Returns transaction data for setting the collateral price in a
|
|
10
|
-
tags: ["
|
|
8
|
+
summary: "Set collateral price for financing market",
|
|
9
|
+
description: "Returns transaction data for setting the collateral price in a financing market",
|
|
10
|
+
tags: ["Financing"],
|
|
11
11
|
responses: {
|
|
12
12
|
200: {
|
|
13
13
|
description: "Returns transaction data for setting collateral price",
|
|
@@ -18,7 +18,7 @@ const NextSentTransactionParamsSchema = z.object({
|
|
|
18
18
|
});
|
|
19
19
|
export const ParseNextFractionsCreatedEventV0 = createController({
|
|
20
20
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
21
|
-
summary: "Get FractionsCreated
|
|
21
|
+
summary: "Get FractionsCreated event (next)",
|
|
22
22
|
description: "Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted with corresponding `createFractions` action from the next SDK.",
|
|
23
23
|
tags: ["NFT Fractions"],
|
|
24
24
|
responses: {
|
|
@@ -8,10 +8,10 @@ import { ErrorSchema, PlatformContractAddress, StakingChainId } from "../../../.
|
|
|
8
8
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
9
9
|
import { createTag } from "../../../../common/tag.js";
|
|
10
10
|
import { mapToPlatform, PlatformSchema } from "../../common/platform.js";
|
|
11
|
-
const tag = createTag("
|
|
11
|
+
const tag = createTag("Markets");
|
|
12
12
|
export const GetPlatformV0 = createController({
|
|
13
13
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
|
-
summary: "Get
|
|
14
|
+
summary: "Get platform",
|
|
15
15
|
description: "Retrieve details of a specified platform",
|
|
16
16
|
tags: [tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -8,10 +8,10 @@ import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
|
8
8
|
import { PageSchema } from "../../../../common/models/page.js";
|
|
9
9
|
import { createTag } from "../../../../common/tag.js";
|
|
10
10
|
import { mapToPlatform, PlatformSchema } from "../../common/platform.js";
|
|
11
|
-
const tag = createTag("
|
|
11
|
+
const tag = createTag("Markets");
|
|
12
12
|
export const SearchPlatformsV0 = createController({
|
|
13
13
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
14
|
-
summary: "Search
|
|
14
|
+
summary: "Search platforms",
|
|
15
15
|
description: "Retrieve a list of platforms with filtering and sorting",
|
|
16
16
|
tags: [tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -11,7 +11,7 @@ import { mapToPool, PoolSchema } from "../../common/pool.js";
|
|
|
11
11
|
const tag = createTag("Pools");
|
|
12
12
|
export const GetPoolV0 = createController({
|
|
13
13
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
|
-
summary: "Get
|
|
14
|
+
summary: "Get pool",
|
|
15
15
|
description: "Retrieve details of a specified pool",
|
|
16
16
|
tags: [tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -11,7 +11,7 @@ import { mapToPool, PoolSchema } from "../../common/pool.js";
|
|
|
11
11
|
const tag = createTag("Pools");
|
|
12
12
|
export const SearchPoolsV0 = createController({
|
|
13
13
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
14
|
-
summary: "Search
|
|
14
|
+
summary: "Search pools",
|
|
15
15
|
description: "Retrieve a list of pools with filtering and sorting",
|
|
16
16
|
tags: [tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -8,7 +8,7 @@ import { RoleSchema } from "../../common/role.js";
|
|
|
8
8
|
const tag = createTag("Roles");
|
|
9
9
|
export const GetRolesV0 = createController({
|
|
10
10
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
11
|
-
summary: "Get
|
|
11
|
+
summary: "Get roles",
|
|
12
12
|
description: "Retrieve all available (pre-defined) roles",
|
|
13
13
|
tags: [tag.tag],
|
|
14
14
|
responses: {
|
|
@@ -9,7 +9,7 @@ import { createTag } from "../../../../common/tag.js";
|
|
|
9
9
|
const tag = createTag("Roles");
|
|
10
10
|
export const GrantRoleV0 = createController({
|
|
11
11
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
|
-
summary: "Grant
|
|
12
|
+
summary: "Grant role",
|
|
13
13
|
description: "Generates transaction for granting specified role to user addreses within the platform",
|
|
14
14
|
tags: [tag.tag],
|
|
15
15
|
responses: {
|
|
@@ -11,7 +11,7 @@ import { mapToStake, StakeSchema } from "../../common/stake.js";
|
|
|
11
11
|
const tag = createTag("Stakes");
|
|
12
12
|
export const GetStakeV0 = createController({
|
|
13
13
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
|
-
summary: "Get
|
|
14
|
+
summary: "Get stake",
|
|
15
15
|
description: "Retrieve details of a specified stake",
|
|
16
16
|
tags: [tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -11,7 +11,7 @@ import { AddressSchema, SentTransactionParamsSchema } from "../../../common/inde
|
|
|
11
11
|
export function createGetCreatePoolEventController(template) {
|
|
12
12
|
return createController({
|
|
13
13
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
|
-
summary: "Get
|
|
14
|
+
summary: "Get pool create event",
|
|
15
15
|
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted with corresponding \`createPool\` action`,
|
|
16
16
|
tags: [template.tag.tag],
|
|
17
17
|
responses: {
|
|
@@ -10,7 +10,7 @@ import { AddressSchema, SentTransactionParamsSchema } from "../../../common/inde
|
|
|
10
10
|
export function createGetPlatformDeployEventController(template) {
|
|
11
11
|
return createController({
|
|
12
12
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
13
|
-
summary: "Get
|
|
13
|
+
summary: "Get platform deploy event",
|
|
14
14
|
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted with corresponding \`createPlatform\` action`,
|
|
15
15
|
tags: [template.tag.tag],
|
|
16
16
|
responses: {
|
|
@@ -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.0
|
|
3
|
+
"version": "0.10.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-
|
|
43
|
-
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.0
|
|
44
|
-
"@evergonlabs/tmi-protocol-
|
|
45
|
-
"@evergonlabs/tmi-protocol-
|
|
46
|
-
"@evergonlabs/tmi-protocol-
|
|
47
|
-
"@evergonlabs/tmi-protocol-
|
|
48
|
-
"@evergonlabs/tmi-protocol-
|
|
42
|
+
"@evergonlabs/tmi-protocol-indexer": "0.10.0",
|
|
43
|
+
"@evergonlabs/tmi-protocol-fractions-sdk": "0.10.0",
|
|
44
|
+
"@evergonlabs/tmi-protocol-staking-sdk": "0.10.0",
|
|
45
|
+
"@evergonlabs/tmi-protocol-shared": "0.10.0",
|
|
46
|
+
"@evergonlabs/tmi-protocol-types": "0.10.0",
|
|
47
|
+
"@evergonlabs/tmi-protocol-utils": "0.10.0",
|
|
48
|
+
"@evergonlabs/tmi-protocol-contracts": "0.10.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@evergonlabs/tmi-eslint-config": "0.3.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"kleur": "^4.1.5",
|
|
60
60
|
"npm-run-all": "^4.1.5",
|
|
61
61
|
"openapi-typescript": "^7.6.0",
|
|
62
|
-
"rdme": "^
|
|
62
|
+
"rdme": "^10.0.0",
|
|
63
63
|
"rimraf": "^6.0.1",
|
|
64
64
|
"tsx": "^4.19.2",
|
|
65
65
|
"typescript": "5.7.3",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@evergonlabs/internal": "0.0.0"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
70
|
-
"node": ">=
|
|
70
|
+
"node": ">=20.10.0"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public",
|
|
@@ -78,12 +78,15 @@
|
|
|
78
78
|
"build:lib": "tsc -p tsconfig.build.json",
|
|
79
79
|
"check-types": "tsc --noEmit",
|
|
80
80
|
"clean": "rimraf ./dist ./artifacts",
|
|
81
|
-
"docs:upload": "pnpm run env -- tsx ./scripts/generateAndUpload/bin.ts",
|
|
81
|
+
"docs:upload": "pnpm run env -- pnpm run tsx:oa -- ./scripts/generateAndUpload/bin.ts",
|
|
82
|
+
"docs:upload-all": "pnpm run env -- pnpm run tsx:oa -- ./scripts/generateAndUpload/uploadAll.ts",
|
|
82
83
|
"env": "dotenv -e ../../.env",
|
|
83
84
|
"lint": "eslint .",
|
|
84
85
|
"lint:fix": "eslint . --fix",
|
|
85
|
-
"openapi:generate": "tsx --
|
|
86
|
-
"serve": "pnpm run env -- tsx --
|
|
87
|
-
"
|
|
86
|
+
"openapi:generate": "pnpm run tsx:oa -- ./scripts/generateOpenApi/bin.ts",
|
|
87
|
+
"serve": "pnpm run env -- pnpm run tsx:oa -- ./src/serve.ts",
|
|
88
|
+
"tsx:oa": "tsx --import @hono/zod-openapi",
|
|
89
|
+
"test": "pnpm run env -- vitest run",
|
|
90
|
+
"test:sequential": "pnpm run env -- vitest run"
|
|
88
91
|
}
|
|
89
92
|
}
|