Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR replaces the legacy, single-page Rust SDK documentation (pointing to the deprecated aptos-core SDK) with a new multi-page documentation set for aptos-rust-sdk, including updated sidebar navigation and localized nav labels.
Changes:
- Adds new Rust SDK docs pages (EN/ES/ZH) covering quickstart, accounts, transaction building patterns, data fetching, smart contracts, and examples.
- Updates sidebar structure to group Rust SDK pages under “Accounts” and “Building Transactions”.
- Updates SDKs overview card copy and adds new nav label keys for Rust SDK sub-groups.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
astro.sidebar.ts |
Adds grouped Rust SDK navigation with Accounts + Building Transactions sub-groups. |
src/content/nav/en.ts |
Adds label keys for Rust SDK sub-groups used by the new sidebar structure. |
src/content/nav/es.ts |
Adds label keys for Rust SDK sub-groups used by the new sidebar structure. |
src/content/nav/zh.ts |
Adds label keys for Rust SDK sub-groups used by the new sidebar structure. |
src/content/docs/build/sdks.mdx |
Updates the Rust SDK LinkCard description. |
src/content/docs/build/sdks/rust-sdk/index.mdx |
New EN Rust SDK landing page and requirements section. |
src/content/docs/es/build/sdks/rust-sdk/index.mdx |
New ES Rust SDK landing page and requirements section. |
src/content/docs/zh/build/sdks/rust-sdk/index.mdx |
New ZH Rust SDK landing page and requirements section. |
src/content/docs/build/sdks/rust-sdk/fetch-data-via-sdk.mdx |
New EN page describing common read/query patterns (balances, views, ledger info, etc.). |
src/content/docs/es/build/sdks/rust-sdk/fetch-data-via-sdk.mdx |
New ES version of fetch-data-via-sdk page. |
src/content/docs/zh/build/sdks/rust-sdk/fetch-data-via-sdk.mdx |
New ZH version of fetch-data-via-sdk page. |
src/content/docs/build/sdks/rust-sdk/building-transactions.mdx |
New EN “Building Transactions” guide covering end-to-end transaction flow and helpers. |
src/content/docs/es/build/sdks/rust-sdk/building-transactions.mdx |
New ES version of “Building Transactions”. |
src/content/docs/zh/build/sdks/rust-sdk/building-transactions.mdx |
New ZH version of “Building Transactions”. |
src/content/docs/build/sdks/rust-sdk.mdx |
Deletes legacy EN single-page Rust SDK doc that referenced aptos-core. |
src/content/docs/es/build/sdks/rust-sdk.mdx |
Deletes legacy ES single-page Rust SDK doc that referenced aptos-core. |
src/content/docs/build/sdks/rust-sdk/quickstart.mdx |
New EN quickstart page (account creation, faucet funding, transfer). |
src/content/docs/es/build/sdks/rust-sdk/quickstart.mdx |
New ES quickstart page. |
src/content/docs/zh/build/sdks/rust-sdk/quickstart.mdx |
New ZH quickstart page. |
src/content/docs/build/sdks/rust-sdk/rust-examples.mdx |
New EN examples index page. |
src/content/docs/es/build/sdks/rust-sdk/rust-examples.mdx |
New ES examples index page. |
src/content/docs/zh/build/sdks/rust-sdk/rust-examples.mdx |
New ZH examples index page. |
src/content/docs/build/sdks/rust-sdk/smart-contracts.mdx |
New EN smart contracts page. |
src/content/docs/es/build/sdks/rust-sdk/smart-contracts.mdx |
New ES smart contracts page. |
src/content/docs/zh/build/sdks/rust-sdk/smart-contracts.mdx |
New ZH smart contracts page. |
src/content/docs/build/sdks/rust-sdk/account.mdx |
New EN account management page. |
src/content/docs/es/build/sdks/rust-sdk/account.mdx |
New ES account management page. |
src/content/docs/zh/build/sdks/rust-sdk/account.mdx |
New ZH account management page. |
src/content/docs/build/sdks/rust-sdk/account/multi-sig-accounts.mdx |
New EN multi-sig + keyless page. |
src/content/docs/es/build/sdks/rust-sdk/account/multi-sig-accounts.mdx |
New ES multi-sig + keyless page. |
src/content/docs/zh/build/sdks/rust-sdk/account/multi-sig-accounts.mdx |
New ZH multi-sig + keyless page. |
src/content/docs/build/sdks/rust-sdk/building-transactions/* |
New EN subpages for simulation, multi-agent, sponsoring, batching, scripts. |
src/content/docs/es/build/sdks/rust-sdk/building-transactions/* |
New ES subpages for simulation, multi-agent, sponsoring, batching, scripts. |
src/content/docs/zh/build/sdks/rust-sdk/building-transactions/* |
New ZH subpages for simulation, multi-agent, sponsoring, batching, scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ], | ||
| }; | ||
|
|
||
| let gas_estimate = aptos.estimate_gas(payload).await?; |
There was a problem hiding this comment.
This example calls aptos.estimate_gas(payload) with a single argument, but the simulating-transactions docs in this same Rust SDK section use aptos.estimate_gas(&alice, payload.clone()). One of these signatures is likely wrong; please align this snippet with the actual SDK API (and keep it consistent across pages) so readers can copy/paste without compile errors.
| let gas_estimate = aptos.estimate_gas(payload).await?; | |
| let gas_estimate = aptos.estimate_gas(&alice, payload.clone()).await?; |
| serde_json::json!("1000"), | ||
| ], | ||
| }; | ||
|
|
||
| let gas_estimate = aptos.estimate_gas(payload).await?; |
There was a problem hiding this comment.
This example calls aptos.estimate_gas(payload) with a single argument, but the simulating-transactions docs in this same Rust SDK section use aptos.estimate_gas(&alice, payload.clone()). One of these signatures is likely wrong; please align this snippet with the actual SDK API (and keep it consistent across pages) so readers can copy/paste without compile errors.
| // Retrieve all modules published under an account | ||
| let modules = aptos.fullnode().get_account_modules(address).await?; | ||
| for module in &modules { | ||
| println!("Module: {}", module.abi.as_ref().unwrap().name); | ||
| } |
There was a problem hiding this comment.
get_account_modules is iterated as for module in &modules, but other snippets in this PR treat the response as having a .data field (e.g., for module in &modules.data). Please make these examples consistent with the actual response type so the snippet compiles as written.
| Usa `TransactionBuilder` para ensamblar una `RawTransaction` con el remitente, numero de secuencia, payload, ID de cadena y parametros de gas opcionales. | ||
|
|
||
| ```rust | ||
| use aptos_sdk::transaction::TransactionBuilder; |
There was a problem hiding this comment.
This page imports TransactionBuilder from aptos_sdk::transaction::TransactionBuilder, but other Rust SDK docs in this PR consistently use aptos_sdk::transaction_builder::TransactionBuilder. Unless the SDK re-exports it under transaction, this snippet won’t compile as written—please align the import/module path with the rest of the docs (and the actual SDK API).
| use aptos_sdk::transaction::TransactionBuilder; | |
| use aptos_sdk::transaction_builder::TransactionBuilder; |
|
|
||
| // Retrieve all modules published under an account | ||
| let modules = aptos.fullnode().get_account_modules(address).await?; | ||
| for module in &modules { |
There was a problem hiding this comment.
get_account_modules is iterated as for module in &modules, but other snippets in this PR treat the response as having a .data field (e.g., for module in &modules.data). Please make these examples consistent with the actual response type so the snippet compiles as written.
| for module in &modules { | |
| for module in &modules.data { |
| Use `TransactionBuilder` to assemble a `RawTransaction` with the sender, sequence number, payload, chain ID, and optional gas parameters. | ||
|
|
||
| ```rust | ||
| use aptos_sdk::transaction::TransactionBuilder; |
There was a problem hiding this comment.
This page imports TransactionBuilder from aptos_sdk::transaction::TransactionBuilder, but other Rust SDK docs in this PR consistently use aptos_sdk::transaction_builder::TransactionBuilder. Unless the SDK re-exports it under transaction, this snippet won’t compile as written—please align the import/module path with the rest of the docs (and the actual SDK API).
| use aptos_sdk::transaction::TransactionBuilder; | |
| use aptos_sdk::transaction_builder::TransactionBuilder; |
| ```rust | ||
| use aptos_sdk::transaction::TransactionBuilder; | ||
|
|
||
| let chain_id = aptos.chain_id().await?; | ||
| let sequence_number = aptos.get_sequence_number(sender.address()).await?; |
There was a problem hiding this comment.
This page imports TransactionBuilder from aptos_sdk::transaction::TransactionBuilder, but other Rust SDK docs in this PR consistently use aptos_sdk::transaction_builder::TransactionBuilder. Unless the SDK re-exports it under transaction, this snippet won’t compile as written—please align the import/module path with the rest of the docs (and the actual SDK API).
| ], | ||
| }; | ||
|
|
||
| let gas_estimate = aptos.estimate_gas(payload).await?; |
There was a problem hiding this comment.
This example calls aptos.estimate_gas(payload) with a single argument, but the simulating-transactions docs in this same Rust SDK section use aptos.estimate_gas(&alice, payload.clone()). One of these signatures is likely wrong; please align this snippet with the actual SDK API (and keep it consistent across pages) so readers can copy/paste without compile errors.
| let gas_estimate = aptos.estimate_gas(payload).await?; | |
| let gas_estimate = aptos.estimate_gas(&alice, payload.clone()).await?; |
|
|
||
| // Retrieve all modules published under an account | ||
| let modules = aptos.fullnode().get_account_modules(address).await?; | ||
| for module in &modules { |
There was a problem hiding this comment.
get_account_modules is iterated as for module in &modules, but other snippets in this PR treat the response as having a .data field (e.g., for module in &modules.data). Please make these examples consistent with the actual response type so the snippet compiles as written.
| for module in &modules { | |
| for module in &modules.data { |
Add collapsible Rust SDK group to sidebar with sub-sections for accounts and building transactions. Add corresponding navigation labels in English, Spanish, and Chinese.
Replace the single-page Rust SDK doc (pointing to deprecated aptos-core SDK) with 13 in-depth pages covering the new aptos-rust-sdk: overview with feature flags, quickstart, account management, multi-sig/keyless accounts, fetching data, building transactions (with sub-pages for simulation, multi-agent, sponsored, batching, and script transactions), smart contracts, and examples. Includes full Spanish and Chinese translations (26 additional pages). Note: --no-verify used because the nano-staged remark hook is broken (it passes the glob AND staged files to remark --output, causing "Cannot write multiple files to single output" for any MDX commit). Content was verified with pnpm format:content and pnpm lint.
2e97a61 to
dc6c58a
Compare
- Move MultiKeyAccount to top as the recommended approach - Demote MultiEd25519Account to legacy/compatibility section - Remove keyless accounts section (doesn't belong on multi-sig page) - Update Spanish and Chinese translations accordingly
Summary
aptos-coreSDK) with 13 in-depth pages covering the newaptos-rust-sdkDocumentation Pages
Files Changed
Test plan
pnpm lintpassespnpm format/pnpm format:contentpassexperimental.fontsconfig error on main)