@evergonlabs/tmi-protocol-api 0.10.0-rc.2 → 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/common/blockchain.d.ts +2137 -766
- package/dist/common/blockchain.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/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 +11 -10
|
@@ -27,7 +27,7 @@ const QuerySchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
export const ParseGatedErc20DeployEvent = createController({
|
|
29
29
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
30
|
-
summary: "Get
|
|
30
|
+
summary: "Get gated ERC20 TokenProxyConfigured event",
|
|
31
31
|
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the Gated ERC20 factory \`deployAndInitializeProxy\` action`,
|
|
32
32
|
tags: [erc20Tag.tag],
|
|
33
33
|
responses: {
|
|
@@ -5,7 +5,7 @@ import { createController } from "../../../common/controller.js";
|
|
|
5
5
|
import { DeployTransactionSchema } from "../../../common/index.js";
|
|
6
6
|
import { erc20Tag } from "../tag.js";
|
|
7
7
|
const deployGatedSimpleRoute = describeRoute({
|
|
8
|
-
summary: "Get
|
|
8
|
+
summary: "Get gated ERC20",
|
|
9
9
|
description: "Returns transaction data for deploying a gated ERC20. This is an audited contract.",
|
|
10
10
|
tags: [erc20Tag.tag],
|
|
11
11
|
responses: {
|
|
@@ -24,7 +24,7 @@ const QuerySchema = z.object({
|
|
|
24
24
|
});
|
|
25
25
|
export const ParseGatedSimpleErc20DeployEvent = createController({
|
|
26
26
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
27
|
-
summary: "Get
|
|
27
|
+
summary: "Get gated simple ERC20 deploy event",
|
|
28
28
|
description: `Gets the contract deployment transaction by hash and extracts the deployed contract address from the receipt.
|
|
29
29
|
|
|
30
30
|
Provided transaction must be a contract creation transaction for the gated simple ERC20 token.`,
|
|
@@ -15,7 +15,7 @@ export const GrantRoleErc20RequestSchema = z.object({
|
|
|
15
15
|
account: AddressSchema.openapi({ description: "The address to grant the role to" }),
|
|
16
16
|
});
|
|
17
17
|
const grantRoleRoute = describeRoute({
|
|
18
|
-
summary: "Grant
|
|
18
|
+
summary: "Grant role on Gated ERC20",
|
|
19
19
|
description: "Returns transaction data for granting a role on a gated ERC20 token contract",
|
|
20
20
|
tags: [erc20Tag.tag],
|
|
21
21
|
responses: {
|
|
@@ -12,7 +12,7 @@ export const MintErc20RequestSchema = z.object({
|
|
|
12
12
|
amount: Int256BigInt(z.bigint().nonnegative()),
|
|
13
13
|
});
|
|
14
14
|
const mintRoute = describeRoute({
|
|
15
|
-
summary: "Mint
|
|
15
|
+
summary: "Mint gated ERC20",
|
|
16
16
|
description: "Returns transaction data for minting a gated ERC20 (MINTER_ROLE required)",
|
|
17
17
|
tags: [erc20Tag.tag],
|
|
18
18
|
responses: {
|
|
@@ -13,7 +13,7 @@ export const RecoverErc20RequestSchema = z.object({
|
|
|
13
13
|
amount: Int256BigInt(z.bigint().nonnegative()),
|
|
14
14
|
});
|
|
15
15
|
const recoverRoute = describeRoute({
|
|
16
|
-
summary: "Recover
|
|
16
|
+
summary: "Recover gated ERC20",
|
|
17
17
|
description: "Returns transaction data for recovering a gated ERC20 token from one address to another (RECOVER_ROLE required)",
|
|
18
18
|
tags: [erc20Tag.tag],
|
|
19
19
|
responses: {
|
|
@@ -15,7 +15,7 @@ export const RenounceRoleErc20RequestSchema = z.object({
|
|
|
15
15
|
callerConfirmation: AddressSchema.openapi({ description: "The caller's address for confirmation" }),
|
|
16
16
|
});
|
|
17
17
|
const renounceRoleRoute = describeRoute({
|
|
18
|
-
summary: "Renounce
|
|
18
|
+
summary: "Renounce role on Gated ERC20",
|
|
19
19
|
description: "Returns transaction data for renouncing a role on a gated ERC20 token contract",
|
|
20
20
|
tags: [erc20Tag.tag],
|
|
21
21
|
responses: {
|
|
@@ -15,7 +15,7 @@ export const RevokeRoleErc20RequestSchema = z.object({
|
|
|
15
15
|
account: AddressSchema.openapi({ description: "The address to revoke the role from" }),
|
|
16
16
|
});
|
|
17
17
|
const revokeRoleRoute = describeRoute({
|
|
18
|
-
summary: "Revoke
|
|
18
|
+
summary: "Revoke role on Gated ERC20",
|
|
19
19
|
description: "Returns transaction data for revoking a role on a gated ERC20 token contract",
|
|
20
20
|
tags: [erc20Tag.tag],
|
|
21
21
|
responses: {
|
|
@@ -12,7 +12,7 @@ export const TransferErc20RequestSchema = z.object({
|
|
|
12
12
|
amount: Int256BigInt(z.bigint().nonnegative()),
|
|
13
13
|
});
|
|
14
14
|
const transferRoute = describeRoute({
|
|
15
|
-
summary: "Transfer
|
|
15
|
+
summary: "Transfer gated ERC20",
|
|
16
16
|
description: "Returns transaction data for transferring a gated ERC20 token to another address",
|
|
17
17
|
tags: [erc20Tag.tag],
|
|
18
18
|
responses: {
|
|
@@ -13,7 +13,7 @@ export const TransferFromErc20RequestSchema = z.object({
|
|
|
13
13
|
amount: Int256BigInt(z.bigint().nonnegative()),
|
|
14
14
|
});
|
|
15
15
|
const transferFromRoute = describeRoute({
|
|
16
|
-
summary: "TransferFrom
|
|
16
|
+
summary: "TransferFrom gated ERC20",
|
|
17
17
|
description: "Returns transaction data for transferring a gated ERC20 token from one address to another (requires approval)",
|
|
18
18
|
tags: [erc20Tag.tag],
|
|
19
19
|
responses: {
|
|
@@ -13,7 +13,7 @@ export const ApproveErc721RequestSchema = z.object({
|
|
|
13
13
|
});
|
|
14
14
|
const approveRoute = describeRoute({
|
|
15
15
|
summary: "Approve ERC721",
|
|
16
|
-
description: "Returns transaction data for approving an address to transfer a specific ERC721 token",
|
|
16
|
+
description: "[TESTNET ONLY] Returns transaction data for approving an address to transfer a specific ERC721 token",
|
|
17
17
|
tags: [erc721Tag.tag],
|
|
18
18
|
responses: {
|
|
19
19
|
200: {
|
|
@@ -12,7 +12,7 @@ export const BurnErc721RequestSchema = z.object({
|
|
|
12
12
|
});
|
|
13
13
|
const burnRoute = describeRoute({
|
|
14
14
|
summary: "Burn ERC721",
|
|
15
|
-
description: "Returns transaction data for burning an ERC721 token",
|
|
15
|
+
description: "[TESTNET ONLY] Returns transaction data for burning an ERC721 token",
|
|
16
16
|
tags: [erc721Tag.tag],
|
|
17
17
|
responses: {
|
|
18
18
|
200: {
|
|
@@ -15,8 +15,8 @@ export const DeployErc721RequestSchema = z.object({
|
|
|
15
15
|
minter: AddressSchema.openapi({ description: "Address to receive MINTER_ROLE" }),
|
|
16
16
|
});
|
|
17
17
|
const deployErc721Route = describeRoute({
|
|
18
|
-
summary: "Deploy ERC721 via
|
|
19
|
-
description: `This contract has not been audited.
|
|
18
|
+
summary: "Deploy ERC721 via factory",
|
|
19
|
+
description: `[TESTNET ONLY] This contract has not been audited.
|
|
20
20
|
|
|
21
21
|
Returns transaction data for deploying a new ERC721 token via the factory contract.
|
|
22
22
|
|
|
@@ -15,7 +15,7 @@ export const InitializeErc721RequestSchema = z.object({
|
|
|
15
15
|
});
|
|
16
16
|
const initializeRoute = describeRoute({
|
|
17
17
|
summary: "Initialize ERC721",
|
|
18
|
-
description: "Returns transaction data for initializing an ERC721 token proxy contract",
|
|
18
|
+
description: "[TESTNET ONLY] Returns transaction data for initializing an ERC721 token proxy contract",
|
|
19
19
|
tags: [erc721Tag.tag],
|
|
20
20
|
responses: {
|
|
21
21
|
200: {
|
|
@@ -26,8 +26,8 @@ const QuerySchema = z.object({
|
|
|
26
26
|
});
|
|
27
27
|
export const ParseDefaultErc721DeployEvent = createController({
|
|
28
28
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
29
|
-
summary: "Get ERC721 TokenProxyConfigured
|
|
30
|
-
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the ERC721 factory \`deployAndInitializeProxy\` action`,
|
|
29
|
+
summary: "Get ERC721 TokenProxyConfigured event",
|
|
30
|
+
description: `[TESTNET ONLY] Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the ERC721 factory \`deployAndInitializeProxy\` action`,
|
|
31
31
|
tags: [erc721Tag.tag],
|
|
32
32
|
responses: {
|
|
33
33
|
200: {
|
|
@@ -19,8 +19,8 @@ export const DeployGatedErc721RequestSchema = z.object({
|
|
|
19
19
|
}),
|
|
20
20
|
});
|
|
21
21
|
const deployGatedErc721Route = describeRoute({
|
|
22
|
-
summary: "Deploy
|
|
23
|
-
description: `This contract has not been audited.
|
|
22
|
+
summary: "Deploy gated ERC721 via factory",
|
|
23
|
+
description: `[TESTNET ONLY] This contract has not been audited.
|
|
24
24
|
|
|
25
25
|
Returns transaction data for deploying a new gated ERC721 token via the factory contract.
|
|
26
26
|
|
|
@@ -18,8 +18,8 @@ export const InitializeGatedErc721RequestSchema = z.object({
|
|
|
18
18
|
}),
|
|
19
19
|
});
|
|
20
20
|
const initializeRoute = describeRoute({
|
|
21
|
-
summary: "Initialize
|
|
22
|
-
description: "Returns transaction data for initializing a gated ERC721 token proxy contract",
|
|
21
|
+
summary: "Initialize gated ERC721",
|
|
22
|
+
description: "[TESTNET ONLY] Returns transaction data for initializing a gated ERC721 token proxy contract",
|
|
23
23
|
tags: [erc721Tag.tag],
|
|
24
24
|
responses: {
|
|
25
25
|
200: {
|
|
@@ -26,8 +26,8 @@ const QuerySchema = z.object({
|
|
|
26
26
|
});
|
|
27
27
|
export const ParseGatedErc721DeployEvent = createController({
|
|
28
28
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
29
|
-
summary: "Get
|
|
30
|
-
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the Gated ERC721 factory \`deployAndInitializeProxy\` action`,
|
|
29
|
+
summary: "Get gated ERC721 TokenProxyConfigured event",
|
|
30
|
+
description: `[TESTNET ONLY] Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the Gated ERC721 factory \`deployAndInitializeProxy\` action`,
|
|
31
31
|
tags: [erc721Tag.tag],
|
|
32
32
|
responses: {
|
|
33
33
|
200: {
|
|
@@ -15,8 +15,8 @@ export const GrantRoleErc721RequestSchema = z.object({
|
|
|
15
15
|
account: AddressSchema.openapi({ description: "The address to grant the role to" }),
|
|
16
16
|
});
|
|
17
17
|
const grantRoleRoute = describeRoute({
|
|
18
|
-
summary: "Grant
|
|
19
|
-
description: "Returns transaction data for granting a role on the ERC721 token contract",
|
|
18
|
+
summary: "Grant role on ERC721",
|
|
19
|
+
description: "[TESTNET ONLY] Returns transaction data for granting a role on the ERC721 token contract",
|
|
20
20
|
tags: [erc721Tag.tag],
|
|
21
21
|
responses: {
|
|
22
22
|
200: {
|
|
@@ -11,7 +11,7 @@ export const MintErc721RequestSchema = z.object({
|
|
|
11
11
|
});
|
|
12
12
|
const mintRoute = describeRoute({
|
|
13
13
|
summary: "Mint ERC721",
|
|
14
|
-
description: "Returns transaction data for minting an ERC721 token with an auto-generated token ID (MINTER_ROLE required)",
|
|
14
|
+
description: "[TESTNET ONLY] Returns transaction data for minting an ERC721 token with an auto-generated token ID (MINTER_ROLE required)",
|
|
15
15
|
tags: [erc721Tag.tag],
|
|
16
16
|
responses: {
|
|
17
17
|
200: {
|
|
@@ -14,7 +14,7 @@ export const RecoverErc721RequestSchema = z.object({
|
|
|
14
14
|
});
|
|
15
15
|
const recoverRoute = describeRoute({
|
|
16
16
|
summary: "Recover ERC721",
|
|
17
|
-
description: "Returns transaction data for recovering an ERC721 token from one address to another (RECOVER_ROLE required)",
|
|
17
|
+
description: "[TESTNET ONLY] Returns transaction data for recovering an ERC721 token from one address to another (RECOVER_ROLE required)",
|
|
18
18
|
tags: [erc721Tag.tag],
|
|
19
19
|
responses: {
|
|
20
20
|
200: {
|
|
@@ -15,8 +15,8 @@ export const RenounceRoleErc721RequestSchema = z.object({
|
|
|
15
15
|
callerConfirmation: AddressSchema.openapi({ description: "The caller's address for confirmation" }),
|
|
16
16
|
});
|
|
17
17
|
const renounceRoleRoute = describeRoute({
|
|
18
|
-
summary: "Renounce
|
|
19
|
-
description: "Returns transaction data for renouncing a role on the ERC721 token contract",
|
|
18
|
+
summary: "Renounce role on ERC721",
|
|
19
|
+
description: "[TESTNET ONLY] Returns transaction data for renouncing a role on the ERC721 token contract",
|
|
20
20
|
tags: [erc721Tag.tag],
|
|
21
21
|
responses: {
|
|
22
22
|
200: {
|
|
@@ -15,8 +15,8 @@ export const RevokeRoleErc721RequestSchema = z.object({
|
|
|
15
15
|
account: AddressSchema.openapi({ description: "The address to revoke the role from" }),
|
|
16
16
|
});
|
|
17
17
|
const revokeRoleRoute = describeRoute({
|
|
18
|
-
summary: "Revoke
|
|
19
|
-
description: "Returns transaction data for revoking a role on the ERC721 token contract",
|
|
18
|
+
summary: "Revoke role on ERC721",
|
|
19
|
+
description: "[TESTNET ONLY] Returns transaction data for revoking a role on the ERC721 token contract",
|
|
20
20
|
tags: [erc721Tag.tag],
|
|
21
21
|
responses: {
|
|
22
22
|
200: {
|
|
@@ -10,8 +10,8 @@ export const SetBaseURIRequestSchema = z.object({
|
|
|
10
10
|
baseURI: z.string().nonempty().openapi({ description: "New base URI for token metadata" }),
|
|
11
11
|
});
|
|
12
12
|
const setBaseURIRoute = describeRoute({
|
|
13
|
-
summary: "Set ERC721
|
|
14
|
-
description: "Returns transaction data for setting the base URI on an ERC721 token",
|
|
13
|
+
summary: "Set ERC721 base URI",
|
|
14
|
+
description: "[TESTNET ONLY] Returns transaction data for setting the base URI on an ERC721 token",
|
|
15
15
|
tags: [erc721Tag.tag],
|
|
16
16
|
responses: {
|
|
17
17
|
200: {
|
|
@@ -12,8 +12,8 @@ export const SetTokenURIRequestSchema = z.object({
|
|
|
12
12
|
tokenURI: z.string().nonempty().openapi({ description: "URI for the specific token metadata" }),
|
|
13
13
|
});
|
|
14
14
|
const setTokenURIRoute = describeRoute({
|
|
15
|
-
summary: "Set ERC721
|
|
16
|
-
description: "Returns transaction data for setting a token-specific URI on an ERC721 token",
|
|
15
|
+
summary: "Set ERC721 token URI",
|
|
16
|
+
description: "[TESTNET ONLY] Returns transaction data for setting a token-specific URI on an ERC721 token",
|
|
17
17
|
tags: [erc721Tag.tag],
|
|
18
18
|
responses: {
|
|
19
19
|
200: {
|
|
@@ -14,7 +14,7 @@ export const TransferFromErc721RequestSchema = z.object({
|
|
|
14
14
|
});
|
|
15
15
|
const transferFromRoute = describeRoute({
|
|
16
16
|
summary: "Transfer ERC721",
|
|
17
|
-
description: "Returns transaction data for transferring an ERC721 token from one address to another",
|
|
17
|
+
description: "[TESTNET ONLY] Returns transaction data for transferring an ERC721 token from one address to another",
|
|
18
18
|
tags: [erc721Tag.tag],
|
|
19
19
|
responses: {
|
|
20
20
|
200: {
|
|
@@ -20,7 +20,7 @@ export const UpgradeProxyRequestSchema = z.object({
|
|
|
20
20
|
}),
|
|
21
21
|
});
|
|
22
22
|
const upgradeRoute = describeRoute({
|
|
23
|
-
summary: "Upgrade
|
|
23
|
+
summary: "Upgrade transparent proxy implementation",
|
|
24
24
|
description: "Returns transaction data for upgrading the implementation of a transparent proxy contract using ProxyAdmin",
|
|
25
25
|
tags: [proxyTag.tag],
|
|
26
26
|
responses: {
|
|
@@ -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),
|