mirror of
https://github.com/Xahau/xahau-web.git
synced 2025-11-19 10:55:48 +00:00
Compare commits
30 Commits
Ekiserrepe
...
fix-ci-err
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b989f3ecc | ||
|
|
1ea99fa904 | ||
|
|
209aff06b9 | ||
|
|
6032c14645 | ||
|
|
cf6c6667d6 | ||
|
|
381c5e1a9f | ||
|
|
8f3bd1f9be | ||
|
|
67b0b6629d | ||
|
|
1543b0e4c1 | ||
|
|
8f758976fb | ||
|
|
ddea8e0012 | ||
|
|
4eb2df7c97 | ||
|
|
023d4ffb38 | ||
|
|
e3be8bbf4b | ||
|
|
69de1779a3 | ||
|
|
9085768920 | ||
|
|
4a8e181d38 | ||
|
|
99bd4ba34e | ||
|
|
915aacc2d6 | ||
|
|
09ab2dee29 | ||
|
|
3c8cfe206f | ||
|
|
7d4eebdfb4 | ||
|
|
cdd2f5058c | ||
|
|
2a73058eab | ||
|
|
5747a948a6 | ||
|
|
6fe9c25db9 | ||
|
|
b87b096cce | ||
|
|
b1ce5e6fd3 | ||
|
|
0fe5e830d6 | ||
|
|
ee9a946e77 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -26,8 +26,6 @@ jobs:
|
||||
|
||||
- name: Setup Biome
|
||||
uses: biomejs/setup-biome@v2
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -6,6 +6,7 @@ import starlight from '@astrojs/starlight'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'astro/config'
|
||||
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
||||
import { remarkGlobalReferences } from './src/plugins/remarkGlobalReferences'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
@@ -311,6 +312,9 @@ export default defineConfig({
|
||||
}),
|
||||
mdx(),
|
||||
],
|
||||
markdown: {
|
||||
remarkPlugins: [remarkGlobalReferences],
|
||||
},
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
|
||||
15
package-lock.json
generated
15
package-lock.json
generated
@@ -18,6 +18,7 @@
|
||||
"astro": "^5.10.1",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"remark-reference-links": "^7.0.0",
|
||||
"starlight-openapi": "^0.19.1",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"vanilla-cookieconsent": "^3.1.0"
|
||||
@@ -6421,6 +6422,20 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-reference-links": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-reference-links/-/remark-reference-links-7.0.0.tgz",
|
||||
"integrity": "sha512-OMACEps7CkpBio5nutUToCcXFJr9QkkoHdku41iIholMdFZ0jdRxgFmPm2B7R+DSvW83ZShdA3ubWTH+C3M6Eg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-rehype": {
|
||||
"version": "11.1.2",
|
||||
"resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"astro": "^5.10.1",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"remark-reference-links": "^7.0.0",
|
||||
"starlight-openapi": "^0.19.1",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"vanilla-cookieconsent": "^3.1.0"
|
||||
|
||||
@@ -24,7 +24,7 @@ To opt-out of Balance Adjustments, omit the Issuer field and set Flags to 1. Doi
|
||||
"Account": "<rAddr...>",
|
||||
"TransactionType": "ClaimReward",
|
||||
"NetworkID": 21337,
|
||||
"Flags" 1
|
||||
"Flags": 1
|
||||
}
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ All interactions with this amendment are via the ClaimReward transaction:
|
||||
|
||||
```json
|
||||
{
|
||||
"Account": "<rAddr...>",
|
||||
"Account": "<rAddr...>",
|
||||
"TransactionType": "ClaimReward",
|
||||
"Issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"NetworkID": 21337
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Account Managment
|
||||
---
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
import { LinkCard } from '@astrojs/starlight/components';
|
||||
|
||||
The Account Management features in the Xahau network are a crucial component for users to manage their accounts effectively.
|
||||
|
||||
@@ -13,25 +13,25 @@ This includes several transaction types that enable users to perform various ope
|
||||
|
||||
The `AccountSet` transaction type allows users to modify the properties of their accounts. This includes settings such as transfer rate, account flags, and more.
|
||||
|
||||
[accountset.md](/docs/protocol-reference/transactions/transaction-types/accountset.md)
|
||||
<LinkCard title="AccountSet" href="/docs/protocol-reference/transactions/transaction-types/accountset" />
|
||||
|
||||
#### AccountDelete
|
||||
|
||||
The `AccountDelete` transaction type enables users to delete their accounts from the Xahau network. This operation is irreversible and should be used with caution.
|
||||
|
||||
[accountdelete.md](/docs/protocol-reference/transactions/transaction-types/accountdelete.md)
|
||||
<LinkCard title="AccountDelete" href="/docs/protocol-reference/transactions/transaction-types/accountdelete" />
|
||||
|
||||
#### SetRegularKey
|
||||
|
||||
The `SetRegularKey` transaction type allows users to set a regular key pair for their account. This key pair can be used as an alternative to the master key pair for signing transactions.
|
||||
|
||||
[setregularkey.md](/docs/protocol-reference/transactions/transaction-types/setregularkey.md)
|
||||
<LinkCard title="SetRegularKey" href="/docs/protocol-reference/transactions/transaction-types/setregularkey" />
|
||||
|
||||
#### SignersListSet
|
||||
#### SignerListSet
|
||||
|
||||
The `SignersListSet` transaction type enables users to set a list of signers for their account. This is particularly useful for multi-signature accounts where multiple parties are required to sign off on transactions.
|
||||
The `SignerListSet` transaction type enables users to set a list of signers for their account. This is particularly useful for multi-signature accounts where multiple parties are required to sign off on transactions.
|
||||
|
||||
[signerlistset.md](/docs/protocol-reference/transactions/transaction-types/signerlistset.md)
|
||||
<LinkCard title="SignerListSet" href="/docs/protocol-reference/transactions/transaction-types/signerlistset" />
|
||||
|
||||
#### Import
|
||||
|
||||
@@ -39,6 +39,6 @@ The `Import` transaction type is used to import transactions from other networks
|
||||
|
||||
Please note that the process of importing for the issuer involves specific transaction types and requires careful configuration. Always ensure that the hooks are correctly set up and that the transactions are valid for the intended operations.
|
||||
|
||||
[import.md](/docs/protocol-reference/transactions/transaction-types/import.md)
|
||||
<LinkCard title="Import" href="/docs/protocol-reference/transactions/transaction-types/import" />
|
||||
|
||||
These transaction types provide users with a comprehensive set of tools for managing their accounts on the Xahau network. As with all operations, users should ensure they understand the implications of each transaction type before use.
|
||||
|
||||
@@ -201,7 +201,7 @@ If a Transaction Type does not appear in the table then it has no TSHes **other
|
||||
| Account | Account | Strong |
|
||||
| Account | RegularKey | Strong |
|
||||
|
||||
**SignersListSet**
|
||||
**SignerListSet**
|
||||
|
||||
| OTXN | TSH | SignerListSet |
|
||||
| ------- | ------- | ------------- |
|
||||
|
||||
@@ -14,6 +14,8 @@ For specific node use cases (e.g. full history) specs may differ (and grow) over
|
||||
* Filesystem: EXT4/XFS/...
|
||||
* Network IO: 100Mbit+
|
||||
|
||||
***As of August 6, 2025 the full history for the Xahau Network is approximately 8TB***
|
||||
|
||||
### Nodes for future (network growth) production use:
|
||||
|
||||
<table><thead><tr><th width="140"></th><th width="200">Minimum</th><th width="199">Preferred</th><th>Ideal</th></tr></thead><tbody><tr><td>CPU</td><td>16 cores</td><td>20+ cores</td><td>40+ cores</td></tr><tr><td>Memory</td><td>32GB</td><td>64GB</td><td>128GB+</td></tr><tr><td>Disk IO</td><td>15k random RW</td><td>20k random RW</td><td>30k random RW</td></tr><tr><td>Disk Size</td><td>500GB</td><td>1TB</td><td>2TB</td></tr><tr><td>Filesystem</td><td>XFS</td><td>XFS</td><td>XFS</td></tr><tr><td>Network IO</td><td>500Mbit+</td><td>1Gbit</td><td>10Gbit</td></tr></tbody></table>
|
||||
|
||||
@@ -27,21 +27,21 @@ _Added by the \[XahauGenesis amendment]\[] and the \[Hooks amendment]\[]_
|
||||
|
||||
### Fields
|
||||
|
||||
| Field | JSON Type | Internal Type | Description |
|
||||
| ------------ | --------- | ------------- | -------------------------------------------------------------------------------- |
|
||||
| Account | String | AccountID | The address of the genesis account that will mint and distribute XAH. |
|
||||
| GenesisMints | Array | Array | An array of objects representing the destinations and amounts of the minted XAH. |
|
||||
| Field | JSON Type | Internal Type | Description |
|
||||
| -------------- | --------- | ------------- | -------------------------------------------------------------------------------- |
|
||||
| `Account` | String | AccountID | The address of the genesis account that will mint and distribute XAH. |
|
||||
| `GenesisMints` | Array | Array | An array of objects representing the destinations and amounts of the minted XAH. |
|
||||
|
||||
### GenesisMint Object
|
||||
|
||||
The GenesisMint transaction includes an array of objects called `GenesisMints`. Each object represents a destination account and the amount of XAH to be minted and distributed to that account.
|
||||
|
||||
| Field | JSON Type | Internal Type | Description |
|
||||
| --------------- | --------- | ------------- | -------------------------------------------------------------------------- |
|
||||
| Destination | String | AccountID | The address of the account that will receive the minted XAH. |
|
||||
| Amount | String | Amount | The amount of XAH to be minted and distributed to the destination account. |
|
||||
| GovernanceFlags | String | Hash256 | _(Optional)_ The governance flags associated with the destination account. |
|
||||
| GovernanceMarks | String | Hash256 | _(Optional)_ The governance marks associated with the destination account. |
|
||||
| Field | JSON Type | Internal Type | Description |
|
||||
| ----------------- | --------- | ------------- | -------------------------------------------------------------------------- |
|
||||
| `Destination` | String | AccountID | The address of the account that will receive the minted XAH. |
|
||||
| `Amount` | String | Amount | The amount of XAH to be minted and distributed to the destination account. |
|
||||
| `GovernanceFlags` | String | Hash256 | _(Optional)_ The governance flags associated with the destination account. |
|
||||
| `GovernanceMarks` | String | Hash256 | _(Optional)_ The governance marks associated with the destination account. |
|
||||
|
||||
### Special Transaction Cost
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ _(Added by the \[Import amendment]\[].)_
|
||||
|
||||
### Notes
|
||||
|
||||
_It is recommended that if you use a `SignersList` or `RegularKey` to sign your transactions that you key your accounts **FIRST** before attempting to _B2M_ XAH_ .
|
||||
_It is recommended that if you use a `SignerList` or `RegularKey` to sign your transactions that you key your accounts **FIRST** before attempting to _B2M_ XAH_ .
|
||||
|
||||
* If the inner (xpop) transaction is `AccountSet` the mainet existing flags will be transfered to the new network.
|
||||
* If the inner (xpop) transaction is `SetRegularKey` with the `RegularKey` field omitted or empty, and a signers list does not exist for the account then the `lsfDisableMaster` flag will be set on the account.
|
||||
|
||||
13
src/content/references/global.md
Normal file
13
src/content/references/global.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Currently, remarkPlugins does not support HMR, so you will need to restart the dev server if you change this file. -->
|
||||
[Internal Type]: /docs/protocol-reference/binary-format
|
||||
[Sequence Number]: /docs/protocol-reference/data-types/#account-sequence
|
||||
[Index Number]: /docs/protocol-reference/data-types/#index-number
|
||||
[SHA-512Half]: /docs/protocol-reference/data-types/#hashes
|
||||
[Specifying Time]: /docs/protocol-reference/data-types/#specifying-time
|
||||
[seconds since the Ripple Epoch]: /docs/protocol-reference/data-types/#specifying-time
|
||||
[Ledger Index]: /docs/protocol-reference/data-types/#ledger-index
|
||||
[ledger index]: /docs/protocol-reference/data-types/#ledger-index
|
||||
[Hash]: /docs/protocol-reference/data-types/#hashes
|
||||
[Address]: /docs/protocol-reference/data-types/#addresses
|
||||
[Currency Amount]: /docs/protocol-reference/data-types/#specifying-currency-amounts
|
||||
[drops of XAH]: /docs/protocol-reference/data-types/#specifying-currency-amounts
|
||||
5
src/content/references/pseudo-transactions.md
Normal file
5
src/content/references/pseudo-transactions.md
Normal file
@@ -0,0 +1,5 @@
|
||||
EnableAmendment
|
||||
EmitFailure
|
||||
SetFee
|
||||
UNLModify
|
||||
UNLReport
|
||||
38
src/content/references/transactions.md
Normal file
38
src/content/references/transactions.md
Normal file
@@ -0,0 +1,38 @@
|
||||
AccountDelete
|
||||
AccountSet
|
||||
CheckCancel
|
||||
CheckCash
|
||||
CheckCreate
|
||||
ClaimReward
|
||||
Clawback
|
||||
DepositPreauth
|
||||
EscrowCancel
|
||||
EscrowCreate
|
||||
EscrowFinish
|
||||
GenesisMint
|
||||
Import
|
||||
Invoke
|
||||
NFTokenAcceptOffer
|
||||
NFTokenBurn
|
||||
NFTokenCancelOffer
|
||||
NFTokenCreateOffer
|
||||
NFTokenMint
|
||||
OfferCancel
|
||||
OfferCreate
|
||||
Payment
|
||||
PaymentChannelClaim
|
||||
PaymentChannelCreate
|
||||
PaymentChannelFund
|
||||
Remit
|
||||
SetHook
|
||||
SetRegularKey
|
||||
SetRemarks
|
||||
SignerListSet
|
||||
SpinalTap
|
||||
TicketCreate
|
||||
TrustSet
|
||||
URITokenBurn
|
||||
URITokenBuy
|
||||
URITokenCancelSellOffer
|
||||
URITokenCreateSellOffer
|
||||
URITokenMint
|
||||
@@ -76,11 +76,11 @@ const { frontmatter } = Astro.props
|
||||
</div>
|
||||
<div class="text-black flex flex-col col-span-2 md:col-span-3 row-start-auto md:row-start-2 min-h-40 items-start justify-end p-4 bg-white border-black border-2">
|
||||
<h3 class="text-xl md:text-2xl font-semibold">Ledgers closed</h3>
|
||||
<h4 class="text-4xl md:text-6xl font-extrabold">15M+</h4>
|
||||
<h4 class="text-4xl md:text-6xl font-extrabold">16M+</h4>
|
||||
</div>
|
||||
<a href="/docs/infrastructure/node-requirements/" class="col-span-3 row-start-auto md:row-start-2 px-10 h-12 flex items-center justify-center bg-xahau-green text-black text-base font-bold hover:bg-black hover:text-white transition">Want to run a node?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<slot />
|
||||
</BaseLayout>
|
||||
</BaseLayout>
|
||||
|
||||
168
src/plugins/remarkGlobalReferences.ts
Normal file
168
src/plugins/remarkGlobalReferences.ts
Normal file
@@ -0,0 +1,168 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { visit } from 'unist-util-visit'
|
||||
|
||||
const parseRules: {
|
||||
path: string
|
||||
parse: (content: string) => { label: string; url: string }[]
|
||||
}[] = [
|
||||
{
|
||||
path: 'src/content/references/global.md',
|
||||
parse: (content: string) => {
|
||||
const lines = content.split('\n')
|
||||
const result: { label: string; url: string }[] = []
|
||||
for (const line of lines) {
|
||||
const match = line.match(/^\[([^\]]+)\]:\s*(.+)$/)
|
||||
if (match) {
|
||||
const [, label, url] = match
|
||||
result.push({ label, url: url.trim() })
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'src/content/references/transactions.md',
|
||||
parse: (content: string) => {
|
||||
const lines = content.split('\n')
|
||||
const result: { label: string; url: string }[] = []
|
||||
for (const line of lines) {
|
||||
if (line.length > 0) {
|
||||
const url = `/docs/protocol-reference/transactions/transaction-types/${line.toLowerCase()}`
|
||||
result.push({ label: `${line}`, url })
|
||||
result.push({ label: `${line} transaction`, url })
|
||||
result.push({ label: `${line} transactions`, url })
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'src/content/references/pseudo-transactions.md',
|
||||
parse: (content: string) => {
|
||||
const lines = content.split('\n')
|
||||
const result: { label: string; url: string }[] = []
|
||||
for (const line of lines) {
|
||||
if (line.length > 0) {
|
||||
const url = `/docs/protocol-reference/transactions/pseudo-transaction-types/${line.toLowerCase()}`
|
||||
result.push({ label: `${line}`, url })
|
||||
result.push({ label: `${line} transaction`, url })
|
||||
result.push({ label: `${line} transactions`, url })
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
/**
|
||||
* Remark plugin to resolve reference-style links from global.md
|
||||
*/
|
||||
export function remarkGlobalReferences() {
|
||||
let globalRefs: Record<string, string> | null = null
|
||||
|
||||
function loadGlobalReferences() {
|
||||
if (globalRefs !== null) return globalRefs
|
||||
|
||||
try {
|
||||
globalRefs = {}
|
||||
for (const rule of parseRules) {
|
||||
const content = readFileSync(rule.path, 'utf-8')
|
||||
const refs = rule.parse(content)
|
||||
for (const ref of refs) {
|
||||
globalRefs[ref.label] = ref.url
|
||||
}
|
||||
}
|
||||
|
||||
return globalRefs
|
||||
} catch (error: any) {
|
||||
console.warn('Could not load global.md references:', error.message)
|
||||
globalRefs = {}
|
||||
return globalRefs
|
||||
}
|
||||
}
|
||||
|
||||
return function transformer(tree: any) {
|
||||
const refs = loadGlobalReferences()
|
||||
|
||||
// Find all reference-style links in the format [text][]
|
||||
visit(tree, 'linkReference', (node) => {
|
||||
if (
|
||||
node.referenceType === 'shortcut' ||
|
||||
node.referenceType === 'collapsed'
|
||||
) {
|
||||
const label = node.label || node.children?.[0]?.value
|
||||
|
||||
if (label && refs[label]) {
|
||||
// Convert linkReference to a regular link
|
||||
node.type = 'link'
|
||||
node.url = refs[label]
|
||||
delete node.referenceType
|
||||
delete node.identifier
|
||||
delete node.label
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Also look for escaped reference-style links in text nodes: \[label]\[]
|
||||
visit(tree, 'text', (node, index, parent) => {
|
||||
if (!node.value) return
|
||||
|
||||
// Find escaped reference-style links: \[label]\[]
|
||||
const pattern = /\\?\[([^\]]+)\\?\]\\?\[\]/g
|
||||
const replacements = []
|
||||
let match: RegExpExecArray | null = null
|
||||
|
||||
match = pattern.exec(node.value)
|
||||
while (match !== null) {
|
||||
const [fullMatch, label] = match
|
||||
if (refs[label]) {
|
||||
replacements.push({
|
||||
start: match.index,
|
||||
end: match.index + fullMatch.length,
|
||||
label,
|
||||
url: refs[label],
|
||||
})
|
||||
}
|
||||
match = pattern.exec(node.value)
|
||||
}
|
||||
|
||||
// Apply replacements from right to left to maintain indices
|
||||
if (replacements.length > 0) {
|
||||
const newNodes = []
|
||||
let lastIndex = 0
|
||||
|
||||
for (const replacement of replacements) {
|
||||
// Add text before the replacement
|
||||
if (replacement.start > lastIndex) {
|
||||
newNodes.push({
|
||||
type: 'text',
|
||||
value: node.value.slice(lastIndex, replacement.start),
|
||||
})
|
||||
}
|
||||
|
||||
// Add the link
|
||||
newNodes.push({
|
||||
type: 'link',
|
||||
url: replacement.url,
|
||||
children: [{ type: 'text', value: replacement.label }],
|
||||
})
|
||||
|
||||
lastIndex = replacement.end
|
||||
}
|
||||
|
||||
// Add remaining text
|
||||
if (lastIndex < node.value.length) {
|
||||
newNodes.push({
|
||||
type: 'text',
|
||||
value: node.value.slice(lastIndex),
|
||||
})
|
||||
}
|
||||
|
||||
// Replace the current node with the new nodes
|
||||
if (parent && typeof index === 'number') {
|
||||
parent.children.splice(index, 1, ...newNodes)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,10 @@ header img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Light mode colors. */
|
||||
:root {
|
||||
--sl-color-accent-low: #c3e0c9;
|
||||
|
||||
Reference in New Issue
Block a user