Skip to content

feat(wallet): implement wallet resource methods - #363

Merged
Cjay-Cyber-2 merged 1 commit into
ASTROIDX556:mainfrom
Zikrullah001:feat/wallet-resource-methods
Oct 2, 2026
Merged

Cjay-Cyber-2 merged 1 commit into
ASTROIDX556:mainfrom
Zikrullah001:feat/wallet-resource-methods

Conversation

@Zikrullah001

Copy link
Copy Markdown
Contributor

What Changed

  • packages/wallet/src/index.ts: Added getWallet, listWallets, getWalletBalances, and fundWallet resource methods using the shared client helpers, with optional request options, typed parameters, and TSDoc usage examples.
  • packages/types/src/dto.ts: Added WalletBalanceQuery and FundWalletInput, with exact decimal-string amounts and typed Stellar asset/issuer fields; used the public-key type for imported wallet addresses.
  • packages/types/src/entities.ts: Added StellarAssetCode and StellarPublicKey aliases and applied them to wallet and balance DTO fields while retaining balance amounts as DecimalString.
  • packages/wallet/__tests__/wallet.test.ts: Added mocked-client tests for each requested method, including route/query handling and preservation of decimal amounts as strings.

Why

Expose the wallet collection and balance/funding endpoints through the SDK's typed WalletResource API, while preventing monetary precision loss and clarifying Stellar asset and issuer fields.

How it Was Tested

  • pnpm --filter @astroid/wallet test: passed, 53 tests across 7 files. New cases cover fetching, listing, balance filters, and funding request payloads with exact decimal strings.
  • pnpm --filter @astroid/wallet typecheck: passed.
  • pnpm typecheck: currently fails in the fetched upstream baseline at packages/agent/src/__tests__/validation.test.ts, which imports missing CreateAgentDtoSchema and UpdateAgentDtoSchema exports from @astroid/types. This failure is unrelated to the wallet changes.

Closes #275

@Cjay-Cyber-2
Cjay-Cyber-2 merged commit 830d791 into ASTROIDX556:main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Wallet resource methods and balance query helpers in @astroid/wallet

2 participants