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
0 votes
1 answer
193 views

Error: encoding/hex: invalid byte: s When using Lucid calling payToContract

I am getting an issue when creating a Lucid transaction and calling payToContract I have created the datum and it is erroring on the line that converts this datum toHex With the following error: Error:...
2 votes
1 answer
189 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
2 answers
326 views

@emurgo/cardano-serialization-lib-browser on NextJS error when running `npm run build`

I'm a complete NextJS / React and Wasm newbie, but I'm having fun learning and building a simple website. I've added @emurgo/cardano-serialization-lib-browser as a dep to my NextJS 17 project w/ npm i ...
0 votes
1 answer
398 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 = '...
2 votes
3 answers
406 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 ...
0 votes
2 answers
131 views

get all transactions info of Cardano by using third party 'Blockfrost' with only 1 time call api?

I'm a noob about Cardano, i wonder if be able to get all transactions info of cardano by passing an specific address. For example i have an specific address is: ...
2 votes
1 answer
200 views

Get transaction unspent output value

I have payment signing key and staking signing key of my wallet. How can I get transaction unspent outputs with cardano-cli/cardano-serialization-lib/pycardano. I expect to get string like this ...
0 votes
2 answers
38 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 {...
0 votes
2 answers
201 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 () => ...
1 vote
1 answer
110 views

Rust Serialization Lib Minting NFT - Missing Key Witnesses Error on Submission

I am running into an error with the CSL Rust Lib when submitting a minting NFT tx. I am following a minimal example in JS https://gist.github.com/lovalabs/83d08796ab9ff65cbf188fbca8d03343 as a guide ...
0 votes
1 answer
130 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 ...
0 votes
3 answers
117 views

Unlock NFT from smart contract by Cardano-serialization-library

I am trying to implement the Unlocking of NFT from an "always true" smart contract. I am using the Cardano serialization library for this. I can lock the NFT successfully, but when i unlock ...
0 votes
2 answers
925 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 ...
0 votes
1 answer
142 views

Convert UTxO to hex encoded bytes string

Hello I want to convert a normal UTxO transaction hash to an encoded bytes string. How do I do this? Help would be appreciated! something like ...
1 vote
1 answer
171 views

Verify Tx Signature

Say I created a multi-sig transaction and I am now gathering signatures using the Cardano-multiplatform-library. How can I check that the signature is correct for my transaction body, and the signers ...
0 votes
2 answers
248 views

How to check the NFT timelock status?

How can I check the NFT timelock status, besides pool.pm?
0 votes
0 answers
22 views

Create cardano transaction for wallet signing using Cardano Serialization Lib

I am trying to generate a simple cardano transaction using Cardano Serialization Lib that simply sends some ADA. I want to sign the transaction using web3 wallet like Nami and verify that signature. I ...
0 votes
1 answer
74 views

cardano_serialization_lib + GeneralTransactionMetadata error

help const METADATA = { [policy.id]: { [name.slice(0,32)]: { ...inputData.metadata } } } const generalMetadata = Loader.Cardano.GeneralTransactionMetadata.new() generalMetadata.insert( Loader.Cardano....
0 votes
1 answer
56 views

Cardano Transaction Submit Errors

I am currently building a dApp on cardano using cardano-serialization-lib and wallets (Nami, Typhon, Yoroi). Since you have to configure TransactionBuilder with the latest Protocol Parameters, there ...
1 vote
1 answer
75 views

How to verify signed Tx and signer's address?

I am building dApps on cardano, and I faced an issue. I was trying to let the users sign message to verify them. (using signData method of wallet) But signData method is not supported for ledger type ...
0 votes
0 answers
42 views

parse signed transaction error

I am using the cardano-serialization-lib to derive addresses and create a transaction unsigned.. See below const signed_transaction = await cardanolib.Transaction.new( newTx.body(), witnesses, ...
1 vote
0 answers
50 views

Can we Make a Multi-witness transactions using cardano Serialization Lib?

My Goal is to Transfer NFTs from one Wallet to another and use second wallet to cover my transaction fee. According to this article https://developers.cardano.org/docs/integrate-cardano/multi-witness-...
0 votes
1 answer
334 views

NFT Minting with cip68 standard

I want to write the code for minting NFTs with CIP68 update. Like i need such NFTs whose metadata could be updated instead of minting the new NFT everytime. I searched about it and get to know that ...
1 vote
1 answer
93 views

How to install/use cardano-serialization-lib

I follow this guide to get start with cardano-serialization-lib. Install nodejs package with: npm i @emurgo/cardano-serialization-lib-nodejs Still can't get it running. The module 'rust-lib' can't be ...
2 votes
2 answers
177 views

Collateral for new Wallets

New users of Cardano sometime want to get started quickly and often face the daunting task of understanding what collateral is. Then faced with the fact that they need to send some collateral to their ...
0 votes
0 answers
99 views

Tx consuming script fails with: Caused by: (unConstrData #44000de140)... Third data argument, does not decode to a context when burning an NFT

I've this tx trying to submit to cardano-node 1.35.5: ...
1 vote
2 answers
67 views

Calculated fee too small for StakeRegistration cert submission via cardano-serialization-lib wallet connect

Having some issues getting a submit Stake Registration certificate using cardano-serialization-lib. The transaction builds, can can be signed, but what's weird is the correct fee is not being ...
1 vote
1 answer
99 views

I want to build a transaction to send Assets using cardano serialization lib

I want to transfer asset instead of ADA using cardano serialization Lib. I am new to cardano blockchain. I recently transferred ADA's build a transaction using this link so far https://github.com/...
1 vote
2 answers
284 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
1 answer
124 views

Compile errors when importing Cardano Serialization Lib Browser in React

I'm getting several compile errors as soon as I import @emurgo/cardano-serialization-lib-browser in my project, all of them similar to these: ERROR in ./node_modules/@emurgo/cardano-serialization-lib-...
1 vote
0 answers
55 views

Building a transaction that will require both payment and stake key signature using Cardano Serialization Lib

Usually, when a build a simple transaction such as making a payment, the transaction usually requires the buyer's payment key. Here is an example transaction I made with Cardano Serialization Lib. // ...
6 votes
3 answers
694 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 ...
0 votes
2 answers
163 views

Cardano Multi-Sig Mint BabbageOutputTooSmallUTxO

I’m trying to build a multi-sig transaction to mint an NFT. The transaction will take some input from users wallet via coin selection and add an additional NFT as output. The problem begans, when the ...
0 votes
0 answers
75 views

Different addresses from same mnemonic?

I want to generate an old Byron address. However, depending on which software I use (cardano-address or cardano-serialization-lib), I get a different result for the same mnemonic phrase. Here is my ...
0 votes
1 answer
98 views

How can I build a transaction to register a stake pool using Cardano Serialization Lib?

I have built the following transaction to register a stake pool: { "txHash": "0f874a3cb0ba57ed68a79601781eb9e29666f7f2f0e72ab4ed1f3cc9fcea7dee", "ttl": 60310548, &...
0 votes
1 answer
49 views

How to convert UTxOs from Graphql to Cardano Serialization lib format?

I want to use this function as coin selection for my transactions: txBuilder.add_inputs_from(unspentOutputs, 3); The problem I have is I'm using cardano-graphql to retrieve UTxOs: { "data"...
1 vote
2 answers
231 views

How can I build a transaction to send different assets (not just ada) using Cardano Serialization Lib?

I have followed this example on how to create a transaction to send ada and I had no issues so far. What I would like to do next is to add different assets to this same transaction. Is there an ...
0 votes
1 answer
98 views

Transaction in Cardano

I created transfer function with blockfrost.js and cardano-serialization-lib. I refered following code. https://github.com/blockfrost/blockfrost-js/tree/master/examples/simple-transaction When I try ...
7 votes
0 answers
98 views

Developers are having dismal experience building on Cardano [closed]

When developers get into plutus playground, 10 out pf 10 expect it to work like remix, an IDE. You put a code in. You compile and deploy. And then start interacting with the dApp. All in the same ...
2 votes
1 answer
165 views

What's the correct way of deserializing a UTxO?

I'm getting the following error when trying to deserialize a UTxO obtained using cardano-graphql: Deserialization failed in TransactionUnspentOutput because: No variant matched This is the code that ...
1 vote
1 answer
114 views

Sending consecutive transactions will result in an error

Sending consecutive transactions will result in an error. Using the simple-transaction example below, a transaction is created in Cardano-Serialization-Lib and sent to the blockchain using BrokFrost. ...
1 vote
1 answer
295 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
2 answers
111 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 ...
3 votes
2 answers
302 views

Plutus V2 Tx Building causing NonOutputSupplimentaryDatums error

I am stuck with this error, what's a NonOutputSupplimentaryDatums?: ""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (...
0 votes
2 answers
63 views

Coin Selection for Multiasset

I am building an NFT marketplace on Cardano. To build my transactions I use cardano-serialization-lib. When I try to use add_inputs_from() with LargestFirstMultiAsset strategy to choose inputs for the ...
0 votes
1 answer
188 views

How to get TransactionUnspentOutput as a hex encoded bytes string programmatically

So basically I want to convert a normal UTxO hash like: 550665309dee7e2f64d13f999297f001763f65fe50bb05524afc0990c7dce0c3 to a TransactionUnspentOutput as a hex encoded bytes string like: ...
0 votes
1 answer
131 views

cardano serialization lib - Multiple addresses and stake keys

I was able to generate a single address following the guide. My question is regarding stake key. Is it necessary to derive a new stake key for each new address or can you just increment .derive(n + 1) ...
0 votes
1 answer
244 views

How to get PublicKey from PrivateKey

I want to retrieve the public key from a private key created via a mnemonic key. const { mnemonicToEntropy } = require('bip39'); const CardanoWasm = require('@emurgo/cardano-serialization-lib-nodejs') ...
0 votes
2 answers
223 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 ...
0 votes
0 answers
102 views

What does ExtraRedeemers error mean when call function in contract with nami wallet and cardano-serialization

Sometimes I face this issue when make action buy nft in contract. Sometimes it works. So I don't know what does this mean and how to fix it. transaction submit error ShelleyTxValidationError ...