Skip to content

Conversation

@ruhil6789
Copy link

Summary

This PR adds missing documentation for two features identified in issue #707:

  1. accountType option in MeshWallet initialization
  2. selector option in MeshTxBuilder for coin selection customization

Context

Issue #707 identified several undocumented features. This PR addresses:

  • mesh-wallet: Account type in initialization (payment/stake/drep)
  • mesh-transaction: Coin selection strategy customization via selector option

Changes

  • Added comprehensive JSDoc for accountType parameter in MeshWallet class with examples for payment, stake, and drep account types
  • Added JSDoc for MeshTxBuilderOptions interface documenting all options including selector
  • Added JSDoc for MeshTxBuilder constructor with selector explanation and examples
  • Updated playground documentation (initialize-txbuilder.tsx) to include selector option in signature and options list
  • Documented available built-in selectors: CardanoSdkInputSelector (default) and LargestFirstInputSelector
  • Explained how to create custom selectors via IInputSelector interface

Affected Components

Type of Change

  • Documentation update (adding or updating documentation related to the project)

Related Issues

Fixes #707

Checklist

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary (N/A - documentation only)
  • I have updated the documentation, if necessary
  • All new and existing tests pass (i.e. npm run test) (N/A - documentation only)
  • The build is pass (i.e. npm run build) (N/A - documentation only)

- Document accountType option in MeshWallet initialization (payment/stake/drep)
- Document selector option in MeshTxBuilder for coin selection customization
- Update playground documentation to include selector option

Fixes MeshJS#707
Copy link
Member

@HinsonSIDAN HinsonSIDAN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for fixing typo also

Copy link
Member

@HinsonSIDAN HinsonSIDAN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes before merging

Required Changes

# File Issue Fix
1 packages/mesh-wallet/src/mesh/index.ts:78 Incorrect networkId values - States "0 for mainnet, 1 for testnet" but Cardano uses mainnet=1, testnet=0 Swap to "1 for mainnet, 0 for testnet"
2 apps/playground/.../initialize-txbuilder.tsx:50 Grammar error - "to initialized the lower level" Change to "to initialize the lower level"

@ruhil6789
Copy link
Author

@HinsonSIDAN I’ve updated the code and pushed the required changes. Please have a look when you get a chance.

Copy link
Member

@HinsonSIDAN HinsonSIDAN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you for your contribution!

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.

Missing Documentation

2 participants