Skip to main content
6 votes
Accepted

How to decode cbor which is generated with cardano-cli build command?

Been thinking about this question for a while. I haven't yet found a way to decode the specific 57 byte cbor to an addr-style address, but I suspect it will involve using the above keymappings in some ...
zhekson's user avatar
  • 3,689
3 votes

Programmatically creating the policyid / scripthash in Javascript (Browser)

Finally got my head around this, thanks to this version in Python: Re-Implementing Policy Hashing in Python by @tycl. Basically we need to Parse the policy (JSON) Follow the CDDL specifications to ...
sean's user avatar
  • 1,463
2 votes
Accepted

Re-Implementing Policy Hashing in Python

It seems I was close, but the str.encode() function was not the correct one to use. Also a zero byte needs to be prepended to the data to be hashed. Thanks to user bwbush from the cardano forum for ...
tycl's user avatar
  • 190
2 votes
Accepted

NativeScript vs PlutusScript

I think NativeScript is a simple multisig scripting language while PlutusScript is a Turing complete scripting language. You can find more details and examples of NativeScript here
Archi - Pie Stake Pool's user avatar
2 votes

Cbor address to bech32 type address in JS or python

You can also use typhonjs used by typhonwallet. It's a Pure JS library not dependent on WASM. Install npm i @stricahq/typhonjs Usage const typhonjs = require("@stricahq/typhonjs"); const ...
Pavan Vora's user avatar
1 vote

Can someone show me how to get the transaction in the proper format for cip-30?

You were on the right track, the key is to add --cddl-format to the build command
wutzebaer's user avatar
  • 691
1 vote

Cbor address to bech32 type address in JS or python

First install the npm module: npm i @emurgo/cardano-serialization-lib-browser Then you need a wasm loader module class wasm { async load() { if (this._wasm) return; /** * @private ...
intrinsic-values's user avatar
1 vote

cbor encode and decode

I use python cbor2 library or https://cbor.me. In the case of a wallet vkey, it's just a hex value that it'll decode as. Something like a transaction will have more data types embedded in the CBOR.
Samuel Leathers's user avatar
1 vote
Accepted

How can I use cardano-serialization-lib in the browser to decode CBOR?

With the help of Samuel's answer, I have been able to get it running. Some important things I didn't know: import from CDN has to be done with the full url. The library has to be imported inside of ...
eddex's user avatar
  • 3,838
1 vote
Accepted

Programmatically creating the policyid / scripthash in Javascript (Browser)

You can do this using the 10.0 beta version of cardano-serialization-lib which should make it into stable pretty soon (I'm in the process of testing this, you can follow the status on this Github ...
Thom's user avatar
  • 354

Only top scored, non community-wiki answers of a minimum length are eligible