diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index dd9c6b5..e5ea226 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,8 @@ +--- +search: + boost: 0.2 +--- + ## [Unreleased] ### Added @@ -29,7 +34,7 @@ - `pyproject.toml`: set `python-source = "python"` and moved the package stub tree under `python/kaspa/` (`kaspa.pyi` → `python/kaspa/__init__.pyi`). - `Hash` accepts `str` in addition to `Hash` instances wherever it is used as an argument, and gained a `to_hex()` method. - Added `__repr__` methods to: `Hash`, `Balance`, `Binary`, `Address`, `NetworkId`, `ScriptPublicKey`, `TransactionOutpoint`, `Transaction`, `TransactionInput`, `TransactionOutput`, `UtxoEntry`, `UtxoEntries` (consensus and generator helper), `UtxoEntryReference`, `ScriptBuilder`, `Wallet`, `Fees`, `PaymentOutput`, `Outputs`, `Generator`, `GeneratorSummary`, `PendingTransaction`, `BalanceStrings`, `UtxoProcessorEvent`, `UtxoProcessor`, `UtxoContext`, `Notification`, `Resolver`, `NotificationEvent`, `RpcClient`, `DerivationPath`, `XPub`, `PublicKey`, `XOnlyPublicKey`, `PublicKeyGenerator`. -- Documentation site reorganization +- Documentation site reorganization & search ranking ### Fixed - `AccountDescriptor.__repr__` now correctly renders optional fields. diff --git a/docs/examples.md b/docs/examples.md index c90e176..168228f 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Examples Runnable examples live in the SDK repository, not in these docs. Each diff --git a/docs/gen_ref_pages.py b/docs/gen_ref_pages.py index a18c89b..f37cc10 100644 --- a/docs/gen_ref_pages.py +++ b/docs/gen_ref_pages.py @@ -19,6 +19,23 @@ "Exceptions", ] +CLASS_BOOSTS = { + "Wallet": 10, + "RpcClient": 8, + "Address": 8, + "Transaction": 8, + "Generator": 6, + "UtxoEntry": 5, + "PublicKey": 5, + "PrivateKey": 5, + "Mnemonic": 5, + "UtxoProcessor": 5, + "UtxoContext": 5, + "Resolver": 4, + "ScriptBuilder": 4, + "NetworkId": 4, +} + def parse_stub_file(content: str) -> dict: """ @@ -161,6 +178,10 @@ def category_to_nav_path(category: str) -> tuple: with mkdocs_gen_files.open(doc_path, "w") as f: if category == "Exceptions": f.write("---\nsearch:\n boost: 0.3\n---\n\n") + elif category == "TypedDicts": + f.write("---\nsearch:\n boost: 0.6\n---\n\n") + elif name in CLASS_BOOSTS: + f.write(f"---\nsearch:\n boost: {CLASS_BOOSTS[name]}\n---\n\n") f.write(f'# `{name}` ({type_label})\n\n') f.write(f"::: {module}.{name}\n") f.write(" options:\n") diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 4091f3f..ecb0d34 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Installation This Python package can be [installed from PyPi](#installation-via-pypi) or [built from source](#installation-from-source). diff --git a/docs/getting-started/security.md b/docs/getting-started/security.md index 9872f51..05b00bc 100644 --- a/docs/getting-started/security.md +++ b/docs/getting-started/security.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Security The SDK gives you direct access to mnemonics, seeds, private keys, and wallet diff --git a/docs/learn/addresses.md b/docs/learn/addresses.md index 376ff8c..1517cd9 100644 --- a/docs/learn/addresses.md +++ b/docs/learn/addresses.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Addresses A Kaspa address encodes a public key or script hash, the address diff --git a/docs/learn/index.md b/docs/learn/index.md index a374dcb..a96e779 100644 --- a/docs/learn/index.md +++ b/docs/learn/index.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Learn The Learn section on this site is grouped into the following main categories: diff --git a/docs/learn/networks.md b/docs/learn/networks.md index 2551573..0b1f4eb 100644 --- a/docs/learn/networks.md +++ b/docs/learn/networks.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Networks The Kaspa community runs various public networks: a production mainnet and a few testnets. diff --git a/docs/learn/rpc/calls.md b/docs/learn/rpc/calls.md index 5fe32e3..02c33ee 100644 --- a/docs/learn/rpc/calls.md +++ b/docs/learn/rpc/calls.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Calls Once connected, every RPC method is `await client.(...)`. Most diff --git a/docs/learn/rpc/connecting.md b/docs/learn/rpc/connecting.md index 0aed612..f6d43ba 100644 --- a/docs/learn/rpc/connecting.md +++ b/docs/learn/rpc/connecting.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Connecting [`RpcClient.connect()`](../../reference/Classes/RpcClient.md#kaspa.RpcClient.connect) diff --git a/docs/learn/rpc/overview.md b/docs/learn/rpc/overview.md index c4b08fe..2132f41 100644 --- a/docs/learn/rpc/overview.md +++ b/docs/learn/rpc/overview.md @@ -1,3 +1,8 @@ +--- +search: + boost: 5 +--- + # RPC Kaspa nodes expose an RPC API. This SDK provides diff --git a/docs/learn/rpc/resolver.md b/docs/learn/rpc/resolver.md index 15e3f30..a260f9e 100644 --- a/docs/learn/rpc/resolver.md +++ b/docs/learn/rpc/resolver.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Resolver A [`Resolver`](../../reference/Classes/Resolver.md) finds a public Kaspa diff --git a/docs/learn/rpc/subscriptions.md b/docs/learn/rpc/subscriptions.md index 53afeb5..44f3e1d 100644 --- a/docs/learn/rpc/subscriptions.md +++ b/docs/learn/rpc/subscriptions.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Subscriptions Subscriptions let diff --git a/docs/learn/transactions/inputs.md b/docs/learn/transactions/inputs.md index 25976d8..9fa93d5 100644 --- a/docs/learn/transactions/inputs.md +++ b/docs/learn/transactions/inputs.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Inputs A transaction's inputs say *which UTXOs are being spent*. Each input diff --git a/docs/learn/transactions/mass-and-fees.md b/docs/learn/transactions/mass-and-fees.md index 68fbe4a..e805e1b 100644 --- a/docs/learn/transactions/mass-and-fees.md +++ b/docs/learn/transactions/mass-and-fees.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Mass & fees Kaspa uses a **mass-based fee model**. Every transaction has a *mass* diff --git a/docs/learn/transactions/metadata.md b/docs/learn/transactions/metadata.md index b484722..943169d 100644 --- a/docs/learn/transactions/metadata.md +++ b/docs/learn/transactions/metadata.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Metadata fields Beyond inputs and outputs, a diff --git a/docs/learn/transactions/outputs.md b/docs/learn/transactions/outputs.md index 7f47c8c..cb1689b 100644 --- a/docs/learn/transactions/outputs.md +++ b/docs/learn/transactions/outputs.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Outputs A transaction's outputs are the new UTXOs it creates. Each carries a diff --git a/docs/learn/transactions/overview.md b/docs/learn/transactions/overview.md index 2dcb112..4741eba 100644 --- a/docs/learn/transactions/overview.md +++ b/docs/learn/transactions/overview.md @@ -1,3 +1,8 @@ +--- +search: + boost: 5 +--- + # Transactions A Kaspa transaction has the same shape as on any UTXO chain: a list diff --git a/docs/learn/transactions/scripts.md b/docs/learn/transactions/scripts.md index dc397c5..1ad2c01 100644 --- a/docs/learn/transactions/scripts.md +++ b/docs/learn/transactions/scripts.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Scripts A [`ScriptPublicKey`](../../reference/Classes/ScriptPublicKey.md) is the lock on every output. Most of the time it's diff --git a/docs/learn/transactions/serialization.md b/docs/learn/transactions/serialization.md index 752c8f5..165cee1 100644 --- a/docs/learn/transactions/serialization.md +++ b/docs/learn/transactions/serialization.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Serialization The transaction-shaped types — diff --git a/docs/learn/transactions/signing.md b/docs/learn/transactions/signing.md index 6fb24f7..bc0f115 100644 --- a/docs/learn/transactions/signing.md +++ b/docs/learn/transactions/signing.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Signing Signing fills each input's `signature_script` with proof that the diff --git a/docs/learn/transactions/submission.md b/docs/learn/transactions/submission.md index b8bc628..0221643 100644 --- a/docs/learn/transactions/submission.md +++ b/docs/learn/transactions/submission.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Submission & confirmation Submitting a signed transaction hands it to a node, which gossips it diff --git a/docs/learn/wallet-sdk/derivation.md b/docs/learn/wallet-sdk/derivation.md index 1298c8e..89695a9 100644 --- a/docs/learn/wallet-sdk/derivation.md +++ b/docs/learn/wallet-sdk/derivation.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Derivation Once you have an [`XPrv`](../../reference/Classes/XPrv.md) (see diff --git a/docs/learn/wallet-sdk/key-management.md b/docs/learn/wallet-sdk/key-management.md index bfe90fd..ae8024b 100644 --- a/docs/learn/wallet-sdk/key-management.md +++ b/docs/learn/wallet-sdk/key-management.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Key Management Everything on this page is BIP-39 compatible. The SDK gives you diff --git a/docs/learn/wallet-sdk/overview.md b/docs/learn/wallet-sdk/overview.md index d6303f4..f6cab86 100644 --- a/docs/learn/wallet-sdk/overview.md +++ b/docs/learn/wallet-sdk/overview.md @@ -1,3 +1,8 @@ +--- +search: + boost: 5 +--- + # Wallet SDK The **Wallet SDK** is the set of primitives the managed diff --git a/docs/learn/wallet-sdk/tx-generator.md b/docs/learn/wallet-sdk/tx-generator.md index 7ba795d..e1e9513 100644 --- a/docs/learn/wallet-sdk/tx-generator.md +++ b/docs/learn/wallet-sdk/tx-generator.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Transaction Generator The [`Generator`](../../reference/Classes/Generator.md) is the SDK's diff --git a/docs/learn/wallet-sdk/utxo-context.md b/docs/learn/wallet-sdk/utxo-context.md index bca460a..8440326 100644 --- a/docs/learn/wallet-sdk/utxo-context.md +++ b/docs/learn/wallet-sdk/utxo-context.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # UTXO Context A [`UtxoContext`](../../reference/Classes/UtxoContext.md) tracks UTXOs diff --git a/docs/learn/wallet-sdk/utxo-processor.md b/docs/learn/wallet-sdk/utxo-processor.md index 113619b..fe47c53 100644 --- a/docs/learn/wallet-sdk/utxo-processor.md +++ b/docs/learn/wallet-sdk/utxo-processor.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # UTXO Processor A [`UtxoProcessor`](../../reference/Classes/UtxoProcessor.md) is the diff --git a/docs/learn/wallet/accounts.md b/docs/learn/wallet/accounts.md index 956f9cd..b14662f 100644 --- a/docs/learn/wallet/accounts.md +++ b/docs/learn/wallet/accounts.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Accounts A wallet can hold multiple accounts of mixed kinds, each backed by one diff --git a/docs/learn/wallet/addresses.md b/docs/learn/wallet/addresses.md index ee80163..0c427a2 100644 --- a/docs/learn/wallet/addresses.md +++ b/docs/learn/wallet/addresses.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Addresses A BIP32 account derives [`Address`](../../reference/Classes/Address.md) instances. The wallet records two diff --git a/docs/learn/wallet/architecture.md b/docs/learn/wallet/architecture.md index 78d0e6f..fbc8cf6 100644 --- a/docs/learn/wallet/architecture.md +++ b/docs/learn/wallet/architecture.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Architecture The `Wallet` class is a system of cooperating components. Knowing some of the underlying mechanics is useful for development. diff --git a/docs/learn/wallet/errors.md b/docs/learn/wallet/errors.md index a80ef3e..f1a3505 100644 --- a/docs/learn/wallet/errors.md +++ b/docs/learn/wallet/errors.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Errors The wallet's errors live in `kaspa.exceptions`. Most are diff --git a/docs/learn/wallet/events.md b/docs/learn/wallet/events.md index 5cf39ee..70732db 100644 --- a/docs/learn/wallet/events.md +++ b/docs/learn/wallet/events.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Events The wallet emits events for every state change the node pushes diff --git a/docs/learn/wallet/lifecycle.md b/docs/learn/wallet/lifecycle.md index 4004383..6d143d1 100644 --- a/docs/learn/wallet/lifecycle.md +++ b/docs/learn/wallet/lifecycle.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Lifecycle A `Wallet` moves through five states. Each transition is async and diff --git a/docs/learn/wallet/overview.md b/docs/learn/wallet/overview.md index 827a1f5..2cf2629 100644 --- a/docs/learn/wallet/overview.md +++ b/docs/learn/wallet/overview.md @@ -1,3 +1,8 @@ +--- +search: + boost: 5 +--- + # Wallet The [`Wallet`](../../reference/Classes/Wallet.md) class is the SDK's diff --git a/docs/learn/wallet/private-keys.md b/docs/learn/wallet/private-keys.md index 728e3b5..642b886 100644 --- a/docs/learn/wallet/private-keys.md +++ b/docs/learn/wallet/private-keys.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Private Keys A *private key data* entry is the encrypted secret that backs one or diff --git a/docs/learn/wallet/send-transaction.md b/docs/learn/wallet/send-transaction.md index 71fe69a..958a2d5 100644 --- a/docs/learn/wallet/send-transaction.md +++ b/docs/learn/wallet/send-transaction.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Send Transaction Outgoing flows from an activated account. Every method on this page diff --git a/docs/learn/wallet/sweep.md b/docs/learn/wallet/sweep.md index c691f0c..ef8e5e0 100644 --- a/docs/learn/wallet/sweep.md +++ b/docs/learn/wallet/sweep.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Sweep Funds A sweep consolidates every UTXO in an account into one address. Two diff --git a/docs/learn/wallet/sync-state.md b/docs/learn/wallet/sync-state.md index 714ec78..820e188 100644 --- a/docs/learn/wallet/sync-state.md +++ b/docs/learn/wallet/sync-state.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Sync State "Sync" in the managed wallet covers two distinct layers: diff --git a/docs/learn/wallet/transaction-history.md b/docs/learn/wallet/transaction-history.md index bc1fbce..eaa98ed 100644 --- a/docs/learn/wallet/transaction-history.md +++ b/docs/learn/wallet/transaction-history.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Transaction History The wallet stores a record of every transaction that touched each diff --git a/docs/learn/wallet/wallet-files.md b/docs/learn/wallet/wallet-files.md index 538d7f4..295930a 100644 --- a/docs/learn/wallet/wallet-files.md +++ b/docs/learn/wallet/wallet-files.md @@ -1,3 +1,8 @@ +--- +search: + boost: 3 +--- + # Wallet Files A wallet file is a single encrypted file on disk. Only one is open at