input-output-hk / cardano-js-sdk

JavaScript SDK for interacting with Cardano, providing various key management options, with support for popular hardware wallets
https://input-output-hk.github.io/cardano-js-sdk/
Apache License 2.0
214 stars 58 forks source link

Documentation #161

Closed mailtodanish closed 2 years ago

mailtodanish commented 2 years ago

Hi, Where to get documentation of all its methods and its description?

I am not able to understand what exactly below method does and there are several methods.

Cardano.PlutusData.new_constr_plutus_data

Let me know if method details are documented ?

mkazlauskas commented 2 years ago

Hi, documentation is available here. I don't see Cardano.PlutusData though, where did you find it?

mailtodanish commented 2 years ago
const datum = Loader.Cardano.PlutusData.**new_constr_plutus_data**(
    Loader.Cardano.ConstrPlutusData.new(
      Loader.Cardano.Int.new_i32(DATUM_TYPE.StartBid),
      Loader.Cardano.**PlutusList**.new()
    )

https://input-output-hk.github.io/cardano-js-sdk/classes/_cardano_sdk_core.CSL.PlutusData.html

document is not telling anything about method what exactly it is doing? it is saying about return. I am very new and want to add datum in transaction.

mkazlauskas commented 2 years ago

That's from cardano-serialization-lib and it's docs are out of scope of this SDK. If I had to guess it creates an object that you could then set in CSL's Transaction object. Closing this issue since there's nothing else to resolve. If you have any other questions about cardano-js-sdk please use 'Discussions' instead of 'Issues'.