Skip to content

Conversation

@lempira
Copy link
Contributor

@lempira lempira commented Dec 17, 2025

Implements KMD client tests for localnet integration testing. Tests cover wallet management, key management, multisig operations, and transaction/program signing.

Skipped tests (2) due to Zod schema type mismatches:

  • post_v1_master_key_export - Client returns masterDerivationKey as Uint8Array, schema expects number[]
  • post_v1_multisig_export - Client returns publicKeys as Uint8Array[], schema expects number[][]

@PatrickDinh PatrickDinh changed the base branch from main to decoupling December 17, 2025 23:49
@neilcampbell
Copy link
Contributor

@lempira I think it would be good to have this as a npm script and integrated into the npm run generate:clients command, so that we can easily re-gen the schemas alongside the clients.

@lempira lempira force-pushed the feature/add-kmd-tests branch 2 times, most recently from c376002 to 3049301 Compare December 18, 2025 17:36
@lempira
Copy link
Contributor Author

lempira commented Dec 18, 2025

@lempira I think it would be good to have this as a npm script and integrated into the npm run generate:clients command, so that we can easily re-gen the schemas alongside the clients.

I added a target at the top-level package.json and at in client package.json. The client script targets have relative paths right now, but I plan to move the generate-zod-schema script to polytest and the targets will call that instead.

@lempira lempira force-pushed the feature/add-kmd-tests branch from 1d85543 to 62de8cf Compare December 18, 2025 18:10
Add localnet config and fixture helpers for wallet/key management
- Add localnetConfig and test constants to config.ts
- Create fixtures.ts with wallet/key helper functions
- Implement GET versions and wallets tests
- Implement POST wallet create/init/info/release/rename/renew tests
- Disable globalSetup for localnet testing
- post_v1_key.test.ts
- post_v1_key_list.test.ts
- post_v1_key_export.test.ts
- post_v1_key_import.test.ts
- delete_v1_key.test.ts
- post_v1_master_key_export.test.ts (skipped: Uint8Array vs number[] type mismatch)
- post_v1_multisig_import.test.ts
- post_v1_multisig_list.test.ts
- post_v1_multisig_export.test.ts (skipped: Uint8Array[] vs number[][] type mismatch)
- delete_v1_multisig.test.ts
- post_v1_multisig_sign.test.ts
- post_v1_multisig_signprogram.test.ts

Added algod-client and transact as devDependencies for signing tests..
- post_v1_transaction_sign.test.ts
- post_v1_program_sign.test.ts
@lempira lempira force-pushed the feature/add-kmd-tests branch from 62de8cf to 6cc6303 Compare December 21, 2025 19:47
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.

3 participants