Compare commits
91 Commits
Ekiserrepe
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370956d8da | ||
|
|
fe57340cb0 | ||
|
|
bab4067d77 | ||
|
|
ac31794600 | ||
|
|
f0faaa2f4d | ||
|
|
be7330daf8 | ||
|
|
a6cd013177 | ||
|
|
937b20d569 | ||
|
|
fc91815634 | ||
|
|
253ca39399 | ||
|
|
1efe7c8ef4 | ||
|
|
bbacf041ed | ||
|
|
6679f7893d | ||
|
|
ea7d03c991 | ||
|
|
c868bd5930 | ||
|
|
9965b7cccd | ||
|
|
c07613ee1f | ||
|
|
0d215df7d9 | ||
|
|
fd9b45f4dd | ||
|
|
595a1b90d9 | ||
|
|
8a2036159e | ||
|
|
6c88213e4b | ||
|
|
084fc2aa6c | ||
|
|
7a0799c54f | ||
|
|
ea558effea | ||
|
|
781ba0796e | ||
|
|
165fc2ae41 | ||
|
|
41bd2756fa | ||
|
|
873468d8fa | ||
|
|
fbc68e383f | ||
|
|
b9a9984f86 | ||
|
|
9fcb9f235c | ||
|
|
334cfc3e31 | ||
|
|
7eed80c992 | ||
|
|
1c6308101e | ||
|
|
2e98bf838a | ||
|
|
7ea930ba51 | ||
|
|
2ef17af47d | ||
|
|
523252646d | ||
|
|
eb63f48e17 | ||
|
|
4e7d741549 | ||
|
|
d0f908abd5 | ||
|
|
268b65ba41 | ||
|
|
e4fdce9ae6 | ||
|
|
818cd021a1 | ||
|
|
02da2cc50c | ||
|
|
38b4a0df32 | ||
|
|
8469c5dfaf | ||
|
|
86650055e1 | ||
|
|
40a8aaf655 | ||
|
|
575598f42e | ||
|
|
77e3d8b001 | ||
|
|
29df0aece7 | ||
|
|
8f7545b541 | ||
|
|
896959c613 | ||
|
|
8758ac2cf1 | ||
|
|
ee862a8ba7 | ||
|
|
c25e8f7c57 | ||
|
|
206a614f74 | ||
|
|
bab4e61c4e | ||
|
|
4246025324 | ||
|
|
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 |
12
.github/workflows/ci.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: CI
|
name: Build and Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -11,7 +11,7 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -26,8 +26,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Biome
|
- name: Setup Biome
|
||||||
uses: biomejs/setup-biome@v2
|
uses: biomejs/setup-biome@v2
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -37,3 +35,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Astro project
|
- name: Build Astro project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Run HTML Link test
|
||||||
|
run: |
|
||||||
|
curl https://htmltest.wjdp.uk | bash
|
||||||
|
echo "IgnoreDirectoryMissingTrailingSlash: True" > .htmltest.yml
|
||||||
|
./bin/htmltest --conf .htmltest.yml --skip-external dist
|
||||||
|
|||||||
5
.gitignore
vendored
@@ -22,3 +22,8 @@ pnpm-debug.log*
|
|||||||
|
|
||||||
# jetbrains setting folder
|
# jetbrains setting folder
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
|
# htmltest
|
||||||
|
/bin/htmltest
|
||||||
|
/tmp/.htmltest
|
||||||
|
.htmltest.yml
|
||||||
|
|||||||
6
.vscode/settings.json
vendored
@@ -2,7 +2,9 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.defaultFormatter": "biomejs.biome",
|
"editor.defaultFormatter": "biomejs.biome",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"quickfix.biome": "explicit",
|
"source.fixAll.biome": "explicit"
|
||||||
"source.organizeImports.biome": "explicit"
|
},
|
||||||
|
"files.associations": {
|
||||||
|
"*.css": "tailwindcss"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
CONTRIBUTING.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Thank You!
|
||||||
|
Public contributions to the documentation are welcome. When contributing, please help with consistency and clarity by adhering to the below guidelines.
|
||||||
|
|
||||||
|
# Disambiguation
|
||||||
|
* Strive for brevity and clarity. Avoid jargon and use a professional writing tone. Adhere to standards, such as [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).
|
||||||
|
* When referring to the software `xahaud`, use a lowercase "x" and include the 'd'. When referring to the broader `Xahau Network`, capitalize both terms and,if appropriate, subsequently use the capitalized term "the Network". Use the capitalized `Xahau` or the all caps abbreviation `XAH` when referring to the currency.
|
||||||
|
* Be mindful that this documentation is shared by a global community. Avoid culture-specific jargon or slang.
|
||||||
|
|
||||||
|
# Formatting
|
||||||
|
* Relative and absolute linking are both permitted. When changing the directory structure or renaming individual pages, use grep to ensure all links are updated. Header, footer, index page, navigation bar, and links on other pages all need to be updated manually.
|
||||||
|
* The use of second person ("you") is permitted.
|
||||||
|
* Individual webpages may be formatted using Markdown, HTML, CSS, and JavaScript in any combination. To the extent possible, favor style templates and avoid inline CSS.
|
||||||
|
* When using bulleted or numbered lists end sentences with a period ('.'), unless doing so interferes with content. For example, if a bulleted list item ends with a link to a webpage, do not add a '.' at the end of the link, as doing so breaks the link. Similarly, do not add a '.' after code snippets.
|
||||||
|
* Capitalize proper nouns, including "Testnet" and "Mainnet". Prefer single word for these terms.
|
||||||
|
* Use square brackets inside code snippets to offset user specific information, such as file names and paths. For example: `cd [/path/to/xahaud] && ./xahaud server_info`
|
||||||
|
* Wrap multi-line code examples in three backticks: "```".
|
||||||
|
|
||||||
|
# General Guidelines
|
||||||
|
* Include meaningful commit messages.
|
||||||
@@ -34,3 +34,7 @@ All commands are run from the root of the project, from a terminal:
|
|||||||
| `npm run preview` | Preview your build locally, before deploying |
|
| `npm run preview` | Preview your build locally, before deploying |
|
||||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
||||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
| `npm run astro -- --help` | Get help using the Astro CLI |
|
||||||
|
|
||||||
|
## Standards for Formatting Contributions
|
||||||
|
|
||||||
|
When contributing, please adhere to the standards defined in "[contributing.md](contributing.md)".
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import starlight from '@astrojs/starlight'
|
|||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
import { defineConfig } from 'astro/config'
|
import { defineConfig } from 'astro/config'
|
||||||
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
||||||
|
import { remarkGlobalReferences } from './src/plugins/remarkGlobalReferences'
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -279,15 +280,13 @@ export default defineConfig({
|
|||||||
{
|
{
|
||||||
label: 'Infrastructure',
|
label: 'Infrastructure',
|
||||||
items: [
|
items: [
|
||||||
'docs/infrastructure/node-requirements',
|
'docs/infrastructure/system-requirements',
|
||||||
{
|
'docs/infrastructure/installing-xahaud',
|
||||||
label: 'Running a Node',
|
'docs/infrastructure/updating-xahaud',
|
||||||
collapsed: true,
|
'docs/infrastructure/enabling-validation',
|
||||||
items: [
|
'docs/infrastructure/identity',
|
||||||
'docs/infrastructure/running-a-node/running-a-mainnet-node',
|
'docs/infrastructure/interacting',
|
||||||
'docs/infrastructure/running-a-node/running-a-testnet-node',
|
'docs/infrastructure/advanced-configuration',
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Building Xahau (Dev)',
|
label: 'Building Xahau (Dev)',
|
||||||
collapsed: true,
|
collapsed: true,
|
||||||
@@ -311,6 +310,9 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
mdx(),
|
mdx(),
|
||||||
],
|
],
|
||||||
|
markdown: {
|
||||||
|
remarkPlugins: [remarkGlobalReferences],
|
||||||
|
},
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()],
|
plugins: [tailwindcss()],
|
||||||
},
|
},
|
||||||
|
|||||||
35
biome.jsonc
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.3.3/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
"useIgnoreFile": false
|
"useIgnoreFile": false
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"includes": ["**", "!*/**/*.astro", "!.astro", "!dist"],
|
"includes": ["**", "!dist"],
|
||||||
"ignoreUnknown": false
|
"ignoreUnknown": false
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
@@ -17,7 +17,24 @@
|
|||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
"recommended": true
|
"recommended": true,
|
||||||
|
"suspicious": {
|
||||||
|
"noExplicitAny": "info"
|
||||||
|
},
|
||||||
|
"complexity": {
|
||||||
|
"noBannedTypes": "info"
|
||||||
|
},
|
||||||
|
"correctness": {
|
||||||
|
"noUnusedImports": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"experimentalFullSupportEnabled": true,
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentScriptAndStyle": true,
|
||||||
|
"indentStyle": "space"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"javascript": {
|
"javascript": {
|
||||||
@@ -26,6 +43,18 @@
|
|||||||
"semicolons": "asNeeded"
|
"semicolons": "asNeeded"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"css": {
|
||||||
|
"parser": {
|
||||||
|
"tailwindDirectives": true,
|
||||||
|
"cssModules": true
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 2,
|
||||||
|
"quoteStyle": "single"
|
||||||
|
}
|
||||||
|
},
|
||||||
"assist": {
|
"assist": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
359
package-lock.json
generated
@@ -9,23 +9,32 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^4.3.0",
|
"@astrojs/mdx": "^4.3.0",
|
||||||
|
"@astrojs/node": "^9.4.4",
|
||||||
"@astrojs/react": "^4.3.0",
|
"@astrojs/react": "^4.3.0",
|
||||||
"@astrojs/starlight": "^0.34.4",
|
"@astrojs/starlight": "^0.34.4",
|
||||||
"@astrojs/starlight-tailwind": "^4.0.1",
|
"@astrojs/starlight-tailwind": "^4.0.1",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
"@heroicons/react": "^2.2.0",
|
"@heroicons/react": "^2.2.0",
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
|
"altcha": "^2.2.4",
|
||||||
"astro": "^5.10.1",
|
"astro": "^5.10.1",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
|
"remark-reference-links": "^7.0.0",
|
||||||
"starlight-openapi": "^0.19.1",
|
"starlight-openapi": "^0.19.1",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.11",
|
||||||
"vanilla-cookieconsent": "^3.1.0"
|
"vanilla-cookieconsent": "^3.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.0.6"
|
"@biomejs/biome": "^2.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@altcha/crypto": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@altcha/crypto/-/crypto-0.0.1.tgz",
|
||||||
|
"integrity": "sha512-qZMdnoD3lAyvfSUMNtC2adRi666Pxdcw9zqfMU5qBOaJWqpN9K+eqQGWqeiKDMqL0SF+EytNG4kR/Pr/99GJ6g==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
||||||
@@ -108,6 +117,26 @@
|
|||||||
"astro": "^5.0.0"
|
"astro": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@astrojs/node": {
|
||||||
|
"version": "9.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@astrojs/node/-/node-9.4.4.tgz",
|
||||||
|
"integrity": "sha512-zQelZmeejnpw3Y5cj2gCyAZ6HT7tjgsWLZH8k40s3bTaT6lqJXlPtKJeIsuEcod21vZLODqBEQeu0CWrWm01EQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@astrojs/internal-helpers": "0.7.3",
|
||||||
|
"send": "^1.2.0",
|
||||||
|
"server-destroy": "^1.0.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"astro": "^5.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@astrojs/node/node_modules/@astrojs/internal-helpers": {
|
||||||
|
"version": "0.7.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.7.3.tgz",
|
||||||
|
"integrity": "sha512-6Pl0bQEIChuW5wqN7jdKrzWfCscW2rG/Cz+fzt4PhSQX2ivBpnhXgFUCs0M3DCYvjYHnPVG2W36X5rmFjZ62sw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@astrojs/prism": {
|
"node_modules/@astrojs/prism": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.3.0.tgz",
|
||||||
@@ -456,9 +485,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/biome": {
|
"node_modules/@biomejs/biome": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.3.tgz",
|
||||||
"integrity": "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA==",
|
"integrity": "sha512-zn/P1pRBCpDdhi+VNSMnpczOz9DnqzOA2c48K8xgxjDODvi5O8gs3a2H233rck/5HXpkFj6TmyoqVvxirZUnvg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -472,20 +501,20 @@
|
|||||||
"url": "https://opencollective.com/biome"
|
"url": "https://opencollective.com/biome"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@biomejs/cli-darwin-arm64": "2.0.6",
|
"@biomejs/cli-darwin-arm64": "2.3.3",
|
||||||
"@biomejs/cli-darwin-x64": "2.0.6",
|
"@biomejs/cli-darwin-x64": "2.3.3",
|
||||||
"@biomejs/cli-linux-arm64": "2.0.6",
|
"@biomejs/cli-linux-arm64": "2.3.3",
|
||||||
"@biomejs/cli-linux-arm64-musl": "2.0.6",
|
"@biomejs/cli-linux-arm64-musl": "2.3.3",
|
||||||
"@biomejs/cli-linux-x64": "2.0.6",
|
"@biomejs/cli-linux-x64": "2.3.3",
|
||||||
"@biomejs/cli-linux-x64-musl": "2.0.6",
|
"@biomejs/cli-linux-x64-musl": "2.3.3",
|
||||||
"@biomejs/cli-win32-arm64": "2.0.6",
|
"@biomejs/cli-win32-arm64": "2.3.3",
|
||||||
"@biomejs/cli-win32-x64": "2.0.6"
|
"@biomejs/cli-win32-x64": "2.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.3.tgz",
|
||||||
"integrity": "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A==",
|
"integrity": "sha512-5+JtW6RKmjqL9un0UtHV0ezOslAyYBzyl5ZhYiu7GHesX2x8NCDl6tXYrenv9m7e1RLbkO5E5Kh04kseMtz6lw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -500,9 +529,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-x64": {
|
"node_modules/@biomejs/cli-darwin-x64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.3.tgz",
|
||||||
"integrity": "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ==",
|
"integrity": "sha512-UPmKRalkHicvIpeccuKqq+/gA2HYV8FUnAEDJnqYBlGlycKqe6xrovWqvWTE4TTNpIFf4UQyuaDzLkN6Kz6tbA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -517,9 +546,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64": {
|
"node_modules/@biomejs/cli-linux-arm64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.3.tgz",
|
||||||
"integrity": "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA==",
|
"integrity": "sha512-zeiKwALNB/hax7+LLhCYqhqzlWdTfgE9BGkX2Z8S4VmCYnGFrf2fON/ec6KCos7mra5MDm6fYICsEWN2+HKZhw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -534,9 +563,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.3.tgz",
|
||||||
"integrity": "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw==",
|
"integrity": "sha512-KhCDMV+V7Yu72v40ssGJTHuv/j0n7JQ6l0s/c+EMcX5zPYLMLr4XpmI+WXhp4Vfkz0T5Xnh5wbrTBI3f2UTpjQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -551,9 +580,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64": {
|
"node_modules/@biomejs/cli-linux-x64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.3.tgz",
|
||||||
"integrity": "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw==",
|
"integrity": "sha512-05CjPLbvVVU8J6eaO6iSEoA0FXKy2l6ddL+1h/VpiosCmIp3HxRKLOa1hhC1n+D13Z8g9b1DtnglGtM5U3sTag==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -568,9 +597,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64-musl": {
|
"node_modules/@biomejs/cli-linux-x64-musl": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.3.tgz",
|
||||||
"integrity": "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ==",
|
"integrity": "sha512-IyqQ+jYzU5MVy9CK5NV0U+NnUMPUAhYMrB/x4QgL/Dl1MqzBVc61bHeyhLnKM6DSEk73/TQYrk/8/QmVHudLdQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -585,9 +614,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-arm64": {
|
"node_modules/@biomejs/cli-win32-arm64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.3.tgz",
|
||||||
"integrity": "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA==",
|
"integrity": "sha512-NtlLs3pdFqFAQYZjlEHKOwJEn3GEaz7rtR2oCrzaLT2Xt3Cfd55/VvodQ5V+X+KepLa956QJagckJrNL+DmumQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -602,9 +631,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-x64": {
|
"node_modules/@biomejs/cli-win32-x64": {
|
||||||
"version": "2.0.6",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.3.tgz",
|
||||||
"integrity": "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw==",
|
"integrity": "sha512-klJKPPQvUk9Rlp0Dd56gQw/+Wt6uUprHdHWtbDC93f3Iv+knA2tLWpcYoOZJgPV+9s+RBmYv0DGy4mUlr20esg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2700,6 +2729,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/altcha": {
|
||||||
|
"version": "2.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/altcha/-/altcha-2.2.4.tgz",
|
||||||
|
"integrity": "sha512-UrU2izh1pISqzd7TCAJiJB2N+r7roqA348Qxt1gJlW5k9pJpbDDmMcDaxfuet9h/WFE6Snrritu/WusmERarrg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@altcha/crypto": "^0.0.1"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@rollup/rollup-linux-x64-gnu": "4.18.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/altcha/node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
|
"version": "4.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz",
|
||||||
|
"integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/ansi-align": {
|
"node_modules/ansi-align": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
|
||||||
@@ -2799,13 +2853,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/astro": {
|
"node_modules/astro": {
|
||||||
"version": "5.10.1",
|
"version": "5.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/astro/-/astro-5.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/astro/-/astro-5.13.2.tgz",
|
||||||
"integrity": "sha512-DJVmt+51jU1xmgmAHCDwuUgcG/5aVFSU+tcX694acAZqPVt8EMUAmUZcJDX36Z7/EztnPph9HR3pm72jS2EgHQ==",
|
"integrity": "sha512-yjcXY0Ua3EwjpVd3GoUXa65HQ6qgmURBptA+M9GzE0oYvgfuyM7bIbH8IR/TWIbdefVUJR5b7nZ0oVnMytmyfQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/compiler": "^2.12.2",
|
"@astrojs/compiler": "^2.12.2",
|
||||||
"@astrojs/internal-helpers": "0.6.1",
|
"@astrojs/internal-helpers": "0.7.2",
|
||||||
"@astrojs/markdown-remark": "6.3.2",
|
"@astrojs/markdown-remark": "6.3.6",
|
||||||
"@astrojs/telemetry": "3.3.0",
|
"@astrojs/telemetry": "3.3.0",
|
||||||
"@capsizecss/unpack": "^2.4.0",
|
"@capsizecss/unpack": "^2.4.0",
|
||||||
"@oslojs/encoding": "^1.1.0",
|
"@oslojs/encoding": "^1.1.0",
|
||||||
@@ -2848,6 +2902,7 @@
|
|||||||
"rehype": "^13.0.2",
|
"rehype": "^13.0.2",
|
||||||
"semver": "^7.7.1",
|
"semver": "^7.7.1",
|
||||||
"shiki": "^3.2.1",
|
"shiki": "^3.2.1",
|
||||||
|
"smol-toml": "^1.3.4",
|
||||||
"tinyexec": "^0.3.2",
|
"tinyexec": "^0.3.2",
|
||||||
"tinyglobby": "^0.2.12",
|
"tinyglobby": "^0.2.12",
|
||||||
"tsconfck": "^3.1.5",
|
"tsconfck": "^3.1.5",
|
||||||
@@ -2861,7 +2916,7 @@
|
|||||||
"xxhash-wasm": "^1.1.0",
|
"xxhash-wasm": "^1.1.0",
|
||||||
"yargs-parser": "^21.1.1",
|
"yargs-parser": "^21.1.1",
|
||||||
"yocto-spinner": "^0.2.1",
|
"yocto-spinner": "^0.2.1",
|
||||||
"zod": "^3.24.2",
|
"zod": "^3.24.4",
|
||||||
"zod-to-json-schema": "^3.24.5",
|
"zod-to-json-schema": "^3.24.5",
|
||||||
"zod-to-ts": "^1.2.0"
|
"zod-to-ts": "^1.2.0"
|
||||||
},
|
},
|
||||||
@@ -2892,6 +2947,39 @@
|
|||||||
"astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0"
|
"astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/astro/node_modules/@astrojs/internal-helpers": {
|
||||||
|
"version": "0.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.7.2.tgz",
|
||||||
|
"integrity": "sha512-KCkCqR3Goym79soqEtbtLzJfqhTWMyVaizUi35FLzgGSzBotSw8DB1qwsu7U96ihOJgYhDk2nVPz+3LnXPeX6g=="
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@astrojs/markdown-remark": {
|
||||||
|
"version": "6.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-6.3.6.tgz",
|
||||||
|
"integrity": "sha512-bwylYktCTsLMVoCOEHbn2GSUA3c5KT/qilekBKA3CBng0bo1TYjNZPr761vxumRk9kJGqTOtU+fgCAp5Vwokug==",
|
||||||
|
"dependencies": {
|
||||||
|
"@astrojs/internal-helpers": "0.7.2",
|
||||||
|
"@astrojs/prism": "3.3.0",
|
||||||
|
"github-slugger": "^2.0.0",
|
||||||
|
"hast-util-from-html": "^2.0.3",
|
||||||
|
"hast-util-to-text": "^4.0.2",
|
||||||
|
"import-meta-resolve": "^4.1.0",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
|
"mdast-util-definitions": "^6.0.0",
|
||||||
|
"rehype-raw": "^7.0.0",
|
||||||
|
"rehype-stringify": "^10.0.1",
|
||||||
|
"remark-gfm": "^4.0.1",
|
||||||
|
"remark-parse": "^11.0.0",
|
||||||
|
"remark-rehype": "^11.1.2",
|
||||||
|
"remark-smartypants": "^3.0.2",
|
||||||
|
"shiki": "^3.2.1",
|
||||||
|
"smol-toml": "^1.3.4",
|
||||||
|
"unified": "^11.0.5",
|
||||||
|
"unist-util-remove-position": "^5.0.0",
|
||||||
|
"unist-util-visit": "^5.0.0",
|
||||||
|
"unist-util-visit-parents": "^6.0.1",
|
||||||
|
"vfile": "^6.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/astro/node_modules/semver": {
|
"node_modules/astro/node_modules/semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||||
@@ -3382,6 +3470,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
|
||||||
"integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="
|
"integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/depd": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dequal": {
|
"node_modules/dequal": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
||||||
@@ -3469,6 +3566,12 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ee-first": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.177",
|
"version": "1.5.177",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.177.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.177.tgz",
|
||||||
@@ -3479,6 +3582,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||||
},
|
},
|
||||||
|
"node_modules/encodeurl": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.18.2",
|
"version": "5.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz",
|
||||||
@@ -3584,6 +3696,12 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/escape-html": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/escape-string-regexp": {
|
"node_modules/escape-string-regexp": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
||||||
@@ -3679,6 +3797,15 @@
|
|||||||
"@types/estree": "^1.0.0"
|
"@types/estree": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/etag": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
|
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eventemitter3": {
|
"node_modules/eventemitter3": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||||
@@ -3767,6 +3894,15 @@
|
|||||||
"unicode-trie": "^2.0.0"
|
"unicode-trie": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fresh": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fsevents": {
|
"node_modules/fsevents": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
@@ -4215,6 +4351,31 @@
|
|||||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
|
||||||
"integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="
|
"integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/http-errors": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"inherits": "2.0.4",
|
||||||
|
"setprototypeof": "1.2.0",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"toidentifier": "1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/http-errors/node_modules/statuses": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/i18next": {
|
"node_modules/i18next": {
|
||||||
"version": "23.16.8",
|
"version": "23.16.8",
|
||||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz",
|
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz",
|
||||||
@@ -4246,6 +4407,12 @@
|
|||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/inherits": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/inline-style-parser": {
|
"node_modules/inline-style-parser": {
|
||||||
"version": "0.2.4",
|
"version": "0.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz",
|
||||||
@@ -5737,6 +5904,27 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/mime-db": {
|
||||||
|
"version": "1.54.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
|
||||||
|
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-types": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"mime-db": "^1.54.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/minipass": {
|
"node_modules/minipass": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
||||||
@@ -5888,6 +6076,18 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
|
||||||
"integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="
|
"integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/on-finished": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ee-first": "1.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/oniguruma-parser": {
|
"node_modules/oniguruma-parser": {
|
||||||
"version": "0.12.1",
|
"version": "0.12.1",
|
||||||
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz",
|
||||||
@@ -6147,6 +6347,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
|
||||||
"integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="
|
"integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="
|
||||||
},
|
},
|
||||||
|
"node_modules/range-parser": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/react": {
|
"node_modules/react": {
|
||||||
"version": "19.1.0",
|
"version": "19.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
|
||||||
@@ -6421,6 +6630,20 @@
|
|||||||
"url": "https://opencollective.com/unified"
|
"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": {
|
"node_modules/remark-rehype": {
|
||||||
"version": "11.1.2",
|
"version": "11.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
|
||||||
@@ -6593,6 +6816,40 @@
|
|||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/send": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "^4.3.5",
|
||||||
|
"encodeurl": "^2.0.0",
|
||||||
|
"escape-html": "^1.0.3",
|
||||||
|
"etag": "^1.8.1",
|
||||||
|
"fresh": "^2.0.0",
|
||||||
|
"http-errors": "^2.0.0",
|
||||||
|
"mime-types": "^3.0.1",
|
||||||
|
"ms": "^2.1.3",
|
||||||
|
"on-finished": "^2.4.1",
|
||||||
|
"range-parser": "^1.2.1",
|
||||||
|
"statuses": "^2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/server-destroy": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/setprototypeof": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/sharp": {
|
"node_modules/sharp": {
|
||||||
"version": "0.33.5",
|
"version": "0.33.5",
|
||||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
|
||||||
@@ -6752,6 +7009,15 @@
|
|||||||
"astro": ">=5.5.0"
|
"astro": ">=5.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/statuses": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/stream-replace-string": {
|
"node_modules/stream-replace-string": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz",
|
||||||
@@ -6910,6 +7176,15 @@
|
|||||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/toidentifier": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tr46": {
|
"node_modules/tr46": {
|
||||||
"version": "0.0.3",
|
"version": "0.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||||
|
|||||||
@@ -7,24 +7,27 @@
|
|||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"check": "biome check --write",
|
"check": "biome check --write",
|
||||||
"ci": "biome ci"
|
"ci": "biome ci --diagnostic-level=warn"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^4.3.0",
|
"@astrojs/mdx": "^4.3.0",
|
||||||
|
"@astrojs/node": "^9.4.4",
|
||||||
"@astrojs/react": "^4.3.0",
|
"@astrojs/react": "^4.3.0",
|
||||||
"@astrojs/starlight": "^0.34.4",
|
"@astrojs/starlight": "^0.34.4",
|
||||||
"@astrojs/starlight-tailwind": "^4.0.1",
|
"@astrojs/starlight-tailwind": "^4.0.1",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
"@heroicons/react": "^2.2.0",
|
"@heroicons/react": "^2.2.0",
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
|
"altcha": "^2.2.4",
|
||||||
"astro": "^5.10.1",
|
"astro": "^5.10.1",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
|
"remark-reference-links": "^7.0.0",
|
||||||
"starlight-openapi": "^0.19.1",
|
"starlight-openapi": "^0.19.1",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.11",
|
||||||
"vanilla-cookieconsent": "^3.1.0"
|
"vanilla-cookieconsent": "^3.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.0.6"
|
"@biomejs/biome": "^2.3.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
BIN
public/assets/hook-examples-senarios-1.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
public/assets/hook-examples-senarios-2.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
public/assets/hook-examples-senarios-3.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
public/assets/hook-examples-senarios-4.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
public/assets/hook-examples-senarios-5.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
@@ -2,9 +2,10 @@
|
|||||||
import 'vanilla-cookieconsent/dist/cookieconsent.css'
|
import 'vanilla-cookieconsent/dist/cookieconsent.css'
|
||||||
---
|
---
|
||||||
<script>
|
<script>
|
||||||
import { run } from 'vanilla-cookieconsent';
|
import { run } from 'vanilla-cookieconsent'
|
||||||
import { config } from '../CookieConsentConfig';
|
import { config } from '../CookieConsentConfig'
|
||||||
run(config);
|
|
||||||
|
|
||||||
document.body.classList.add('cc--darkmode');
|
run(config)
|
||||||
|
|
||||||
|
document.body.classList.add('cc--darkmode')
|
||||||
</script>
|
</script>
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
---
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
document.documentElement.dataset.theme = 'light';
|
document.documentElement.dataset.theme = 'light'
|
||||||
</script>
|
</script>
|
||||||
<style is:global>
|
<style is:global>
|
||||||
.social-icons::after {
|
.social-icons::after {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
XMarkIcon,
|
XMarkIcon,
|
||||||
} from '@heroicons/react/20/solid'
|
} from '@heroicons/react/20/solid'
|
||||||
---
|
---
|
||||||
|
|
||||||
<starlight-menu-button class="print:hidden">
|
<starlight-menu-button class="print:hidden">
|
||||||
<button
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
@@ -20,38 +19,38 @@ import {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
class StarlightMenuButton extends HTMLElement {
|
class StarlightMenuButton extends HTMLElement {
|
||||||
btn = this.querySelector('button')!;
|
btn = this.querySelector('button') as HTMLButtonElement
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super()
|
||||||
// Toggle `aria-expanded` state when a user clicks the button.
|
// Toggle `aria-expanded` state when a user clicks the button.
|
||||||
this.btn.addEventListener('click', () => this.toggleExpanded());
|
this.btn.addEventListener('click', () => this.toggleExpanded())
|
||||||
|
|
||||||
// Close the menu when a user presses the escape key.
|
// Close the menu when a user presses the escape key.
|
||||||
const parentNav = this.closest('nav');
|
const parentNav = this.closest('nav')
|
||||||
if (parentNav) {
|
if (parentNav) {
|
||||||
parentNav.addEventListener('keyup', (e) => this.closeOnEscape(e));
|
parentNav.addEventListener('keyup', (e) => this.closeOnEscape(e))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setExpanded(expanded: boolean) {
|
setExpanded(expanded: boolean) {
|
||||||
this.setAttribute('aria-expanded', String(expanded));
|
this.setAttribute('aria-expanded', String(expanded))
|
||||||
document.body.toggleAttribute('data-mobile-menu-expanded', expanded);
|
document.body.toggleAttribute('data-mobile-menu-expanded', expanded)
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleExpanded() {
|
toggleExpanded() {
|
||||||
this.setExpanded(this.getAttribute('aria-expanded') !== 'true');
|
this.setExpanded(this.getAttribute('aria-expanded') !== 'true')
|
||||||
}
|
}
|
||||||
|
|
||||||
closeOnEscape(e: KeyboardEvent) {
|
closeOnEscape(e: KeyboardEvent) {
|
||||||
if (e.code === 'Escape') {
|
if (e.code === 'Escape') {
|
||||||
this.setExpanded(false);
|
this.setExpanded(false)
|
||||||
this.btn.focus();
|
this.btn.focus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define('starlight-menu-button', StarlightMenuButton);
|
customElements.define('starlight-menu-button', StarlightMenuButton)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
import TableOfContents from '@astrojs/starlight/components/TableOfContents.astro'
|
import TableOfContents from '@astrojs/starlight/components/TableOfContents.astro'
|
||||||
---
|
---
|
||||||
|
|
||||||
{
|
{
|
||||||
Astro.locals.starlightRoute.toc && (
|
Astro.locals.starlightRoute.toc && (
|
||||||
<>
|
<>
|
||||||
@@ -44,9 +43,14 @@ import TableOfContents from '@astrojs/starlight/components/TableOfContents.astro
|
|||||||
max-width: calc(
|
max-width: calc(
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 *
|
100vw -
|
||||||
|
var(--sl-sidebar-width) -
|
||||||
|
2 *
|
||||||
|
var(--sl-content-pad-x) -
|
||||||
|
2 *
|
||||||
var(--sl-sidebar-pad-x)
|
var(--sl-sidebar-pad-x)
|
||||||
) * 0.25 /* MAGIC NUMBER 🥲 */
|
) *
|
||||||
|
0.25 /* MAGIC NUMBER 🥲 */
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
import Search from '@astrojs/starlight/components/Search.astro'
|
||||||
import SidebarPersister from '@astrojs/starlight/components/SidebarPersister.astro'
|
import SidebarPersister from '@astrojs/starlight/components/SidebarPersister.astro'
|
||||||
import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'
|
import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'
|
||||||
import Search from '@astrojs/starlight/components/Search.astro'
|
|
||||||
|
|
||||||
const { sidebar } = Astro.locals.starlightRoute
|
const _sidebar = Astro.locals.starlightRoute.sidebar
|
||||||
---
|
---
|
||||||
|
|
||||||
<SidebarPersister>
|
<SidebarPersister>
|
||||||
<Search class="hidden md:block"/>
|
<Search class="hidden md:block"/>
|
||||||
<SidebarSublist sublist={sidebar} />
|
<SidebarSublist sublist={_sidebar}/>
|
||||||
</SidebarPersister>
|
</SidebarPersister>
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||||
<div class="col-span-3"><slot /></div>
|
<div class="col-span-3">
|
||||||
|
<slot/>
|
||||||
|
</div>
|
||||||
{
|
{
|
||||||
Astro.locals.starlightRoute.toc && (
|
Astro.locals.starlightRoute.toc && (
|
||||||
<aside class="right-sidebar-container col-span-1 print:hidden">
|
<aside class="right-sidebar-container col-span-1 print:hidden">
|
||||||
@@ -18,7 +20,9 @@
|
|||||||
order: 2;
|
order: 2;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: calc(
|
width: calc(
|
||||||
var(--sl-sidebar-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2
|
var(--sl-sidebar-width) +
|
||||||
|
(100% - var(--sl-content-width) - var(--sl-sidebar-width)) /
|
||||||
|
2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +44,9 @@
|
|||||||
|
|
||||||
order: 1;
|
order: 1;
|
||||||
width: calc(
|
width: calc(
|
||||||
var(--sl-content-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2
|
var(--sl-content-width) +
|
||||||
|
(100% - var(--sl-content-width) - var(--sl-sidebar-width)) /
|
||||||
|
2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
---
|
---
|
||||||
const { class: className, ...rest } = Astro.props
|
const { class: _className } = Astro.props
|
||||||
|
|
||||||
import { Image } from 'astro:assets'
|
import { Image } from 'astro:assets'
|
||||||
---
|
---
|
||||||
<a href={Astro.props.href} target="_blank" class:list={["flex hover:border-xahau-green hover:bg-gray-50 !text-black !no-underline items-center justify-center p-4 text-center bg-white font-bold border-black border-2",className]}>
|
<a
|
||||||
|
href={Astro.props.href}
|
||||||
|
target="_blank"
|
||||||
|
class:list={["flex hover:border-xahau-green hover:bg-gray-50 !text-black !no-underline items-center justify-center p-4 text-center bg-white font-bold border-black border-2",_className]}
|
||||||
|
>
|
||||||
{Astro.props.imageSrc ? <Image src={Astro.props.imageSrc} alt={Astro.props.title} class="w-auto h-auto max-h-2/5" /> : Astro.props.title}
|
{Astro.props.imageSrc ? <Image src={Astro.props.imageSrc} alt={Astro.props.title} class="w-auto h-auto max-h-2/5" /> : Astro.props.title}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -2,37 +2,58 @@
|
|||||||
import { Image } from 'astro:assets'
|
import { Image } from 'astro:assets'
|
||||||
import logo from '../assets/xahau-logo.svg'
|
import logo from '../assets/xahau-logo.svg'
|
||||||
---
|
---
|
||||||
|
<footer
|
||||||
<footer class="bg-white text-base font-regular text-black **:text-black **:no-underline">
|
class="bg-white text-base font-regular text-black **:text-black **:no-underline"
|
||||||
<div class="flex-none container mx-auto py-12 max-w-7xl p-6 grid grid-cols-1 md:grid-cols-10 gap-4">
|
>
|
||||||
|
<div
|
||||||
|
class="flex-none container mx-auto py-12 max-w-7xl p-6 grid grid-cols-1 md:grid-cols-10 gap-4"
|
||||||
|
>
|
||||||
<div class="col-span-1 md:col-span-3 flex flex-col gap-3">
|
<div class="col-span-1 md:col-span-3 flex flex-col gap-3">
|
||||||
<a href="/"><Image src={logo} class="w-1/2" alt="Xahau" /><a>
|
<a href="/">
|
||||||
<p>This website is open source and open for contributions <a href="https://github.com/Xahau/xahau-web" target="_blank">on GitHub</a></p>
|
<Image src={logo} class="w-1/2" alt="Xahau"/>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
This website is open source and open for contributions
|
||||||
|
<a href="https://github.com/Xahau/xahau-web" target="_blank"
|
||||||
|
>on GitHub</a
|
||||||
|
>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-1 md:col-span-2 md:col-start-5 flex flex-col gap-3">
|
<div class="col-span-1 md:col-span-2 md:col-start-5 flex flex-col gap-3">
|
||||||
<p><strong>Xahau</strong></p>
|
<p>
|
||||||
|
<strong>Xahau</strong>
|
||||||
|
</p>
|
||||||
<a href="/about">About</a>
|
<a href="/about">About</a>
|
||||||
<a href="/features">Features</a>
|
<a href="/features">Features</a>
|
||||||
<a href="/ecosystem">Ecosystem</a>
|
<a href="/ecosystem">Ecosystem</a>
|
||||||
<a href="/roadmap">Roadmap</a>
|
<a href="/roadmap">Roadmap</a>
|
||||||
<a href="/docs/compliance/responsible-disclosure">Break Xahau</a>
|
<a href="/docs/compliance/responsible-disclosure">Break Xahau</a>
|
||||||
|
<a href="/fraud-report">Report Fraud</a>
|
||||||
<a href="/docs/resources/media-kit">Media kit</a>
|
<a href="/docs/resources/media-kit">Media kit</a>
|
||||||
<a href="/privacy-policy">Privacy Policy</a>
|
<a href="/privacy-policy">Privacy Policy</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-1 md:col-span-2 flex flex-col gap-3">
|
<div class="col-span-1 md:col-span-2 flex flex-col gap-3">
|
||||||
<p><strong>Documentation</strong></p>
|
<p>
|
||||||
|
<strong>Documentation</strong>
|
||||||
|
</p>
|
||||||
<a href="/docs">Get started</a>
|
<a href="/docs">Get started</a>
|
||||||
<a href="/docs/protocol-reference/transactions">Protocol Reference</a>
|
<a href="/docs/protocol-reference/transactions">Protocol Reference</a>
|
||||||
<a href="/docs/hooks">Hooks</a>
|
<a href="/docs/hooks">Hooks</a>
|
||||||
<a href="/docs/data-apis">Data APIs</a>
|
<a href="/docs/data-apis">Data APIs</a>
|
||||||
<a href="/docs/infrastructure/node-requirements">Infrastructure</a>
|
<a href="/docs/infrastructure/system-requirements">Infrastructure</a>
|
||||||
<a href="/docs/resources/whitepaper">Whitepaper</a>
|
<a href="/docs/resources/whitepaper">Whitepaper</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-1 md:col-span-2 flex flex-col gap-3">
|
<div class="col-span-1 md:col-span-2 flex flex-col gap-3">
|
||||||
<p><strong>Connect</strong></p>
|
<p>
|
||||||
|
<strong>Connect</strong>
|
||||||
|
</p>
|
||||||
|
<a href="/connect">Events</a>
|
||||||
|
<a href="/contest">Dev Contest</a>
|
||||||
<a href="https://x.com/XahauNetwork" target="_blank">X</a>
|
<a href="https://x.com/XahauNetwork" target="_blank">X</a>
|
||||||
<a href="https://github.com/Xahau" target="_blank">GitHub</a>
|
<a href="https://github.com/Xahau" target="_blank">GitHub</a>
|
||||||
<a href="https://discord.com/invite/UzU58haAn4" target="_blank">Community Discord</a>
|
<a href="https://discord.com/invite/UzU58haAn4" target="_blank">
|
||||||
|
Community Discord
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -19,6 +19,8 @@ import {
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
||||||
const socials = [
|
const socials = [
|
||||||
|
{ name: 'Events', href: '/connect' },
|
||||||
|
{ name: 'Dev Contest', href: '/contest' },
|
||||||
{ name: 'X', href: 'https://x.com/XahauNetwork' },
|
{ name: 'X', href: 'https://x.com/XahauNetwork' },
|
||||||
{ name: 'GitHub', href: 'https://github.com/Xahau' },
|
{ name: 'GitHub', href: 'https://github.com/Xahau' },
|
||||||
{ name: 'Community Discord', href: 'https://discord.com/invite/UzU58haAn4' },
|
{ name: 'Community Discord', href: 'https://discord.com/invite/UzU58haAn4' },
|
||||||
@@ -29,7 +31,7 @@ const docs = [
|
|||||||
{ name: 'Protocol Reference', href: '/docs/protocol-reference/transactions' },
|
{ name: 'Protocol Reference', href: '/docs/protocol-reference/transactions' },
|
||||||
{ name: 'Hooks', href: '/docs/hooks' },
|
{ name: 'Hooks', href: '/docs/hooks' },
|
||||||
{ name: 'Data APIs', href: '/docs/data-apis' },
|
{ name: 'Data APIs', href: '/docs/data-apis' },
|
||||||
{ name: 'Infrastructure', href: '/docs/infrastructure/node-requirements' },
|
{ name: 'Infrastructure', href: '/docs/infrastructure/system-requirements' },
|
||||||
{ name: 'Whitepaper', href: '/docs/resources/whitepaper' },
|
{ name: 'Whitepaper', href: '/docs/resources/whitepaper' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
const { class: className, ...rest } = Astro.props
|
const { class: _className } = Astro.props
|
||||||
|
|
||||||
import { Image } from 'astro:assets'
|
import { Image } from 'astro:assets'
|
||||||
import gem1 from '../assets/gems/1.png'
|
import gem1 from '../assets/gems/1.png'
|
||||||
@@ -40,22 +40,20 @@ const gemMap = {
|
|||||||
'17': gem17,
|
'17': gem17,
|
||||||
}
|
}
|
||||||
|
|
||||||
const gem = gemMap[Astro.props.gem as keyof typeof gemMap] || gem1
|
const _gem = gemMap[Astro.props.gem as keyof typeof gemMap] || gem1
|
||||||
|
|
||||||
var gemSize = 'size-80'
|
var _gemSize = 'size-80'
|
||||||
if (Astro.props.gemSize && Astro.props.gemSize === 'large') {
|
if (Astro.props.gemSize && Astro.props.gemSize === 'large') {
|
||||||
gemSize = 'size-120 -top-40'
|
_gemSize = 'size-120 -top-40'
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
<div class:list={["flex",_className]}>
|
||||||
<div class:list={["flex",className]}>
|
|
||||||
<div class="flex-none container mx-auto py-12 text-left max-w-7xl p-6">
|
<div class="flex-none container mx-auto py-12 text-left max-w-7xl p-6">
|
||||||
|
|
||||||
{Astro.props.align ? (
|
{Astro.props.align ? (
|
||||||
<div class="grid grid-cols-1 md:grid-cols-5" >
|
<div class="grid grid-cols-1 md:grid-cols-5" >
|
||||||
{Astro.props.align === "right" && Astro.props.gem && (
|
{Astro.props.align === "right" && Astro.props.gem && (
|
||||||
<div class="relative overflow-visible invisible md:visible">
|
<div class="relative overflow-visible invisible md:visible">
|
||||||
<Image loading={Astro.props.loading} src={gem} alt="Gem" class={`overflow-visible ${gemSize} absolute inset-0 m-auto -left-60 object-cover`} />
|
<Image loading={Astro.props.loading} src={_gem} alt="Gem" class={`overflow-visible ${_gemSize} absolute inset-0 m-auto -left-60 object-cover`} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div class={
|
<div class={
|
||||||
@@ -69,7 +67,7 @@ if (Astro.props.gemSize && Astro.props.gemSize === 'large') {
|
|||||||
</div>
|
</div>
|
||||||
{Astro.props.align === "left" && Astro.props.gem && (
|
{Astro.props.align === "left" && Astro.props.gem && (
|
||||||
<div class="relative overflow-visible invisible md:visible">
|
<div class="relative overflow-visible invisible md:visible">
|
||||||
<Image loading={Astro.props.loading} src={gem} alt="Gem" class={`overflow-visible ${gemSize} absolute inset-0 m-auto -right-150 object-cover`} />
|
<Image loading={Astro.props.loading} src={_gem} alt="Gem" class={`overflow-visible ${_gemSize} absolute inset-0 m-auto -right-150 object-cover`} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,3 +54,131 @@ You can unblock amendment blocked servers by upgrading to the newest version of
|
|||||||
When amendments are enabled, the source code for pre-amendment behaviors remain in `xahaud`. While there are use-cases for keeping old code, such as reconstructing ledger outcomes for verification, tracking amendments and legacy code adds complexity over time.
|
When amendments are enabled, the source code for pre-amendment behaviors remain in `xahaud`. While there are use-cases for keeping old code, such as reconstructing ledger outcomes for verification, tracking amendments and legacy code adds complexity over time.
|
||||||
|
|
||||||
The [XRP Ledger Standard 11d](https://github.com/XRPLF/XRPL-Standards/discussions/19) defines a process for retiring old amendments and associated pre-amendment code. After an amendment has been enabled on the Mainnet for two years, it can be retired. Retiring an amendment makes it part of the core protocol unconditionally; it's no longer tracked or treated as an amendment, and all pre-amendment code is removed.
|
The [XRP Ledger Standard 11d](https://github.com/XRPLF/XRPL-Standards/discussions/19) defines a process for retiring old amendments and associated pre-amendment code. After an amendment has been enabled on the Mainnet for two years, it can be retired. Retiring an amendment makes it part of the core protocol unconditionally; it's no longer tracked or treated as an amendment, and all pre-amendment code is removed.
|
||||||
|
|
||||||
|
### Known Amendments
|
||||||
|
|
||||||
|
The following amendments have been implemented or are in the process of being enabled on Xahau:
|
||||||
|
|
||||||
|
#### Feature Amendments
|
||||||
|
|
||||||
|
##### XahauGenesis
|
||||||
|
|
||||||
|
Enables the genesis account to mint XAH and distribute it via [GenesisMint transactions](/docs/protocol-reference/transactions/transaction-types/genesismint-emitted-txn).
|
||||||
|
|
||||||
|
##### MultiSign
|
||||||
|
|
||||||
|
Enables multi-signature functionality, allowing accounts to require multiple signatures for transactions. This amendment introduces [SignerListSet transactions](/docs/protocol-reference/transactions/transaction-types/signerlistset) and [SignerList ledger objects](/docs/protocol-reference/ledger-data/ledger-objects-types/signers-list) to support multi-signing.
|
||||||
|
|
||||||
|
##### DepositAuth
|
||||||
|
|
||||||
|
Enables deposit authorization functionality, allowing accounts to require preauthorization before receiving payments. This amendment introduces [DepositPreauth transactions](/docs/protocol-reference/transactions/transaction-types/depositpreauth) and [DepositPreauth ledger objects](/docs/protocol-reference/ledger-data/ledger-objects-types/deposit-pre-auth) to manage preauthorizations.
|
||||||
|
|
||||||
|
##### Hooks
|
||||||
|
|
||||||
|
Core amendment enabling Hook smart contract functionality on Xahau. _(Added by the [Hooks amendment][].)_
|
||||||
|
|
||||||
|
##### HooksUpdate1
|
||||||
|
|
||||||
|
Updates and improvements to the Hooks system.
|
||||||
|
|
||||||
|
##### Remit
|
||||||
|
|
||||||
|
Implements [XLS-55](https://github.com/XRPLF/XRPL-Standards/discussions/156). A new simple but powerful what-you-see-is-what-you-get push payment transaction type. Enables [Remit transactions](/docs/protocol-reference/transactions/transaction-types/remit) that allow paying multiple currencies and URITokens in the same transaction to the same destination. The transaction automatically pays to create missing trustlines, automatically pays the reserves on transferred tokens, and automatically pays to create the destination account if it doesn't exist. You can mint a receipt or bonus URIToken in-line within the transaction. Optionally inform a third party Hook about the transaction. No partial payments and no pathing.
|
||||||
|
|
||||||
|
##### ZeroB2M
|
||||||
|
|
||||||
|
Disables the burn-to-mint path for XRP to XAH. Normal behaviour of the Import transaction remains, but burned XRP is not credited. B2M is still available for key synchronisation or to activate an account, but cannot be used to mint new assets.
|
||||||
|
|
||||||
|
##### Remarks
|
||||||
|
|
||||||
|
The Remarks amendment allows key-value pairs (similar to hook state) to be stored by object owners on those objects. This is akin to flipping over a document and hand-writing a note on it. Remarks can be anything and mean different things to different parties. Remarks can also be set to immutable. Remarks follow an object through changes of ownership and can be used to achieve novel use cases like dynamic NFTs and simplify some otherwise very complicated hook state operations. Enables [SetRemarks transactions](/docs/protocol-reference/transactions/transaction-types/setremarks).
|
||||||
|
|
||||||
|
##### Touch
|
||||||
|
|
||||||
|
This amendment ensures all accounts involved in a transaction (all transactional stakeholders) are forced to appear in its metadata by incrementing a "touch counter" even if nothing else on the account was changed. This is named for the unix file utility touch. This provides better audit consistency and ease of programming automated tools.
|
||||||
|
|
||||||
|
##### HookCanEmit
|
||||||
|
|
||||||
|
This amendment adds a new field to HookSet objects: `HookCanEmit` is syntactically identical to the `HookOn` field, except that it controls which transaction types the Hook is allowed to emit rather than which transaction types trigger the hook. Note that it uses the same active-low semantics as `HookOn` with `SetHook` being active high. However if the field is absent it's taken to be that the Hook may emit any transaction including `SetHook`. Adds the `HookCanEmit` field to [HookDefinition](/docs/protocol-reference/ledger-data/ledger-objects-types/hook-definition) objects.
|
||||||
|
|
||||||
|
##### Clawback
|
||||||
|
|
||||||
|
Enables [Clawback transactions](/docs/protocol-reference/transactions/transaction-types/clawback) that allow issuers to revoke tokens that were previously issued by their account. This is a ported feature from the XRPL. _(Introduced in 2025.7.9-release+1951)_
|
||||||
|
|
||||||
|
##### DeepFreeze
|
||||||
|
|
||||||
|
Enables deep freeze functionality for trustlines and assets. This is a ported feature from the XRPL. _(Introduced in 2025.7.9-release+1951)_
|
||||||
|
|
||||||
|
##### IOUIssuerWeakTSH
|
||||||
|
|
||||||
|
Makes IOU issuers weak transactional stakeholders (TSH) in certain transaction types. Ensures that Currency Issuers have their hooks executed in third party transactions that touch or mention their currency, if they have opted into weak execution. See [Weak and Strong](/docs/hooks/concepts/weak-and-strong) for details. _(Introduced in 2025.7.9-release+1951)_
|
||||||
|
|
||||||
|
##### Cron
|
||||||
|
|
||||||
|
Enables scheduled Hook execution via [CronSet transactions](/docs/protocol-reference/transactions/transaction-types/cronset) and [Cron ledger objects](/docs/protocol-reference/ledger-data/ledger-objects-types/cron). This feature allows Hooks to schedule a series of future self-invocations (akin to a cronjob in Linux systems) which can assist Hook developers in writing complex governance structures, games and more. The maximum number of repeats is 256, however issuing a further `CronSet` transaction can extend this once the number of repeats crosses a desired minimum threshold. _(Introduced in 2025.10.27-release+2405)_
|
||||||
|
|
||||||
|
##### ExtendedHookState
|
||||||
|
|
||||||
|
Extends Hook state management capabilities, including the `HookStateScale` field for [AccountRoot](/docs/protocol-reference/ledger-data/ledger-objects-types/accountroot) objects to control when Hook state entries become stale. This feature expands the amount of data Hooks can store in their Hook State (key-value system for Hooks) to allow Hooks richer data storage when they need it. The scale (up to 16) affects both the maximum size of the value you may store in a single hook state, along with the number of reserve units that k-v pair consumes. A scale of 1 (default) means you pay 1 reserve for up-to 256 bytes stored per Hook State. A scale of 4 means you pay 4 reserve units for up-to 1024 bytes per Hook State. It's important to note that you pay this rate (the scale rate) even if all of your Hook States contain only a single byte. It is possible to increase the scale after your Hook already has stored state, but not to decrease it. Decreasing the scale requires all HookState to be first deleted. _(Introduced in 2025.10.27-release+2405)_
|
||||||
|
|
||||||
|
#### Bug Fix Amendments
|
||||||
|
|
||||||
|
##### fixXahauV1
|
||||||
|
|
||||||
|
Enforces a namespaces per account limit of 256. Various bug fixes with URIToken logic. Ensures that default (0) STAmounts are recorded in metadata. Ensures that OfferID can be used instead of OfferSequence when cancelling an offer. Fixes a bug where certain hooks cannot be deleted. Fixes a bug where the quorum required for a `ttIMPORT` is accidentally too high. Allows accounts to appear more than once in a GenesisMint transaction. Changes the Issuer of a URIToken from strong to weak TSH when a URIToken is being burned. Ensures TSHes on escrows created by emitted transactions are correctly triggered. Adds hook parameters size fee to all txns (1 drop per byte). _(Introduced in 2024.9.11-release+985)_
|
||||||
|
|
||||||
|
##### fixXahauV2
|
||||||
|
|
||||||
|
Cleans up TSH logic and removes old redundant table. Adds informational flags to each member of `sfHookExecutions`, describing weak, strong etc. execution. Adds `sfEmitNonce` to each member of `sfHookEmissions`, so as to better disambiguate emitted txns. Additional sanity checks on emitted txns to ensure they are placed into the correct ledger.
|
||||||
|
|
||||||
|
##### fixXahauV3
|
||||||
|
|
||||||
|
Further fixes for Xahau protocol implementation issues. This amendment ensures consistency and sensible outcomes for various edge cases. This amendment is set to default: _yes_ voting. If validators wish to vote against this amendment they must manually change their vote to no. _(Introduced in 2025.2.6-release+1299)_
|
||||||
|
|
||||||
|
##### fixNSDelete
|
||||||
|
|
||||||
|
Fixes the behaviour of Hook State namespace deletion to ensure ledger consistency. Introduces a new tes code: `tesPARTIAL`. `tesPARTIAL` is returned if the transaction was successful but should be resubmitted by the user under a new sequence number to complete amortized work until `tesSUCCESS` is returned.
|
||||||
|
|
||||||
|
##### fix240819
|
||||||
|
|
||||||
|
Bug fix amendment from August 19, 2024.
|
||||||
|
|
||||||
|
##### fixPageCap
|
||||||
|
|
||||||
|
Fixes issues related to page capacity limits.
|
||||||
|
|
||||||
|
##### fix240911
|
||||||
|
|
||||||
|
Bug fix amendment from September 11, 2024.
|
||||||
|
|
||||||
|
##### fixFloatDivide
|
||||||
|
|
||||||
|
Fixes issues with floating point division operations in Hooks. This amendment ensures proper handling of division by zero and edge cases in the `float_divide` function. Changes the behaviour of the `float_divide` hook API to correct a small error. This amendment is set to default: _yes_ voting. See [float_divide](/docs/hooks/functions/float/float_divide) for details. _(Introduced in 2024.11.18-release+1141)_
|
||||||
|
|
||||||
|
##### fixReduceImport
|
||||||
|
|
||||||
|
Fixes issues related to Import transaction processing. This amendment ensures consistency and sensible outcomes for various edge cases. This amendment is set to default: _yes_ voting. If validators wish to vote against this amendment they must manually change their vote to no. _(Introduced in 2025.2.6-release+1299)_
|
||||||
|
|
||||||
|
##### fix20250131
|
||||||
|
|
||||||
|
Bug fix amendment from January 31, 2025. This amendment ensures consistency and sensible outcomes for various edge cases. This amendment is set to default: _yes_ voting. If validators wish to vote against this amendment they must manually change their vote to no. _(Introduced in 2025.2.6-release+1299)_
|
||||||
|
|
||||||
|
##### fixRewardClaimFlags
|
||||||
|
|
||||||
|
Fixes issues with reward claim transaction flags.
|
||||||
|
|
||||||
|
##### fixProvisionalDoubleThreading
|
||||||
|
|
||||||
|
Fixes issues with provisional double threading in transaction processing. Ensures the correct PreviousTxnID and transaction metadata are maintained in double threading scenarios. _(Introduced in 2025.7.9-release+1951)_
|
||||||
|
|
||||||
|
##### fixInvalidTxFlags
|
||||||
|
|
||||||
|
Fixes a bug that currently allows invalid flags to be provided to some transactions. While these invalid flags currently do nothing, they should actually produce a malformed error. After this fix is applied, invalid flags will produce a malformed error as expected. _(Introduced in 2025.10.27-release+2405)_
|
||||||
|
|
||||||
|
##### fixCronStacking
|
||||||
|
|
||||||
|
Fixes issues with Cron transaction stacking behavior.
|
||||||
|
|
||||||
|
### Amendment Status
|
||||||
|
|
||||||
|
For the most current status of amendments (enabled, voting, or vetoed), check the [xahaud repository](https://github.com/Xahau/xahaud) or query a running `xahaud` server using the `feature` command.
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ To opt-out of Balance Adjustments, omit the Issuer field and set Flags to 1. Doi
|
|||||||
"Account": "<rAddr...>",
|
"Account": "<rAddr...>",
|
||||||
"TransactionType": "ClaimReward",
|
"TransactionType": "ClaimReward",
|
||||||
"NetworkID": 21337,
|
"NetworkID": 21337,
|
||||||
"Flags" 1
|
"Flags": 1
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ All interactions with this amendment are via the ClaimReward transaction:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Account": "<rAddr...>",
|
"Account": "<rAddr...>",
|
||||||
"TransactionType": "ClaimReward",
|
"TransactionType": "ClaimReward",
|
||||||
"Issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
"Issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||||
"NetworkID": 21337
|
"NetworkID": 21337
|
||||||
|
|||||||
@@ -9,4 +9,21 @@ Added: [https://github.com/Xahau/xahaud/pull/201](https://github.com/Xahau/xahau
|
|||||||
|
|
||||||
## Server Definitions
|
## Server Definitions
|
||||||
|
|
||||||
Server definitions can eas
|
Server definitions can easily be fetched from public nodes. These definitions include binary codec information and other network-specific data needed for transaction serialization and deserialization.
|
||||||
|
|
||||||
|
### Mainnet
|
||||||
|
- [`https://xahau.network/server_definitions.json`](https://xahau.network/server_definitions.json)
|
||||||
|
|
||||||
|
### Testnet
|
||||||
|
- [`https://xahau-test.net/server_definitions.json`](https://xahau-test.net/server_definitions.json)
|
||||||
|
|
||||||
|
### JSHooks-Testnet
|
||||||
|
- [`https://jshooks.xahau-test.net/server_definitions.json`](https://jshooks.xahau-test.net/server_definitions.json)
|
||||||
|
|
||||||
|
These server definitions are essential for:
|
||||||
|
- Binary codec operations
|
||||||
|
- Transaction serialization
|
||||||
|
- Field type definitions
|
||||||
|
- Network-specific constants
|
||||||
|
|
||||||
|
You can use these definitions in your applications to properly encode and decode transactions for the Xahau network.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ The Xahau Faucet & Explorers can be found here:
|
|||||||
JSON body with `destination` property: fund the mentioned `destination` account.
|
JSON body with `destination` property: fund the mentioned `destination` account.
|
||||||
* **Explorers:**
|
* **Explorers:**
|
||||||
* **Xahauexplorer:** [**https://test.xahauexplorer.com**](https://test.xahauexplorer.com)
|
* **Xahauexplorer:** [**https://test.xahauexplorer.com**](https://test.xahauexplorer.com)
|
||||||
* **XRPLF:** [**https://explorer.xahau-test.net**](https://explorer.xahau-test.net)
|
* **InFTF:** [**https://explorer.xahau-test.net**](https://explorer.xahau-test.net)
|
||||||
* **XRPL.org:** [**https://xahau-testnet.xrpl.org**](https://xahau-testnet.xrpl.org)
|
* **XRPL.org:** [**https://xahau-testnet.xrpl.org**](https://xahau-testnet.xrpl.org)
|
||||||
* **XRPLWin:** [**https://xahau-testnet.xrplwin.com**](https://xahau-testnet.xrplwin.com/)
|
* **XRPLWin:** [**https://xahau-testnet.xrplwin.com**](https://xahau-testnet.xrplwin.com/)
|
||||||
|
|
||||||
@@ -22,6 +22,6 @@ The Xahau Faucet & Explorers can be found here:
|
|||||||
* **Explorers:**
|
* **Explorers:**
|
||||||
* **Xahauexplorer:** [**https://xahauexplorer.com**](https://xahauexplorer.com/)
|
* **Xahauexplorer:** [**https://xahauexplorer.com**](https://xahauexplorer.com/)
|
||||||
* **Xahscan:** [**https://xahscan.com/**](https://xahscan.com/)
|
* **Xahscan:** [**https://xahscan.com/**](https://xahscan.com/)
|
||||||
* **XRPLF:** [**https://explorer.xahau.network**](https://explorer.xahau.network/)
|
* **InFTF:** [**https://explorer.xahau.network**](https://explorer.xahau.network/)
|
||||||
* **XRPL.org:** [**https://xahau.xrpl.org**](https://xahau.xrpl.org)
|
* **XRPL.org:** [**https://xahau.xrpl.org**](https://xahau.xrpl.org)
|
||||||
* **XRPLWin:** [**https://xahau.xrplwin.com**](https://xahau.xrplwin.com/)
|
* **XRPLWin:** [**https://xahau.xrplwin.com**](https://xahau.xrplwin.com/)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Account Managment
|
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.
|
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.
|
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
|
#### 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.
|
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
|
#### 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.
|
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
|
#### 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.
|
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.
|
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.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ description: >-
|
|||||||
---
|
---
|
||||||
import { Aside } from '@astrojs/starlight/components';
|
import { Aside } from '@astrojs/starlight/components';
|
||||||
|
|
||||||
While libraries may deal with fee determination for you (see [.](./ "mention")), when building your own integrations with the Xahauy ledger, you may have to implement dynamic fee determination based on the transaction, source & destination account.
|
While libraries may deal with fee determination for you, when building your own integrations with the Xahau Network, you may have to implement dynamic fee determination based on the transaction, source & destination account.
|
||||||
|
|
||||||
As the sender of a transaction will have to pay for the fees required for the invoked Hooks for the specific transaction type, where Hooks can live both on the source & destination account, you can send a TX Blob (signed with a dummy account) to the `fee` command, after which Xahau will return the specific fees required for the specific transaction.
|
As the sender of a transaction will have to pay for the fees required for the invoked Hooks for the specific transaction type, where Hooks can live both on the source & destination account, you can send a TX Blob (signed with a dummy account) to the `fee` command, after which Xahau will return the specific fees required for the specific transaction.
|
||||||
|
|
||||||
|
|||||||
@@ -18,30 +18,30 @@ This was counter to the Hook Design Philosophy, so Hook Chaining was introduced.
|
|||||||
|
|
||||||
A Hook Chain is a sequence of up to **10** Hooks installed on an Xahau account.
|
A Hook Chain is a sequence of up to **10** Hooks installed on an Xahau account.
|
||||||
|
|
||||||
* A Hook Chain executes successfully when every Hook in the chain has been individually executed and subsequently calls [accept](../technical/hooks-functions/control/accept.md).
|
* A Hook Chain executes successfully when every Hook in the chain has been individually executed and subsequently calls [accept](/docs/hooks/functions/control/accept).
|
||||||
* Each chain's execution starts at chain position 0 and ends at chain position 9. If a position is blank (because it was never filled or because the hook that was installed there has been removed) then that position is skipped and treated as successful.
|
* Each chain's execution starts at chain position 0 and ends at chain position 9. If a position is blank (because it was never filled or because the hook that was installed there has been removed) then that position is skipped and treated as successful.
|
||||||
* In order for a transaction to succeed, both ends of the transaction (sending side and receiving side) must have executed successfully. This means if there is a Hook Chain installed on both sides, then both Hook Chains must execute successfully for the transaction to succeed.
|
* In order for a transaction to succeed, both ends of the transaction (sending side and receiving side) must have executed successfully. This means if there is a Hook Chain installed on both sides, then both Hook Chains must execute successfully for the transaction to succeed.
|
||||||
|
|
||||||
Hooks are installed into the chain using the [SetHook Transaction](sethook-transaction.md). When they are installed, the installer may specify install-time [Parameters](parameters.md) which may change the behaviour of the installed Hook.
|
Hooks are installed into the chain using the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction). When they are installed, the installer may specify install-time [Parameters](/docs/hooks/concepts/parameters) which may change the behaviour of the installed Hook.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||

|

|
||||||
<figcaption>*Example: Execution flow for a transaction passing through two Hook Chains*</figcaption>
|
<figcaption>*Example: Execution flow for a transaction passing through two Hook Chains*</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
### Chain Manipulation
|
### Chain Manipulation
|
||||||
|
|
||||||
In addition to the _install-time_ operations specified in the [SetHook Transaction](sethook-transaction.md), Hooks have some runtime control over chain execution:
|
In addition to the _install-time_ operations specified in the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction), Hooks have some runtime control over chain execution:
|
||||||
|
|
||||||
* A Hook may determine its own `HookHash` by calling [hook_hash](../technical/hooks-functions/hook-context/hook_hash.md).
|
* A Hook may determine its own `HookHash` by calling [hook_hash](/docs/hooks/functions/hook-context/hook_hash).
|
||||||
* A Hook may determine its location in the Hook Chain using [hook_pos](../technical/hooks-functions/hook-context/hook_pos.md).
|
* A Hook may determine its location in the Hook Chain using [hook_pos](/docs/hooks/functions/hook-context/hook_pos).
|
||||||
* A Hook may skip (or re-enable) another Hook further down the chain using [hook_skip](../technical/hooks-functions/hook-context/hook_skip.md).
|
* A Hook may skip (or re-enable) another Hook further down the chain using [hook_skip](/docs/hooks/functions/hook-context/hook_skip).
|
||||||
* A Hook may modify the [Parameters](parameters.md) of a Hook further down the chain using [hook_param_set](../technical/hooks-functions/hook-context/hook_param_set.md).
|
* A Hook may modify the [Parameters](/docs/hooks/concepts/parameters) of a Hook further down the chain using [hook_param_set](/docs/hooks/functions/hook-context/hook_param_set).
|
||||||
|
|
||||||
### Weak Executions
|
### Weak Executions
|
||||||
|
|
||||||
Hook Chains are [Strongly Executed](weak-and-strong.md). However any Hook in any chain may flag that it requires a second, Weak Execution by calling [hook_again](../technical/hooks-functions/hook-context/hook_again.md). If all Hook Chains execute successfully then the originating transaction is applied. Once the originating transaction has been applied any Weak Executions may happen, in the following order:
|
Hook Chains are [Strongly Executed](/docs/hooks/concepts/weak-and-strong). However any Hook in any chain may flag that it requires a second, Weak Execution by calling [hook_again](/docs/hooks/functions/hook-context/hook_again). If all Hook Chains execute successfully then the originating transaction is applied. Once the originating transaction has been applied any Weak Executions may happen, in the following order:
|
||||||
|
|
||||||
1. `cbak` execution if this was an Emitted Transaction.
|
1. `cbak` execution if this was an Emitted Transaction.
|
||||||
2. Weak Transactional Stake Holders who have opted in to allow a [Collect Call](collect-call.md). Execution order is first-come first-serve according to the event that caused the TSH to be flagged (such as pathing).
|
2. Weak Transactional Stake Holders who have opted in to allow a [Collect Call](/docs/hooks/concepts/collect-call). Execution order is first-come first-serve according to the event that caused the TSH to be flagged (such as pathing).
|
||||||
3. Any _Again as Weak_ (AAW) Hooks. Execution order for AAW is first numerically according to Account ID then numerically according to Hook position.
|
3. Any _Again as Weak_ (AAW) Hooks. Execution order for AAW is first numerically according to Account ID then numerically according to Hook position.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Therefore during typical Weak execution the fee for the execution is collected f
|
|||||||
|
|
||||||
| Type of Weak Execution | Fee |
|
| Type of Weak Execution | Fee |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| <p><strong>Again As Weak</strong><br />- Happens when a Strongly Executed Hook calls <a href="../technical/hooks-functions/hook-context/hook_again.md">hook_again</a></p> | Free (already paid by the Strong Execution). |
|
| <p><strong>Again As Weak</strong><br />- Happens when a Strongly Executed Hook calls <a href="/docs/hooks/functions/hook-context/hook_again">hook_again</a></p> | Free (already paid by the Strong Execution). |
|
||||||
| <p><strong>Callback</strong><br />- Happens when an emitted transaction either makes it into a ledger or is flagged as being impossible to ever make it into a ledger.</p> | Free (already paid during Emission). |
|
| <p><strong>Callback</strong><br />- Happens when an emitted transaction either makes it into a ledger or is flagged as being impossible to ever make it into a ledger.</p> | Free (already paid during Emission). |
|
||||||
| <p><strong>Weak Transactional Stakeholder</strong><br />- Happens if a transaction in some way mildly affects your account.</p> | Paid for by your account (not by the originating transaction) if and only if both your account is marked with `asfTshCollect` flag and your Hook is marked with the `hsfCollect` flag. |
|
| <p><strong>Weak Transactional Stakeholder</strong><br />- Happens if a transaction in some way mildly affects your account.</p> | Paid for by your account (not by the originating transaction) if and only if both your account is marked with `asfTshCollect` flag and your Hook is marked with the `hsfCollect` flag. |
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ A Hook always implements and exports exactly one or both of the following functi
|
|||||||
`int64_t hook(uint32_t ctx) { ... }` _required_
|
`int64_t hook(uint32_t ctx) { ... }` _required_
|
||||||
|
|
||||||
* Executed whenever a transaction comes into or leaves from the account the Hook is set on (`ctx = 0`) or
|
* Executed whenever a transaction comes into or leaves from the account the Hook is set on (`ctx = 0`) or
|
||||||
* Executed when executed as a [Weak Transactional Stakeholder](weak-and-strong.md) (`ctx > 0`).
|
* Executed when executed as a [Weak Transactional Stakeholder](/docs/hooks/concepts/weak-and-strong) (`ctx > 0`).
|
||||||
|
|
||||||
`int64_t cbak(uint32_t ctx) { ... }` _optional_
|
`int64_t cbak(uint32_t ctx) { ... }` _optional_
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ The following `trace` functions are available in the Hooks API
|
|||||||
|
|
||||||
| Hook API | What it does |
|
| Hook API | What it does |
|
||||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| [trace](../technical/hooks-functions/trace-debug/trace.md) | Print a utf-8 message, followed by a user-specified buffer (this last optionally as hex.) |
|
| [trace](/docs/hooks/functions/trace-debug/trace) | Print a utf-8 message, followed by a user-specified buffer (this last optionally as hex.) |
|
||||||
| [trace_num](../technical/hooks-functions/trace-debug/trace_num.md) | Print a utf-8 message, followed by an integer. |
|
| [trace_num](/docs/hooks/functions/trace-debug/trace_num) | Print a utf-8 message, followed by an integer. |
|
||||||
| [trace_float](../technical/hooks-functions/trace-debug/trace_float.md) | Print a utf-8 message, followed by an XFL Floating point number. |
|
| [trace_float](/docs/hooks/functions/trace-debug/trace_float) | Print a utf-8 message, followed by an XFL Floating point number. |
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ The solution: **Emitted Transactions**. We allow the Originating Transaction to
|
|||||||
|
|
||||||
Emitted Transactions are _new_ transactions created by the execution of a Hook and entered into consensus for processing in the next ledger. The transaction may be of any Transaction Type but must follow strict emission rules.
|
Emitted Transactions are _new_ transactions created by the execution of a Hook and entered into consensus for processing in the next ledger. The transaction may be of any Transaction Type but must follow strict emission rules.
|
||||||
|
|
||||||
To emit a transaction the Hook first prepares the serialized transaction then calls [emit](../technical/hooks-functions/emitted-transaction/emit-1.md).
|
To emit a transaction the Hook first prepares the serialized transaction then calls [emit](/docs/hooks/functions/emitted-transaction/emit-1).
|
||||||
|
|
||||||
Because emitted transactions can trigger Hooks in the next ledger which in turn may emit more transactions, all emitted transactions carry a `burden` and a `generation` field in their `EmitDetails` block. The `EmitDetails` block replaces the signature field in a traditional transaction.
|
Because emitted transactions can trigger Hooks in the next ledger which in turn may emit more transactions, all emitted transactions carry a `burden` and a `generation` field in their `EmitDetails` block. The `EmitDetails` block replaces the signature field in a traditional transaction.
|
||||||
|
|
||||||
@@ -28,13 +28,13 @@ It is important to note that the Hooks API follows the strict rule of _no rewrit
|
|||||||
|
|
||||||
### Callbacks
|
### Callbacks
|
||||||
|
|
||||||
As introduced in [Introduction and Terminology](terminology.md) emitted transactions trigger callbacks when they are accepted into a ledger. Due to the decentralised nature of consensus acceptance into a ledger of an emitted transaction is **not a guarantee**, although it is usually all-but guaranteed.
|
As introduced in [Introduction and Terminology](/docs/hooks/concepts/terminology) emitted transactions trigger callbacks when they are accepted into a ledger. Due to the decentralised nature of consensus acceptance into a ledger of an emitted transaction is **not a guarantee**, although it is usually all-but guaranteed.
|
||||||
|
|
||||||
If an emitted transaction expires before it can be accepted into a ledger (for any number of reasons: the ledgers may be full, the fee may be too high for the emitted transaction or the emitted transaction may be somehow invalid) then a _pseudo transaction_ is created in the ledger to clean up the emitted transaction. This pseudo transaction also calls the callback of your hook, with `parameter = 1` to indicate the emitted transaction indeed failed.
|
If an emitted transaction expires before it can be accepted into a ledger (for any number of reasons: the ledgers may be full, the fee may be too high for the emitted transaction or the emitted transaction may be somehow invalid) then a _pseudo transaction_ is created in the ledger to clean up the emitted transaction. This pseudo transaction also calls the callback of your hook, with `parameter = 1` to indicate the emitted transaction indeed failed.
|
||||||
|
|
||||||
### Emission Rules
|
### Emission Rules
|
||||||
|
|
||||||
The [emit](../technical/hooks-functions/emitted-transaction/emit-1.md) Hook API will enforce the following rules on a proposed (to be emitted) transaction.
|
The [emit](/docs/hooks/functions/emitted-transaction/emit-1) Hook API will enforce the following rules on a proposed (to be emitted) transaction.
|
||||||
|
|
||||||
| # | Emission Rule | Explanation |
|
| # | Emission Rule | Explanation |
|
||||||
| - | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| - | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
@@ -53,10 +53,10 @@ All emitted transactions must contain an `sfEmitDetails` object correctly popula
|
|||||||
|
|
||||||
| Field | Required Value | Description |
|
| Field | Required Value | Description |
|
||||||
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| sfEmitGeneration | <p>If the Originating Transaction was itself an emitted transaction then one more than the <code>sfEmitGeneration</code> of that transaction.<br /><br />If the Originating Transaction was not an emitted transaction then <code>1</code>.<br /><br />This should be populated using <a href="../technical/hooks-functions/emitted-transaction/etxn_generation.md">etxn_generation</a>.</p> | This field keeps track of a chain of emitted transactions that in turn cause other transactions to be emitted. |
|
| sfEmitGeneration | <p>If the Originating Transaction was itself an emitted transaction then one more than the <code>sfEmitGeneration</code> of that transaction.<br /><br />If the Originating Transaction was not an emitted transaction then <code>1</code>.<br /><br />This should be populated using <a href="/docs/hooks/functions/emitted-transaction/etxn_generation">etxn_generation</a>.</p> | This field keeps track of a chain of emitted transactions that in turn cause other transactions to be emitted. |
|
||||||
| sfEmitBurden | <p>If the Originating Transaction was itself an emitted transaction then the <code>burden</code> of the Originating Transaction multiplied by the maximum number of transactions the Hook has declared it will emit using <a href="../technical/hooks-functions/emitted-transaction/etxn_reserve.md">etxn_reserve</a>.<br /><br />If the Originating Transaction was not an emitted transaction then <code>1</code>.<br /><br />This should be populated using <a href="../technical/hooks-functions/emitted-transaction/etxn_burden.md">etxn_burden</a>.</p> | This field is a heuristic for detecting forkbombs. Fees are based on burden and will increase exponentially when a chain reaction is started to prevent the network becoming overun by self-reinforcing emitted transactions. |
|
| sfEmitBurden | <p>If the Originating Transaction was itself an emitted transaction then the <code>burden</code> of the Originating Transaction multiplied by the maximum number of transactions the Hook has declared it will emit using <a href="/docs/hooks/functions/emitted-transaction/etxn_reserve">etxn_reserve</a>.<br /><br />If the Originating Transaction was not an emitted transaction then <code>1</code>.<br /><br />This should be populated using <a href="/docs/hooks/functions/emitted-transaction/etxn_burden">etxn_burden</a>.</p> | This field is a heuristic for detecting forkbombs. Fees are based on burden and will increase exponentially when a chain reaction is started to prevent the network becoming overun by self-reinforcing emitted transactions. |
|
||||||
| sfEmitParentTxnID | The transaction ID of the Originating Transaction | The Hook Execution that emitted the transaction is connected to the Originating Transaction. Therefore this field is always required for the efficient tracing of behaviour. |
|
| sfEmitParentTxnID | The transaction ID of the Originating Transaction | The Hook Execution that emitted the transaction is connected to the Originating Transaction. Therefore this field is always required for the efficient tracing of behaviour. |
|
||||||
| sfEmitNonce | A special deterministic nonce produced by a call to [nonce](../technical/hooks-functions/emitted-transaction/etxn_nonce.md) | Emitted Transactions would be identical with the same fields and therefore have identical transaction hashes if a nonce were not used. However every node on the network needs to agree on the nonce, so a special Hook API to produce a deterministic nonce is made available. |
|
| sfEmitNonce | A special deterministic nonce produced by a call to [nonce](/docs/hooks/functions/emitted-transaction/etxn_nonce) | Emitted Transactions would be identical with the same fields and therefore have identical transaction hashes if a nonce were not used. However every node on the network needs to agree on the nonce, so a special Hook API to produce a deterministic nonce is made available. |
|
||||||
| sfEmitCallback | The 20 byte Hook Account ID | This field is used by xahaud when it needs to intitate a callback, such that it knows which Hook and account to initate the callback on. Callbacks happen when an emitted transaction is accepted into a ledger. |
|
| sfEmitCallback | The 20 byte Hook Account ID | This field is used by xahaud when it needs to intitate a callback, such that it knows which Hook and account to initate the callback on. Callbacks happen when an emitted transaction is accepted into a ledger. |
|
||||||
|
|
||||||
<Aside type="tip" title="Check the examples">
|
<Aside type="tip" title="Check the examples">
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ When Hooks execute they leave behind information about the status of that execut
|
|||||||
| sfHookReturnCode | The integer returned as the third parameter of `accept` or `rollback`. |
|
| sfHookReturnCode | The integer returned as the third parameter of `accept` or `rollback`. |
|
||||||
| sfHookReturnString | The string returned in the first two parameters of `accept` or `rollback`, if any. |
|
| sfHookReturnString | The string returned in the first two parameters of `accept` or `rollback`, if any. |
|
||||||
| sfHookInstructionCount | The total number of webassembly instructions that were executed when the Hook ran. |
|
| sfHookInstructionCount | The total number of webassembly instructions that were executed when the Hook ran. |
|
||||||
| sfHookEmitCount | The total number of [Emitted Transactions](emitted-transactions.md) produced by the Hook. |
|
| sfHookEmitCount | The total number of [Emitted Transactions](/docs/hooks/concepts/emitted-transactions) produced by the Hook. |
|
||||||
| sfHookExecutionIndex | The order in which the Hook was executed (as distinct from other Hook Executions on the same Originating Transaction.) |
|
| sfHookExecutionIndex | The order in which the Hook was executed (as distinct from other Hook Executions on the same Originating Transaction.) |
|
||||||
| sfHookStateChangeCount | The number of [Hook State](state-management.md) changes the Hook made during execution. |
|
| sfHookStateChangeCount | The number of [Hook State](/docs/hooks/concepts/state-management) changes the Hook made during execution. |
|
||||||
|
|||||||
@@ -50,26 +50,26 @@ Once you have an XFL you can use the Float API to do various computations. The F
|
|||||||
|
|
||||||
| Hook API | What it does |
|
| Hook API | What it does |
|
||||||
| ----------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||||
| [float_set](../technical/hooks-functions/float/float_set.md) | Create a float from an exponent and mantissa |
|
| [float_set](/docs/hooks/functions/float/float_set) | Create a float from an exponent and mantissa |
|
||||||
| [float_multiply](../technical/hooks-functions/float/float_multiply.md) | Multiply two XFL numbers together |
|
| [float_multiply](/docs/hooks/functions/float/float_multiply) | Multiply two XFL numbers together |
|
||||||
| [float_mulratio](../technical/hooks-functions/float/float_mulratio.md) | Multiply an XFL floating point by a non-XFL numerator and denominator |
|
| [float_mulratio](/docs/hooks/functions/float/float_mulratio) | Multiply an XFL floating point by a non-XFL numerator and denominator |
|
||||||
| [float_negate](../technical/hooks-functions/float/float_negate.md) | Negate an XFL floating point number |
|
| [float_negate](/docs/hooks/functions/float/float_negate) | Negate an XFL floating point number |
|
||||||
| [float_compare](../technical/hooks-functions/float/float_compare.md) | Perform a comparison on two XFL floating point numbers |
|
| [float_compare](/docs/hooks/functions/float/float_compare) | Perform a comparison on two XFL floating point numbers |
|
||||||
| [float_sum](../technical/hooks-functions/float/float_sum.md) | Add two XFL numbers together |
|
| [float_sum](/docs/hooks/functions/float/float_sum) | Add two XFL numbers together |
|
||||||
| [float_sto](../technical/hooks-functions/float/float_sto.md) | Output an XFL as a serialized object |
|
| [float_sto](/docs/hooks/functions/float/float_sto) | Output an XFL as a serialized object |
|
||||||
| [float_sto_set](../technical/hooks-functions/float/float_sto_set.md) | Read a serialized amount into an XFL |
|
| [float_sto_set](/docs/hooks/functions/float/float_sto_set) | Read a serialized amount into an XFL |
|
||||||
| [float_invert](../technical/hooks-functions/float/float_invert.md) | Divide one by an XFL floating point number |
|
| [float_invert](/docs/hooks/functions/float/float_invert) | Divide one by an XFL floating point number |
|
||||||
| [float_divide](../technical/hooks-functions/float/float_divide.md) | Divide an XFL by another XFL floating point number |
|
| [float_divide](/docs/hooks/functions/float/float_divide) | Divide an XFL by another XFL floating point number |
|
||||||
| [float_one](../technical/hooks-functions/float/float_one.md) | Return the number 1 represented in an XFL enclosing number |
|
| [float_one](/docs/hooks/functions/float/float_one) | Return the number 1 represented in an XFL enclosing number |
|
||||||
| [float_exponent](../technical/hooks-functions/float/float_exponent.md) | Get the exponent of an XFL enclosing number |
|
| [float_exponent](/docs/hooks/functions/float/float_exponent) | Get the exponent of an XFL enclosing number |
|
||||||
| [float_mantissa](../technical/hooks-functions/float/float_mantissa.md) | Get the mantissa of an XFL enclosing number |
|
| [float_mantissa](/docs/hooks/functions/float/float_mantissa) | Get the mantissa of an XFL enclosing number |
|
||||||
| [float_sign](../technical/hooks-functions/float/float_sign.md) | Get the sign of an XFL enclosing number |
|
| [float_sign](/docs/hooks/functions/float/float_sign) | Get the sign of an XFL enclosing number |
|
||||||
| float_exponent_set | Set the exponent of an XFL enclosing number |
|
| float_exponent_set | Set the exponent of an XFL enclosing number |
|
||||||
| float_mantissa_set | Set the mantissa of an XFL enclosing number |
|
| float_mantissa_set | Set the mantissa of an XFL enclosing number |
|
||||||
| float_sign_set | Set the sign of an XFL enclosing number |
|
| float_sign_set | Set the sign of an XFL enclosing number |
|
||||||
| [float_int](../technical/hooks-functions/float/float_int.md) | Convert an XFL floating point into an integer (floor) |
|
| [float_int](/docs/hooks/functions/float/float_int) | Convert an XFL floating point into an integer floor |
|
||||||
| [float_root](../technical/hooks-functions/float/float_root.md) | Compute the nth root of an XFL |
|
| [float_root](/docs/hooks/functions/float/float_root) | Compute the nth root of an XFL |
|
||||||
| [float_log](../technical/hooks-functions/float/float_log.md) | Compute the decimal log of an XFL |
|
| [float_log](/docs/hooks/functions/float/float_log) | Compute the decimal log of an XFL |
|
||||||
|
|
||||||
<Aside type="caution">
|
<Aside type="caution">
|
||||||
You should never do any direct math or comparison on the _enclosing number_. This will almost always result in incorrect computations.
|
You should never do any direct math or comparison on the _enclosing number_. This will almost always result in incorrect computations.
|
||||||
|
|||||||
@@ -14,17 +14,16 @@ import { Aside } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
### Grants
|
### Grants
|
||||||
|
|
||||||
Grants provide a way for a Hook Installer to assign [State Management](state-management.md) permissions to a _foreign_ Hook on other Xahau accounts.
|
Grants provide a way for a Hook Installer to assign [State Management](/docs/hooks/concepts/state-management) permissions to a _foreign_ Hook on other Xahau accounts.
|
||||||
|
|
||||||
A [SetHook Transaction](sethook-transaction.md) may specify a `HookGrants` array within any `Hook` object in its `Hooks` array. The `HookGrants` array contains one or more `HookGrant` objects (up to 8).
|
A [SetHook Transaction](/docs/hooks/concepts/sethook-transaction) may specify a `HookGrants` array within any `Hook` object in its `Hooks` array. The `HookGrants` array contains one or more `HookGrant` objects (up to 8).
|
||||||
|
|
||||||
Unlike [Parameters](parameters.md), the `HookGrants` array is always set exactly as specified in the [SetHook Transaction](sethook-transaction.md). Therefore if you wish to update a particular `HookGrant` whilst retaining multiple other `HookGrant` entires that were previously set, you must first obtain the old `HookGrants` array, modify it, and then resubmit the entire array in an [_Update_ Operation](sethook-transaction.md).
|
Unlike [Parameters](/docs/hooks/concepts/parameters), the `HookGrants` array is always set exactly as specified in the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction). Therefore if you wish to update a particular `HookGrant` whilst retaining multiple other `HookGrant` entires that were previously set, you must first obtain the old `HookGrants` array, modify it, and then resubmit the entire array in an [_Update_ Operation](/docs/hooks/concepts/sethook-transaction).
|
||||||
|
|
||||||
To delete all Grants submit an empty `HookGrants` array.
|
To delete all Grants submit an empty `HookGrants` array.
|
||||||
|
|
||||||
<Aside type="caution">
|
<Aside type="caution">
|
||||||
Unlike [Parameters](parameters.md), the `HookGrants` array is always set exactly as specified in the [SetHook Transaction]
|
Unlike [Parameters](/docs/hooks/concepts/parameters), the `HookGrants` array is always set exactly as specified in the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction).
|
||||||
(sethook-transaction.md).
|
|
||||||
</Aside>
|
</Aside>
|
||||||
|
|
||||||
A Grant permits a foreign XRPL account or Hook to modify the Hook State within the namespace of the specific Hook for which the Grant is defined.
|
A Grant permits a foreign XRPL account or Hook to modify the Hook State within the namespace of the specific Hook for which the Grant is defined.
|
||||||
@@ -88,4 +87,4 @@ The _second grant_ above allows:
|
|||||||
|
|
||||||
### Using the Grant
|
### Using the Grant
|
||||||
|
|
||||||
To make use of a grant, a Hook modifies State objects on a foreign account by calling [state_foreign_set](../technical/hooks-functions/state/state_foreign_set.md).
|
To make use of a grant, a Hook modifies State objects on a foreign account by calling [state_foreign_set](/docs/hooks/functions/state/state_foreign_set).
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ SetHook transactions are charged per byte of created webassembly. The rate is 50
|
|||||||
|
|
||||||
### Hook Execution Fees
|
### Hook Execution Fees
|
||||||
|
|
||||||
When Hooks are [Strongly Executed](weak-and-strong.md) the originating transaction must pay for the Strong Executions in the originating transaction's fee.
|
When Hooks are [Strongly Executed](/docs/hooks/concepts/weak-and-strong) the originating transaction must pay for the Strong Executions in the originating transaction's fee.
|
||||||
|
|
||||||
Hook Execution fees are charged at a rate of 1 drop per web assembly instruction in the worst-case execution of the function `hook` (or `cbak` in the case of a callback). Thus a small Hook with a lot of looping may end up attracting high runtime fees.
|
Hook Execution fees are charged at a rate of 1 drop per web assembly instruction in the worst-case execution of the function `hook` (or `cbak` in the case of a callback). Thus a small Hook with a lot of looping may end up attracting high runtime fees.
|
||||||
|
|
||||||
@@ -59,6 +59,6 @@ If there is an invalid value for `tx_blob` or `tx_blob` is missing, a regular JS
|
|||||||
|
|
||||||
### Emission Fees
|
### Emission Fees
|
||||||
|
|
||||||
Hooks have access to the same computation the _Fee RPC Helper_ does. To use this simply call [etxn_fee_base](../technical/hooks-functions/emitted-transaction/etxn_fee_base.md) with a buffer containing the serialised transaction as the arguments. As with the RPC call, you must ensure that the `Fee` field is present in the serialised transaction. The value is irrelevant.
|
Hooks have access to the same computation the _Fee RPC Helper_ does. To use this simply call [etxn_fee_base](/docs/hooks/functions/emitted-transaction/etxn_fee_base) with a buffer containing the serialised transaction as the arguments. As with the RPC call, you must ensure that the `Fee` field is present in the serialised transaction. The value is irrelevant.
|
||||||
|
|
||||||
When `etxn_fee_base` returns the recommended fee you may use [sto_emplace](../technical/hooks-functions/serialization/sto_emplace.md) to emplace it into the serialised transaction before emission. The relevant field is `sfFee`.
|
When `etxn_fee_base` returns the recommended fee you may use [sto_emplace](/docs/hooks/functions/serialization/sto_emplace) to emplace it into the serialised transaction before emission. The relevant field is `sfFee`.
|
||||||
|
|||||||
@@ -9,16 +9,16 @@ While working on Hooks we published a number of blogs on our progress, insights
|
|||||||
|
|
||||||
#### 1. Receiving Hook executes additional logic
|
#### 1. Receiving Hook executes additional logic
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### 2. Receiving Hook blocks incoming transaction
|
#### 2. Receiving Hook blocks incoming transaction
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### 3. Sending Hook blocks outgoing transaction
|
#### 3. Sending Hook blocks outgoing transaction
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### 4. Hook controls an institutional account
|
#### 4. Hook controls an institutional account
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -7,15 +7,15 @@ import { Aside } from '@astrojs/starlight/components';
|
|||||||
Hooks add smart contract functionality to the Xahau: _layer one_ custom code to influence the behaviour and flow of transactions. Hooks are small, efficient pieces of code being defined on an Xahau account, allowing logic to be executed before and/or after Xahau transactions.
|
Hooks add smart contract functionality to the Xahau: _layer one_ custom code to influence the behaviour and flow of transactions. Hooks are small, efficient pieces of code being defined on an Xahau account, allowing logic to be executed before and/or after Xahau transactions.
|
||||||
|
|
||||||
<Aside type="note">
|
<Aside type="note">
|
||||||
Please note: you're reading the **technical documentation** of Hooks. This documentation is highly technical & assumes prior knowledge of programming and the Xahau Ledger. If you are looking for examples on what Hooks are, will bring to the Xahau Ledger and what they could do, please [check this page](example-usage).
|
Please note: you're reading the **technical documentation** of Hooks. This documentation is highly technical & assumes prior knowledge of programming and the Xahau Network. If you are looking for examples on what Hooks are, will bring to the Xahau Network and what they could do, please [check this page](/docs/hooks/concepts/introduction/example-usage).
|
||||||
</Aside>
|
</Aside>
|
||||||
|
|
||||||
Xahau is known and is being appreciated for its transaction throughput, speed and the low fees. Combined with available advanced transaction types like multi sign, escrows, payment channels and even a decentralized exchange (all on ledger, out of the box, without requiring smart contracts) Xahau has a lot to offer businesses and (creative) developers.
|
Xahau is known and is being appreciated for its transaction throughput, speed and the low fees. Combined with available advanced transaction types like multi sign, escrows, payment channels and even a decentralized exchange (all on ledger, out of the box, without requiring smart contracts) Xahau has a lot to offer businesses and creative developers.
|
||||||
|
|
||||||
Hooks add smart contract functionality to Xahau: _layer one_ custom code to influence the behaviour and flow of transactions. Hooks are small, efficient pieces of code being defined on an Xahau account, allowing logic to be executed before and/or after Xahau transactions. These Hooks can be really simple, like: “reject payments < 10 XAH”, or “for all outgoing payments, send 10% to my savings account” or more advanced.
|
Hooks add smart contract functionality to Xahau: _layer one_ custom code to influence the behaviour and flow of transactions. Hooks are small, efficient pieces of code being defined on an Xahau account, allowing logic to be executed before and/or after Xahau transactions. These Hooks can be really simple, like: “reject payments < 10 XAH”, or “for all outgoing payments, send 10% to my savings account” or more advanced.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||

|

|
||||||
<figcaption>*Hooks high level concept*</figcaption>
|
<figcaption>*Hooks high level concept*</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
@@ -30,4 +30,4 @@ Hooks are currently live on a public testnet. It's time for testing, coding, hav
|
|||||||
* [Xahau Testnet](https://xahau-test.net/)
|
* [Xahau Testnet](https://xahau-test.net/)
|
||||||
* [Xahau Testnet Explorer](https://explorer.xahau-test.net/)
|
* [Xahau Testnet Explorer](https://explorer.xahau-test.net/)
|
||||||
* [Examples (source code)](https://github.com/XRPL-Labs/xrpld-hooks/tree/hooks-ssvm/hook-api-examples)
|
* [Examples (source code)](https://github.com/XRPL-Labs/xrpld-hooks/tree/hooks-ssvm/hook-api-examples)
|
||||||
* [Blogs (concepts)](https://dev.to/t/xrplhooks/top/infinity)
|
* [Blogs concepts](https://dev.to/t/xrplhooks/top/infinity)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ int32_t _g (uint32_t id, uint32_t maxiter);
|
|||||||
|
|
||||||
The first argument `id` is the identifier for this guard. This is a unique constant chosen by the developer, typically the line number in the source file is used.
|
The first argument `id` is the identifier for this guard. This is a unique constant chosen by the developer, typically the line number in the source file is used.
|
||||||
|
|
||||||
The second argument `maxiter` is a promise the developer makes to the ledger that this guard will not be _hit_ more than `maxiter` times during the execution of the Hook. If the guard call is executed more than this many times the Hook will automatically rollback with a `GUARD_VIOLATION` ([Hook API return codes](ref:negative-return-codes)). Because the guard will be hit _before_ the loop condition is checked, it is important to add one to the total number of expected iterations. (Note: The GUARD() macro already adds one).
|
The second argument `maxiter` is a promise the developer makes to the ledger that this guard will not be _hit_ more than `maxiter` times during the execution of the Hook. If the guard call is executed more than this many times the Hook will automatically rollback with a `GUARD_VIOLATION` ([Hook API return codes](/docs/hooks/functions/overview/return-codes)). Because the guard will be hit _before_ the loop condition is checked, it is important to add one to the total number of expected iterations. (Note: The GUARD() macro already adds one).
|
||||||
|
|
||||||
<Aside type="caution">
|
<Aside type="caution">
|
||||||
Guards must be set using numerical literals. You cannot use a variable or runtime value in a Guard.
|
Guards must be set using numerical literals. You cannot use a variable or runtime value in a Guard.
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ description: Prevent state clobbering by using the correct namespace
|
|||||||
---
|
---
|
||||||
### Namespaces
|
### Namespaces
|
||||||
|
|
||||||
To avoid two or more Hooks installed on the same account unintentionally clobbering each-other's [Hook State](state-management.md), a 32 byte namespace must be provided when creating or installing each Hook.
|
To avoid two or more Hooks installed on the same account unintentionally clobbering each-other's [Hook State](/docs/hooks/concepts/state-management), a 32 byte namespace must be provided when creating or installing each Hook.
|
||||||
|
|
||||||
The namespace may be any arbitrary 32 byte value the developer chooses. Provided the namespace is unique in the Hook chain no state clobbering will occur.
|
The namespace may be any arbitrary 32 byte value the developer chooses. Provided the namespace is unique in the Hook chain no state clobbering will occur.
|
||||||
|
|
||||||
We strongly recommended using `SHA256` over the developer's working name for the Hook. SHA256 is one of the two hashing algorithms used in the derivation of Xahau addresses (from an account master key), and, as such, it should be readily available to the developer.
|
We strongly recommended using `SHA256` over the developer's working name for the Hook. SHA256 is one of the two hashing algorithms used in the derivation of Xahau addresses (from an account master key), and, as such, it should be readily available to the developer.
|
||||||
|
|
||||||
The `HookNamespace` field is supplied as a 32 byte _hex_ blob inside each `Hook` object in a `Hooks` array when [executing a SetHook transaction](sethook-transaction.md).
|
The `HookNamespace` field is supplied as a 32 byte _hex_ blob inside each `Hook` object in a `Hooks` array when [executing a SetHook transaction](/docs/hooks/concepts/sethook-transaction).
|
||||||
|
|
||||||
The configured Namespace a Hook operates under alters the [Keylets](slots-and-keylets.md) its [State](state-management.md) is stored under. Therefore two Hooks under two different Namespaces installed on the same Xahau account may use the same state key to refer to different state objects. Conversely, two different Hooks using the same Namespace on the same Xahau account can access and modify eachother's state objects using the same state keys.
|
The configured Namespace a Hook operates under alters the [Keylets](/docs/hooks/concepts/slots-and-keylets) its [State](/docs/hooks/concepts/state-management) is stored under. Therefore two Hooks under two different Namespaces installed on the same Xahau account may use the same state key to refer to different state objects. Conversely, two different Hooks using the same Namespace on the same Xahau account can access and modify eachother's state objects using the same state keys.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ HookNamespace: addr.codec.sha256('carbon').toString('hex')
|
|||||||
|
|
||||||
### Default Namespace
|
### Default Namespace
|
||||||
|
|
||||||
The first user to [set a novel Hook](sethook-transaction.md) defines a `HookNamespace` which becomes the _Default Namespace_ for that Hook. This means any subsequent users who [reference the same _HookDefinition_](reference-counted-hook-definitions.md) will receive this originally set Namespace by default.
|
The first user to [set a novel Hook](/docs/hooks/concepts/sethook-transaction) defines a `HookNamespace` which becomes the _Default Namespace_ for that Hook. This means any subsequent users who [reference the same _HookDefinition_](/docs/hooks/concepts/reference-counted-hook-definitions) will receive this originally set Namespace by default.
|
||||||
|
|
||||||
The subsequent user may specify their own Namespace, overriding the Default Namespace for their installation only.
|
The subsequent user may specify their own Namespace, overriding the Default Namespace for their installation only.
|
||||||
|
|
||||||
@@ -33,9 +33,9 @@ The subsequent user may specify their own Namespace, overriding the Default Name
|
|||||||
|
|
||||||
Choice of HookNamespace affects the behaviour of the following Hook APIs:
|
Choice of HookNamespace affects the behaviour of the following Hook APIs:
|
||||||
|
|
||||||
* [state](../technical/hooks-functions/state/)
|
* [state](/docs/hooks/functions/state/state)
|
||||||
* [state_set](../technical/hooks-functions/state/state_set.md)
|
* [state_set](/docs/hooks/functions/state/state_set)
|
||||||
|
|
||||||
### Namespace API Helper
|
### Namespace API Helper
|
||||||
|
|
||||||
See [account_info](../technical/hooks-functions/websocket-apis/account_info.md) and [account_namespace](../technical/hooks-functions/websocket-apis/account_namespace.md) for information about how to query the ledger regarding namespaces.
|
See [account_info](/docs/hooks/functions/websocket-apis/account_info) and [account_namespace](/docs/hooks/functions/websocket-apis/account_namespace) for information about how to query the ledger regarding namespaces.
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ description: Install-time parameters allow Hooks to be generic and flexible
|
|||||||
---
|
---
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Hook developers may opt to use _install-time_ parameters (called Hook Parameters) in their Hook. This allows subsequent installers of the Hook to change certain behaviours the programmer defines without recompiling or re-uploading the Hook (assuming at least one account still [references](reference-counted-hook-definitions.md) the existing Hook Definition.)
|
Hook developers may opt to use _install-time_ parameters (called Hook Parameters) in their Hook. This allows subsequent installers of the Hook to change certain behaviours the programmer defines without recompiling or re-uploading the Hook (assuming at least one account still [references](/docs/hooks/concepts/reference-counted-hook-definitions) the existing Hook Definition.)
|
||||||
|
|
||||||
Hook Parameters are a set of Key-Value pairs set during the [SetHook Transaction](sethook-transaction.md) and retrievable by the Hook during runtime. Both the `ParameterName` (key) and the `ParameterValue` are set as _hex_ blobs, and have a maximum length of 32 bytes and 256 bytes respectively.
|
Hook Parameters are a set of Key-Value pairs set during the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction) and retrievable by the Hook during runtime. Both the `ParameterName` key and the `ParameterValue` are set as _hex_ blobs, and have a maximum length of 32 bytes and 256 bytes respectively.
|
||||||
|
|
||||||
A [SetHook Transaction](sethook-transaction.md) may define up to _16_ Hook Parameters per installed Hook.
|
A [SetHook Transaction](/docs/hooks/concepts/sethook-transaction) may define up to _16_ Hook Parameters per installed Hook.
|
||||||
|
|
||||||
### Setting Parameters
|
### Setting Parameters
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ Hooks:
|
|||||||
|
|
||||||
### Default Parameters
|
### Default Parameters
|
||||||
|
|
||||||
The first user to [set a novel Hook](sethook-transaction.md) may define Hook Parameters which then become the _Default Parameters_ for that Hook. This means any subsequent users who [references the same _HookDefinition_](reference-counted-hook-definitions.md) will receive these originally set Hook Parameters by default.
|
The first user to [set a novel Hook](/docs/hooks/concepts/sethook-transaction) may define Hook Parameters which then become the _Default Parameters_ for that Hook. This means any subsequent users who [references the same _HookDefinition_](/docs/hooks/concepts/reference-counted-hook-definitions) will receive these originally set Hook Parameters by default.
|
||||||
|
|
||||||
The subsequent user may specify their own Parameters, overriding the Default Parameters for their installation.
|
The subsequent user may specify their own Parameters, overriding the Default Parameters for their installation.
|
||||||
|
|
||||||
@@ -48,10 +48,10 @@ To erase a Parameter in a subsequent installation, specify the `ParameterName` k
|
|||||||
|
|
||||||
### Using Parameters in Hooks
|
### Using Parameters in Hooks
|
||||||
|
|
||||||
Parameters can be read by the Hooks they are set on using [hook_param](../technical/hooks-functions/hook-context/hook_param.md).
|
Parameters can be read by the Hooks they are set on using [hook_param](/docs/hooks/functions/hook-context/hook_param).
|
||||||
|
|
||||||
If more than one Hook is installed in a Hook Chain, then [hook_param_set](../technical/hooks-functions/hook-context/hook_param_set.md) can be used in limited circumstances to modify the Hook Parameters of a Hook further down the chain on the same account.
|
If more than one Hook is installed in a Hook Chain, then [hook_param_set](/docs/hooks/functions/hook-context/hook_param_set) can be used in limited circumstances to modify the Hook Parameters of a Hook further down the chain on the same account.
|
||||||
|
|
||||||
### Runtime Parameters
|
### Runtime Parameters
|
||||||
|
|
||||||
On Xahau and the Xahau testnet, HookParameters may also be included at the top level of any transaction type according to the foregoing rules and size limits. These parameters can be accessed inside a hook using the [otxn_param](../technical/hooks-functions/originating-transaction/otxn_param.md) API.
|
On Xahau and the Xahau testnet, HookParameters may also be included at the top level of any transaction type according to the foregoing rules and size limits. These parameters can be accessed inside a hook using the [otxn_param](/docs/hooks/functions/originating-transaction/otxn_param) API.
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
title: Reference Counted Hook Definitions
|
title: Reference Counted Hook Definitions
|
||||||
description: Avoid re-uploading the same bytecode to the ledger
|
description: Avoid re-uploading the same bytecode to the ledger
|
||||||
---
|
---
|
||||||
When a novel Hook's web assembly byte-code is uploaded to Xahau, a significant storage burden is imposed on the network. This storage burden is reflected in the [Hook Fees](hook-fees.md) charged by the network.
|
When a novel Hook's web assembly byte-code is uploaded to Xahau, a significant storage burden is imposed on the network. This storage burden is reflected in the [Hook Fees](/docs/hooks/concepts/hook-fees) charged by the network.
|
||||||
|
|
||||||
To avoid this burden (and high fees for end users) reference counting is used:
|
To avoid this burden (and high fees for end users) reference counting is used:
|
||||||
|
|
||||||
* The first time a novel Hook is installed, the [SetHook Transaction](sethook-transaction.md) must provide a significant fee.
|
* The first time a novel Hook is installed, the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction) must provide a significant fee.
|
||||||
* The Hook's web assembly byte-code becomes an unowned and reference counted object on the ledger (called a `HookDefinition`).
|
* The Hook's web assembly byte-code becomes an unowned and reference counted object on the ledger (called a `HookDefinition`).
|
||||||
* Subsequent installations by the same or other users for an identical Hook (i.e. with identical byte-code) increment the reference count. These installations point at the same object on the ledger. These transactions are billed in a similar way to setting a Trust Line, as the storage burden for the Hook was already paid for in the original Set Hook transaction.
|
* Subsequent installations by the same or other users for an identical Hook (i.e. with identical byte-code) increment the reference count. These installations point at the same object on the ledger. These transactions are billed in a similar way to setting a Trust Line, as the storage burden for the Hook was already paid for in the original Set Hook transaction.
|
||||||
* While the reference count on the Hook Definition is greater than zero (meaning one or more accounts still have the Hook installed) the object remains on the ledger.
|
* While the reference count on the Hook Definition is greater than zero (meaning one or more accounts still have the Hook installed) the object remains on the ledger.
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -14,11 +14,11 @@ To assist Hook developers in working with serialized objects the `sto` namespace
|
|||||||
|
|
||||||
| Hook API | at it does |
|
| Hook API | at it does |
|
||||||
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||||
| [sto_subfield](../technical/hooks-functions/serialization/sto_subfield.md) | Index into a xrpld serialized object and return the location and length of a subfield |
|
| [sto_subfield](/docs/hooks/functions/serialization/sto_subfield) | Index into a xrpld serialized object and return the location and length of a subfield |
|
||||||
| [sto_subarray](../technical/hooks-functions/serialization/sto_subarray.md) | Index into a xrpld serialized array and return the location and length of an index |
|
| [sto_subarray](/docs/hooks/functions/serialization/sto_subarray) | Index into a xrpld serialized array and return the location and length of an index |
|
||||||
| [sto_emplace](../technical/hooks-functions/serialization/sto_emplace.md) | Emplace a field into an existing STObject at its canonical placement |
|
| [sto_emplace](/docs/hooks/functions/serialization/sto_emplace) | Emplace a field into an existing STObject at its canonical placement |
|
||||||
| [sto_erase](../technical/hooks-functions/serialization/sto_erase.md) | Remove a field from an STObject |
|
| [sto_erase](/docs/hooks/functions/serialization/sto_erase) | Remove a field from an STObject |
|
||||||
| [sto_validate](../technical/hooks-functions/serialization/sto_validate.md) | Validate an STObject |
|
| [sto_validate](/docs/hooks/functions/serialization/sto_validate) | Validate an STObject |
|
||||||
|
|
||||||
Where applicable these APIs return an _offset_ and a _length_ encoded into a single int64_t. See individual documentation for details.
|
Where applicable these APIs return an _offset_ and a _length_ encoded into a single int64_t. See individual documentation for details.
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ The main body of the SetHook transaction is the hooks array:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This array _mirrors_ the [Hook Chain](chaining.md) installed on the account:
|
This array _mirrors_ the [Hook Chain](/docs/hooks/concepts/chaining) installed on the account:
|
||||||
|
|
||||||
* Position 0 in the array _corresponds_ to position 0 in the Hook Chain.
|
* Position 0 in the array _corresponds_ to position 0 in the Hook Chain.
|
||||||
* Position 3 in the array _corresponds_ to position 3 in the Hook Chain, etc.
|
* Position 3 in the array _corresponds_ to position 3 in the Hook Chain, etc.
|
||||||
@@ -56,7 +56,7 @@ This array _mirrors_ the [Hook Chain](chaining.md) installed on the account:
|
|||||||
Each entry in the Hooks Array (in the SetHook Transaction) is called a _HookSet Object_, and its corresponding Hook in the account's Hook Chain is called the _Corresponding Hook_.
|
Each entry in the Hooks Array (in the SetHook Transaction) is called a _HookSet Object_, and its corresponding Hook in the account's Hook Chain is called the _Corresponding Hook_.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||

|

|
||||||
<figcaption>*Example: A user performs an operation on each Hook in his/her Hook chain with a SetHook transaction.*</figcaption>
|
<figcaption>*Example: A user performs an operation on each Hook in his/her Hook chain with a SetHook transaction.*</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
@@ -67,15 +67,15 @@ Each Corresponding Hook is an object containing a _reference_ (pointer) to a `Ho
|
|||||||
The HookDefinition object is an unowned reference-counted ledger object that provides for de-duplication of identical web assembly bytecode. Two users using an identical hook will both point to the same HookDefinition.
|
The HookDefinition object is an unowned reference-counted ledger object that provides for de-duplication of identical web assembly bytecode. Two users using an identical hook will both point to the same HookDefinition.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||

|

|
||||||
<figcaption>*Example: Hook Definitions on Xahau*</figcaption>
|
<figcaption>*Example: Hook Definitions on Xahau*</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
For more information see: [Reference Counting](reference-counted-hook-definitions.md)
|
For more information see: [Reference Counting](/docs/hooks/concepts/reference-counted-hook-definitions)
|
||||||
|
|
||||||
### Hook Defaults
|
### Hook Defaults
|
||||||
|
|
||||||
When a `HookDefinition` is created it contains the initial [Parameters](parameters.md), [Namespace](namespaces.md) and [Grants](grants.md) supplied by the user. These become the Hook Defaults. Any Hook referencing this Hook Definition will use these defaults _unless_ the SetHook Transaction that creates that reference explicitly overrides those defaults, or a subsequent Update Operation overrides them.
|
When a `HookDefinition` is created it contains the initial [Parameters](/docs/hooks/concepts/parameters), [Namespace](/docs/hooks/concepts/namespaces) and [Grants](/docs/hooks/concepts/grants) supplied by the user. These become the Hook Defaults. Any Hook referencing this Hook Definition will use these defaults _unless_ the SetHook Transaction that creates that reference explicitly overrides those defaults, or a subsequent Update Operation overrides them.
|
||||||
|
|
||||||
### HookSet Operations
|
### HookSet Operations
|
||||||
|
|
||||||
|
|||||||
@@ -25,22 +25,22 @@ The avilable slot APIs are:
|
|||||||
|
|
||||||
| Hook API | What it does |
|
| Hook API | What it does |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||||
| [slot](../technical/hooks-functions/slot/slot.md) | Serialize and output a slotted object |
|
| [slot](/docs/hooks/functions/slot/slot) | Serialize and output a slotted object |
|
||||||
| [slot_clear](../technical/hooks-functions/slot/slot_clear.md) | Free up a currently occupied slot |
|
| [slot_clear](/docs/hooks/functions/slot/slot_clear) | Free up a currently occupied slot |
|
||||||
| [slot_count](../technical/hooks-functions/slot/slot_count.md) | Count the elements of an array object in a slot |
|
| [slot_count](/docs/hooks/functions/slot/slot_count) | Count the elements of an array object in a slot |
|
||||||
| slot_id | Compute the canonical hash of the slotted object and return it |
|
| slot_id | Compute the canonical hash of the slotted object and return it |
|
||||||
| [slot_set](../technical/hooks-functions/slot/slot_set.md) | Locate an object based on its keylet and place it into a slot |
|
| [slot_set](/docs/hooks/functions/slot/slot_set) | Locate an object based on its keylet and place it into a slot |
|
||||||
| [slot_subarray](../technical/hooks-functions/slot/slot_subarray.md) | Index into a slotted array and assign a sub-object to another slot |
|
| [slot_subarray](/docs/hooks/functions/slot/slot_subarray) | Index into a slotted array and assign a sub-object to another slot |
|
||||||
| [slot_subfield](../technical/hooks-functions/slot/slot_subfield.md) | Index into a slotted object and assign a sub-object to another slot |
|
| [slot_subfield](/docs/hooks/functions/slot/slot_subfield) | Index into a slotted object and assign a sub-object to another slot |
|
||||||
| [slot_type](../technical/hooks-functions/slot/slot_type.md) | Retrieve the field code of an object in a slot and, optionally, some other information |
|
| [slot_type](/docs/hooks/functions/slot/slot_type) | Retrieve the field code of an object in a slot and, optionally, some other information |
|
||||||
| [slot_float](../technical/hooks-functions/slot/slot_float.md) | Parse the STI_AMOUNT in the specified slot and return it as an XFL enclosed number |
|
| [slot_float](/docs/hooks/functions/slot/slot_float) | Parse the STI_AMOUNT in the specified slot and return it as an XFL enclosed number |
|
||||||
| [slot_size](../technical/hooks-functions/slot/slot_size.md) | Compute the serialized size of an object in a slot |
|
| [slot_size](/docs/hooks/functions/slot/slot_size) | Compute the serialized size of an object in a slot |
|
||||||
|
|
||||||
### What are keylets?
|
### What are keylets?
|
||||||
|
|
||||||
Keylets are used to locate (point to) on-ledger objects. In brief they are a _hash_ of identifying information from the object, which is the canonical _handle_ for that object.
|
Keylets are used to locate (point to) on-ledger objects. In brief they are a _hash_ of identifying information from the object, which is the canonical _handle_ for that object.
|
||||||
|
|
||||||
Hooks use a serialized 34 byte keylet format which can be derrived using the important [util_keylet](ref:util_keylet) function. Without this looking up and slotting objects would be generally impossible.
|
Hooks use a serialized 34 byte keylet format which can be derrived using the important [util_keylet](/docs/hooks/functions/utilities/util_keylet) function. Without this looking up and slotting objects would be generally impossible.
|
||||||
|
|
||||||
<Aside type="tip">
|
<Aside type="tip">
|
||||||
The Hook APIs which accept a 34 byte keylet will also generally accept a 32 byte canonical transaction hash.
|
The Hook APIs which accept a 34 byte keylet will also generally accept a 32 byte canonical transaction hash.
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ import { Aside } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
State Management is achieved using
|
State Management is achieved using
|
||||||
|
|
||||||
* [state](../technical/hooks-functions/state/state.md)
|
* [state](/docs/hooks/functions/state/state)
|
||||||
* [state_set](../technical/hooks-functions/state/state_set.md)
|
* [state_set](/docs/hooks/functions/state/state_set)
|
||||||
* [state_foreign](../technical/hooks-functions/state/state_foreign.md)
|
* [state_foreign](/docs/hooks/functions/state/state_foreign)
|
||||||
|
|
||||||
### Storing and fetching
|
### Storing and fetching
|
||||||
|
|
||||||
The below example uses the [state_set](../technical/hooks-functions/state/state_set.md) Hook API to assign the value `0xC001CAFE` to the key `0x0..000001` (uint256 = 1) in the Hook State of the Hook Account.
|
The below example uses the [state_set](/docs/hooks/functions/state/state_set) Hook API to assign the value `0xC001CAFE` to the key `0x0..000001` (uint256 = 1) in the Hook State of the Hook Account.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
uint8_t key[32] = {
|
uint8_t key[32] = {
|
||||||
@@ -58,8 +58,8 @@ After the above code has run the `value` buffer will be populated with the value
|
|||||||
|
|
||||||
### Foreign state
|
### Foreign state
|
||||||
|
|
||||||
From time to time it may be advantageous for one Hook running on one account to read the Hook State of another Hook running on another account. The [state_foreign](../technical/hooks-functions/state/state_foreign.md) Hook API does exactly this. Because the ledger is public there is no reasonable expectation of privacy anyway. Any Hook may therefore _read_ (but not write) the Hook State of any other Hook.
|
From time to time it may be advantageous for one Hook running on one account to read the Hook State of another Hook running on another account. The [state_foreign](/docs/hooks/functions/state/state_foreign) Hook API does exactly this. Because the ledger is public there is no reasonable expectation of privacy anyway. Any Hook may therefore _read_ (but not write) the Hook State of any other Hook.
|
||||||
|
|
||||||
### Namespaces and querying
|
### Namespaces and querying
|
||||||
|
|
||||||
Please see [Namespaces](namespaces.md)
|
Please see [Namespaces](/docs/hooks/concepts/namespaces)
|
||||||
|
|||||||
@@ -18,21 +18,21 @@ This Hooks documentation and the Hooks API use a set of unfamiliar terms. Use th
|
|||||||
|
|
||||||
| Term | Explanation |
|
| Term | Explanation |
|
||||||
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Hook | <p><em>This term refers to a range of things depending on context</em><br />1. A webassembly binary uploadable to Xahau with the <a href="sethook-transaction.md">SetHook Transaction</a> type.<br />2. A webassembly binary already uploaded to and set or configured onto an Xahau account.<br />3. The <a href="https://xrpl-hooks.readme.io/docs/anatomy-of-a-hook-1">source code</a> of such a binary.</p> |
|
| Hook | <p><em>This term refers to a range of things depending on context</em><br />1. A webassembly binary uploadable to Xahau with the <a href="/docs/hooks/concepts/sethook-transaction">SetHook Transaction</a> type.<br />2. A webassembly binary already uploaded to and set or configured onto an Xahau account.<br />3. The <a href="/docs/hooks/concepts/compiling-hooks">source code</a> of such a binary.</p> |
|
||||||
| Originating Transaction | The transaction that triggered the Hook to fire. This could be either a transaction sent out of or into an account with a Hook set on it. |
|
| Originating Transaction | The transaction that triggered the Hook to fire. This could be either a transaction sent out of or into an account with a Hook set on it. |
|
||||||
| Originating Account | The account that sent an Originating Transaction. |
|
| Originating Account | The account that sent an Originating Transaction. |
|
||||||
| Hook Account | The account where the currently executing Hook lives. This is the account that owns the Hook, the account that performed the [SetHook Transaction](sethook-transaction.md) which created the Hook and the account to whom belongs the Hook State for the currently executing Hook. |
|
| Hook Account | The account where the currently executing Hook lives. This is the account that owns the Hook, the account that performed the [SetHook Transaction](/docs/hooks/concepts/sethook-transaction) which created the Hook and the account to whom belongs the Hook State for the currently executing Hook. |
|
||||||
| Installer | The account which is currently installing a Hook using the SetHook transaction. |
|
| Installer | The account which is currently installing a Hook using the SetHook transaction. |
|
||||||
| Emitted Transaction | A new transaction created by a Hook during the Hook's execution that is not the Originating Transaction. These are typically used for sending funds back to the Originating Account. See: [Emitted Transactions](emitted-transactions.md). |
|
| Emitted Transaction | A new transaction created by a Hook during the Hook's execution that is not the Originating Transaction. These are typically used for sending funds back to the Originating Account. See: [Emitted Transactions](/docs/hooks/concepts/emitted-transactions). |
|
||||||
| State | A per-account key-value map of 32 byte keys to arbitrary data. All Hooks present on an account have access to the same Hook State and can modify it. Note that the Hook State lives on the Hook Account **not** on the Originating Account. See: [State Management](state-management.md). |
|
| State | A per-account key-value map of 32 byte keys to arbitrary data. All Hooks present on an account have access to the same Hook State and can modify it. Note that the Hook State lives on the Hook Account **not** on the Originating Account. See: [State Management](/docs/hooks/concepts/state-management). |
|
||||||
| SetHook | A new Transaction Type introduced in the Hooks ammendment which sets a Hook onto an Xahau account. See: [SetHook Transaction](sethook-transaction.md). |
|
| SetHook | A new Transaction Type introduced in the Hooks ammendment which sets a Hook onto an Xahau account. See: [SetHook Transaction](/docs/hooks/concepts/sethook-transaction). |
|
||||||
| Guards | A special control mechanism you need to use if you write a loop into in a Hook. See: [Loops and Guarding](loops-and-guarding.md). |
|
| Guards | A special control mechanism you need to use if you write a loop into in a Hook. See: [Loops and Guarding](/docs/hooks/concepts/loops-and-guarding). |
|
||||||
| Grants | Special permission a Hook Installer can give another account or a specific Hook (regardless of where it is installed) to modify Hook State on the Installer's account. |
|
| Grants | Special permission a Hook Installer can give another account or a specific Hook (regardless of where it is installed) to modify Hook State on the Installer's account. |
|
||||||
| Namespace | A unique 32 byte code delineating one set of state keys from another. The same state key may be used by two different Hooks without interfering with each-other if the namespaces set on the Hooks are different. |
|
| Namespace | A unique 32 byte code delineating one set of state keys from another. The same state key may be used by two different Hooks without interfering with each-other if the namespaces set on the Hooks are different. |
|
||||||
| Parameters | Install-time parameters that can be optionally set on a Hook. |
|
| Parameters | Install-time parameters that can be optionally set on a Hook. |
|
||||||
| Reference Counting | An unowned object on the ledger may be reference counted, meaning it is deleted when the final account which referenced (used) it removes their reference to it. |
|
| Reference Counting | An unowned object on the ledger may be reference counted, meaning it is deleted when the final account which referenced (used) it removes their reference to it. |
|
||||||
| XFL or Floating Point | A way to do high precision math in Hooks such as for exchange rate computation. See: [Floating Point Numbers (XFL)](floating-point-numbers-xfl.md). |
|
| XFL or Floating Point | A way to do high precision math in Hooks such as for exchange rate computation. See: [Floating Point Numbers (XFL)](/docs/hooks/concepts/floating-point-numbers-xfl). |
|
||||||
| Serialized Objects (STO) | The way xahaud transmits and stores ledger objects. See: [Serialized Objects](serialized-objects.md). |
|
| Serialized Objects (STO) | The way xahaud transmits and stores ledger objects. See: [Serialized Objects](/docs/hooks/concepts/serialized-objects). |
|
||||||
| Slots and Keylets | Slots can contain ledger objects and keylets identify those objects. See: [Slots and Keylets](slots-and-keylets.md). |
|
| Slots and Keylets | Slots can contain ledger objects and keylets identify those objects. See: [Slots and Keylets](/docs/hooks/concepts/slots-and-keylets). |
|
||||||
| Trace | A way to print a log line to the xrpld output from a Hook. See: [Debugging Hooks](debugging-hooks.md). |
|
| Trace | A way to print a log line to the xrpld output from a Hook. See: [Debugging Hooks](/docs/hooks/concepts/debugging-hooks). |
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ For example:
|
|||||||
* In a conventional direct XAH **Payment** transaction the two TSH are the _originating account_ and the _destination account_.
|
* In a conventional direct XAH **Payment** transaction the two TSH are the _originating account_ and the _destination account_.
|
||||||
* In a **SetSignerList** transaction the TSH are the _originating account_ and each account whose address appears in the signer list, where such accounts are active on the ledger.
|
* In a **SetSignerList** transaction the TSH are the _originating account_ and each account whose address appears in the signer list, where such accounts are active on the ledger.
|
||||||
* In an **OfferCreate** transaction, other account's offers which are crossed by the originating transaction are all weak TSH and may opt for weak execution.
|
* In an **OfferCreate** transaction, other account's offers which are crossed by the originating transaction are all weak TSH and may opt for weak execution.
|
||||||
|
* With the **IOUIssuerWeakTSH** amendment, currency issuers have their hooks executed in third-party transactions that touch or mention their currency, if they have opted into weak execution.
|
||||||
|
|
||||||
Due to the heterogenous nature of transactions on Xahau, TSH come in all shapes and sizes and can be exotic and non-intuitive. This becomes more true as time passes and more transaction types are added to the Ledger.
|
Due to the heterogenous nature of transactions on Xahau, TSH come in all shapes and sizes and can be exotic and non-intuitive. This becomes more true as time passes and more transaction types are added to the Ledger.
|
||||||
|
|
||||||
@@ -30,15 +31,15 @@ A **Strong** connection means:
|
|||||||
A **Weak** connection means:
|
A **Weak** connection means:
|
||||||
|
|
||||||
1. The originating transaction **does not** pay for the execution of the TSH Hook Chain.
|
1. The originating transaction **does not** pay for the execution of the TSH Hook Chain.
|
||||||
2. The TSH pays for the execution of their own Hook Chain through a feature called [Collect Call Hooks](collect-call.md).
|
2. The TSH pays for the execution of their own Hook Chain through a feature called [Collect Call Hooks](/docs/hooks/concepts/collect-call).
|
||||||
3. The TSH must have set an account flag `asfTshCollect` prior to the execution of the originating transaction.
|
3. The TSH must have set an account flag `asfTshCollect` prior to the execution of the originating transaction.
|
||||||
4. The TSH **does not** have the right to rollback the whole transaction by calling `rollback()` from their Hook during execution (but can still modify their own Hook state and Emit transactions.)
|
4. The TSH **does not** have the right to rollback the whole transaction by calling `rollback()` from their Hook during execution (but can still modify their own Hook state and Emit transactions.)
|
||||||
|
|
||||||
### Before or After
|
### Before or After
|
||||||
|
|
||||||
Strong TSHes have their hooks executed _before_ the originating transaction is applied to the ledger. This means they have the ability to [rollback](../technical/hooks-functions/control/rollback.md) the transaction (because it hasn't yet been applied.) This gives strongly executed hooks the ability to completely block a transaction from occurring.
|
Strong TSHes have their hooks executed _before_ the originating transaction is applied to the ledger. This means they have the ability to [rollback](/docs/hooks/functions/control/rollback) the transaction (because it hasn't yet been applied.) This gives strongly executed hooks the ability to completely block a transaction from occurring.
|
||||||
|
|
||||||
Weak TSHes have their hooks executed _after_ the originating transaction has been applied to the ledger. This means they have access to the [transaction metadata](../technical/hooks-functions/originating-transaction/meta_slot.md) but cannot prevent the transaction from occurring.
|
Weak TSHes have their hooks executed _after_ the originating transaction has been applied to the ledger. This means they have access to the [transaction metadata](/docs/hooks/functions/originating-transaction/meta_slot) but cannot prevent the transaction from occurring.
|
||||||
|
|
||||||
<Aside type="tip">
|
<Aside type="tip">
|
||||||
Strongly executed hooks can call <a href="ref:hook_again">hook_again</a> to be executed a second time as a weak execution after the originating transaction has been applied.
|
Strongly executed hooks can call <a href="ref:hook_again">hook_again</a> to be executed a second time as a weak execution after the originating transaction has been applied.
|
||||||
@@ -52,7 +53,7 @@ During the execution of `hook`:
|
|||||||
|
|
||||||
* 0 means the Hook is being executed _strongly_
|
* 0 means the Hook is being executed _strongly_
|
||||||
* 1 means the Hook is being executed _weakly_
|
* 1 means the Hook is being executed _weakly_
|
||||||
* 2 means the Hook is being executed _weakly_ after being executed _strongly_ due to a [hook_again](../technical/hooks-functions/hook-context/hook_again.md) call.
|
* 2 means the Hook is being executed _weakly_ after being executed _strongly_ due to a [hook_again](/docs/hooks/functions/hook-context/hook_again) call.
|
||||||
|
|
||||||
During the execution of `cbak`:
|
During the execution of `cbak`:
|
||||||
|
|
||||||
@@ -201,7 +202,7 @@ If a Transaction Type does not appear in the table then it has no TSHes **other
|
|||||||
| Account | Account | Strong |
|
| Account | Account | Strong |
|
||||||
| Account | RegularKey | Strong |
|
| Account | RegularKey | Strong |
|
||||||
|
|
||||||
**SignersListSet**
|
**SignerListSet**
|
||||||
|
|
||||||
| OTXN | TSH | SignerListSet |
|
| OTXN | TSH | SignerListSet |
|
||||||
| ------- | ------- | ------------- |
|
| ------- | ------- | ------------- |
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Tabs, TabItem, LinkButton, Aside } from '@astrojs/starlight/components'
|
|||||||
### Concepts
|
### Concepts
|
||||||
|
|
||||||
<LinkButton href="/docs/hooks/concepts/introduction/">Introduction</LinkButton>
|
<LinkButton href="/docs/hooks/concepts/introduction/">Introduction</LinkButton>
|
||||||
<LinkButton href="/docs/hooks/concepts/execution-metadata/">Execution Metadata</LinkButton>
|
<LinkButton href="/docs/hooks/concepts/execution-metadata">Execution Metadata</LinkButton>
|
||||||
|
|
||||||
### Behaviour
|
### Behaviour
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Aside, Tabs, TabItem, LinkButton } from '@astrojs/starlight/components'
|
|||||||
### Concepts
|
### Concepts
|
||||||
|
|
||||||
<LinkButton href="/docs/hooks/concepts/introduction/">Introduction</LinkButton>
|
<LinkButton href="/docs/hooks/concepts/introduction/">Introduction</LinkButton>
|
||||||
<LinkButton href="/docs/hooks/concepts/execution-metadata/">Execution Metadata</LinkButton>
|
<LinkButton href="/docs/hooks/concepts/execution-metadata">Execution Metadata</LinkButton>
|
||||||
|
|
||||||
### Behaviour
|
### Behaviour
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Tabs, TabItem, LinkButton } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
### Concepts
|
### Concepts
|
||||||
|
|
||||||
<LinkButton href="/docs/protocol-reference/transactions">Transactions</LinkButton>
|
<LinkButton href="/docs/protocol-reference/transactions/">Transactions</LinkButton>
|
||||||
|
|
||||||
### Behaviour
|
### Behaviour
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: etxn_fee_base
|
|||||||
import { Tabs, TabItem, LinkButton, Aside } from '@astrojs/starlight/components';
|
import { Tabs, TabItem, LinkButton, Aside } from '@astrojs/starlight/components';
|
||||||
|
|
||||||
<Aside type="caution">
|
<Aside type="caution">
|
||||||
Fees on a Hooks-enabled ledger are non trivial. See: [Hook Fees](../../../concepts/hook-fees.md) for details.
|
Fees on a Hooks-enabled ledger are non trivial. See: [Hook Fees](/docs/hooks/concepts/hook-fees) for details.
|
||||||
</Aside>
|
</Aside>
|
||||||
|
|
||||||
### Concepts
|
### Concepts
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ if (float_compare(pusd_to_send, 0n, COMPARE_LESS) == 1)
|
|||||||
| ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| float1 | int64_t | An XFL floating point enclosing number representing the first operand to the comparison |
|
| float1 | int64_t | An XFL floating point enclosing number representing the first operand to the comparison |
|
||||||
| float2 | int64_t | An XFL floating point enclosing number representing the second operand to the comparison |
|
| float2 | int64_t | An XFL floating point enclosing number representing the second operand to the comparison |
|
||||||
| mode | uint32_t | A bit-flag field consisting of any of (or any logically valid combination of) the following flags:<br /><code>COMPARE_LESS</code><br /><code>COMPARE_EQUAL</code><br /><code>COMPARE_GREATER</code><br /><br />Valid combinations are:<br /><code>COMPARE_LESS</code> | <code>COMPARE_GREATER</code><br />- Not equal<br /><br /><code>COMPARE_LESS</code> | <code>COMPARE_EQUAL</code><br />- Less than or equal to<br /><br /><code>COMPARE_GREATER</code> | <code>COMPARE_EQUAL</code><br />- Greater than or equal to |
|
| mode | uint32_t | A bit-flag field consisting of any of (or any logically valid combination of) the following flags:<br /><code>COMPARE_EQUAL</code> `1`<br /><code>COMPARE_LESS</code> `2`<br /><code>COMPARE_GREATER</code> `4`<br /><br />Valid combinations are:<br /><code>COMPARE_LESS</code> \| <code>COMPARE_GREATER</code><br />- Not equal<br /><br /><code>COMPARE_LESS</code> \| <code>COMPARE_EQUAL</code><br />- Less than or equal to<br /><br /><code>COMPARE_GREATER</code> \| <code>COMPARE_EQUAL</code><br />- Greater than or equal to |
|
||||||
|
|
||||||
<Aside type="caution">
|
<Aside type="caution">
|
||||||
Always verify the function returned `1` rather than `non-zero`, as negative error codes will be classed as `non-zero`.
|
Always verify the function returned `1` rather than `non-zero`, as negative error codes will be classed as `non-zero`.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
### Behaviour
|
### Behaviour
|
||||||
|
|
||||||
* If the hook is being strongly executed then flag this specific hook in the chain for [Again As Weak Execution](../../../concepts/weak-and-strong.md).
|
* If the hook is being strongly executed then flag this specific hook in the chain for [Again As Weak Execution](/docs/hooks/concepts/weak-and-strong).
|
||||||
* If the originating transaction successfully is applied then the hook will be called again in a second, Weak Execution.
|
* If the originating transaction successfully is applied then the hook will be called again in a second, Weak Execution.
|
||||||
|
|
||||||
### Definition
|
### Definition
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
### Behaviour
|
### Behaviour
|
||||||
|
|
||||||
* If the Hook is being [Weakly Executed](../../../concepts/weak-and-strong.md) then emplace the metadata of the originating transaction into the slot specified or into a new slot if no slot is specified
|
* If the Hook is being [Weakly Executed](/docs/hooks/concepts/weak-and-strong) then emplace the metadata of the originating transaction into the slot specified or into a new slot if no slot is specified
|
||||||
|
|
||||||
### Definition
|
### Definition
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ const meta_slot_no = meta_slot(0)
|
|||||||
<TabItem label="C">
|
<TabItem label="C">
|
||||||
| Type | Description |
|
| Type | Description |
|
||||||
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| int64_t | <p>The slot the otxn was placed in<br /><br /><code>INVALID_ARGUMENT</code><br />- specified slot number exceeds the largest possible slot number<br /><br /><code>NO_FREE_SLOTS</code><br />- the request could not granted because no free slot was avaialble to place the originating transaction into.<br /><br /><code>PREREQUISITE_NOT_MET</code><br />- The hook is being <a href="../../../concepts/weak-and-strong.md">Strongly Executed</a> and therefore no transactional metadata is available.</p> |
|
| int64_t | <p>The slot the otxn was placed in<br /><br /><code>INVALID_ARGUMENT</code><br />- specified slot number exceeds the largest possible slot number<br /><br /><code>NO_FREE_SLOTS</code><br />- the request could not granted because no free slot was avaialble to place the originating transaction into.<br /><br /><code>PREREQUISITE_NOT_MET</code><br />- The hook is being <a href="/docs/hooks/concepts/weak-and-strong">Strongly Executed</a> and therefore no transactional metadata is available.</p> |
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem label="JavaScript">
|
<TabItem label="JavaScript">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="C">
|
<TabItem label="C">
|
||||||
* Look up the value for a named parameter specified in `read_ptr` on the originating transaction (ttINVOKE only).
|
* Look up the value for a named parameter specified in `read_ptr` on the originating transaction.
|
||||||
* Write the parameter's value to `write_ptr`
|
* Write the parameter's value to `write_ptr`
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ When Hooks communicate with `xahaud` they can only pass _integer_ values. Typica
|
|||||||
|
|
||||||
### Allowed functions
|
### Allowed functions
|
||||||
|
|
||||||
Only two functions are allowed within a Hook: `hook()` and `cbak()`. Read about this [here](../../../concepts/compiling-hooks.md)
|
Only two functions are allowed within a Hook: `hook()` and `cbak()`. Read about this [here](/docs/hooks/concepts/compiling-hooks)
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="C">
|
<TabItem label="C">
|
||||||
All parameters passed to a Hook API must be one of: `uint32_t, int32_t, uint64_t, int64_t`. Typically these are pointers and lengths of buffers within the Hook's stack frame. Sometimes they are [Integer Encoded Floating Point Numbers (XFL)](../../../concepts/floating-point-numbers-xfl.md) or other data.
|
All parameters passed to a Hook API must be one of: `uint32_t, int32_t, uint64_t, int64_t`. Typically these are pointers and lengths of buffers within the Hook's stack frame. Sometimes they are [Integer Encoded Floating Point Numbers (XFL)](/docs/hooks/concepts/floating-point-numbers-xfl) or other data.
|
||||||
|
|
||||||
The parameters to a Hook API are always in the following order:
|
The parameters to a Hook API are always in the following order:
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ Some Hook APIs may only write or may only read from memory, and some might not d
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem label="JavaScript">
|
<TabItem label="JavaScript">
|
||||||
All parameters passed to a Hook API must be one of: `string, number[], bigint(xfl), object(json)`. Typically these are pointers and lengths of buffers within the Hook's stack frame. Sometimes they are [Integer Encoded Floating Point Numbers (XFL)](../../../concepts/floating-point-numbers-xfl.md) or other data.
|
All parameters passed to a Hook API must be one of: `string, number[], bigint(xfl), object(json)`. Typically these are pointers and lengths of buffers within the Hook's stack frame. Sometimes they are [Integer Encoded Floating Point Numbers (XFL)](/docs/hooks/concepts/floating-point-numbers-xfl) or other data.
|
||||||
|
|
||||||
The parameters to a Hook API are always in the following order:
|
The parameters to a Hook API are always in the following order:
|
||||||
|
|
||||||
@@ -66,4 +66,4 @@ Some Hook APIs may only write or may only read from memory, and some might not d
|
|||||||
|
|
||||||
### Return codes
|
### Return codes
|
||||||
|
|
||||||
All Hook APIs return a _signed integer_. Read about return codes here: [Return codes](return-codes.md)
|
All Hook APIs return a _signed integer_. Read about return codes here: [Return codes](/docs/hooks/functions/overview/return-codes)
|
||||||
|
|||||||
@@ -19,12 +19,14 @@ Hooks allow the creation of customized logic and automation within the Xahau, ma
|
|||||||
|
|
||||||
These triggers can be used to send on-ledger actions or execute other actions in response to the specified event. Hooks are currently available on the [Xahau network](https://xahau.network/).
|
These triggers can be used to send on-ledger actions or execute other actions in response to the specified event. Hooks are currently available on the [Xahau network](https://xahau.network/).
|
||||||
|
|
||||||
> _To learn more about the theoretical concepts of Hooks you can visit the_ [_Concepts_](concepts/introduction) _section._
|
> _To learn more about the theoretical concepts of Hooks you can visit the_ [_Concepts_](/docs/hooks/concepts/introduction) _section._
|
||||||
|
|
||||||
> _To learn how to code Hooks in C and its functions, visit_ [_Hooks C-Functions_](functions/overview/hook-api-conventions/)_._
|
> _To learn how to code Hooks in C and its functions, visit_ [_Hooks C-Functions_](/docs/hooks/functions/overview/hook-api-conventions/)_._
|
||||||
|
|
||||||
> _There is a_ [_Hooks Builder site_](https://builder.xahau.network/) _where you can develop, test, debug, and deploy your own Hooks on testnet in your browser, using our examples or building your own from scratch._
|
> _There is a_ [_Hooks Builder site_](https://builder.xahau.network/) _where you can develop, test, debug, and deploy your own Hooks on testnet in your browser, using our examples or building your own from scratch._
|
||||||
|
|
||||||
|
> _[Hookstore](https://hookstore.xahau.network/) provides a platform for discovering, sharing, and managing Hooks. Use the [Hookstore Console](https://console.hookstore.xahau.network/) to manage your Hooks and explore the ecosystem._
|
||||||
|
|
||||||
> There is an upcoming development to allow writing Hooks in JavaScript, also known as JSHooks. At the moment it can be tested using [JSHooks](https://github.com/Xahau/jshooks-alpha) repo.
|
> There is an upcoming development to allow writing Hooks in JavaScript, also known as JSHooks. At the moment it can be tested using [JSHooks](https://github.com/Xahau/jshooks-alpha) repo.
|
||||||
|
|
||||||
### Why are Hooks a Big Deal? <a href="#why-are-hooks-a-big-deal" id="why-are-hooks-a-big-deal"></a>
|
### Why are Hooks a Big Deal? <a href="#why-are-hooks-a-big-deal" id="why-are-hooks-a-big-deal"></a>
|
||||||
@@ -40,7 +42,7 @@ Hooks provide a versatile platform as they can be used for implementing a broad
|
|||||||
Hooks can be written in C or any other preferred language and then compiled into WebAssembly.
|
Hooks can be written in C or any other preferred language and then compiled into WebAssembly.
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||

|

|
||||||
<figcaption>*Using Hooks Builder, you can develop, test, debug and deploy your own Hooks on our testnet, using our examples or building your own from scratch.*</figcaption>
|
<figcaption>*Using Hooks Builder, you can develop, test, debug and deploy your own Hooks on our testnet, using our examples or building your own from scratch.*</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Each category is designed to provide you with detailed insights and instructions
|
|||||||
|
|
||||||
The Features section is where you'll find information about the unique aspects of Xahau. One of the key areas covered in this section is Developer Tooling.
|
The Features section is where you'll find information about the unique aspects of Xahau. One of the key areas covered in this section is Developer Tooling.
|
||||||
|
|
||||||
Our Developer Tooling page covers Hooks Tools and Client Libraries, simplifying the process of interacting with Hooks and the Xahau Ledger. This section is designed to help you understand the functionality and capabilities of Xahau, with practical examples to help illustrate these features in action.
|
Our Developer Tooling page covers Hooks Tools and Client Libraries, simplifying the process of interacting with Hooks and the Xahau Network. This section is designed to help you understand the functionality and capabilities of Xahau, with practical examples to help illustrate these features in action.
|
||||||
|
|
||||||
### Protocol Reference
|
### Protocol Reference
|
||||||
|
|
||||||
@@ -22,12 +22,7 @@ It also covers the different ledger objects integral to the network's operation,
|
|||||||
|
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
|
|
||||||
The Infrastructure section provides detailed instructions for setting up the build environment on both Ubuntu 22.04 and macOS 13.5.2.
|
Infrastructure is the core of the Xahau Network. Servers running the xahaud software enable users to do things like submit, verify, and query transactions. The documentation in this section provides instructions for installing, updating, configuring, and building xahaud. Concepts, such as attesting to the identity of a given server or running xahaud as a validator, are also discussed.
|
||||||
|
|
||||||
In the 'Building Xahau' chapter, you will find a step-by-step guide through the process of establishing environmental variables, installing core and Xahaud dependencies, and compiling the software.
|
|
||||||
|
|
||||||
This includes the acquisition and setup of essential components like LLVM, Boost, WasmEdge, and Protobuf. The steps explain why certain versions and configurations are needed to ensure compatibility and optimal performance.
|
**We hope this documentation provides you with the information you need to understand, use, and contribute to the Xahau Network. Happy exploring!**
|
||||||
|
|
||||||
This section ends with cloning the Xahau repository and creating the Xahaud target, setting developers on the path to adding to or deploying the Xahau network.
|
|
||||||
|
|
||||||
**We hope this documentation provides you with the information you need to understand, use, and contribute to Xahau. Happy exploring!**
|
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
title: Advanced xahaud Configuration
|
||||||
|
---
|
||||||
|
There are numerous configuration options available to xahaud operators. This section will cover some of the more commonly used options, including those required for clustering servers and configuring databases.
|
||||||
|
|
||||||
|
For complete documentation on configuration options, please see the example configuration files in the [xahaud GitHub repository](https://github.com/Xahau/xahaud/tree/dev/cfg).
|
||||||
|
|
||||||
|
## Running Databases in Memory
|
||||||
|
Users seeking to maximize xahaud performance may choose to run databases in memory, rather than on dedicated storage media. Memory databases are not suited for machines storing history, as the databases are not persistent across xahaud restarts. Likewise, the amount of history stored is contingent on available system memory. Thus, `online_delete` and `advisory_delete` are required in the `xahaud.cfg` to prevent out of memory errors. When using a memory database, it is advisable to disable SWAP, as SWAP writes the contents of memory to disk, thereby potentially defeating the benefits obtained by storing the database in memory.
|
||||||
|
|
||||||
|
To enable the memory database, edit the `xahaud.cfg` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
[relational_db]
|
||||||
|
type=RWDB
|
||||||
|
|
||||||
|
[node_db]
|
||||||
|
type=RWDB # RWDB is the memory database
|
||||||
|
online_delete=256 # This value should be low on machines using memory databases. '256' is the minimum value.
|
||||||
|
advisory_delete=0 # Do not require human intervention to delete history. This is necessary for preventing out of memory errors.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Clustering
|
||||||
|
Clustering allows xahaud operators to configure multiple xahaud servers so that the servers trust one another, thereby reducing workload. Properly clustered servers can share information about malicious or problematic websocket, rpc, and peer connections, while also automatically propagating submitted transactions throughout the cluster. Thus, if a transaction is submitted on a sever with a higher load than the transaction's fee allows for, the transaction will still propagate to other servers in the cluster, thereby increasing the probability that the transaction is included in an upcoming ledger.
|
||||||
|
|
||||||
|
Administrators operating xahaud validators can benefit from clustering, as the cluster provides connectivity for the highly secure validator, thereby eliminating the need for the validator to connect to unknown or untrusted servers.
|
||||||
|
|
||||||
|
Server operators should not cluster their servers with servers outside of their own control. Likewise, clustered servers should have low latency connections, ideally being located in the same data center.
|
||||||
|
|
||||||
|
Generating cluster seeds (public/private keys) is done via the `validation_create` [API method](/docs/features/http-websocket-apis/admin-api-methods). While the method name includes the term 'validation', this method is not used to [create the keys](/docs/infrastructure/enabling-validation) used to sign validation messages. Instead, it is used to create keys to identify any xahaud server, validating or non-validating.
|
||||||
|
|
||||||
|
To create a cluster:
|
||||||
|
1. On each xahaud instance that will be included in the cluster, generate a public key and seed: `./xahaud validation_create`
|
||||||
|
2. Open each server's `xahaud.cfg` file, and add or edit the following sections:
|
||||||
|
* `[ips_fixed]` - Include the IPv4/6 addresses and peer listening ports (e.g., `10.1.1.2 21337`) for other servers that will be in the cluster. The listening port is defined under the `[port_peer]` stanza in the `xahaud.cfg` file on the server listening for incoming connections. The default listening port for the main Xahau Network is `21337`.
|
||||||
|
* `[node_seed]` - The output in the `validation_seed` field from the `validation_create` command. This is a private key, and it must be installed on the same server on which it was generated.
|
||||||
|
* `[cluster_nodes]` - The output from the `validation_public_key` field of the `validation_create` command. This is a public key, and it must be installed on peer servers, not the server on which it was generated.
|
||||||
|
3. Restart xahaud on each server in the cluster: `systemctl restart xahaud`
|
||||||
|
4. Backup each server's `xahaud.cfg`.
|
||||||
|
5. Verify connectivity among clustered peers via the [peers](/docs/features/http-websocket-apis/admin-api-methods) API method: `./xahaud peers`
|
||||||
|
|
||||||
|
The cluster section of a `xahaud.cfg` file might look like this:
|
||||||
|
```
|
||||||
|
[ips_fixed]
|
||||||
|
10.1.1.2 21337 # Clustered peer 1
|
||||||
|
10.1.1.3 21337 # Clustered peer 2
|
||||||
|
10.1.1.4 21337 # Clustered peer 3
|
||||||
|
|
||||||
|
[cluster_nodes]
|
||||||
|
n9LzAHaB7ka318dAJWLQD1WkpGR86NyvaCzrtUAt4PuNtDCTCqxn # validation_public_key from clustered peer 1
|
||||||
|
n9KWNMsRdQ66jYHLCVgFBAQAzb16DwDioVdXSuV8pTcfEfaHkdvZ # validation_public_key from clustered peer 2
|
||||||
|
n9JFK8xUcy9S9TBmCcZKKmY28LEVjTurcpzC5XkXnyAAj1Svytee # validation_public_key from clustered peer 3
|
||||||
|
|
||||||
|
[node_seed]
|
||||||
|
sn8QEFTpBM8nydnLD6FjxKN845uRG # Private validation_seed from the local xahaud instance
|
||||||
|
|
||||||
|
```
|
||||||
@@ -90,7 +90,7 @@ deb http://apt.llvm.org/ llvm-toolchain-- main
|
|||||||
# Add the apt-repo directly with add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main"
|
# Add the apt-repo directly with add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install Rippled Dependencies
|
### Install Xahaud Dependencies
|
||||||
|
|
||||||
Install CMake
|
Install CMake
|
||||||
|
|
||||||
|
|||||||
48
src/content/docs/docs/infrastructure/enabling-validation.mdx
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: Enabling Validation in xahaud
|
||||||
|
---
|
||||||
|
Validators are xahaud nodes that are configured with an additional public/private keypair, which is used to sign each proposed ledger. Thus, validators are the primary mechanism used to achieve consensus regarding the order in which transactions are applied on the Xahau Network.
|
||||||
|
|
||||||
|
## Background Considerations
|
||||||
|
Running a validating xahaud server may seem straight forward, however, there are a number of considerations for production node operators including uptime and security. This following introductory sections provide background on these considerations.
|
||||||
|
|
||||||
|
### Security and Availability
|
||||||
|
When running xahaud as a validator, system security and availability are critical. Validator operators are expected to actively monitor their servers and to respond quickly to outages. Some validator operators choose to host standby machines in diverse data centers, so they can quickly recover from outages. While it is possible to host a reliable validator in one's home, it is unlikely that such a setup could provide sufficient stability and security for the validator to gain broader trust (e.g., inclusion on published UNLs). Similarly, validator operators are strongly discouraged from running software other than xahaud on a machine used as a xahaud validator, since this increases the probability of running out of resources or exposing a security vulnerability. System administrators who require websocket or RPC access to a server are encouraged to run different machines for queries, so resources are not taken away from the critical task of validating ledgers.
|
||||||
|
<br></br>
|
||||||
|
The private/public validation keypair should be stored and backed up in a secure, offline environment. Anyone with access to the keys of a trusted validator has potential to harm the network. After installing a validation token into the xahaud.cfg file, it is advised to restrict read access (`chmod 400 xahaud.cfg`) and change ownership of the file to "root" or "xahaud", depending on the type of install (`chown root:root xahaud.cfg`).
|
||||||
|
|
||||||
|
### Identity Attestation
|
||||||
|
To avoid a [Sybil attack](https://en.wikipedia.org/wiki/Sybil_attack) and build trust, validating xahaud nodes attest to their identity by cryptographically signing a domain name with their validation keys. This signature is then hosted at the same domain, in a [TOML format file](/docs/infrastructure/identity). In addition to verifying the identity of a validator, this TOML file can also be used to verify the identity of individual account holders on the Xahau Network, by providing an attestation signed by the private account key instead of the private validation key. The TOML file should be hosted on a web server with TLS encryption enabled at:<br></br><code>https://[your-domain.com]/.well-known/xahau.toml</code><br></br>
|
||||||
|
|
||||||
|
### Peering
|
||||||
|
To maintain a high level of security, xahaud nodes that are configured as validators should only peer with known, trusted peers. Enabling the `peer_private` setting and explicitly defining `ips_fixed` in the xahaud.cfg file will force a server to only connect to defined peers. Operating system and hardware level protections, such as firewalls, provide additional reassurance that the server is only connecting to defined peers. However, this can be a challenge, as validators with too few peers, typically less than about five, are at risk of falling out of sync with the rest of the network.
|
||||||
|
|
||||||
|
### Governance and Trust
|
||||||
|
The Xahau Network utilizes the [Governance Game](/docs/features/governance-game) as a democratic method for managing the Network. Additionally, each xahaud instance participating in the Network is required to install a list of trusted validating servers, called a Unique Node List or UNL. Thus, the existing governance participants can vote a new validator into a seat at the governance table. Separately, trusted UNL publishers, such as the [InFTF](https://inftf.org), can choose to include a validator in their recommended list of trusted validators. Running a validator does not guarantee inclusion in either the Governance Game or any UNL. Typically, validating servers that are selected for inclusion in the governance process have:
|
||||||
|
1. High availability
|
||||||
|
- Effective 24/7/365 monitoring with rapid responses to outages
|
||||||
|
2. High agreement with the rest of the network
|
||||||
|
3. An identified owner/operator and a clear geographic location
|
||||||
|
4. A proactive approach to updating and voting for [amendments](/docs/features/amendments) and fees
|
||||||
|
- This requires taking the time to watch what is in development
|
||||||
|
|
||||||
|
## Enabling Validation
|
||||||
|
Switching a stock xahaud server into a validator is a straight forward process. Essentially, users will generate a public/private keypair, which is then used to generate a token using an ephemeral key derived from the master pair. That token is installed into the `xahaud.cfg` file, thereby instructing xahaud to propose validations to the Network.
|
||||||
|
|
||||||
|
### Building the Validation Keys Tool
|
||||||
|
At this time, there is not an official release of the software used for generating validation keys. Thus, users can either build the tool from scratch or rely on a packaged version provided with rippled (this tool is not packaged with the xahaud binary). The instructions for building the tool are the same as the instructions for building rippled, and they are provided on the [ripple/validator-keys-tool](https://github.com/ripple/validator-keys-tool) repository page. There are also some [packaged binaries](https://github.com/jscottbranson/xahau-examples/) available in unofficial repositories. Users seeking to generate keys for production validators should build the tool from scratch on a secure, air-gapped machine.
|
||||||
|
|
||||||
|
While xahaud provides the `validation_create` [Admin API method](/docs/features/http-websocket-apis/admin-api-methods), this method is NOT capable of generating the necessary validation token or allowing for domain verification. Thus, despite the name, the `validation_create` method is used to create public/private keys to identify a server broadly, for example when [clustering multiple servers](/docs/infrastructure/advanced-configuration).
|
||||||
|
|
||||||
|
### Generating and Installing Validation Keys
|
||||||
|
Consider using an offline machine to generate validation keys and a validation token.
|
||||||
|
1. Navigate to the directory containing the validation keys tool: `cd [/path/to/tool]`
|
||||||
|
2. Generate a new keypair: `./validator-keys create_keys`
|
||||||
|
3. The newly generated keypair is stored in `/home/[username]/[.ripple or .xahaud]/validator-keys.json`. The storage path depends on which version of the validator-keys-tool is used.
|
||||||
|
4. Ideally, validators should provide identity attestation. To do so, set your domain in the validator-keys.json file: `./validator-keys set_domain [example.com]`
|
||||||
|
- If you do not wish to provide an identifying domain, generate a validation token without a domain: `./validator-keys create_token --keyfile /home/[username]/.xahaud/validator-keys.json`
|
||||||
|
5. Review the output of the previous command. Note the `[validator_token]`, as this will be installed in xahaud.cfg to enable validation. If a domain was set, note the `attestation=""` line, as it will need to be added into the TOML file served at your domain.
|
||||||
|
- Anytime the tool is used to generate a new `validator_token`, a field, `token_sequence`, is incremented in the `validator-keys.json` file. The Network will ignore validations from any server that has a token generated with a lower sequence number than the highest observed number. For example, if your validation token has sequence number "3" and you generate a new token with sequence number "2", validations from any machine using the new token with the lower sequence number will be ignored. This feature enables server operators to generate a new token, rather than generating new master validation keys, in the event of a security compromise or other incident.
|
||||||
|
6. Open xahaud.cfg and paste in the `[validation_token]`, then restart the xahaud service.
|
||||||
|
7. Paste the `attestation=""` into your [TOML](/docs/infrastructure/identity) file to prove the identity of your validator.
|
||||||
|
8. Ensure private validation keys are stored securely, ideally separate from the validator.
|
||||||
179
src/content/docs/docs/infrastructure/identity.mdx
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
---
|
||||||
|
title: Serving a TOML File for Identity Verification
|
||||||
|
---
|
||||||
|
***Identity verification requires two parts. NEVER TRUST TOML FILES OR ON NETWORK VALIDATOR/ACCOUNT ATTESTATIONS ALONE TO CONFIRM IDENTITY, AS ANYONE CAN SET THEM. A website (URL) must claim ownership of the validator/account, and the on-network data must match.***
|
||||||
|
|
||||||
|
Given that trust is foundational to the Xahau Network, it is ideal for entities operating xahaud validators to take credit for their servers. Identity attestation provides users with assurances that one entity isn't gaining disproportionate control over the trusted (default UNL) validators in the Network. This is is done by publishing two attestations: one from a validating server on the Xahau Network and a second from a web server that serves the identifying domain over TLS. Thus, the validator claims association with the web domain and the web domain claims association with the validator. *Without both of these claims, it is not possible to trust the identity attestation.*
|
||||||
|
|
||||||
|
Similarly, individual Xahau account holders might wish to publish a TOML file attesting that specific accounts on the network are under their control. Account ownership attestations are particularly relevant for enterprises, such as exchanges or financial institutions. As with validators, these attestations require two parts: a web server that claims ownership of a Xahau Network address as well as an on-network account address that claims to be owned by the same domain. Account attestations provide users with confidence that they are routing deposits to the correct address.
|
||||||
|
|
||||||
|
The contents and structure of this file are similar to those used by [Stellar](https://developers.stellar.org/docs/tokens/publishing-asset-info) and the [XRP Ledger](https://xrpl.org/docs/references/xrp-ledger-toml). Since the file can contain custom fields, it is important to allow flexibility when building tools designed to parse the TOML file.
|
||||||
|
|
||||||
|
## Web Server and DNS Configuration
|
||||||
|
1. The file contents must be in the [TOML format](https://github.com/toml-lang/toml).
|
||||||
|
2. The TOML file must be served from: `https://[optional-subdomain.your-domain.com]/.well-known/xahau.toml`
|
||||||
|
* The path `/.well-known/xahau.toml` must not be altered. The path must be all lower case.
|
||||||
|
* [RFC 5785](https://datatracker.ietf.org/doc/html/rfc5785) contains more information on the "/.well-known/" path.
|
||||||
|
3. A TLS certificate chaining to a trusted certificate authority must be used to encrypt connections serving the TOML file.
|
||||||
|
4. DNS Sec is recommended for the domain.
|
||||||
|
5. Subdomains may be used to serve the file, and identical files may be hosted from multiple subdomains.
|
||||||
|
6. Content type for the file is `application/toml`.
|
||||||
|
7. The TOML file must be served with a CORS header: `Access-Control-Allow-Origin: *`
|
||||||
|
8. Additional headers may be served with the TOML file, if needed.
|
||||||
|
9. Custom or nonstandard fields may be added to the TOML file, as required by individual users.
|
||||||
|
10. No field is strictly required in the TOML file.
|
||||||
|
|
||||||
|
### CORS Configuration
|
||||||
|
Apache:
|
||||||
|
```
|
||||||
|
<Location "/.well-known/xahau.toml">
|
||||||
|
Header set Access-Control-Allow-Origin "*"
|
||||||
|
</Location>
|
||||||
|
```
|
||||||
|
Nginx:
|
||||||
|
```
|
||||||
|
location /.well-known/xahau.toml {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### TOML File Contents
|
||||||
|
TOML files are typically subdivided into sections describing the TOML file itself (metadata), principals (responsible parties), and claimed assets including: validators, non-validating xahaud servers, accounts, and issued currencies.
|
||||||
|
|
||||||
|
#### Example TOML
|
||||||
|
The below example is intended to illustrate all sections that are commonly included in a Xahau Network TOML file. Individual users may not have all of these sections in their TOML file, and some users may need to include multiple of the same section. For example, if one exchange issues multiple currencies, it would include a `[[CURRENCIES]]` section for each IOU issued on the Network.
|
||||||
|
```
|
||||||
|
[METADATA]
|
||||||
|
modified = 2025-08-04T14:24:34.123Z
|
||||||
|
expired = 2025-12-31T14:24:34.123Z
|
||||||
|
|
||||||
|
[ORGANIZATION]
|
||||||
|
name = "A Company B.V."
|
||||||
|
website = "https://example.com"
|
||||||
|
email = "contact@example.com"
|
||||||
|
|
||||||
|
[[PRINCIPALS]]
|
||||||
|
name = "A. Person"
|
||||||
|
email = "a_person@example.com"
|
||||||
|
social_1 = "https://www.linkedin.com/company/incfintech"
|
||||||
|
x = "@IncFinTech"
|
||||||
|
|
||||||
|
[[VALIDATORS]]
|
||||||
|
public_key = "nHBixLw8q7XUP5AKceK2aZriN67PPjQW7JJ7hLkJgxvkTTs5go6k"
|
||||||
|
attestation = "07FA61020CA5E0605BE29D213DCC33F934B631EB6215F52D3E99D8AEA841272E300758B5C03CD2332190307324B4869838B77BAD275B31CF59D13E8FA6A8780B"
|
||||||
|
owner_country = "US"
|
||||||
|
server_country = "CA"
|
||||||
|
network_asn = "398726"
|
||||||
|
network = "21337"
|
||||||
|
unl = "https://vl.xahau.org"
|
||||||
|
|
||||||
|
[[SERVERS]]
|
||||||
|
ws = "wss://"
|
||||||
|
json_rpc = "https://"
|
||||||
|
peer = "https://"
|
||||||
|
network = "21337"
|
||||||
|
|
||||||
|
[[ACCOUNTS]]
|
||||||
|
address = "rabc..."
|
||||||
|
network = "21337"
|
||||||
|
desc = "This wallet is used for client deposits."
|
||||||
|
|
||||||
|
[[CURRENCIES]]
|
||||||
|
code = "USD"
|
||||||
|
issuer = "rabc..."
|
||||||
|
symbol = "$"
|
||||||
|
network = "21337"
|
||||||
|
display_decimals = 2
|
||||||
|
|
||||||
|
[[CURRENCIES]]
|
||||||
|
code = "EUR"
|
||||||
|
issuer = "rabc..."
|
||||||
|
symbol = "€"
|
||||||
|
network = "21337"
|
||||||
|
display_decimals = 2
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Metadata
|
||||||
|
Dates/times in the TOML file should be specified in UTC and include millisecond precision. For example, `2025-08-04T14:24:34.123Z`. Only one metadata section can be included in a TOML file.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`modified`</td><td>Date-Time</td><td>Date and time when the TOML was most recently modified.</td></tr>
|
||||||
|
<tr><td>`expires`</td><td>Date-Time</td><td>After this date/time, the TOML file will be considered expired and thus invalid.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Organization
|
||||||
|
If an entity rather than an individual is claiming responsibility for the TOML file, that entity should use this section to identify itself. It would be unusual and likely an error for one TOML file to have multiple `[ORGANIZATION]` sections. If multiple sections are needed, ensure an additional set of brackets are added: `[[ORGANIZATION]]`.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`name`</td><td>String</td><td>The name of organization hosting the TOML file.</td></tr>
|
||||||
|
<tr><td>`email`</td><td>String</td><td>Email address for the organization.</td></tr>
|
||||||
|
<tr><td>`website`</td><td>String</td><td>Website for the organization (typically this is the same as the URL where the TOML is hosted).</td></tr>
|
||||||
|
<tr><td>`social_[x]`</td><td>String</td><td>Link to a social media profile. This field is not standardized at this time. Thus, `x = "@IncFinTech` and `social_1 = https://x.com/IncFinTech` are both valid.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Principals
|
||||||
|
This section is used to identify individual points of contact for the Xahau Network infrastructure and/or accounts.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`name`</td><td>String</td><td>The name of an individual responsible for overseeing the organizations Xahau Network operations.</td></tr>
|
||||||
|
<tr><td>`email`</td><td>String</td><td>Email address for the principal.</td></tr>
|
||||||
|
<tr><td>`website`</td><td>String</td><td>Website for the principal.</td></tr>
|
||||||
|
<tr><td>`social_[x]`</td><td>String</td><td>Link to a social media profile. This field is not standardized at this time. Thus, `x = "@IncFinTech` and `social_1 = https://x.com/IncFinTech` are both valid.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Validators
|
||||||
|
Validator operators are strongly encouraged to publish an attestation as proof of ownership. Providing geographic and ISP information is important, as it enables trusted (dUNL) list publishers to evaluate the geographic diversity of trusted validators on the network. If too many trusted validators are concentrated in one geographic region or on one network ASN, there is a risk to the broader network.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`public_key`</td><td>String</td><td>The master public key used to validations.</td></tr>
|
||||||
|
<tr><td>`attestation`</td><td>String</td><td>Domain attestation generated by the validator-keys tool.</td></tr>
|
||||||
|
<tr><td>`owner_country`</td><td>String</td><td>[ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code for the entity or person in charge of the server.</td></tr>
|
||||||
|
<tr><td>`server_country`</td><td>String</td><td>ISO-3166-2 country code for the server's physical location.</td></tr>
|
||||||
|
<tr><td>`network_asn`</td><td>String</td><td>The Autonomous System Number (ASN) for the Internet Service Provider(s) providing internet connectivity to the server.</td></tr>
|
||||||
|
<tr><td>`network`</td><td>String</td><td>Identifies which network (Mainnet, Testnet, etc.) the server participates in.</td></tr>
|
||||||
|
<tr><td>`unl`</td><td>String</td><td>A URL hosting the list of trusted validators that the validator subscribes to.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Servers
|
||||||
|
Network participants who provide public peering or API access via websocket or RPC can publish details for accessing individual servers.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`ws`</td><td>String</td><td>The URL for public websocket access. This begins with "ws:// or wss://".</td></tr>
|
||||||
|
<tr><td>`json_rpc`</td><td>String</td><td>The URL for public RPC access. This begins with "http:// or https://".</td></tr>
|
||||||
|
<tr><td>`peer`</td><td>String</td><td>URL other servers can use to peer with the server identified in the TOML.</td></tr>
|
||||||
|
<tr><td>`network`</td><td>String</td><td>Identifies which network (Mainnet, Testnet, etc.) the server participates in.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Accounts
|
||||||
|
Entities needing account verification can use this section to claim ownership of a given Xahau Network wallet.
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`address`</td><td>String</td><td>The encoded public key (beginning with `r`) identifying a Xahau Network wallet.</td></tr>
|
||||||
|
<tr><td>`network`</td><td>String</td><td>Identifies which network (Mainnet, Testnet, etc.) the wallet is used on.</td></tr>
|
||||||
|
<tr><td>`desc`</td><td>String</td><td>Human readable description of what the wallet is used for.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
#### Currencies
|
||||||
|
It is possible for multiple wallets to issue currencies with the same currency code. ***Thus, it is critical that users verify the issuing wallet as well as the currency code.***
|
||||||
|
<table>
|
||||||
|
<thead><tr><td>Field</td><td>Data Type</td><td>Description</td></tr></thead>
|
||||||
|
<tr><td>`code`</td><td>String</td><td>The ticker symbol of the token as three digits or 40 hex characters. This field is case sensitive.</td></tr>
|
||||||
|
<tr><td>`issuer`</td><td>String</td><td>The wallet address (beginning with `r`) that issued the currency. The referenced wallet should be present in the `[[ACCOUNTS]]` section of the TOML file.</td></tr>
|
||||||
|
<tr><td>`symbol`</td><td>String</td><td>The symbol (e.g., "$") used to identify the currency.</td></tr>
|
||||||
|
<tr><td>`network`</td><td>String</td><td>Identifies which network (Mainnet, Testnet, etc.) the currency is issued on.</td></tr>
|
||||||
|
<tr><td>`display_decimals`</td><td>Integer</td><td>The number of digits to the right of the decimal point that clients should display when showing quantities of the currency.</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## Validator Domain Verification
|
||||||
|
Hosting the `xahau.toml` file enables domain owners to claim ownership of a validator. However, it is critical that the validator also acknowledge this ownership, so third parties can reliably trust network operators. Since validators form the backbone of forward progress on the Xahau Network, it is important that operators appropriately secure their private validation keys.
|
||||||
|
|
||||||
|
If you are not familiar with the Validator Keys Tool, see the page on [Enabling Validation in xahaud](/docs/infrastructure/enabling-validation).
|
||||||
|
|
||||||
|
Users who have already complete the steps on the Enabling Validation page do not need to repeat them. Simply paste the `attestation = ""` field into the TOML file and ensure the correct `[validator_token]` is installed in the `xahaud.cfg`.
|
||||||
|
|
||||||
|
Users who did not configure a domain when they initially generated a validation token may do so by running `./validator-keys set_domain [example.com]`. Prior to attempting to set the domain, ensure that the master validation key JSON file is stored in the correct path: `/home/[username]/[.ripple or .xahaud]/validator-keys.json`.
|
||||||
|
|
||||||
|
## Wallet Address Verification
|
||||||
|
Consistent with validator domain verification, verifying ownership of a wallet address on the Xahau Network requires two components: A TOML file served over a TLS encrypted connection (with a properly chained certificate) from the domain claiming ownership and a transaction from the wallet address verifying the ownership claim. To claim ownership of a wallet address:
|
||||||
|
1. Include the address as an `[[accounts]]` section in the TOML file.
|
||||||
|
2. Submit an [AccountSet transaction](/docs/protocol-reference/transactions/transaction-types/accountset) with the `Domain` field specified.
|
||||||
61
src/content/docs/docs/infrastructure/installing-xahaud.mdx
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
title: Installing xahaud
|
||||||
|
description: >-
|
||||||
|
The software behind Xahau is open source, and anyone can run a node locally. Users can run a Docker container, a local instance, or a binary file.
|
||||||
|
---
|
||||||
|
When running a node, users will have to configure settings based on whether the node will run on the test network or the main network. When transitioning a single node from one network to the other, database files must be wiped, except wallet.db, which contains the server's identity credentials.
|
||||||
|
|
||||||
|
In addition to [building from scratch](/docs/infrastructure/building-xahau), there are three ways to install xahaud: Docker, locally, and using a portable binary. The below install methods all rely on the xahaud builds published at: [https://build.xahau.tech](https://build.xahau.tech), though the end result is different.
|
||||||
|
## Docker Container
|
||||||
|
|
||||||
|
To run xahaud in a Docker Container:
|
||||||
|
|
||||||
|
1. Clone the appropriate (Mainnet or Testnet) Xahau Docker GitHub repository using the URL in the table below: <code>git clone [repository-url]</code>
|
||||||
|
2. Navigate to the repository directory: <code>cd [repository-name]</code>
|
||||||
|
3. Run: <code>./build</code>
|
||||||
|
4. Run: <code>./up</code>
|
||||||
|
5. Commands and additional information are located in the README.md file in the Docker repository. Configuration files and databases are located in the `store` directory inside the Docker directory.
|
||||||
|
|
||||||
|
## Local Install
|
||||||
|
The Xahau Docker repositories (Mainnet and Testnet) each contains a script to automate the local install process, so that xahaud can be run outside of Docker. These scripts will create systemd files, a 'xahaud' user, and default configuration files. The URLs for these scripts are in the table at the bottom of this page. To install locally:
|
||||||
|
|
||||||
|
1. Download and run the install script: <code>curl -sL [https://link-to-script] | bash</code>
|
||||||
|
2. Edit the configuration file: <code>/opt/xahahud/etc/xahaud.cfg</code>
|
||||||
|
3. Verify and, if needed, edit the contents of the trusted validators file: <code>/opt/xahaud/etc/validators-xahau.txt</code>
|
||||||
|
4. Start and enable xahaud to run automatically: <code>systemctl enable --now xahaud</code>
|
||||||
|
5. Verify xahaud is running: <code>/opt/xahaud/bin/xahaud server_info</code>
|
||||||
|
|
||||||
|
## Binary Files
|
||||||
|
Users seeking to install xahaud in non-traditional environments (e.g., outside Ubuntu) may benefit from the binary release packages, which are built with necessary dependencies. This install process is essentially the same as the "Local Install", however, xahaud is not configured as a systemd service and config files are not installed in default directories.
|
||||||
|
1. Download the latest release from [https://build.xahau.tech](https://build.xahau.tech)
|
||||||
|
2. Download and edit the relevant configuration and trusted validators files (see the table below for links to Mainnet and Testnet configurations). Ensure the paths to the validators-xahau.txt file, the database directory, and the logfile are accessible.
|
||||||
|
3. Change permissions on the downloaded binary, so it is executable: <code>chmod 500 [/path/to/xahaud]</code>
|
||||||
|
4. Consider restricting access to xahaud.cfg and validators-xahau.txt: <code>chmod 400 xahaud.cfg validators-xahau.txt</code>
|
||||||
|
5. Run the binary: <code>./[path/to/xahaud] --net --conf [path to xahaud.cfg]</code>
|
||||||
|
6. Verify xahaud is running: <code>./[path/to/xahaud] server_info</code>
|
||||||
|
|
||||||
|
## Resources, Peering, and Configurations
|
||||||
|
This peering is relevant for both Docker containers and local installations.
|
||||||
|
|
||||||
|
<table style="width: 100%; table-layout: fixed;">
|
||||||
|
<thead><tr><th>Resource</th><th>Main Network</th><th>Test Network</th></tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td>Documentation and Resources</td><td><a href="https://xahau.network/">https://xahau.network/</a></td><td>Same as Mainnet</td></tr>
|
||||||
|
<tr><td>Hooks Smart Contract Documentation</td><td><a href="https://xahau.network/docs/hooks/">https://xahau.network/docs/hooks/</a></td><td>Same as Mainnet</td></tr>
|
||||||
|
<tr><td>Explorer</td><td><a href="https://explorer.xahau.network/">https://explorer.xahau.network/</a></td><td><a href="https://explorer.xahau-test.net/">https://explorer.xahau-test.net</a></td></tr>
|
||||||
|
<tr><td>Public WebSocket URL</td><td><a href="wss://xahau.network">wss://xahau.network</a></td><td><a href="wss://xahau-test.net">wss://xahau-test.net</a></td></tr>
|
||||||
|
<tr><td>Network ID and Peer Listening Port</td><td>21337 <a href="https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=21337">IANA assigned port</a></td><td>21338</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Peering and Bootstrap Servers</td>
|
||||||
|
<td>bacab.alloy.ee 21337<br></br>hubs.xahau.as16089.net 21337</td>
|
||||||
|
<td>79.110.60.122 21338<br></br>79.110.60.124 21338<br></br>79.110.60.125 21338<br></br>79.110.60.121 21338<br></br><br></br>2a0c:3bc0::1c74 21338<br></br>2a0c:3bc0::169d 21338<br></br>2a0c:3bc0::1aaf 21338<br></br>2a0c:3bc0::1d78 21338</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td>Docker Container</td><td><a href="https://github.com/Xahau/mainnet-docker">https://github.com/Xahau/mainnet-docker</a></td><td><a href="https://github.com/Xahau/Xahau-Testnet-Docker">https://github.com/Xahau/Xahau-Testnet-Docker</a></td></tr>
|
||||||
|
<tr><td>Local Install Scripts</td><td><a href="https://raw.githubusercontent.com/Xahau/mainnet-docker/refs/heads/main/xahaud-install-update.sh">https://raw.githubusercontent.com/Xahau/mainnet-docker/refs/heads/main/xahaud-install-update.sh</a></td><td><a href="https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/xahaud-install-update.sh">https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/xahaud-install-update.sh</a></td></tr>
|
||||||
|
<tr><td>Binary Releases</td><td><a href="https://build.xahau.tech">https://build.xahau.tech</a></td><td>Same as Mainnet</td></tr>
|
||||||
|
<tr><td>Sample Configuration File</td><td><a href="https://github.com/Xahau/mainnet-docker/blob/main/store/etc/xahaud.sample.cfg">https://github.com/Xahau/mainnet-docker/blob/main/store/etc/xahaud.sample.cfg</a></td><td><a href="https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/xahaud.cfg">https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/xahaud.cfg</a></td></tr>
|
||||||
|
<tr><td>Sample Trusted Validators (UNL) File</td><td><a href="https://github.com/Xahau/mainnet-docker/blob/main/store/etc/validators-xahau.sample.txt">https://github.com/Xahau/mainnet-docker/blob/main/store/etc/validators-xahau.sample.txt</a></td><td><a href="https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/validators-xahau.txt">https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/validators-xahau.txt</a></td></tr>
|
||||||
|
<tr><td>Documented Configuration Files</td><td><a href="https://github.com/Xahau/xahaud/tree/dev/cfg">https://github.com/Xahau/xahaud/tree/dev/cfg</a></td><td>Same as Mainnet</td></tr>
|
||||||
|
<tr><td>Github Build Actions (release numbers)</td><td style="word-break: break-all;"><a href="https://github.com/Xahau/xahaud/actions?query=branch%3Arelease+is%3Asuccess+build+using+docker">https://github.com/Xahau/xahaud/actions?query=branch%3Arelease+is%3Asuccess+build+using+docker</a></td><td>Same as Mainnet</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
55
src/content/docs/docs/infrastructure/interacting.mdx
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
title: Interacting With xahaud Using Websocket and RPC
|
||||||
|
---
|
||||||
|
The xahaud software provides both websocket and RPC interfaces that can be configured for a variety of use cases, such as submitting transactions or querying ledger history. Some users may choose to place proxy software in front of xahaud to provide encryption, load balancing, or other benefits. It is possible to install TLS certificates in the xahaud.cfg file using parameters such as `ssl_key = [/path/to/key]`.
|
||||||
|
|
||||||
|
## Configuring Websocket and RPC Ports
|
||||||
|
To enable listening ports, edit the `xahaud.cfg` file. Enabled ports are listed under the `[server]` stanza in the configuration file. Each port listed under the `[server]` section must be further defined via it's own stanza. In addition to configuring websocket or RPC ports, administrators can also configure the port used to listen for incoming peer connections (`port_peer`). On validating servers, it is ideal to remove `port_peer` from the configuration file, to avoid incoming connections. A configuration file with the peer protocol, one websocket port, and one RPC port might look like:<br></br><br></br>
|
||||||
|
|
||||||
|
```
|
||||||
|
[server]
|
||||||
|
port_peer
|
||||||
|
port_ws_public
|
||||||
|
port_rpc_public
|
||||||
|
|
||||||
|
[port_peer] # Name of the port.
|
||||||
|
protocol = peer # Required field.
|
||||||
|
port = 21337 # Required field.
|
||||||
|
ip = :: # Address of interface to bind to.
|
||||||
|
|
||||||
|
[port_ws_public]
|
||||||
|
protocol = ws
|
||||||
|
port = 16006
|
||||||
|
ip = ::
|
||||||
|
limit = 150 # Maximum number of clients allowed to connect to a given port. "0" is unlimited.
|
||||||
|
admin = [ 10.10.10.5, 10.11.11.0/24 ] # IP addresses or subnets allowed to submit [admin](/docs/features/http-websocket-apis/admin-api-methods) requests.
|
||||||
|
secure_gateway = [ 10.10.10.20, 10.15.15.0/24 ] # Addresses allowed to send X-Forwarded-For and X-User headers.
|
||||||
|
|
||||||
|
[port_rpc_public]
|
||||||
|
protocol = http
|
||||||
|
port = 16007
|
||||||
|
ip = ::
|
||||||
|
```
|
||||||
|
<br></br>
|
||||||
|
Additional configuration options for websocket and RPC connections are available in the [Example Configuration File](https://github.com/Xahau/xahaud/blob/dev/cfg/rippled-example.cfg).
|
||||||
|
|
||||||
|
## UDP RPC
|
||||||
|
|
||||||
|
xahaud supports UDP-based RPC for high-performance, low-latency queries. UDP RPC is useful for applications that need to make many rapid queries and can tolerate occasional packet loss.
|
||||||
|
|
||||||
|
To enable UDP RPC, add a UDP port definition in your `xahaud.cfg`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[server]
|
||||||
|
port_udp_rpc
|
||||||
|
|
||||||
|
[port_udp_rpc]
|
||||||
|
protocol = http
|
||||||
|
port = 16008
|
||||||
|
ip = ::
|
||||||
|
transport = udp
|
||||||
|
```
|
||||||
|
|
||||||
|
UDP RPC requests use the same JSON-RPC format as HTTP RPC, but are sent as UDP datagrams. Responses are also sent via UDP. Since UDP is connectionless, each request must include all necessary context, and clients should handle potential packet loss by implementing retry logic.
|
||||||
|
|
||||||
|
**Note:** UDP RPC is best suited for read-only operations. Transaction submission should use WebSocket or HTTP RPC for reliability.
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
title: Node Requirements
|
|
||||||
---
|
|
||||||
Hardware requirements for nodes (RPC, validator, ...) should be generally along the lines of the specs outlined below.
|
|
||||||
|
|
||||||
For specific node use cases (e.g. full history) specs may differ (and grow) over time.
|
|
||||||
|
|
||||||
### Nodes should run (reasonably) well for own use with:
|
|
||||||
|
|
||||||
* CPU: 6+ cores
|
|
||||||
* Memory: 16GB+ (32GB advised)
|
|
||||||
* Disk IO: 10k random RW
|
|
||||||
* Disk size: 100GB+
|
|
||||||
* Filesystem: EXT4/XFS/...
|
|
||||||
* Network IO: 100Mbit+
|
|
||||||
|
|
||||||
### 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>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
title: Running a Mainnet Node
|
|
||||||
description: >-
|
|
||||||
Xahau Mainnet allows for running your own local node. You can run a Docker
|
|
||||||
Container or connect with your own local running instance.
|
|
||||||
---
|
|
||||||
### Connecting to the Xahau Mainnet with Docker
|
|
||||||
|
|
||||||
To connect to the Xahau Mainnet you can use this docker container:
|
|
||||||
|
|
||||||
[https://github.com/Xahau/mainnet-docker](https://github.com/Xahau/mainnet-docker)
|
|
||||||
|
|
||||||
1. Clone the repository
|
|
||||||
2. Run `./build`
|
|
||||||
3. Run `./up`
|
|
||||||
4. Check the README for commands, etc. [https://github.com/Xahau/mainnet-docker/blob/main/README.md](https://github.com/Xahau/mainnet-docker/blob/main/README.md)
|
|
||||||
5. Connect using WebSockets or RPC:\
|
|
||||||
WebSocket: `ws://localhost:16006`\
|
|
||||||
RPC (HTTP POST): `http://localhost:16007`
|
|
||||||
|
|
||||||
## Local instance
|
|
||||||
|
|
||||||
### Peering info
|
|
||||||
|
|
||||||
<table data-header-hidden><thead><tr><th width="236.34908136482937"></th><th></th></tr></thead><tbody><tr><td>Info</td><td><a href="https://xahau.network/">https://xahau.network/</a></td></tr><tr><td>Explorer</td><td><a href="https://explorer.xahau.network/">https://explorer.xahau.network/</a></td></tr><tr><td>Technical docs</td><td><a href="https://xrpl-hooks.readme.io/">https://xrpl-hooks.readme.io</a></td></tr><tr><td>WebSocket URL</td><td><a href="wss://xahau.network">wss://xahau.network</a></td></tr><tr><td>Public peering </td><td>Network ID: <strong><code>21337</code></strong></td></tr><tr><td></td><td>- Hub (Cluster) 1: <code>bacab.alloy.ee 21337</code></td></tr><tr><td></td><td>- Hub (Cluster) 2: <code>hubs.xahau.as16089.net 21337</code></td></tr><tr><td></td><td>- Hub 3: <code>xahau-1.cabbit.tech 21337</code></td></tr><tr><td></td><td>- Hub 4: <code>xahau-2.cabbit.tech 21337</code></td></tr><tr><td>Binary & config</td><td><p>For ubuntu 22.04:<br /><br /><strong>Download:</strong></p><p><a href="https://build.xahau.tech"><strong>https://build.xahau.tech</strong></a></p><p></p><p>For the latest release build numbers, see the <a href="https://github.com/Xahau/xahaud/actions?query=branch%3Arelease+is%3Asuccess+build+using+docker"><strong>Github Build Actions</strong></a>.</p><p><br />Extract, then run:<br /><code>./xahaud --net --conf xahaud.cfg</code> Config file sample (to be saved as <code>xahaud.cfg</code>):</p><ul><li><p><a href="https://github.com/Xahau/mainnet-docker/blob/main/store/etc/xahaud.sample.cfg">https://github.com/Xahau/mainnet-docker/blob/main/store/etc/xahaud.cfg</a></p><ul><li>Edit the database path, etc if needed.</li></ul></li><li>In the same folder as the <code>xahaud.cfg</code> config, the <code>validators-xahau.txt</code> file should be stored:<br /><br /><a href="https://github.com/Xahau/mainnet-docker/blob/main/store/etc/validators-xahau.sample.txt">https://github.com/Xahau/mainnet-docker/blob/main/store/etc/validators-xahau.txt</a></li></ul></td></tr><tr><td>UNL (VL)</td><td><a href="https://vl.xahau.org/">https://vl.xahau.org/</a></td></tr></tbody></table>
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
title: Running a Testnet Node
|
|
||||||
description: >-
|
|
||||||
Xahau Testnet allows for running your own local node. You can run a Docker
|
|
||||||
Container or connect with your own local running instance.
|
|
||||||
---
|
|
||||||
### Connecting to the Xahau Testnet with Docker
|
|
||||||
|
|
||||||
To connect to the Xahau Testnet (Hooks V3 testnet) you can use this Docker container:
|
|
||||||
|
|
||||||
[https://github.com/Xahau/Xahau-Testnet-Docker/](https://github.com/Xahau/Xahau-Testnet-Docker/)
|
|
||||||
|
|
||||||
1. Clone the repository
|
|
||||||
2. Run `./build`
|
|
||||||
3. Run `./up`
|
|
||||||
4. Check the README for commands, etc.\
|
|
||||||
[https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/README.md](https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/README.md)
|
|
||||||
5. Connect using WebSockets or RPC:\
|
|
||||||
WebSocket: `ws://localhost:16006`\
|
|
||||||
RPC (HTTP POST): `http://localhost:16007`
|
|
||||||
|
|
||||||
## Local instance
|
|
||||||
|
|
||||||
### Peering info
|
|
||||||
|
|
||||||
<table data-header-hidden><thead><tr><th width="181"></th><th></th></tr></thead><tbody><tr><td>Info & Faucet</td><td><a href="https://xahau-test.net/">https://xahau-test.net</a></td></tr><tr><td>Explorer</td><td><a href="https://explorer.xahau-test.net/">https://explorer.xahau-test.net</a></td></tr><tr><td>Technical docs</td><td><a href="https://xrpl-hooks.readme.io/">https://xrpl-hooks.readme.io</a></td></tr><tr><td>WebSocket URL</td><td><a href="https://xahau-test.net/">wss://xahau-test.net</a></td></tr><tr><td>Public peering V4</td><td>Network ID: <strong><code>21338</code></strong><br /><br /><code>79.110.60.122</code> Port: 21338<br /><code>79.110.60.124</code> Port: 21338<br /><code>79.110.60.125</code> Port: 21338<br /><code>79.110.60.121</code> Port: 21338</td></tr><tr><td>Public peering V4</td><td><p><code>2a0c:3bc0::1c74</code> Port: 21338</p><p><code>2a0c:3bc0::169d</code> Port: 21338</p><p><code>2a0c:3bc0::1aaf</code> Port: 21338</p><p><code>2a0c:3bc0::1d78</code> Port: 21338</p></td></tr><tr><td>Binary & config</td><td><p>For ubuntu 22.04:<br /><br /><strong>Download:</strong></p><p><a href="https://build.xahau.tech/2023.9.25-dev%2B336"><strong>https://build.xahau.tech</strong></a> <strong>- fetch the latest RELEASE version</strong><br /></p><p>Extract, then run: <br /><code>./xahaud --net --quorum=2 --conf xahaud.cfg</code> Config file sample (to be saved as <code>xahaud.cfg</code>):</p><ul><li><p><a href="https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/xahaud.cfg">https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/xahaud.cfg</a></p><ul><li>Edit the database path, etc if needed.</li></ul></li><li>In the same folder as the <code>xahaud.cfg</code> config, the <code>validators-xahau.txt</code> file should be stored:<br /><br /><a href="https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/validators-xahau.txt">https://github.com/Xahau/Xahau-Testnet-Docker/blob/main/store/etc/validators-xahau.txt</a></li></ul></td></tr><tr><td>Validators</td><td><code>[validators]</code><br /><code>nHBoJCE3wPgkTcrNPMHyTJFQ2t77EyCAqcBRspFCpL6JhwCm94VZ</code><br /><code>nHUVv4g47bFMySAZFUKVaXUYEmfiUExSoY4FzwXULNwJRzju4XnQ</code><br /><code>nHBvr8avSFTz4TFxZvvi4rEJZZtyqE3J6KAAcVWVtifsE7edPM7q</code><br /><code>nHUH3Z8TRU57zetHbEPr1ynyrJhxQCwrJvNjr4j1SMjYADyW1WWe</code></td></tr></tbody></table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Integrating Xumm with Hooks V3
|
|
||||||
|
|
||||||
<figure>
|
|
||||||

|
|
||||||
</figure>
|
|
||||||
|
|
||||||
To connect Xumm to the Hooks V3 staging net, scan this QR with the QR scanner in Xumm to add the endpoint (above) to the Xumm node list.
|
|
||||||
24
src/content/docs/docs/infrastructure/system-requirements.mdx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
title: System Requirements
|
||||||
|
---
|
||||||
|
Hardware requirements for nodes customized for various tasks (e.g., RPC/WS, hubs, validators, etc.) should be consistent with the specs outlined below. Consider tailoring your individual system based on your intended use case.
|
||||||
|
|
||||||
|
## Types of Nodes
|
||||||
|
It is possible to run xahaud in diverse configurations, based on a users needs. Similarly, one xahaud server can be configured for multiple purposes, such as a full history server that is also used for RPC/WS calls. The server's purpose dictates necessary system requirements. Some xahaud configurations might include:
|
||||||
|
1. Stock server - This term is commonly used to refer to any xahaud node that is not configured as a validator. A stock server generally has very few changes from the default configuration.
|
||||||
|
2. Full history servers - Are useful for querying historic data. In addition to a large amount of storage space, potentially higher disk IOPS and network bandwidth are needed, depending on the number of users querying the server.
|
||||||
|
3. RPC/Websocket servers - Are tailored for tasks such as submitting transactions or querying current ledger data, like order books or the validation stream. Nginx or other proxy sofware is often placed in front of RPC/WS servers to provide load balancing, encryption, and other benefits.
|
||||||
|
4. Hub server - Peering between nodes is critical for relaying messages across the Xahau Network, and a single server can be configured to provide peering for hundreds of peers. However, a large amount of bandwidth can be required (10 Gbit+).
|
||||||
|
5. [Validating servers](/docs/infrastructure/enabling-validation) - Validators differ from other types of nodes, in that they require an additional cryptographic key to be installed, so they can sign off on the sequence of transactions in a proposed ledger. As availability and security are critical, it is not recommended to use a validator for other functions.
|
||||||
|
|
||||||
|
## General Notes
|
||||||
|
* Builds are typically tested on Ubuntu LTS. However, Docker, portable binaries, custom builds, and other install methods allow for diverse operating system support.
|
||||||
|
* Typically one IPv4 and/or IPv6 address is needed for each xahaud instance. Running multiple instances behind one IPv4 address is not recommended.
|
||||||
|
* Machines storing full history must use XFS or similar to avoid limitations with single file size in EXT4 (max. file size of 16TB). If storing less history, EXT4 is sufficient.
|
||||||
|
* It may be possible to run xahaud on machines that do not meet the below "Minimum" specifications for production servers. However, doing so risks instability.
|
||||||
|
* These system requirements may grow over time. For example, disk space for full history servers is consistently increasing.
|
||||||
|
* As of August 6, 2025 <strong>the full history for the Xahau Network is approximately 8TB</strong>.
|
||||||
|
|
||||||
|
## Recommended Specs for Production xahaud Servers
|
||||||
|
|
||||||
|
<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 (2.5+ GHz x86_64)</td><td>8 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 (sustained)</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>20TB+</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>
|
||||||
49
src/content/docs/docs/infrastructure/updating-xahaud.mdx
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: Updating xahaud
|
||||||
|
---
|
||||||
|
The process for updating xahaud varies depending on the install method used, however, all three methods rely on the releases published at [https://build.xahau.tech](https://build.xahau.tech). When updating a validator, hub, or other 'critical' infrastructure, please check the network health prior to restarting a server to install an update. It is possible to automate the update process using a crontab entry and an update script, however, administrators are discouraged from doing so, as automatic updates may result in restarts at times when the network is unstable. Similarly, human presence allows operators to ensure updates are successful, thereby minimizing downtime.
|
||||||
|
|
||||||
|
## Backup
|
||||||
|
Users should always keep backups of:
|
||||||
|
1. The primary configuration file: `xahaud.cfg`
|
||||||
|
- Location varies based on install type.
|
||||||
|
2. The trusted validators file: `validators-xahau.txt`
|
||||||
|
- Location is specified in 'xahaud.cfg'.
|
||||||
|
3. The server's identity credentials: `wallet.db`
|
||||||
|
- Located in the database directory defined in 'xahaud.cfg'.
|
||||||
|
4. Validators must keep their validation private key backed up in a secure, offline location.
|
||||||
|
|
||||||
|
## Updating Docker Containers
|
||||||
|
Updating xahaud inside a Docker container involves replacing the currently running binary with the new version, downloaded from [https://build.xahau.tech](https://build.xahau.tech). This can be accomplished either by replacing the xahaud binary inside the container or by updating the entire container.
|
||||||
|
<br></br>
|
||||||
|
To update the xahaud binary inside a running Docker container:
|
||||||
|
1. Download the [script](https://gist.githubusercontent.com/WietseWind/2ed35d85dcd056d82645de2958934f86/raw/34be773fd6af42e82cc3a21baf70bfb1e2a6c583/update.sh): `wget https://gist.githubusercontent.com/WietseWind/2ed35d85dcd056d82645de2958934f86/raw/34be773fd6af42e82cc3a21baf70bfb1e2a6c583/update.sh`
|
||||||
|
2. Edit the script and change the first line to the [release version](https://build.xahau.tech) you would like to install.
|
||||||
|
3. Run the script: `bash ./update.sh`
|
||||||
|
4. Verify xahaud is running: `docker exec xahaud-[mainnet/testnet] xahaud server_info`
|
||||||
|
<br></br>
|
||||||
|
To replace the current Docker image with a new version, without overwriting databases or configuration files (which are ignored via the .gitignore file):
|
||||||
|
1. Navigate to the repository: `cd [/path/to/docker-repo]`
|
||||||
|
2. Update to the latest version `git pull`
|
||||||
|
3. List running Docker containers and note the name of the xahaud container: `docker ps`
|
||||||
|
4. Stop the old xahaud instance: `docker stop xahaud-[mainnet/testnet]`
|
||||||
|
5. Remove the old instance: `docker rm xahaud-[mainnet/testnet]`
|
||||||
|
6. Start the new instance: `./build && ./up`
|
||||||
|
|
||||||
|
## Updating Local Installations
|
||||||
|
To update a locally installed version of xahaud, simply replace the current binary with a new binary:
|
||||||
|
1. Download the new binary from: [https://build.xahau.tech](https://build.xahau.tech)
|
||||||
|
2. Mark the new binary executable: `chmod +x [/path/to/download]`
|
||||||
|
3. Stop the currently running xahaud instance: `/opt/xahaud/bin/xahaud stop`
|
||||||
|
4. Replace the old binary with the new: `mv [/path/to/download] /opt/xahaud/bin/xahaud`
|
||||||
|
5. Start xahaud: `systemctl start xahaud`
|
||||||
|
6. Verify xahaud is running: `/opt/xahaud/bin/xahaud server_info`
|
||||||
|
<br></br>
|
||||||
|
A [script](https://gist.githubusercontent.com/WietseWind/9480a4fc95e904e54524406005c8c963/raw/2b200fdc2e5b471ae4f6625674aff1765d63e744/update.sh) that automates the above steps is available.
|
||||||
|
|
||||||
|
## Updating Binary Files
|
||||||
|
Updating the xahaud binary files is essentially the same as the original install instructions:
|
||||||
|
1. Remove the currently running version: `rm [/path/to/xahaud]`
|
||||||
|
2. Download the new version: [https://build.xahau.tech](https://build.xahau.tech)
|
||||||
|
3. Mark the download as executable: `chmod 500 [/path/to/xahaud]`
|
||||||
|
4. Start xahaud: `./[path/to/xahud] --net --conf [/path/to/xahaud.cfg]`
|
||||||
@@ -61,7 +61,7 @@ For example, the `Flags` common transaction field becomes a UInt32 (32-bit unsig
|
|||||||
|
|
||||||
The following JSON file defines the important constants you need for serializing Xahau data to its binary format and deserializing it from binary:
|
The following JSON file defines the important constants you need for serializing Xahau data to its binary format and deserializing it from binary:
|
||||||
|
|
||||||
[**https://github.com/XRPLF/xrpl.js/blob/main/packages/ripple-binary-codec/src/enums/definitions.json**](https://github.com/XRPLF/xrpl.js/blob/main/packages/ripple-binary-codec/src/enums/definitions.json)
|
[**https://github.com/Xahau/xahau.js/tree/main-xahau/packages/xahau-binary-codec/src/enums/definitions.json**](https://github.com/Xahau/xahau.js/tree/main-xahau/packages/xahau-binary-codec/src/enums/definitions.json)
|
||||||
|
|
||||||
The following table defines the top-level fields from the definitions file:
|
The following table defines the top-level fields from the definitions file:
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,23 @@ Each ledger version in the XRP Ledger is made up of three parts:
|
|||||||
|
|
||||||
### State Data
|
### State Data
|
||||||
|
|
||||||
Each ledger version's state data is a set of **ledger objects**, sometimes called _ledger entries_, which collectively represent all settings, balances, and relationships at a given point in time. To store or retrieve an object in the state data, the protocol uses that object's unique [**Ledger Object ID**](ledger-object-ids.md).
|
Each ledger version's state data is a set of **ledger objects**, sometimes called _ledger entries_, which collectively represent all settings, balances, and relationships at a given point in time. To store or retrieve an object in the state data, the protocol uses that object's unique [**Ledger Object ID**](/docs/protocol-reference/ledger-data/ledger-object-ids).
|
||||||
|
|
||||||
In the peer protocol, ledger objects have a [canonical binary format](../binary-format.md). In `xahaud` APIs, ledger objects are represented as JSON objects.
|
In the peer protocol, ledger objects have a [canonical binary format](/docs/protocol-reference/binary-format). In `xahaud` APIs, ledger objects are represented as JSON objects.
|
||||||
|
|
||||||
A ledger object's data fields depend on the type of object; the Xahau Ledger supports the following types:
|
A ledger object's data fields depend on the type of object; the Xahau Network supports the following types:
|
||||||
|
|
||||||
* [Ledger Header](ledger-header.md)
|
* [Ledger Header](/docs/protocol-reference/ledger-data/ledger-header)
|
||||||
* [Ledger Entry Common Fields](ledger-object-ids.md)
|
* [Ledger Entry Common Fields](/docs/protocol-reference/ledger-data/ledger-object-ids)
|
||||||
* [Ledger Entry Types](ledger-objects-types/)
|
* [Ledger Entry Types](/docs/protocol-reference/ledger-data/ledger-objects-types/)
|
||||||
|
|
||||||
|
### Expanded Ledgers
|
||||||
|
|
||||||
|
Xahau supports expanded ledgers, which allow for larger ledger sizes beyond the traditional limits. Expanded ledgers enable the network to handle increased transaction volumes and more complex state data while maintaining performance and consensus stability.
|
||||||
|
|
||||||
|
When expanded ledgers are enabled, the ledger can accommodate:
|
||||||
|
- More transactions per ledger
|
||||||
|
- Larger state data sets
|
||||||
|
- Increased complexity in Hook executions
|
||||||
|
|
||||||
|
Expanded ledgers are automatically used when the network determines they are necessary based on transaction volume and state size. No special configuration is required for nodes to participate in expanded ledgers.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ An `AccountRoot` ledger entry type describes a single account, its settings, and
|
|||||||
"AccountIndex": "59",
|
"AccountIndex": "59",
|
||||||
"Balance": "148446663",
|
"Balance": "148446663",
|
||||||
"Domain": "6D64756F31332E636F6D",
|
"Domain": "6D64756F31332E636F6D",
|
||||||
|
"HookStateScale": 10,
|
||||||
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
|
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
|
||||||
"Flags": 8388608,
|
"Flags": 8388608,
|
||||||
"LedgerEntryType": "AccountRoot",
|
"LedgerEntryType": "AccountRoot",
|
||||||
@@ -35,7 +36,7 @@ An `AccountRoot` object has the following fields:
|
|||||||
| ---------------------- | --------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------- | --------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Account` | String | AccountID | Yes | The identifying (classic) address of this account. |
|
| `Account` | String | AccountID | Yes | The identifying (classic) address of this account. |
|
||||||
| `Sequence` | Number | UInt32 | Yes | The sequence number of the next valid transaction for this account. |
|
| `Sequence` | Number | UInt32 | Yes | The sequence number of the next valid transaction for this account. |
|
||||||
| `Balance` | String | Amount | No | The account's current \[XAH balance in drops]\[XAH, in drops], represented as a string. |
|
| `Balance` | String | Amount | No | The account's current [XAH balance in drops][drops of XAH], represented as a string. |
|
||||||
| `OwnerCount` | Number | UInt32 | Yes | The number of objects this account owns in the ledger, which contributes to its owner reserve. |
|
| `OwnerCount` | Number | UInt32 | Yes | The number of objects this account owns in the ledger, which contributes to its owner reserve. |
|
||||||
| `PreviousTxnID` | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. |
|
| `PreviousTxnID` | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. |
|
||||||
| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The \[index of the ledger]\[Ledger Index] that contains the transaction that most recently modified this object. |
|
| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The \[index of the ledger]\[Ledger Index] that contains the transaction that most recently modified this object. |
|
||||||
@@ -62,14 +63,15 @@ An `AccountRoot` object has the following fields:
|
|||||||
| `ImportSequence` | Number | UInt32 | No | The current sequence number from the importing account on the XAHL Ledger. |
|
| `ImportSequence` | Number | UInt32 | No | The current sequence number from the importing account on the XAHL Ledger. |
|
||||||
| `GovernanceFlags` | String | Hash256 | No | |
|
| `GovernanceFlags` | String | Hash256 | No | |
|
||||||
| `GovernanceMarks` | String | Hash256 | No | |
|
| `GovernanceMarks` | String | Hash256 | No | |
|
||||||
| `AccountIndex` | String | UInt64 | No | The account's \[Index Number]\[]. _(Added by the \[xahauGenesis amendment]\[] :enabled:)_ |
|
| `AccountIndex` | String | UInt64 | No | The account's created index number. _(Added by the \[xahauGenesis amendment]\[] :enabled:)_ |
|
||||||
| `TouchCount` | String | UInt64 | No | An incrementing counter for every time the ledger entry is "touched". |
|
| `TouchCount` | String | UInt64 | No | An incrementing counter for every time the ledger entry is "touched". |
|
||||||
|
| `HookStateScale` | Number | UInt16 | No | Scale factor for determining when Hook state entries become stale. Valid values are `1` to `16` inclusive. _(Added by the [ExtendedHookState amendment][].)_ |
|
||||||
|
|
||||||
### AccountRoot Flags
|
### AccountRoot Flags
|
||||||
|
|
||||||
There are several options which can be either enabled or disabled for an account. These options can be changed with an \[AccountSet transaction]\[]. In the ledger, flags are represented as binary values that can be combined with bitwise-or operations. The bit values for the flags in the ledger are different than the values used to enable or disable those flags in a transaction. Ledger flags have names that begin with **`lsf`**.
|
There are several options which can be either enabled or disabled for an account. These options can be changed with an \[AccountSet transaction]\[]. In the ledger, flags are represented as binary values that can be combined with bitwise-or operations. The bit values for the flags in the ledger are different than the values used to enable or disable those flags in a transaction. Ledger flags have names that begin with **`lsf`**.
|
||||||
|
|
||||||
fAccountRoot objects can have the following flag values:
|
AccountRoot objects can have the following flag values:
|
||||||
|
|
||||||
<table><thead><tr><th width="174">Flag Name</th><th>Hex Value</th><th width="129">Decimal Value</th><th width="118">Corresponding AccountSet Flag</th><th>Description</th></tr></thead><tbody><tr><td><code>lsfDefaultRipple</code></td><td><code>0x00800000</code></td><td>8388608</td><td><code>asfDefaultRipple</code></td><td>Enable rippling on this addresses's trust lines by default. Required for issuing addresses; discouraged for others.</td></tr><tr><td><code>lsfDepositAuth</code></td><td><code>0x01000000</code></td><td>16777216</td><td><code>asfDepositAuth</code></td><td>This account has DepositAuth enabled, meaning it can only receive funds from transactions it sends, and from preauthorized accounts. <em>(Added by the [DepositAuth amendment][])</em></td></tr><tr><td><code>lsfDisableMaster</code></td><td><code>0x00100000</code></td><td>1048576</td><td><code>asfDisableMaster</code></td><td>Disallows use of the master key to sign transactions for this account.</td></tr><tr><td><code>lsfDisallowIncomingCheck</code></td><td><code>0x08000000</code></td><td>134217728</td><td><code>asfDisallowIncomingCheck</code></td><td>This account blocks incoming Checks. </td></tr><tr><td><code>lsfDisallowIncomingNFTokenOffer</code></td><td><code>0x04000000</code></td><td>67108864</td><td><code>asfDisallowIncomingNFTokenOffer</code></td><td>This account blocks incoming NFTokenOffers. </td></tr><tr><td><code>lsfDisallowIncomingPayChan</code></td><td><code>0x10000000</code></td><td>268435456</td><td><code>asfDisallowIncomingPayChan</code></td><td>This account blocks incoming Payment Channels. </td></tr><tr><td><code>lsfDisallowIncomingTrustline</code></td><td><code>0x20000000</code></td><td>536870912</td><td><code>asfDisallowIncomingTrustline</code></td><td>This account blocks incoming trust lines. </td></tr><tr><td><code>lsfDisallowIncomingRemit</code></td><td><code>0x80000000</code></td><td>2147483648</td><td><code>asfDisallowIncomingRemit</code></td><td>This account blocks incoming remit transactions. </td></tr><tr><td><code>lsfDisallowXRP</code></td><td><code>0x00080000</code></td><td>524288</td><td><code>asfDisallowXRP</code></td><td>Client applications should not send XAH to this account. (Advisory; not enforced by the protocol.)</td></tr><tr><td><code>lsfGlobalFreeze</code></td><td><code>0x00400000</code></td><td>4194304</td><td><code>asfGlobalFreeze</code></td><td>All assets issued by this account are frozen.</td></tr><tr><td><code>lsfNoFreeze</code></td><td><code>0x00200000</code></td><td>2097152</td><td><code>asfNoFreeze</code></td><td>This account cannot freeze trust lines connected to it. Once enabled, cannot be disabled.</td></tr><tr><td><code>lsfPasswordSpent</code></td><td><code>0x00010000</code></td><td>65536</td><td>(None)</td><td>This account has used its free SetRegularKey transaction.</td></tr><tr><td><code>lsfRequireAuth</code></td><td><code>0x00040000</code></td><td>262144</td><td><code>asfRequireAuth</code></td><td>This account must individually approve other users for those users to hold this account's tokens.</td></tr><tr><td><code>lsfRequireDestTag</code></td><td><code>0x00020000</code></td><td>131072</td><td><code>asfRequireDest</code></td><td>Requires incoming payments to specify a Destination Tag.</td></tr><tr><td><code>lsfTshCollect</code></td><td><code>0x02000000</code></td><td>33554432</td><td><code>asfTshCollect</code></td><td>The TSH pays for the execution of their own Hook Chain.</td></tr><tr><td><code>lsfURITokenIssuer</code></td><td><code>0x04000000</code></td><td>67108864</td><td><code>asfURITokenIssuer</code></td><td>This account cannot be deleted after it has issued a URIToken.</td></tr></tbody></table>
|
<table><thead><tr><th width="174">Flag Name</th><th>Hex Value</th><th width="129">Decimal Value</th><th width="118">Corresponding AccountSet Flag</th><th>Description</th></tr></thead><tbody><tr><td><code>lsfDefaultRipple</code></td><td><code>0x00800000</code></td><td>8388608</td><td><code>asfDefaultRipple</code></td><td>Enable rippling on this addresses's trust lines by default. Required for issuing addresses; discouraged for others.</td></tr><tr><td><code>lsfDepositAuth</code></td><td><code>0x01000000</code></td><td>16777216</td><td><code>asfDepositAuth</code></td><td>This account has DepositAuth enabled, meaning it can only receive funds from transactions it sends, and from preauthorized accounts. <em>(Added by the [DepositAuth amendment][])</em></td></tr><tr><td><code>lsfDisableMaster</code></td><td><code>0x00100000</code></td><td>1048576</td><td><code>asfDisableMaster</code></td><td>Disallows use of the master key to sign transactions for this account.</td></tr><tr><td><code>lsfDisallowIncomingCheck</code></td><td><code>0x08000000</code></td><td>134217728</td><td><code>asfDisallowIncomingCheck</code></td><td>This account blocks incoming Checks. </td></tr><tr><td><code>lsfDisallowIncomingNFTokenOffer</code></td><td><code>0x04000000</code></td><td>67108864</td><td><code>asfDisallowIncomingNFTokenOffer</code></td><td>This account blocks incoming NFTokenOffers. </td></tr><tr><td><code>lsfDisallowIncomingPayChan</code></td><td><code>0x10000000</code></td><td>268435456</td><td><code>asfDisallowIncomingPayChan</code></td><td>This account blocks incoming Payment Channels. </td></tr><tr><td><code>lsfDisallowIncomingTrustline</code></td><td><code>0x20000000</code></td><td>536870912</td><td><code>asfDisallowIncomingTrustline</code></td><td>This account blocks incoming trust lines. </td></tr><tr><td><code>lsfDisallowIncomingRemit</code></td><td><code>0x80000000</code></td><td>2147483648</td><td><code>asfDisallowIncomingRemit</code></td><td>This account blocks incoming remit transactions. </td></tr><tr><td><code>lsfDisallowXRP</code></td><td><code>0x00080000</code></td><td>524288</td><td><code>asfDisallowXRP</code></td><td>Client applications should not send XAH to this account. (Advisory; not enforced by the protocol.)</td></tr><tr><td><code>lsfGlobalFreeze</code></td><td><code>0x00400000</code></td><td>4194304</td><td><code>asfGlobalFreeze</code></td><td>All assets issued by this account are frozen.</td></tr><tr><td><code>lsfNoFreeze</code></td><td><code>0x00200000</code></td><td>2097152</td><td><code>asfNoFreeze</code></td><td>This account cannot freeze trust lines connected to it. Once enabled, cannot be disabled.</td></tr><tr><td><code>lsfPasswordSpent</code></td><td><code>0x00010000</code></td><td>65536</td><td>(None)</td><td>This account has used its free SetRegularKey transaction.</td></tr><tr><td><code>lsfRequireAuth</code></td><td><code>0x00040000</code></td><td>262144</td><td><code>asfRequireAuth</code></td><td>This account must individually approve other users for those users to hold this account's tokens.</td></tr><tr><td><code>lsfRequireDestTag</code></td><td><code>0x00020000</code></td><td>131072</td><td><code>asfRequireDest</code></td><td>Requires incoming payments to specify a Destination Tag.</td></tr><tr><td><code>lsfTshCollect</code></td><td><code>0x02000000</code></td><td>33554432</td><td><code>asfTshCollect</code></td><td>The TSH pays for the execution of their own Hook Chain.</td></tr><tr><td><code>lsfURITokenIssuer</code></td><td><code>0x04000000</code></td><td>67108864</td><td><code>asfURITokenIssuer</code></td><td>This account cannot be deleted after it has issued a URIToken.</td></tr></tbody></table>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
title: Cron
|
||||||
|
---
|
||||||
|
[\[Source\]](https://github.com/Xahau/xahaud/blob/dev/src/ripple/protocol/impl/LedgerFormats.cpp)
|
||||||
|
|
||||||
|
_(Added by the [Cron amendment][].)_
|
||||||
|
|
||||||
|
A `Cron` object represents a scheduled Hook execution created by a [CronSet transaction](/docs/protocol-reference/transactions/transaction-types/cronset). The Cron engine automatically inserts pseudo-transactions of type `Cron` into the ledger when scheduled executions are due.
|
||||||
|
|
||||||
|
### Example JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Owner": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm",
|
||||||
|
"OwnerNode": "0000000000000000",
|
||||||
|
"StartTime": 816348759,
|
||||||
|
"RepeatCount": 3,
|
||||||
|
"DelaySeconds": 120,
|
||||||
|
"PreviousTxnID": "5463C6E08862A1FAE5EDAC12D70ADB16546A1F674930521295BC082494B62924",
|
||||||
|
"PreviousTxnLgrSeq": 6,
|
||||||
|
"LedgerEntryType": "Cron",
|
||||||
|
"index": "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
A `Cron` object has the following fields:
|
||||||
|
|
||||||
|
| Field | JSON Type | \[Internal Type]\[] | Required? | Description |
|
||||||
|
| ------------------- | --------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `Owner` | String | AccountID | Yes | The account that owns the scheduled Hook execution. This is the account that will be invoked when the cron executes. |
|
||||||
|
| `OwnerNode` | String | UInt64 | Yes | A hint indicating which page of the owner's directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Owner`. |
|
||||||
|
| `StartTime` | Number | UInt32 | Yes | Ripple Epoch timestamp when the first execution should occur. Use `0` for immediate execution. See \[Specifying Time]\[] for details. |
|
||||||
|
| `RepeatCount` | Number | UInt32 | Yes | Number of times the cron should execute. Can be extended via subsequent [CronSet transactions](/docs/protocol-reference/transactions/transaction-types/cronset). Maximum 256 per transaction, but can be extended beyond this limit. |
|
||||||
|
| `DelaySeconds` | Number | UInt32 | Yes | Time interval in seconds between each execution. Maximum of 31,536,000 seconds (365 days). |
|
||||||
|
| `PreviousTxnID` | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. |
|
||||||
|
| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The \[index of the ledger]\[Ledger Index] that contains the transaction that most recently modified this object. |
|
||||||
|
| `LedgerEntryType` | String | UInt16 | Yes | The value `0x0061`, mapped to the string `Cron`, indicates that this object is a Cron object. |
|
||||||
|
|
||||||
|
### Cron ID Format
|
||||||
|
|
||||||
|
The ID of a `Cron` object is the \[SHA-512Half]\[] of the following values, concatenated in order:
|
||||||
|
|
||||||
|
* The Cron space key (`0x0076`)
|
||||||
|
* The timestamp of the `StartTime` field
|
||||||
|
* The randomized AccountID of the `Owner` field
|
||||||
|
|
||||||
|
### Execution Behavior
|
||||||
|
|
||||||
|
When a cron is ready to execute, the Cron engine inserts a pseudo-transaction of type `Cron` into the ledger. This pseudo-transaction contains an `Owner` field referencing the originating Hook account. The scheduled Hook will be invoked automatically at the specified intervals without requiring external triggers.
|
||||||
|
|
||||||
|
Hook developers must enable collect calls (`hsfCOLLECT` flag) on their Hooks, as the `Owner` constitutes a weak transactional stakeholder (TSH) when the Cron pseudo-transaction executes.
|
||||||
|
|
||||||
|
### Related Transactions
|
||||||
|
|
||||||
|
* [CronSet transaction](/docs/protocol-reference/transactions/transaction-types/cronset): Creates, updates, or deletes a Cron object
|
||||||
|
|
||||||
@@ -84,6 +84,8 @@ RippleState objects can have the following flag values:
|
|||||||
| `lsfHighNoRipple` | `0x00200000` | 2097152 | `tfSetNoRipple` | The high account has disabled rippling from this trust line. |
|
| `lsfHighNoRipple` | `0x00200000` | 2097152 | `tfSetNoRipple` | The high account has disabled rippling from this trust line. |
|
||||||
| `lsfLowFreeze` | `0x00400000` | 4194304 | `tfSetFreeze` | The low account has frozen the trust line, preventing the high account from transferring the asset. |
|
| `lsfLowFreeze` | `0x00400000` | 4194304 | `tfSetFreeze` | The low account has frozen the trust line, preventing the high account from transferring the asset. |
|
||||||
| `lsfHighFreeze` | `0x00800000` | 8388608 | `tfSetFreeze` | The high account has frozen the trust line, preventing the low account from transferring the asset. |
|
| `lsfHighFreeze` | `0x00800000` | 8388608 | `tfSetFreeze` | The high account has frozen the trust line, preventing the low account from transferring the asset. |
|
||||||
|
| `lsfLowDeepFreeze` | `0x02000000` | 33554432 | `tfSetDeepFreeze` | The low account has deep-frozen the trust line, preventing the high account from sending and receiving the asset. _(Requires the \[DeepFreeze amendment]\[])_ |
|
||||||
|
| `lsfHighDeepFreeze` | `0x04000000` | 67108864 | `tfSetDeepFreeze` | The high account has deep-frozen the trust line, preventing the low account from sending and receiving the asset. _(Requires the \[DeepFreeze amendment]\[])_ |
|
||||||
|
|
||||||
### Contributing to the Owner Reserve
|
### Contributing to the Owner Reserve
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
title: Cron
|
||||||
|
description: >-
|
||||||
|
The Cron pseudo-transaction is automatically inserted by the Cron engine when
|
||||||
|
a scheduled Hook execution is due.
|
||||||
|
---
|
||||||
|
\[[Source](https://github.com/Xahau/xahaud/blob/dev/src/ripple/app/tx/impl/Cron.cpp)]
|
||||||
|
|
||||||
|
_(Added by the [Cron amendment][].)_
|
||||||
|
|
||||||
|
The `Cron` pseudo-transaction is automatically inserted into the ledger by the Cron engine when a scheduled Hook execution is due. This pseudo-transaction triggers the execution of the Hook on the account specified in the `Owner` field.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"TransactionType": "Cron",
|
||||||
|
"Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
|
||||||
|
"Fee": "0",
|
||||||
|
"LedgerSequence": 21225473,
|
||||||
|
"Sequence": 0,
|
||||||
|
"SigningPubKey": "",
|
||||||
|
"TxnSignature": "",
|
||||||
|
"Owner": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
|
| ----- | --------- | ------------------- | ----------- |
|
||||||
|
| `Owner` | String | AccountID | The account that owns the scheduled Hook execution. This is the account that will be invoked when the cron executes. |
|
||||||
|
| `LedgerSequence` | Number | UInt32 | The \[ledger index]\[] where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
|
||||||
|
|
||||||
|
|
||||||
|
### Common Fields
|
||||||
|
|
||||||
|
As a pseudo-transaction, `Cron` uses the standard pseudo-transaction values for common fields:
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
| ----- | ----- |
|
||||||
|
| `Account` | `rrrrrrrrrrrrrrrrrrrrrhoLvTp` (`ACCOUNT_ZERO`) |
|
||||||
|
| `Fee` | `0` |
|
||||||
|
| `Sequence` | `0` |
|
||||||
|
| `SigningPubKey` | `""` (empty string) |
|
||||||
|
| `TxnSignature` | `""` (empty string) |
|
||||||
|
|
||||||
|
### Execution Behavior
|
||||||
|
|
||||||
|
When a [Cron ledger object](/docs/protocol-reference/ledger-data/ledger-objects-types/cron) is ready to execute (based on its `StartTime`, `DelaySeconds`, and `RepeatCount` fields), the Cron engine automatically inserts a `Cron` pseudo-transaction into the ledger.
|
||||||
|
|
||||||
|
The pseudo-transaction contains an `Owner` field that references the account with the scheduled Hook. The Hook on that account will be invoked automatically, and the account is treated as a **weak transactional stakeholder (TSH)** during execution.
|
||||||
|
|
||||||
|
**Important:** Hook developers must enable collect calls (`hsfCOLLECT` flag) on their Hooks, as the `Owner` constitutes a weak transactional stakeholder when the Cron pseudo-transaction executes. The account must also have the `asfTshCollect` flag enabled.
|
||||||
|
|
||||||
|
### Related Documentation
|
||||||
|
|
||||||
|
* [CronSet transaction](/docs/protocol-reference/transactions/transaction-types/cronset): Creates, updates, or deletes scheduled Hook executions
|
||||||
|
* [Cron ledger object](/docs/protocol-reference/ledger-data/ledger-objects-types/cron): The ledger object that represents a scheduled Hook execution
|
||||||
|
* [Weak and Strong](/docs/hooks/concepts/weak-and-strong): Understanding transactional stakeholders
|
||||||
|
* [Collect Call Hooks](/docs/hooks/concepts/collect-call): How weak TSH Hooks are executed
|
||||||
|
|
||||||
@@ -96,6 +96,8 @@ The `MemoType` and `MemoFormat` fields should only consist of the following char
|
|||||||
|
|
||||||
The `Memos` field is limited to no more than 1 KB in size (when serialized in binary format).
|
The `Memos` field is limited to no more than 1 KB in size (when serialized in binary format).
|
||||||
|
|
||||||
|
**Transaction Cost:** Transactions with a `Memos` field incur an additional cost based on the size of the memos. The cost increases proportionally with the total size of all memos in the transaction.
|
||||||
|
|
||||||
Example of a transaction with a Memos field:
|
Example of a transaction with a Memos field:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -175,3 +177,5 @@ The `HookParameters` field is an array of objects that specify the parameters of
|
|||||||
| ------- | --------- | ------------- | --------------------------- |
|
| ------- | --------- | ------------- | --------------------------- |
|
||||||
| `Name` | String | Blob | The name of the parameter. |
|
| `Name` | String | Blob | The name of the parameter. |
|
||||||
| `Value` | String | Blob | The value of the parameter. |
|
| `Value` | String | Blob | The value of the parameter. |
|
||||||
|
|
||||||
|
**Transaction Cost:** Transactions with a `HookParameters` field incur an additional cost based on the size of the hook parameters. The cost increases proportionally with the total size of all parameters in the transaction.
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ description: An AccountSet transaction modifies the properties of an account in
|
|||||||
"Sequence": 5,
|
"Sequence": 5,
|
||||||
"Domain": "6578616D706C652E636F6D",
|
"Domain": "6578616D706C652E636F6D",
|
||||||
"SetFlag": 5,
|
"SetFlag": 5,
|
||||||
"MessageKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB"
|
"MessageKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
|
||||||
|
"HookStateScale": 10
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ description: An AccountSet transaction modifies the properties of an account in
|
|||||||
| `TickSize` | Number | UInt8 | _(Optional)_ Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. _(Added by the \[TickSize amendment]\[])_ |
|
| `TickSize` | Number | UInt8 | _(Optional)_ Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. _(Added by the \[TickSize amendment]\[])_ |
|
||||||
| `WalletLocator` | String | Hash256 | _(Optional)_ An arbitrary 256-bit value. If specified, the value is stored as part of the account but has no inherent meaning or requirements. |
|
| `WalletLocator` | String | Hash256 | _(Optional)_ An arbitrary 256-bit value. If specified, the value is stored as part of the account but has no inherent meaning or requirements. |
|
||||||
| `WalletSize` | Number | UInt32 | _(Optional)_ Not used. This field is valid in AccountSet transactions but does nothing. |
|
| `WalletSize` | Number | UInt32 | _(Optional)_ Not used. This field is valid in AccountSet transactions but does nothing. |
|
||||||
|
| `HookStateScale` | Number | UInt16 | _(Optional)_ Scale factor for determining when Hook state entries become stale. Valid values are `1` to `16` inclusive. _(Added by the [ExtendedHookState amendment][].)_ |
|
||||||
|
|
||||||
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See Cancel or Skip a Transaction for more details.
|
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See Cancel or Skip a Transaction for more details.
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ To remove the `Domain` field from an account, send an AccountSet with the Domain
|
|||||||
You can put any domain in your account's `Domain` field. To prove that an account and domain belong to the same person or business, you need a "two-way link":
|
You can put any domain in your account's `Domain` field. To prove that an account and domain belong to the same person or business, you need a "two-way link":
|
||||||
|
|
||||||
* Accounts you own should have a domain you own in the `Domain` field.
|
* Accounts you own should have a domain you own in the `Domain` field.
|
||||||
* At that domain, host an xah-ledger.toml file listing accounts you own, and optionally other information about how you use Xahau.
|
* At that domain, host a [xahau.toml](/docs/infrastructure/identity) file listing accounts you own, and optionally other information about how you use Xahau.
|
||||||
|
|
||||||
### AccountSet Flags
|
### AccountSet Flags
|
||||||
|
|
||||||
@@ -61,6 +63,7 @@ The available AccountSet flags are:
|
|||||||
| Flag Name | Decimal Value | Corresponding Ledger Flag | Description |
|
| Flag Name | Decimal Value | Corresponding Ledger Flag | Description |
|
||||||
| --------------------------------- | ------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------- | ------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `asfAccountTxnID` | 5 | (None) | Track the ID of this account's most recent transaction. Required for `AccountTxnID` |
|
| `asfAccountTxnID` | 5 | (None) | Track the ID of this account's most recent transaction. Required for `AccountTxnID` |
|
||||||
|
| `asfAllowTrustLineClawback` | 17 | `lsfAllowTrustLineClawback` | Enables an account to clawback tokens it has issued. This flag can only be enabled if the account’s owner directory is empty (no trust lines, offers, escrows, payment channels, checks, or signer lists). Once set, it cannot be undone. |
|
||||||
| `asfAuthorizedNFTokenMinter` | 10 | (None) | Enable to allow another account to mint non-fungible tokens (NFTokens) on this account's behalf. Specify the authorized account in the `NFTokenMinter` field of the AccountRoot object. To remove an authorized minter, enable this flag and omit the `NFTokenMinter` field. _(Added by the \[NonFungibleTokensV1_1 amendment]\[].)_ |
|
| `asfAuthorizedNFTokenMinter` | 10 | (None) | Enable to allow another account to mint non-fungible tokens (NFTokens) on this account's behalf. Specify the authorized account in the `NFTokenMinter` field of the AccountRoot object. To remove an authorized minter, enable this flag and omit the `NFTokenMinter` field. _(Added by the \[NonFungibleTokensV1_1 amendment]\[].)_ |
|
||||||
| `asfDefaultRipple` | 8 | `lsfDefaultRipple` | Enable rippling on this account's trust lines by default. |
|
| `asfDefaultRipple` | 8 | `lsfDefaultRipple` | Enable rippling on this account's trust lines by default. |
|
||||||
| `asfDepositAuth` | 9 | `lsfDepositAuth` | Enable Deposit Authorization on this account. _(Added by the \[DepositAuth amendment]\[].)_ |
|
| `asfDepositAuth` | 9 | `lsfDepositAuth` | Enable Deposit Authorization on this account. _(Added by the \[DepositAuth amendment]\[].)_ |
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ _(Added by the \[Checks amendment]\[].)_
|
|||||||
| Field | JSON Type | \[Internal Type]\[] | Description |
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `CheckID` | String | Hash256 | The ID of the Check ledger object to cash, as a 64-character hexadecimal string. |
|
| `CheckID` | String | Hash256 | The ID of the Check ledger object to cash, as a 64-character hexadecimal string. |
|
||||||
| `Amount` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | _(Optional)_ Redeem the Check for exactly this amount, if possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `DeliverMin`. |
|
| `Amount` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | _(Optional)_ Redeem the Check for exactly this amount, if possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `DeliverMin`. |
|
||||||
| `DeliverMin` | \[Currency Amount]\[] | Amount | _(Optional)_ Redeem the Check for at least this amount and for as much as possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `Amount`. |
|
| `DeliverMin` | \[Currency Amount]\[] | Amount | _(Optional)_ Redeem the Check for at least this amount and for as much as possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `Amount`. |
|
||||||
|
|
||||||
The transaction _**must**_ include either `Amount` or `DeliverMin`, but not both.
|
The transaction _**must**_ include either `Amount` or `DeliverMin`, but not both.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ _(Added by the \[Checks amendment]\[].)_
|
|||||||
| Field | JSON Type | \[Internal Type]\[] | Description |
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Destination` | String | AccountID | The unique address of the account that can cash the Check. |
|
| `Destination` | String | AccountID | The unique address of the account that can cash the Check. |
|
||||||
| `SendMax` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | Maximum amount of source currency the Check is allowed to debit the sender, including transfer fees on non-XAH currencies. The Check can only credit the destination with the same currency (from the same issuer, for non-XAH currencies). For non-XAH amounts, the nested field names MUST be lower-case. |
|
| `SendMax` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | Maximum amount of source currency the Check is allowed to debit the sender, including transfer fees on non-XAH currencies. The Check can only credit the destination with the same currency (from the same issuer, for non-XAH currencies). For non-XAH amounts, the nested field names MUST be lower-case. |
|
||||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the Check, or a hosted recipient to pay. |
|
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the Check, or a hosted recipient to pay. |
|
||||||
| `Expiration` | Number | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in \[seconds since the Ripple Epoch]\[]. |
|
| `Expiration` | Number | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in \[seconds since the Ripple Epoch]\[]. |
|
||||||
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this Check. |
|
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this Check. |
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
title: Clawback
|
||||||
|
description: >-
|
||||||
|
Revoke tokens that were previously issued by your account.
|
||||||
|
---
|
||||||
|
\[[Source](https://github.com/Xahau/xahaud/blob/dev/src/ripple/app/tx/impl/Clawback.cpp)]
|
||||||
|
|
||||||
|
_(Added by the \[Clawback amendment]\[].)_
|
||||||
|
|
||||||
|
Revoke tokens that were previously issued by your account. The **Clawback** feature is disabled by default. To use it, you must first submit an **AccountSet** transaction that enables *Allow Trust Line Clawback*. If your account has already issued tokens, you cannot enable Clawback afterward. You can only activate *Allow Trust Line Clawback* if your owner directory is completely empty — meaning before creating trust lines, offers, escrows, payment channels, checks, or signer lists. Once enabled, Clawback becomes a permanent capability of your account and cannot be undone.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"TransactionType": "Clawback",
|
||||||
|
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||||
|
"Amount": {
|
||||||
|
"currency": "USD",
|
||||||
|
"issuer": "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
|
||||||
|
"value": "123.45"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
````
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
A **Clawback** transaction includes:
|
||||||
|
|
||||||
|
| Field | JSON Type | Description |
|
||||||
|
| -------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Amount` | *Currency Amount* | The quantity to be revoked, as well as the counterparty from which it is taken. The `value` must not be zero. If greater than the holder’s balance, the entire balance is revoked. In the `issuer` sub-field, specify the holder’s address (not the issuer’s). |
|
||||||
|
|
||||||
|
In Xahau, an IOU/Non-XAH token on a trust line always has an issuer, but trust lines are bidirectional and under certain settings both sides may act as issuers. In this transaction, the issuer’s address goes in the `Account` field, while the holder’s address goes in the `issuer` sub-field of `Amount`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Error Cases
|
||||||
|
|
||||||
|
Besides the standard transaction errors, Clawback may fail with:
|
||||||
|
|
||||||
|
| Error Code | Description |
|
||||||
|
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `temDISABLED` | The **Clawback** amendment is not enabled on Xahau. |
|
||||||
|
| `temBAD_AMOUNT` | The holder’s balance is zero. (It is not an error if the specified amount exceeds the holder’s balance — in that case, the full available balance is revoked). Also occurs if the counterparty in `Amount` is the same account submitting the transaction. |
|
||||||
|
| `tecNO_LINE` | No trust line exists with the specified counterparty, or the trust line has a balance of zero. |
|
||||||
|
| `tecNO_PERMISSION` | Happens if you try to enable `lsfAllowTrustLineClawback` while `lsfNoFreeze` is already enabled, or vice versa. |
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
---
|
||||||
|
title: CronSet
|
||||||
|
description: >-
|
||||||
|
A CronSet transaction enables Hooks to schedule recurring self-invocations at
|
||||||
|
regular intervals, similar to Linux cronjobs. This facilitates complex
|
||||||
|
governance structures and automated processes within Hook frameworks.
|
||||||
|
---
|
||||||
|
\[[Source](https://github.com/Xahau/xahaud/blob/dev/src/ripple/app/tx/impl/CronSet.cpp)]
|
||||||
|
|
||||||
|
_(Added by the CronSet amendment.)_
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"TransactionType": "CronSet",
|
||||||
|
"Account": "rYourAccountAddress",
|
||||||
|
"StartTime": 816348759,
|
||||||
|
"RepeatCount": 3,
|
||||||
|
"DelaySeconds": 120
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
|
| -------------- | --------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Account` | String | AccountID | The Hook account initiating the cron. This is the account that will be invoked when the cron executes. |
|
||||||
|
| `StartTime` | Number | UInt32 | _(Optional)_ Ripple Epoch timestamp when the first execution should occur. Use `0` for immediate execution. If omitted when deleting a cron, the transaction removes the cron. |
|
||||||
|
| `RepeatCount` | Number | UInt32 | _(Optional)_ Number of times the cron should execute (maximum 256 per transaction). Can be extended via subsequent CronSet transactions. Omit when deleting a cron. |
|
||||||
|
| `DelaySeconds` | Number | UInt32 | _(Optional)_ Time interval in seconds between each execution. Omit when deleting a cron. |
|
||||||
|
|
||||||
|
### How CronSet Works
|
||||||
|
|
||||||
|
CronSet transactions enable scheduled, automated Hook execution on the Xahau blockchain at regular intervals, eliminating the need for external services or manual triggers.
|
||||||
|
|
||||||
|
The workflow involves four key steps:
|
||||||
|
|
||||||
|
1. Install a Hook with the `hsfCOLLECT` flag enabled
|
||||||
|
2. Enable Transaction Signature Hook Collection `asfTshCollect` on your account (SetFlag: 11)
|
||||||
|
3. Create a CronSet transaction with scheduling parameters
|
||||||
|
4. Let Xahau handle automatic execution
|
||||||
|
|
||||||
|
### Execution Mechanism
|
||||||
|
|
||||||
|
When a cron is ready to execute, the Cron engine inserts a pseudo-transaction of type `Cron` into the ledger, containing an `Owner` field referencing the originating Hook account. Hook developers must enable collect calls, as the Owner constitutes a weak transactional stakeholder.
|
||||||
|
|
||||||
|
The scheduled Hook will be invoked automatically at the specified intervals without requiring external triggers.
|
||||||
|
|
||||||
|
### Time Format
|
||||||
|
|
||||||
|
Xahau uses Ripple Epoch time (seconds since January 1, 2000), not Unix time. To convert from JavaScript Date:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const rippleEpochTime = Math.floor(Date.now() / 1000) - 946684800;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deleting a Cron
|
||||||
|
|
||||||
|
To remove an existing Cron, omit `StartTime`, `RepeatCount`, and `DelaySeconds` while setting `Flags: 1` (tfCronUnset):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"TransactionType": "CronSet",
|
||||||
|
"Account": "rYourAccountAddress",
|
||||||
|
"Flags": 1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extending Repeat Count
|
||||||
|
|
||||||
|
Upon reaching a minimum threshold, a subsequent CronSet transaction can extend the repeat count beyond the initial 256 execution limit by submitting a new CronSet transaction with an updated `RepeatCount`.
|
||||||
|
|
||||||
|
### CronSet Flags
|
||||||
|
|
||||||
|
Transactions of the CronSet type support additional values in the `Flags` field, as follows:
|
||||||
|
|
||||||
|
| Flag Name | Hex Value | Decimal Value | Description |
|
||||||
|
| ------------- | ------------ | ------------- | -------------------------------------------------------------------------------- |
|
||||||
|
| `tfCronUnset` | `0x00000001` | 1 | Removes an existing Cron. All scheduling fields must be omitted when this is set. |
|
||||||
|
|
||||||
|
### Limitations and Constraints
|
||||||
|
|
||||||
|
- CronSet cannot currently be delegated to another account
|
||||||
|
- Hooks must self-emit CronSet transactions or operate under joint management arrangements
|
||||||
|
- `RepeatCount`: Must be greater than 0 and cannot exceed 256 per transaction (extendable via subsequent transactions)
|
||||||
|
- `DelaySeconds`: Maximum of 31,536,000 seconds (365 days)
|
||||||
|
- `StartTime`: Must be current time or future; cannot exceed 365 days ahead
|
||||||
|
- Cannot combine `tfCronUnset` flag with `DelaySeconds`, `RepeatCount`, or `StartTime` fields
|
||||||
|
- When creating a cron, `DelaySeconds` and `RepeatCount` must both exist or both be absent
|
||||||
|
|
||||||
|
### Error Cases
|
||||||
|
|
||||||
|
Besides errors that can occur for all transactions, CronSet transactions can result in the following transaction result codes:
|
||||||
|
|
||||||
|
| Error Code | Description |
|
||||||
|
| ------------------ | -------------------------------------------------------------------------------------------------- |
|
||||||
|
| `temDISABLED` | Occurs if the Cron feature is not enabled. |
|
||||||
|
| `temINVALID_FLAG` | Occurs if invalid flags are set in the transaction. |
|
||||||
|
| `temMALFORMED` | Occurs if the transaction is malformed with invalid field combinations. |
|
||||||
|
| `tecEXPIRED` | Occurs if `StartTime` is in the past or more than 365 days in the future. |
|
||||||
|
| `tefINTERNAL` | Occurs if the account ledger entry is missing. |
|
||||||
|
| `tefBAD_LEDGER` | Occurs if the Cron object is missing, points to a non-cron entry, or owner directory removal fails. |
|
||||||
@@ -30,7 +30,7 @@ _Added by the \[Escrow amendment]\[]._
|
|||||||
|
|
||||||
| Field | JSON Type | \[Internal Type]\[] | Description |
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Amount` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | Amount to deduct from the sender's balance and escrow. Once escrowed, the Amount can either go to the `Destination` address (after the `FinishAfter` time) or returned to the sender (after the `CancelAfter` time). |
|
| `Amount` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | Amount to deduct from the sender's balance and escrow. Once escrowed, the Amount can either go to the `Destination` address (after the `FinishAfter` time) or returned to the sender (after the `CancelAfter` time). |
|
||||||
| `Destination` | String | AccountID | Address to receive escrowed Amount. |
|
| `Destination` | String | AccountID | Address to receive escrowed Amount. |
|
||||||
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in \[seconds since the Ripple Epoch]\[], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. |
|
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in \[seconds since the Ripple Epoch]\[], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. |
|
||||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in \[seconds since the Ripple Epoch]\[], when the escrowed Amount can be released to the recipient. This value is immutable; the funds cannot move until this time is reached. |
|
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in \[seconds since the Ripple Epoch]\[], when the escrowed Amount can be released to the recipient. This value is immutable; the funds cannot move until this time is reached. |
|
||||||
|
|||||||
@@ -28,20 +28,20 @@ _Added by the \[XahauGenesis amendment]\[] and the \[Hooks amendment]\[]_
|
|||||||
### Fields
|
### Fields
|
||||||
|
|
||||||
| Field | JSON Type | Internal Type | Description |
|
| Field | JSON Type | Internal Type | Description |
|
||||||
| ------------ | --------- | ------------- | -------------------------------------------------------------------------------- |
|
| -------------- | --------- | ------------- | -------------------------------------------------------------------------------- |
|
||||||
| Account | String | AccountID | The address of the genesis account that will mint and distribute XAH. |
|
| `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. |
|
| `GenesisMints` | Array | Array | An array of objects representing the destinations and amounts of the minted XAH. |
|
||||||
|
|
||||||
### GenesisMint Object
|
### 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.
|
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 |
|
| Field | JSON Type | Internal Type | Description |
|
||||||
| --------------- | --------- | ------------- | -------------------------------------------------------------------------- |
|
| ----------------- | --------- | ------------- | -------------------------------------------------------------------------- |
|
||||||
| Destination | String | AccountID | The address of the account that will receive the minted XAH. |
|
| `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. |
|
| `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. |
|
| `GovernanceFlags` | String | Hash256 | _(Optional)_ The governance flags associated with the destination account. |
|
||||||
| GovernanceMarks | String | Hash256 | _(Optional)_ The governance marks associated with the destination account. |
|
| `GovernanceMarks` | String | Hash256 | _(Optional)_ The governance marks associated with the destination account. |
|
||||||
|
|
||||||
### Special Transaction Cost
|
### Special Transaction Cost
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ _(Added by the \[Import amendment]\[].)_
|
|||||||
|
|
||||||
### Notes
|
### 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 `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.
|
* 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.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ description: >-
|
|||||||
---
|
---
|
||||||
\[[Source](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Invoke.cpp)]
|
\[[Source](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Invoke.cpp)]
|
||||||
|
|
||||||
_(Added by the \[Hooks amendment]\[].)_
|
_(Added by the [Hooks amendment][].)_
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@@ -19,16 +19,15 @@ _(Added by the \[Hooks amendment]\[].)_
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Field | JSON Type | \[Internal Type]\[] | Description |
|
| Field | JSON Type | \[Internal Type]\[] | Required? | Description |
|
||||||
| ------------- | --------- | ------------------- | -------------------------------------------------------------------------------------------------- |
|
| ---------------- | --------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------- |
|
||||||
| `Account` | String | AccountID | The address of the account that is invoking the hook. |
|
| `Account` | String | AccountID | Yes | The address of the account that is invoking the hook. |
|
||||||
| `Blob` | String | Blob | _(Optional)_ A blob of data that is passed to the hook. (512 byte max) |
|
| `Blob` | String | Blob | No | A blob of data that is passed to the hook. (128k byte max) |
|
||||||
| `Destination` | String | AccountID | _(Optional)_ The address of the account that is the target of the hook. |
|
| `Destination` | String | AccountID | No | The address of the account that is the target of the hook. |
|
||||||
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this payment. |
|
|
||||||
|
|
||||||
### Special Transaction Cost
|
### Special Transaction Cost
|
||||||
|
|
||||||
The Invoke transaction has a standard transaction cost, plus an additional cost based on the size of the Blob and HookParameters fields.
|
The Invoke transaction has a standard transaction cost, plus an additional cost based on the size of the Blob field.
|
||||||
|
|
||||||
### Error Cases
|
### Error Cases
|
||||||
|
|
||||||
@@ -37,5 +36,5 @@ Besides errors that can occur for all transactions, Invoke transactions can resu
|
|||||||
| Error Code | Description |
|
| Error Code | Description |
|
||||||
| --------------- | ------------------------------------------------------------------------ |
|
| --------------- | ------------------------------------------------------------------------ |
|
||||||
| `temDISABLED` | Occurs if the Hooks amendment is not enabled. |
|
| `temDISABLED` | Occurs if the Hooks amendment is not enabled. |
|
||||||
| `temMALFORMED` | Occurs if the Blob field is larger than 128 KiB. |
|
| `temMALFORMED` | Occurs if the Blob field is larger than 128k bytes. |
|
||||||
| `terNO_ACCOUNT` | Occurs if the sending account or the destination account does not exist. |
|
| `terNO_ACCOUNT` | Occurs if the sending account or the destination account does not exist. |
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: OfferCreate
|
title: OfferCreate
|
||||||
description: >-
|
description: >-
|
||||||
An OfferCreate transaction places an [Offer](offers.html) in the
|
An OfferCreate transaction places an Offer in the
|
||||||
[decentralized exchange](decentralized-exchange.html).
|
decentralized exchange.
|
||||||
---
|
---
|
||||||
\[[Source](https://github.com/Xahau/xahaud/blob/dev/src/ripple/app/tx/impl/URIToken.cpp)]
|
\[[Source](https://github.com/Xahau/xahaud/blob/dev/src/ripple/app/tx/impl/URIToken.cpp)]
|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ description: >-
|
|||||||
| `Expiration` | Number | UInt32 | _(Optional)_ Time after which the Offer is no longer active, in \[seconds since the Ripple Epoch]\[]. |
|
| `Expiration` | Number | UInt32 | _(Optional)_ Time after which the Offer is no longer active, in \[seconds since the Ripple Epoch]\[]. |
|
||||||
| `OfferSequence` | Number | UInt32 | _(Optional)_ An Offer to delete first, specified in the same way as \[OfferCancel]\[]. |
|
| `OfferSequence` | Number | UInt32 | _(Optional)_ An Offer to delete first, specified in the same way as \[OfferCancel]\[]. |
|
||||||
| `OfferID` | String | Hash256 | _(Optional)_ The ID of the Offer ledger object to cancel, as a 64-character hexadecimal string. |
|
| `OfferID` | String | Hash256 | _(Optional)_ The ID of the Offer ledger object to cancel, as a 64-character hexadecimal string. |
|
||||||
| `TakerGets` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | The amount and type of currency being sold. |
|
| `TakerGets` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | The amount and type of currency being sold. |
|
||||||
| `TakerPays` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | The amount and type of currency being bought. |
|
| `TakerPays` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | The amount and type of currency being bought. |
|
||||||
|
|
||||||
### OfferCreate Flags
|
### OfferCreate Flags
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ description: >-
|
|||||||
|
|
||||||
| Field | JSON Type | \[Internal Type]\[] | Description |
|
| Field | JSON Type | \[Internal Type]\[] | Description |
|
||||||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `Amount` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | The amount of currency to deliver. For non-XAH amounts, the nested field names MUST be lower-case. If the `tfPartialPayment` flag is set, deliver _up to_ this amount instead. |
|
| `Amount` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | The amount of currency to deliver. For non-XAH amounts, the nested field names MUST be lower-case. If the `tfPartialPayment` flag is set, deliver _up to_ this amount instead. |
|
||||||
| `Destination` | String | AccountID | The unique address of the account receiving the payment. |
|
| `Destination` | String | AccountID | The unique address of the account receiving the payment. |
|
||||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
|
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
|
||||||
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this payment. |
|
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this payment. |
|
||||||
| `Paths` | Array of path arrays | PathSet | (Optional, auto-fillable) Array of payment paths to be used for this transaction. Must be omitted for XAH-to-XAH transactions. |
|
| `Paths` | Array of path arrays | PathSet | (Optional, auto-fillable) Array of payment paths to be used for this transaction. Must be omitted for XAH-to-XAH transactions. |
|
||||||
| `SendMax` | [Currency Amount](https://docs.xahau.network/technical/protocol-reference/data-types/currency-formats#specifying-currency-amounts) | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_\(finance\)). Does not include the XAH destroyed as a cost for submitting the transaction. For non-XAH amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XAH-to-XAH payments. |
|
| `SendMax` | [Currency Amount](/docs/protocol-reference/data-types/currency-formats/#specifying-currency-amounts) | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_\(finance\)). Does not include the XAH destroyed as a cost for submitting the transaction. For non-XAH amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XAH-to-XAH payments. |
|
||||||
| `DeliverMin` | \[Currency Amount]\[] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. For non-XAH amounts, the nested field names are lower-case. |
|
| `DeliverMin` | \[Currency Amount]\[] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. For non-XAH amounts, the nested field names are lower-case. |
|
||||||
|
|
||||||
### Types of Payments
|
### Types of Payments
|
||||||
|
|||||||