-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(schema): add description to schema (#84)
- Loading branch information
Showing
12 changed files
with
157 additions
and
50 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
### Values | ||
|
||
These values have reasonable defaults or are randomly generated values for secured fields | ||
which will determine how the Chainfile is run. | ||
You may override these values to customize the Chainfile for your specific needs. | ||
|
||
{Object.entries(props.schema.values).map(([key, value]) => { | ||
const defaultValue = typeof value === 'string' ? value : value.default; | ||
|
||
return ( | ||
|
||
<> | ||
<h5>{key} {value.required && <code className="nx-text-xs nx-font-normal">required</code>}</h5> | ||
|
||
{value.description && <p>{value.description}</p>} | ||
{defaultValue && <p>Default: <code>{defaultValue}</code></p>} | ||
|
||
{value.random?.type === 'bytes' && <p>Random: <code>randomBytes({value.random.length}).toString({value.random.encoding})</code></p>} | ||
|
||
</> | ||
)})} | ||
|
||
### Containers | ||
|
||
{Object.entries(props.schema.containers).map(([key, container]) => { | ||
return ( | ||
|
||
<> | ||
<h4>{key}</h4> | ||
|
||
{container.description && <p>{container.description}</p>} | ||
|
||
{Object.entries(container.endpoints).map(([key, endpoint]) => { | ||
|
||
return ( | ||
|
||
<> | ||
|
||
<h5> | ||
endpoint: <code>{key}</code> | ||
</h5> | ||
|
||
{endpoint.description && <p>{endpoint.description}</p>} | ||
|
||
<ul> | ||
{endpoint.port && ( | ||
<li> | ||
Port: <code>{endpoint.port}</code> | ||
</li> | ||
)} | ||
{endpoint.protocol && ( | ||
<li> | ||
Protocol: <code>{endpoint.protocol}</code> | ||
</li> | ||
)} | ||
{endpoint.path && ( | ||
<li> | ||
Path: <code>{endpoint.path}</code> | ||
</li> | ||
)} | ||
{endpoint.probes && <li>Probes: {Object.keys(endpoint.probes).join(', ')}</li>} | ||
{endpoint.authorization && <li>Authorization: required</li>} | ||
</ul> | ||
|
||
</> | ||
)})} | ||
|
||
</> | ||
)})} |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
# Bitcoin | ||
|
||
Definition(s) is maintained by the Chainfile maintainers. |
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,3 @@ | ||
# Defichain | ||
|
||
Definition(s) is maintained by the Chainfile maintainers. |
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 +1,3 @@ | ||
# Ethereum | ||
|
||
Definition(s) is maintained by the Chainfile maintainers. |
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,14 +1,18 @@ | ||
import { Callout } from 'nextra/components'; | ||
import ChainfileDefinition from '../../components/ChainfileDefinition.mdx'; | ||
import ganache from 'chainfile-ganache/ganache.json'; | ||
|
||
# Ganache | ||
|
||
import { Callout } from 'nextra/components'; | ||
Definition(s) is maintained by the Chainfile maintainers. | ||
|
||
<Callout type="warning"> | ||
The Truffle Suite has deprecated Ganache in favor of [Hardhat](hardhat). This Chainfile definition is created for | ||
legacy compatibility only. | ||
|
||
The Truffle Suite has deprecated Ganache in favor of [Hardhat](hardhat). | ||
This Chainfile definition is created for legacy compatibility only. | ||
|
||
</Callout> | ||
|
||
## ganache.json | ||
|
||
```txt filename="Location" copy | ||
chainfile-ganache/ganache.json | ||
``` | ||
<ChainfileDefinition schema={ganache} /> |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import ChainfileDefinition from '../../components/ChainfileDefinition.mdx'; | ||
import test_validator from 'chainfile-solana/test-validator.json'; | ||
|
||
# Solana | ||
|
||
Definition(s) is maintained by the Chainfile maintainers. | ||
|
||
## test-validator.json | ||
|
||
```txt filename="Location" copy | ||
chainfile-solana/test-validator.json | ||
``` | ||
<ChainfileDefinition schema={test_validator} /> |