-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added getNetworkProperties * Changed Num to strings * Updated examples * Fixed amount default * Update examples to match implementation * Updated version * Updated version
- Loading branch information
1 parent
964d5f8
commit 9a80afe
Showing
24 changed files
with
382 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tags: | ||
- Network routes | ||
summary: Get the network properties | ||
description: | | ||
Returns the content from a catapult-server network configuration file (resources/config-network.properties). | ||
To enable this feature, the REST setting "network.propertiesFilePath" must define where the file is located. | ||
This is adjustable via the configuration file (rest/resources/rest.json) per REST instance. | ||
operationId: getNetworkProperties | ||
responses: | ||
"200": | ||
description: success | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/NetworkConfigurationDTO.yml" | ||
"409": | ||
$ref : "../../../responses/InvalidArgument.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
type: object | ||
description: Chain related configuration properties. | ||
properties: | ||
enableVerifiableState: | ||
type: boolean | ||
description: Set to true if block chain should calculate state hashes so that state is fully verifiable at each block. | ||
example: true | ||
enableVerifiableReceipts: | ||
type: boolean | ||
description: Set to true if block chain should calculate receipts so that state changes are fully verifiable at each block. | ||
example: true | ||
currencyMosaicId: | ||
type: string | ||
description: Mosaic id used as primary chain currency. | ||
example: 0x621E'C5B4'0385'6FC2 | ||
harvestingMosaicId: | ||
type: string | ||
description: Mosaic id used to provide harvesting ability. | ||
example: 0x4291'ED23'000A'037A | ||
blockGenerationTargetTime: | ||
type: string # utils::TimeSpan | ||
description: Targeted time between blocks. | ||
example: 15s | ||
blockTimeSmoothingFactor: | ||
type: string # uint32 | ||
description: A higher value makes the network more biased. | ||
example: "3000" | ||
importanceGrouping: | ||
type: string # uint64 | ||
description: Number of blocks that should be treated as a group for importance purposes. | ||
example: "39" | ||
importanceActivityPercentage: | ||
type: string | ||
description: Percentage of importance resulting from fee generation and beneficiary usage. | ||
example: "5" | ||
maxRollbackBlocks: | ||
type: string # uint32 | ||
description: Maximum number of blocks that can be rolled back. | ||
example: "40" | ||
maxDifficultyBlocks: | ||
type: string # uint32 | ||
description: Maximum number of blocks to use in a difficulty calculation. | ||
example: "60" | ||
defaultDynamicFeeMultiplier: | ||
type: string # BlockFeeMultiplier | ||
description: Default multiplier to use for dynamic fees. | ||
example: 10'000 | ||
maxTransactionLifetime: | ||
type: string #utils::TimeSpan | ||
description: Maximum lifetime a transaction can have before it expires. | ||
example: 24h | ||
maxBlockFutureTime: | ||
type: string # utils::TimeSpan | ||
description: Maximum future time of a block that can be accepted. | ||
example: 500ms | ||
initialCurrencyAtomicUnits: | ||
type: string # Amount | ||
description: Initial currency atomic units available in the network. | ||
example: 8'998'999'998'000'000 | ||
maxMosaicAtomicUnits: | ||
type: string # Amount | ||
description: Maximum atomic units (total-supply * 10 ^ divisibility) of a mosaic allowed in the network. | ||
example: 9'000'000'000'000'000 | ||
totalChainImportance: | ||
type: string # Importance | ||
description: Total whole importance units available in the network. | ||
example: 15'000'000 | ||
minHarvesterBalance: | ||
type: string # Amount | ||
description: Minimum number of harvesting mosaic atomic units needed for an account to be eligible for harvesting. | ||
example: "500" | ||
maxHarvesterBalance: | ||
type: string # Amount | ||
description: Maximum number of harvesting mosaic atomic units needed for an account to be eligible for harvesting. | ||
example: 4'000'000 | ||
harvestBeneficiaryPercentage: | ||
type: string | ||
description: Percentage of the harvested fee that is collected by the beneficiary account. | ||
example: "10" | ||
blockPruneInterval: | ||
type: string # uint32 | ||
description: Number of blocks between cache pruning. | ||
example: "360" | ||
maxTransactionsPerBlock: | ||
type: string # uint32 | ||
description: Maximum number of transactions per block. | ||
example: 200'000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: object | ||
required: | ||
- network | ||
- chain | ||
- plugins | ||
properties: | ||
network: | ||
$ref: "./NetworkPropertiesDTO.yml" | ||
chain: | ||
$ref: "./ChainPropertiesDTO.yml" | ||
plugins: | ||
$ref: "./PluginsPropertiesDTO.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type: object | ||
description: Network related configuration properties. | ||
properties: | ||
identifier: | ||
type: string # NetworkIdentifier | ||
description: Network identifier. | ||
example: mijin-test | ||
nodeEqualityStrategy: | ||
$ref: "./NodeIdentityEqualityStrategy.yml" | ||
example: host | ||
publicKey: | ||
$ref: "../../../schemas/PublicKey.yml" | ||
description: Nemesis public key. | ||
example: B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF | ||
generationHash: | ||
$ref: "../../../schemas/Hash256.yml" | ||
description: Nemesis generation hash. | ||
example: 57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6 | ||
epochAdjustment: | ||
type: string # utils::TimeSpan | ||
description: Nemesis epoch time adjustment. | ||
example: 1573430400s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: string | ||
description: | | ||
Node equality strategy. Defines if the identifier for the node must be its public key or host. | ||
enum: | ||
- host | ||
- public-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
type: object | ||
description: Plugin related configuration properties. | ||
properties: | ||
accountlink: | ||
$ref: "../../../plugins/account_link/schemas/AccountLinkNetworkPropertiesDTO.yml" | ||
aggregate: | ||
$ref: "../../../plugins/aggregate/schemas/AggregateNetworkPropertiesDTO.yml" | ||
lockhash: | ||
$ref: "../../../plugins/lock_hash/schemas/HashLockNetworkPropertiesDTO.yml" | ||
locksecret: | ||
$ref: "../../../plugins/lock_secret/schemas/SecretLockNetworkPropertiesDTO.yml" | ||
metadata: | ||
$ref: "../../../plugins/metadata/schemas/MetadataNetworkPropertiesDTO.yml" | ||
mosaic: | ||
$ref: "../../../plugins/mosaic/schemas/MosaicNetworkPropertiesDTO.yml" | ||
multisig: | ||
$ref: "../../../plugins/multisig/schemas/MultisigNetworkPropertiesDTO.yml" | ||
namespace: | ||
$ref: "../../../plugins/namespace/schemas/NamespaceNetworkPropertiesDTO.yml" | ||
restrictionaccount: | ||
$ref: "../../../plugins/restriction_account/schemas/AccountRestrictionNetworkPropertiesDTO.yml" | ||
restrictionmosaic: | ||
$ref: "../../../plugins/restriction_mosaic/schemas/MosaicRestrictionNetworkPropertiesDTO.yml" | ||
transfer: | ||
$ref: "../../../plugins/transfer/schemas/TransferNetworkPropertiesDTO.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
version: 0.8.5 | ||
version: 0.8.6 | ||
title: Catapult REST Endpoints | ||
description: OpenAPI Specification of catapult-rest 1.0.20.19 | ||
description: OpenAPI Specification of catapult-rest 1.0.20.20 | ||
license: | ||
name: Apache 2.0 | ||
url: http://www.apache.org/licenses/LICENSE-2.0.html |
5 changes: 5 additions & 0 deletions
5
spec/plugins/account_link/schemas/AccountLinkNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: object | ||
properties: | ||
dummy: | ||
type: string | ||
description: to trigger plugin load |
22 changes: 22 additions & 0 deletions
22
spec/plugins/aggregate/schemas/AggregateNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type: object | ||
properties: | ||
maxTransactionsPerAggregate: | ||
type: string # uint32 | ||
description: Maximum number of transactions per aggregate. | ||
example: 1'000 | ||
maxCosignaturesPerAggregate: | ||
type: string | ||
description: Maximum number of cosignatures per aggregate. | ||
example: "15" | ||
enableStrictCosignatureCheck: | ||
type: boolean | ||
description: Set to true if cosignatures must exactly match component signers. Set to false if cosignatures should be validated externally. | ||
example: false | ||
enableBondedAggregateSupport: | ||
type: boolean | ||
description: Set to true if bonded aggregates should be allowed. Set to false if bonded aggregates should be rejected. | ||
example: true | ||
maxBondedTransactionLifetime: | ||
type: string # utils::TimeSpan | ||
description: Maximum lifetime a bonded transaction can have before it expires. | ||
example: 48h |
10 changes: 10 additions & 0 deletions
10
spec/plugins/lock_hash/schemas/HashLockNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: object | ||
properties: | ||
lockedFundsPerAggregate: | ||
type: string # Amount | ||
description: Amount that has to be locked per aggregate in partial cache. | ||
example: 10'000'000 | ||
maxHashLockDuration: | ||
type: string # utils::BlockSpan | ||
description: Maximum number of blocks for which a hash lock can exist. | ||
example: 2d |
15 changes: 15 additions & 0 deletions
15
spec/plugins/lock_secret/schemas/SecretLockNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type: object | ||
properties: | ||
maxSecretLockDuration: | ||
type: string # utils::BlockSpan | ||
description: Maximum number of blocks for which a secret lock can exist. | ||
example: 30d | ||
minProofSize: | ||
type: string | ||
description: Minimum size of a proof in bytes. | ||
example: "1" | ||
maxProofSize: | ||
type: string | ||
description: Maximum size of a proof in bytes. | ||
example: "1000" | ||
|
6 changes: 6 additions & 0 deletions
6
spec/plugins/metadata/schemas/MetadataNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: object | ||
properties: | ||
maxValueSize: | ||
type: string | ||
description: Maximum metadata value size. | ||
example: "1024" |
22 changes: 22 additions & 0 deletions
22
spec/plugins/mosaic/schemas/MosaicNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type: object | ||
properties: | ||
maxMosaicsPerAccount: | ||
type: string | ||
description: Maximum number of mosaics that an account can own. | ||
example: 10'000 | ||
maxMosaicDuration: | ||
type: string # utils::BlockSpan | ||
description: Maximum mosaic duration. | ||
example: 3650d | ||
maxMosaicDivisibility: | ||
type: string | ||
description: Maximum mosaic divisibility. | ||
example: "6" | ||
mosaicRentalFeeSinkPublicKey: | ||
$ref: "../../../schemas/PublicKey.yml" | ||
description: Public key of the mosaic rental fee sink account. | ||
example: 53E140B5947F104CABC2D6FE8BAEDBC30EF9A0609C717D9613DE593EC2A266D3 | ||
mosaicRentalFee: | ||
type: string # Amount | ||
description: Mosaic rental fee. | ||
example: "500" |
14 changes: 14 additions & 0 deletions
14
spec/plugins/multisig/schemas/MultisigNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: object | ||
properties: | ||
maxMultisigDepth: | ||
type: string | ||
description: Maximum number of multisig levels. | ||
example: "3" | ||
maxCosignatoriesPerAccount: | ||
type: string # uint32 | ||
description: Maximum number of cosignatories per account. | ||
example: "10" | ||
maxCosignedAccountsPerAccount: | ||
type: string # uint32 | ||
description: Maximum number of accounts a single account can cosign. | ||
example: "5" |
42 changes: 42 additions & 0 deletions
42
spec/plugins/namespace/schemas/NamespaceNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
type: object | ||
properties: | ||
maxNameSize: | ||
type: string | ||
description: Maximum namespace name size. | ||
example: "64" | ||
maxChildNamespaces: | ||
type: string | ||
description: Maximum number of children for a root namespace. | ||
example: "500" | ||
maxNamespaceDepth: | ||
type: string | ||
description: Maximum namespace depth. | ||
example: "3" | ||
minNamespaceDuration: | ||
type: string # utils::BlockSpan | ||
description: Minimum namespace duration. | ||
example: 1m | ||
maxNamespaceDuration: | ||
type: string # utils::BlockSpan | ||
description: Maximum namespace duration. | ||
example: 365d | ||
namespaceGracePeriodDuration: | ||
type: string # utils::BlockSpan | ||
description: Grace period during which time only the previous owner can renew an expired namespace. | ||
example: 2m | ||
reservedRootNamespaceNames: | ||
type: string | ||
description: Reserved root namespaces that cannot be claimed. | ||
example: xem, nem, user, account, org, com, biz, net, edu, mil, gov, info | ||
namespaceRentalFeeSinkPublicKey: | ||
$ref: "../../../schemas/PublicKey.yml" | ||
description: Public key of the namespace rental fee sink account. | ||
example: 3E82E1C1E4A75ADAA3CBA8C101C3CD31D9817A2EB966EB3B511FB2ED45B8E262 | ||
rootNamespaceRentalFeePerBlock: | ||
type: string # Amount | ||
description: Root namespace rental fee per block. | ||
example: "1" | ||
childNamespaceRentalFee: | ||
type: string # Amount | ||
description: Child namespace rental fee. | ||
example: "100" |
6 changes: 6 additions & 0 deletions
6
spec/plugins/restriction_account/schemas/AccountRestrictionNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: object | ||
properties: | ||
maxAccountRestrictionValues: | ||
type: string | ||
description: Maximum number of account restriction values. | ||
example: "512" |
6 changes: 6 additions & 0 deletions
6
spec/plugins/restriction_mosaic/schemas/MosaicRestrictionNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: object | ||
properties: | ||
maxMosaicRestrictionValues: | ||
type: string | ||
description: Maximum number of mosaic restriction values. | ||
example: "20" |
6 changes: 6 additions & 0 deletions
6
spec/plugins/transfer/schemas/TransferNetworkPropertiesDTO.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: object | ||
properties: | ||
maxMessageSize: | ||
type: string | ||
description: Maximum transaction message size. | ||
example: "1024" |
Oops, something went wrong.