docs(solana): fix types and account instantiation pattern
Created by: ihsraham
Summary
Fixes documentation inaccuracies found during verification against actual SDK TypeScript types.
Files Changed
1. sdk/wallet-modules/wallet-solana/configuration.md
Issue: Direct WalletAccountSolana constructor example fails at runtime.
Fix: Replace with WalletManagerSolana.getAccount() pattern.
-import { WalletAccountSolana } from '@tetherto/wdk-wallet-solana'
-const account = new WalletAccountSolana(seedPhrase, "0'/0/0", accountConfig)
+import WalletManagerSolana from '@tetherto/wdk-wallet-solana'
+const wallet = new WalletManagerSolana(seedPhrase, accountConfig)
+const account = await wallet.getAccount(0)
2. sdk/wallet-modules/wallet-solana/api-reference.md
Issue: Return types documented as number but SDK returns bigint.
Fix: Update all method signatures to use correct types.
| Method | Before | After |
|---|---|---|
getFeeRates() |
{normal: number, fast: number} |
{normal: bigint, fast: bigint} |
getBalance() |
Promise<number> |
Promise<bigint> |
getTokenBalance() |
Promise<number> |
Promise<bigint> |
sendTransaction() |
{hash: string, fee: number} |
{hash: string, fee: bigint} |
transfer() |
{hash: string, fee: number} |
{hash: string, fee: bigint} |
quoteSendTransaction() |
{fee: number} |
{fee: bigint} |
quoteTransfer() |
{fee: number} |
{fee: bigint} |
3. sdk/wallet-modules/wallet-solana/usage.md
Issue 1: Code examples used result.signature but SDK returns result.hash.
-console.log('Transaction signature:', result.signature)
+console.log('Transaction hash:', result.hash)
Issue 2: Quick Start used invalid placeholder seed phrase, fails when snippet copied and pasted.
-const seedPhrase = 'your twelve word seed phrase here'
+const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'
Verification
| Test | Result |
|---|---|
| API type verification |
|
| Blind copy-paste tests (4 snippets) |
|
| TypeScript compilation |
|