From d07faa57ed17ed0b81772ef922cf2d0f2fd3298f Mon Sep 17 00:00:00 2001 From: viraladmin <00purple@gmail.com> Date: Sat, 6 Jun 2026 13:07:55 -0600 Subject: [PATCH] Updated docs --- docs/CLI_TOOLS.md | 59 +++++++++++++++++++++++++++++------------------ docs/SETTINGS.md | 38 ++++++++++++++++++++++++++---- 2 files changed, 69 insertions(+), 28 deletions(-) diff --git a/docs/CLI_TOOLS.md b/docs/CLI_TOOLS.md index b7afea7..853497b 100644 --- a/docs/CLI_TOOLS.md +++ b/docs/CLI_TOOLS.md @@ -2,7 +2,7 @@ This file lists the command-line tools built from `src/bin`. On Windows, add `.exe` to each tool name. Most network lookup tools prompt for the wallet decryption key because the RPC handshake is authenticated before the request is sent. -Transaction creator tools produce signed transaction JSON. After creating a transaction, broadcast it with `broadcast_transaction`. +Transaction creator tools produce signed transaction JSON and save it under `./transactions/` using the transaction hash as the filename. Creating a transaction does not submit it to the network; broadcast the saved JSON with `broadcast_transaction`. ## Table of Contents @@ -18,7 +18,7 @@ Transaction creator tools produce signed transaction JSON. After creating a tran ### create_new_wallet -Creates or loads an encrypted wallet file at the requested path. +Creates a new encrypted wallet file at the requested path. Requires: @@ -35,15 +35,13 @@ create_new_wallet Expected reply: ```text -Long Address: Short Address: -Vanity Address: Public Key: ``` ### register_wallet -Registers the configured wallet short-address to long-address mapping with a peer. +Registers the wallet with the network. Registration is required before an address can be used. Requires: @@ -63,15 +61,9 @@ Expected reply: Wallet registered: ``` -or: - -```text -Wallet registration failed. -``` - ### recreate_wallet -Recreates an encrypted wallet file from a private key. +Recreates an encrypted wallet file from a private key. The private key must be obtained with `private_key_from_image`. You must also know the encryption/decryption key used when the wallet was originally created. Requires: @@ -93,7 +85,7 @@ Expected reply: ### recreate_wallet_from_image -Recreates an encrypted wallet file from a private-key image. +Recreates an encrypted wallet file from a private-key image. The image can be a base64 image file or a PNG image file. A base64 image must be stored in a standalone file, not inside the wallet file. You must also know the encryption/decryption key used when the wallet was originally created. Requires: @@ -137,7 +129,7 @@ Private key image saved to ### private_key_from_image -Reads a private key back from an image file. +Reads a private key back from a wallet file or base64 image file. This tool does not read private keys from PNG saved images. Requires: @@ -195,7 +187,7 @@ Service state: ## Transaction Creation Tools -These tools prompt for the fields needed by each transaction type, sign the transaction with the configured wallet and print the signed JSON. The same JSON is also written to the transaction output folder when the tool creates the output file successfully. +These tools prompt for the fields needed by each transaction type, sign the transaction with the selected wallet, print the signed JSON and write the same JSON to `./transactions/.json`. The transaction is not sent to the network until the saved JSON is submitted with `broadcast_transaction`. ### create_transfer_tx @@ -243,7 +235,7 @@ transaction: ### create_issue_token_tx -Creates an issue-token transaction for an existing token. +Issues more units of an existing token. This can only be used by the token creator, and only when the token was originally created without a hard cap that prevents further issuance. Requires: @@ -377,6 +369,21 @@ transaction: Creates the first side of a loan contract transaction. The second party signs the transaction with `verify_sign_loan_tx`. +The lender creates this transaction. The tool asks for: + +- Loan coin/token: the asset being lent. +- Loan amount: how much of that asset is lent. +- Payment period: `daily`, `weekly` or `monthly`; this sets the payment cadence. +- Payment number: how many payments are required before the loan is considered paid. +- Payment amount: how much the borrower must pay each period. +- Grace period: how many payments may be missed before collateral can be claimed. +- Max late value: how far behind the borrower may be, in payment value, before collateral can be claimed. +- Collateral coin/token/NFT: the asset the borrower puts up as collateral. +- Collateral amount: how much collateral is required; enter `1` for NFT collateral. +- Start date: the date the loan begins, entered as `YYYY-MM-DD`. +- Borrower wallet: the borrower's short address or vanity address. +- Transaction fee: the base-currency fee paid by the lender. + Requires: - Running node: No @@ -399,6 +406,13 @@ transaction: Creates a loan payment transaction for an existing loan contract. +The borrower uses this after the loan contract is active. The tool asks for: + +- Loan contract hash: the hash of the loan contract being repaid. +- Payment amount: the amount being paid toward the loan. +- Miner tip: a tip in the loan asset; it must be at least 1% of the payment amount. +- Transaction fee: the base-currency fee paid by the borrower. + Requires: - Running node: No @@ -421,6 +435,11 @@ transaction: Creates a collateral claim transaction for an eligible loan contract. +The lender uses this when the loan rules allow collateral to be claimed. The tool asks for: + +- Loan contract hash: the hash of the loan contract whose collateral is being claimed. +- Transaction fee: the base-currency fee paid by the claimant. + Requires: - Running node: No @@ -462,12 +481,6 @@ successful_broadcast: true ``` -or: - -```text - -``` - ## Transaction Signing Tools ### verify_sign_swap_tx @@ -1228,7 +1241,7 @@ On Windows, the tool also prints `[Postgres-Testnet]`. ### sign_message -Signs a plain text message with the configured wallet. +Signs a plain text message with the selected wallet. Requires: diff --git a/docs/SETTINGS.md b/docs/SETTINGS.md index e7c761d..0bbd903 100644 --- a/docs/SETTINGS.md +++ b/docs/SETTINGS.md @@ -100,11 +100,21 @@ Valid common values: The logger also supports more advanced module-level filters through `flexi_logger`, but normal nodes should use one of the simple values above. -### `IP` +### `PUBLIC_IP` -Reachable IP address or domain name announced by this node during handshakes. +Reachable public IP address announced by this node during handshakes and network-map broadcasts. -Use `127.0.0.1` only for local testing. A public node should use a public IP address or a domain name that resolves to the node and reaches the configured RPC port. +Use `127.0.0.1` only for local testing. A public node should use the public IP address that outside peers use to reach the configured RPC port. + +This value is protocol identity. It is validated against forbidden private or unroutable ranges before the node is accepted by peers. + +### `LISTEN_IP` + +Local bind address used by the RPC server. + +Use `0.0.0.0` to listen on all local interfaces, which is usually the correct value for nodes behind NAT or router port forwarding. + +This value is never announced to peers. It may be private, loopback or wildcard because it only controls where the local process listens. ### `RPC_PORT` @@ -132,6 +142,22 @@ Maximum number of outgoing peer connections the node tries to discover and maint This should be greater than `0`. A recommended value is `10`. +### `VALIDATOR` + +Disables local mining while keeping the node connected to peers, synced and able to validate and rebroadcast network activity. + +Use this for bootstrap or validator-only nodes: + +```ini +VALIDATOR = "true" +``` + +Mining nodes should use: + +```ini +VALIDATOR = "false" +``` + ### `THREADS` Number of async worker tasks used during each mining nonce round. @@ -152,13 +178,15 @@ Piggyback entries are startup peers. The node tries these peers when it first st ```ini [Piggyback] -PIGGYBACK_1 = "1.2.3.4:50053" +PIGGYBACK_1 = "contractless.dev" PIGGYBACK_2 = "5.6.7.8:50053" ``` The node only needs one live piggyback peer to begin discovery. Additional entries are backups if earlier entries are offline or unreachable. -Piggyback entries should be public, routable peers. Private, loopback and invalid addresses are filtered before startup connections begin. +Piggyback entries may use a public IP endpoint or a hostname. If no port is included, the active network RPC port is used. Hostnames are resolved only for these startup entries; nodes must still announce public IP endpoints in handshakes and network mapping. + +Piggyback entries should resolve to public, routable peers. Private, loopback and invalid addresses are filtered before startup connections begin. ## `[Postgres-Testnet]`