StricaHQ / typhonjs

Pure javascript Cardano wallet library
Apache License 2.0
61 stars 12 forks source link

Make protocolParams to be standard #22

Closed mahnunchik closed 7 months ago

mahnunchik commented 1 year ago

This PR makes protocolParams look like parameters from Cardano GraphQL response.

  1. Make number values to be js Number type.
  2. Rename stakeKeyDeposit to keyDeposit
  3. Rename priceSteps to priceStep (ending s)
  4. Swap values of priceStep and priceMem according to latest API response.

Docs:

ashisherc commented 1 year ago

thank you for this pr @mahnunchik, graphql naming convention is not standard, and hence we will be unable to use that format. It would be ideal to use the cardano-cli output naming convention as it will be maintained in long term. plz see this explanation https://github.com/StricaHQ/typhonjs/issues/5

mahnunchik commented 1 year ago

This PR is related to https://github.com/StricaHQ/typhonjs/issues/21 because coins/lovelacePerUtxoByte should be used.

@ashisherc What do you think about accepting number as a parameter or even both BigNumber/number with internal conversion?

mahnunchik commented 1 year ago
  1. Could you please share current output of cardano-cli query protocol-parameters. I don't have running node for now.
  2. The logic behind the change params to native types is to be able to pass parameters as is without conversion to internal BigNumber.
  3. I don't understand math of current algorithm yet.
ashisherc commented 7 months ago

https://github.com/StricaHQ/typhonjs/issues/28#issuecomment-1977956876