Skip to content

Conversation

kenlau666
Copy link
Contributor

@kenlau666 kenlau666 commented Aug 3, 2025

Thank you for contributing to Whisky! We appreciate your effort and dedication to improving this project. To ensure that your contribution is in line with the project's guidelines and can be reviewed efficiently, please fill out the template below.

Remember to follow our Contributing Guide before submitting your pull request.

Impl 4 additional functions in Wallet

  1. get_change_address
  2. get_utxos
  3. get_collateral
  4. submit_tx

Please provide a brief, concise summary of the changes in your pull request. Explain the problem you are trying to solve and the solution you have implemented.

Scope of Change

  • whisky
  • whisky-provider
  • whisky-wallet
  • whisky-csl
  • whisky-common
  • whisky-macros
  • whisky-js

Type of Change

Please mark the relevant option(s) for your pull request:

Feature Change

Type of feature change:

  1. New feature - non-breaking change which adds functionality
  2. Breaking change - fix or feature that would cause existing functionality to not work as expected

new feature

Maintenance

  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Checklist

Please ensure that your pull request meets the following criteria:

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary
  • I have updated the documentation, if necessary
  • All new and existing tests pass
  • Both rust and wasm build pass

Additional Information

If you have any additional information or context to provide, such as screenshots, relevant issues, or other details, please include them here.

let mnemonic_phrase = "summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer summer";
let wallet = Wallet::new_mnemonic(mnemonic_phrase);
let address = wallet
.get_change_address(whisky_wallet::AddressType::Payment)
Copy link
Member

Choose a reason for hiding this comment

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

Allow selecting of wallet type feels little weird, how see @twwu123?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i refer this to mesh. if browser wallet, always BaseAddress. If not, either BaseAddress or EnterpriseAddress
https://github.com/MeshJS/mesh/blob/7fd4afcf287a30b561ffa0b503ec10ddc6683935/packages/mesh-wallet/src/mesh/index.ts#L229

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yea i think this is fine

Copy link
Collaborator

Choose a reason for hiding this comment

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

Later we may overhaul wallet logic, just copy mesh logic for now

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