This PR implements four interconnected issues for the Ancore SDK:
- #55: Account Abstraction SDK Package
- #52: Stellar Network Client
- #115: Secure Storage Encryption Primitives
- #121: Secure Storage Export/Import
AccountContractclass wrapping Soroban contract invocations- XDR encoding/decoding utilities for contract parameters
- Typed error mapping for contract errors
- Support for initialize, execute, and session key operations
- 23 tests covering all contract methods
StellarClientfor network interactions (testnet, mainnet, local)- Account queries, balance lookups, transaction submission
- Retry logic with exponential backoff (3 retries: 1s/2s/4s)
- Friendbot funding for testnet
- Custom error types (NetworkError, AccountNotFoundError, TransactionError)
- 24 tests for client methods and retry logic
deriveKey()using PBKDF2 (100k+ iterations)encrypt()using AES-256-GCM with random IVdecrypt()with auth tag validation- Encrypted payload format with salt, IV, ciphertext
- 30 tests for encryption round-trip and error cases
exportBackup()for encrypted backup creationimportBackup()for encrypted backup restoration- Support for account data and session keys
- Malformed backup handling
- 20 tests for export/import round-trip
- Core SDK: 120 tests passing, 98.83% coverage
- Account Abstraction: 23 tests passing
- Stellar: 24 tests passing (50% coverage - integration-focused)
- All tests: 300+ tests passing
packages/core-sdk/src/storage/encryption-primitives.tspackages/core-sdk/src/storage/backup.tspackages/core-sdk/src/storage/__tests__/encryption-primitives.test.tspackages/core-sdk/src/storage/__tests__/backup.test.tspackages/account-abstraction/src/__tests__/account-contract.test.tspackages/stellar/src/__tests__/client.test.tspackages/stellar/src/__tests__/retry.test.ts
None - all new functionality
- All code follows project conventions and passes linting
- Comprehensive test coverage with edge case handling
- Ready for integration testing against deployed testnet contract