Questions tagged [cardano-serialization-lib]

For questions on how to use the cardano-serialization-library, a library for serialization & deserialization of data structures used in Cardano’s Haskell implementation of Shelley, along with useful utility functions.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

How to test the serialisation of a transaction?

When using the Cardano serialisation library by emurgo, how do you test the output works as intended? Would this change when using parameterised contracts?
0 votes
1 answer
97 views

Attaching Datum Value with CSL 10.x

I generate my datum like so: // Build datum const sellerAddressPKH = changeAddressValue.slice(2,58); const datumFields = CSL.PlutusList.new(); datumFields.add(CSL.PlutusData.new_integer(CSL.BigInt....
  • 121
2 votes
2 answers
255 views

Building a transaction on cardano-cli/api without running node?

Is there a way to build and sign transactions with the cardano-cli/api without running a node? I am trying to construct a transaction using the cli or api and submit it using blockfrost. It throws an ...
3 votes
1 answer
51 views

Haskell + Blockfrost toolchain?

I am looking for a Haskell alternative to the cardano-serialization-lib, which can work in conjunction with blockfrost-haskell. So ideally, it should be able to easily create wallet keys, transactions,...
0 votes
1 answer
45 views

What's a Good example of Practle Serialation lib Usage

Okay so I have used an older version of the library by emerugo. And want some examples of the use of the newer version just to make sure I'm not missing anything important. Can someone point me the ...
0 votes
1 answer
48 views

Cardano Node Causing Browser Errors

I am not a developer, just a hobbyist. I installed the Cardano Node (1.33.0-win64) so that I could point my Nami Wallet Browser Extension to it, rather than the web server node Nami points to by ...
  • 3
0 votes
0 answers
34 views

how to build cardano-serialization-lib ScripHash object from TxOut data hash?

Could anyone give a hint on how to create ScripHash from Haskell ScriptHash/CurrencySymbol value? In a few words. I have built a web server for my contracts. I really want to sign Tx at the client-...
1 vote
2 answers
70 views

How to convert from cborHex to VRFKeyHash using both cardanocli-js and cardano-serialization-lib?

I'm using cardanocli-js to create both VRF files for running a stake pool: vrf.vkey and vrf.skey: const vrfKeyAccount = cardanocliJs.nodeKeyGenVRF("Totem"); Then I want to read the vrf.vkey ...
0 votes
1 answer
81 views

How to retrieve staking credential hash

How to retrieve staking credential hash using cardano serialization library and what is it? How does it differ from public key hash?
  • 3
3 votes
1 answer
125 views

Check status of past transaction using cli

How can you check the status of a past transaction given the TxHash (i.e. pending, failed, or successful) and also the assurance level / number of confirmations and block number? (like on Cardanoscan ...
  • 167
1 vote
2 answers
135 views

How can I convert from cborHex to VRFKeyHash type from the Cardano Serialization Lib?

I need to generate a VRF Key Hash in this format: vrf_vk13hg4gg5fg67399nuz2ldk89kqw9h379cfgtkpvd83ra89f908kcqv2cw3j When I generate it using cardano-cli, I get this file: { "type": "...
0 votes
0 answers
74 views

MissingScriptWitnessesUTXOW while minting NFTs my own NFTS with Nami Wallet?

I am trying to mint NFTs from Nami wallet. I get the following errors. I look like i didn't sign the nativescripts? transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (...
1 vote
2 answers
222 views

How to provide Datum value using serialization lib

I am consuming a script output and also create a new one at the same script address. The validator script requires the output producer to provide the datum value due to making assertions on it. ...
  • 1,088
2 votes
1 answer
191 views

Derive public key hash from bech32 address using python

I know that this is possible in javascript using the cardano serialization lib, as follows: function toHex(bytes){ return Buffer.from(bytes).toString("hex"); } function addrToPubKeyHash(...
  • 948
1 vote
1 answer
209 views

Create transaction serialization-lib > version 10

I'm using cardano-serialization-lib ^9.1.2 to create transaction. I'm using method that are now deprecated in version 10, so is there an example of transaction with serialization-lib latest version ...
2 votes
0 answers
87 views

Cardano serialization lib for PHP

I'm trying to authenticate a user against a (or any) PHP platform (Drupal, Symfony, Laravel,..) by having the user connect with their wallet (Eternl, Nami, ...). As far as I understand, the following ...
  • 21
6 votes
3 answers
430 views

window.cardano undefined

I would to use window.cardano when a user just "enter" to website. Sometimes window.cardano is still undefined How can i solve this problem? I try to use await window.cardano but is not a ...
  • 61
1 vote
1 answer
28 views

How can I generate a KES Signature using cardano-serialization-lib?

Cardano Serialization Lib has this class: export class KESSignature { free(): void; /** * @returns {Uint8Array} */ to_bytes(): Uint8Array; /** * @param {Uint8Array} bytes * @returns {KESSignature} ...
0 votes
1 answer
21 views

How can I issue an operational certificate using cardano-serialization-lib?

Cardano Serialization Lib has this class: export class OperationalCert { free(): void; /** * @returns {Uint8Array} */ to_bytes(): Uint8Array; /** * @param {Uint8Array} bytes * @returns {...
2 votes
1 answer
101 views

Meaning of Index of Redeemer in Serialization Lib 10.4

What is the meaning of the index in the redeemer ? redeemer = [ tag: redeemer_tag, index: uint, data: plutus_data, ex_units: ex_units for context see: https://github.com/input-output-hk/cardano-...
0 votes
2 answers
90 views

Is it possible to generate all stake pool files and keys using Cardano Serialization Lib?

To successfully create and register a stake pool, we are require to generate: Payment keys and address Stake keys and address Stake pool cold key Stake pool hot key Stake pool VRF key Stake pool ...
0 votes
0 answers
36 views

walletid from mnemonic using the cardano-serialization-lib

You need to know the walletid if you want to do anything in the cardano-wallet backend service. One particular use case that I need to solve is where a wallet was created using the cardano-wallet ...
  • 192
3 votes
2 answers
197 views

PlutusData construction using @emurgo cardano-serialization-lib-browser

I have a JSON format needed for PlutusData serialization (but the format is not a standard datum in a list). The datum is wrapped in Maybe monad, so you'll note the nested lists (an array inside the ...
2 votes
1 answer
190 views

Is it possible to get root key from CLI generated private key?

Objective To load a private key generated by cardano-cli into cardano-serialization lib Details Using cardano-cli cardano-cli address key-gen, we get this: { "type": "...
  • 123
3 votes
1 answer
238 views

Cardano Serialization Lib Usage

I am going through Cardano developer docs and the different APIs used to interact with the Cardano network. In the list is Cardano Serialization Lib which has the description, This is a library for ...
  • 327
1 vote
1 answer
109 views

How do you make a faucet for native assets such as NFTS on cardano?

im trying to make an NFT faucet for a NFT drop. How do I make the basic faucet is there an example that I could build upon?
0 votes
0 answers
152 views

Error: submit tx failed: Error: 400: 0: "278ad827cb923ed800fcb2028114ee8e9bca875059e1389ca1f49755c1c9a629"

this.API.submitTx is throwing error Error: submit tx failed: Error: 400: 0: "278ad827cb923ed800fcb2028114ee8e9bca875059e1389ca1f49755c1c9a629" at checkResponseNoError (apiDom.ts:334:1) at ...
0 votes
2 answers
742 views

Not enough ADA leftover to include non-ADA assets in a change address

I am getting the error when using @emurgo\cardano-serialization-lib-asmjs txBuilder.add_change_if_needed(shelleyChangeAddress) throws an exception Not enough ADA leftover to include non-ADA assets in ...
2 votes
0 answers
127 views

Building alonzo transaction using cardano-cli and signing it with serialization-lib

I created an API that based on a request builds the body of a transaction with cardano-cli and returns the cbor to the front-end. In the front-end, I'm using the cardano-serialization-lib to load the ...
  • 948
1 vote
0 answers
98 views

How to sign transaction externally?

I am using the cardano-serialization-lib to derive addresses and create a transaction unsigned. I am then passing that transaction hash in CBOR to an external program to handle the signing process. I ...
  • 50
0 votes
2 answers
167 views

Is there good examples for building a transaction using serialization-lib?

I am trying to find an example of building a simple Tx of ADA in, ADA out type of transaction using sterilization-lib to get cbor and pass it to Wallet.signTx(cbor). developer.cardano.org has a great ...
  • 37
0 votes
2 answers
158 views

Submitting Transaction with CSL Metadata Isn't Showing

I've forked a dApp Connector I found on Github and I'm trying to add some transaction metadata to the ADA transaction it builds. This is what I currently have: buildSendADATransaction = async () => ...
0 votes
1 answer
299 views

How to generate TransactionBody in cardano-serialization lib from cardano-cli's TxBodyAlonzo cborHex

I want to get cborHex from cardano-cli transaction build output and use it with cardano-serialization-lib to recreate the transaction body. I tried the following: cborHex = '...
  • 439
4 votes
1 answer
384 views

How to convert a Stake Key Address from hash to BECH32?

I have this Stake Key: https://testnet.cardanoscan.io/stakekey/7622b4611b15441e7e15cba128ff999ad72388aeb267adc6e70cc9bc?tab=stakehistory I want to convert from ...
1 vote
2 answers
229 views

What am i doing wrong while creating this staking transaction?

i am trying to create a staking transaction using cardano serialisation library and then use blockfrost/infinito to send the transaction. I am using @emurgo/cardano-serialization-lib-nodejs: ^9.1.4, ...
0 votes
2 answers
391 views

How to generate script address from plutus script cborhex

I want to generate the address from the plutus script's cborhex value, but so far without much luck. I am using the alwayssucceeds.plutus contract as an example for which the cborhex value is ...
  • 192
2 votes
1 answer
174 views

How to add multiasset as input to txBuilder?

I'm trying to add lovelaces + native assets to input as multiAsset. However I get Inputs do not conform to this spec or are otherwise invalid. Here is my code: const assetsToSend = this.S....
0 votes
1 answer
124 views

TransctionBuilder.new() in cardano-serialization-lib 10.0.0

With the new version of library TranasctionBuilder.new() arguments have changed. When running: const txBuilder = this.S.TransactionBuilder.new( this.S.LinearFee.new( this.S.BigNum....
1 vote
2 answers
158 views

Javascript assetName Decoding

I'm trying to figure out a reliable way to decode an assetName using JavaScript. My current implementation is this: function hexToBytes (hex) { if(!hex){ return hex; } else { ...
0 votes
1 answer
114 views

TransactionBuilder and add_from_inputs

Looking through the cardano-serialization-lib I see a TransactionBuilderConfig and a TransactionBuilder constructor that looks like it takes the Config and exposes add_from_inputs that maybe does the ...
1 vote
1 answer
233 views

How can I convert Key Hash to bech32 in Cardano serialization lib?

I generate my Key Hash Using the Following Function const getAddressKeyHash = (address) => { return toHex( Cardano.Instance.BaseAddress.from_address( Cardano.Instance.Address....
1 vote
1 answer
313 views

Error loading cardano-serialization-lib

Trying a few different examples out there and I am getting the error: The requested module '/node_modules/@emurgo/cardano-serialization-lib-browser/cardano_serialization_lib_bg.wasm?import' does not ...
0 votes
2 answers
83 views

help, i register script policy with pool.pm was not approved? [closed]

I'm learning to create nft. by using cardano serialization lib and nami wallet but the nft I created, register script policy with pool.pm was not approved. I don't know if it's caused by a signed key ...
1 vote
1 answer
303 views

Error submiting Smart Contract with Nami, What does this error means?

I am running one smart contract with the Nami Wallet but I get this error: ""transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (...
2 votes
2 answers
768 views

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

I'm building a simple website with pure HTML and JS (no React, Angular, etc.). I use Nami to connect to a Cardano wallet and use the Nami's cardano.getBalance() method to get the balance of the wallet....
  • 3,500
1 vote
0 answers
236 views

Mint tokens using plutus scripts with the serialization lib

As I understand, in order to mint a token with the serialization-lib, you must use the function set_mint_scripts, providing a NativeScripts object. This collection of NativeScript objects should ...
  • 948
0 votes
1 answer
216 views

NativeScript vs PlutusScript

In cardano serialization lib what is the difference between NativeScript and PlutusScript? Is there a way to convert from one to the other? I'm trying to load a minting policy script I made as a ...
  • 948
1 vote
1 answer
387 views

cardano-serialization-lib-browser loaded as empty module in NextJS

I'm trying to use cardano-serialization-lib in a NextJS project I'm working on, but I'm receiving an exception before initializing the application TypeError: Cannot read properties of undefined (...
  • 948
0 votes
2 answers
197 views

How to check the NFT timelock status?

How can I check the NFT timelock status, besides pool.pm?
1 vote
0 answers
25 views

Unlock the Funds in the Script with CSL

I'm building a transaction that using UTXO at script as the input. Seem I signed enough vkey, perhaps include transactionWitnessSet.set_plutus_scripts. Finally, i got this error Script inputs not ...
  • 61