Skip to content

docs: convert remaining monolithic usage.md files into how-to guides

Created by: ihsraham

Summary

  • Split 7 remaining monolithic usage.md files into 36 focused how-to guides across wallet, bridge, swap, lending, and fiat modules
  • Converted each original usage.md into a card table hub page linking to its guides
  • Updated SUMMARY.md with all 36 new guide entries nested under their respective module Usage pages
  • Updated wallet-spark docs for v1.0.0-beta.12: aligned API reference, configuration, guides, and README with .d.ts type definitions from the new release

Modules Converted

Module Guides Lines (old) Lines (new total)
wallet-btc 7 659 ~612
wallet-evm-erc-4337 7 522 ~601
wallet-spark 7 571 ~707
bridge-usdt0-evm 5 434 ~535
swap-velora-evm 4 292 ~378
lending-aave-evm 3 210 ~326
fiat-moonpay 3 202 ~326

wallet-spark v1.0.0-beta.12 Documentation Fixes

Verified against .d.ts from @tetherto/wdk-wallet-spark@1.0.0-beta.12.

API Reference (api-reference.md):

  • Removed SparkTransactionReceipt type section (@sparkscan/api-node-sdk-client dependency dropped)
  • getTransactionReceipt() return type corrected from SparkTransactionReceipt | null to SparkTransfer | null
  • getUnusedDepositAddresses() signature updated: accepts optional QueryDepositAddressesParams, returns { depositAddresses: DepositAddressQueryResult[], offset: number }
  • getSparkInvoices() signature updated: accepts QuerySparkInvoicesParams, returns { invoiceStatuses: InvoiceResponse[], offset: number }
  • Added getStaticDepositAddresses() and getUtxosForDepositAddress() to both WalletAccountSpark and WalletAccountReadOnlySpark
  • Moved getTransfers() to WalletAccountReadOnlySpark (available on full account via inheritance)
  • Removed verify() from WalletAccountReadOnlySpark (no longer declared in .d.ts)
  • Documented getAccountByPath() on WalletManagerSpark (was incorrectly marked as unsupported)
  • Added SIGNET to SparkWalletConfig network options
  • Fixed WithdrawOptions: documented as Omit<WithdrawParams, 'feeQuote'>, removed feeQuote from example
  • Fixed TransferOptions vs GetTransfersOptions type confusion (these are distinct types)
  • Added new exported types: DepositAddressQueryResult, InvoiceResponse, QueryDepositAddressesParams, GetUtxosParams, QuerySparkInvoicesParams
  • Removed sparkScanApiKey from SparkWalletConfig type

Configuration (configuration.md):

  • Removed SparkScan API Key section (config option no longer exists)
  • Updated code comment to show SIGNET as valid network option

README (README.md):

  • Added "Spark Signet" to supported networks list

Guides:

  • deposits-and-withdrawals.md: removed feeQuote from withdraw() example, added getStaticDepositAddresses() and getUtxosForDepositAddress() sections, updated intro anchors
  • manage-accounts.md: replaced "getAccountByPath not supported" warning with documented usage and code example
  • get-started.md: added SIGNET to network options hint

Changelog (overview/changelog.md):

  • Added wallet-spark v1.0.0-beta.12 entry with all public API changes

Guide Structure (per module)

Each guide follows the pattern established in PRs #64, #105, and #111:

  • YAML frontmatter with title, description, and layout block
  • Intro paragraph linking to all ## sections
  • API reference cross-links on every method/class in prose
  • Descriptive lead-in before every code block
  • {% code %} wrappers with line numbers
  • {% hint %} callouts for warnings/tips
  • Next Steps linking to the next logical guide
  • handle-errors.md separates error handling from Best Practices (fee management, dispose)

Flagged Tasks (from original task list)

  • swap-stonfi-ton: Module does not exist (404 on npm, no directory in repo). Cancelled.
  • UI KITS: Already well-structured with no monolithic usage.md to convert. Cancelled.

Compliance

  • Token naming: USD₮ in prose, USDT in code (T1)
  • Real contract addresses from api-reference.md (T3)
  • Realistic values achievable with testnet faucets (T4)
  • GitBook render safety verified: balanced code fences, hint/endhint, code/endcode, HTML tables
  • No filler words (W4)
  • All wallet-spark fixes verified against wallet-account-spark.d.ts, wallet-account-read-only-spark.d.ts, and index.d.ts from beta.12

Merge request reports