Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: add DirectPost command #201

Merged
merged 2 commits into from
Oct 19, 2023
Merged

plugin: add DirectPost command #201

merged 2 commits into from
Oct 19, 2023

Conversation

LYC386
Copy link
Contributor

@LYC386 LYC386 commented Sep 19, 2023

Description

Adds "DirectPost" command for meson plugin.

Using DirectPost command, the payload inside a CurrencyRequest won't be passed to an IChain instance. Instead, It will be directly sent to the RPC Url matching the Ticker. The response by RPC will also be directly sent back to caller without passing to an IChain instance.

The reasons to add DirectPost command are as follows:

  • Easier for existing wallet to integrate with Meson. Since most wallets should already handle data sent with RPC by themselves, they only need to wrap the data to a CurrencyRequest.
  • Easier to add support to new chains and RPC methods. We only need to update chain factory and currency setting files to support new chains, leaving the json data parts to wallets.
  • Existing commands remain unchanged.

DirectPost command can be tested with meson_wallet_demo PR.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: Test with local mixnet using docker. Use meson_wallet_demo PR to query gas and send a transaction with DirectPost command.
  • Test B

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have checked that any new log messages doesn't inavertedly link compromising information to an external observer about the Meson Mixnet.

@sc0Vu sc0Vu changed the title add DirectPost command plugin: add DirectPost command Oct 18, 2023
@LYC386 LYC386 merged commit 19a9b11 into develop Oct 19, 2023
46 checks passed
@LYC386 LYC386 deleted the update_plugin_rpc branch October 19, 2023 01:45
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