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
2 answers
425 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 ...
1 vote
0 answers
131 views

How build a transaction to add ADA and change the datum of a previous transaction with assets and ADA locked in a script

I have locked ADA and assets into a script. I want to use the last transaction output and the ADA of a wallet as inputs and I want to have an output with some extra ADA locked and the datum changed ...
0 votes
0 answers
122 views

How to use inline datum and reference inputs in serialization lib 11.0.0

I tried using with_plutus_data const settings = { protocolParams: { linearFee: { minFeeA: "44", minFeeB: "155381", }, minUtxo: "4310", ...
1 vote
1 answer
338 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 ...
3 votes
0 answers
409 views

Error while submitting Transaction through cardano-serialization-lib

I am trying to implement Martify contract using Cardano serialization lib. When I submit the transaction I get the following error. Can someone tell me what it mean? transaction submit error ...
2 votes
4 answers
734 views

How to mint a NFT with a policy of Multiple key-hash with Nami Wallet and Cardano Serialization Lib

I am building a daap and i want the user to be able to mint their app-tokens but the policy of the token must include the signature of the app wallet as well, for this I did the policy with the ...
1 vote
2 answers
241 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. ...
0 votes
1 answer
51 views

Read key from cose_key returned in signData()

The following (await window.cardano['<wallet>'].enable()).signData('<addr>', '<payload>') Returns an object { key: <key>, signature: <sig> } I'm successfully parsing the ...
0 votes
1 answer
178 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
0 answers
23 views

Should you put the serialization library code in a express and node.js backend or just put it as helper function in your front-end app

So i am using the cardano-serialization-library to send transactions between addresses. Below is the code I am using. buildSendADATransaction = async () => { const txBuilder = await ...
4 votes
5 answers
449 views

Smart contract is not working after Vasil Hardfork in testnet

My smart contracts deployed in testnet stoped working after the Vasil Hardfork. i get this error: ""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [...
1 vote
2 answers
163 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 { ...
1 vote
0 answers
240 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 ...
0 votes
1 answer
116 views

Programmatically Send Transactions From a Wallet Using Javascript

I am building an application that has a hot wallet that stores ADA that my user has deposited. After some business logic is met, I want to transfer funds from my hot wallet to another address. How do ...
0 votes
0 answers
46 views

Using a Private Key to Sign and Send Transactions using the cardano-serialization-library Programmatically

How do I send ADA from my address to another using the serialization-lib? The only documents I can find right now regarding the serialization-lib use the Wallet API to sign and send transactions. If I ...
2 votes
1 answer
75 views

How to create an unspent UTXO with specific value

I want to create a script (smart-contract) utxo with a specific number of tokens (it can be an output of a transaction before) in cardano-serialization-lib - javascript. I need this utxo to be part of ...
1 vote
1 answer
39 views

I wanted to know how can i deploy my smart contract made on marlowe playground using blocky on cardano testnet and mainnet?

Please, it would be so helpful if somebody steps up and tell me the way to do it.
0 votes
1 answer
96 views

How to Securely Serialise a Plutus Smart Contract Endpoint?

Assuming I made an arbitrary smart contract and want to serialise the endpoint after I have the validator hash and address hash, what should I do to ensure that the serialisation is as safe as ...
1 vote
1 answer
144 views

Convert Stake Key to Address

I am tiring to use Cardano Sterilization Lib to get the Stake/Usable address from Stake Hash or Address Hash. https://adaex.org/address/...
3 votes
2 answers
89 views

How to Get the Script Address of A Smart Contract?

Once I have written up the smart contract how to I get the script address value to be able to interact with the script whilst its on chain?
1 vote
0 answers
33 views

PPViewHashesDon'tMatch Exception on submit transaction for Cardano serialization-lib version 10.0.x

On emurgo/cardano serialization versions 10.0.X receiving error on submit transaction that: https://drive.google.com/file/d/1SNpM1LtEDPnZPMQXdz1X_Ujiy_FW9BJW/view?usp=sharing Also, in emurgo/cardano-...
0 votes
1 answer
190 views

Error creating a transaction with Cardano Serialization Library

I am trying to create a transaction using the Cardano Serialization Library but I cannot figure out what is going wrong. The code is const BlockFrost = require('@blockfrost/blockfrost-js'); const { ...
0 votes
0 answers
21 views

Receiving PPViewHashesDon'tMatch exception on Cardano Serialization versions >10.0.0

I am using Cardano serialization browser library version 10.2.0 and on submit transaction I receive this error every time. I am uncertain what is missing although it is building the transaction well ...
1 vote
2 answers
147 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": "...
1 vote
0 answers
25 views

How to Send A Token to an Smart Contract Alongside a Datum?

I asked another question (How to Make Sure A Contract Is Signed By a Certain Party?) and got the answer I expected. It raised the secondary Question of how to send a token with a datum to a smart ...
2 votes
1 answer
105 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
1 answer
71 views

What's the correct way of submitting a transaction using cardano-graphql?

I'm getting this error when trying to submit a transaction using graphql: { "errors": [ { "message": "Deserialization failed in Transaction.metadata because: ...
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 {...
1 vote
1 answer
29 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
2 answers
92 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 ...
1 vote
1 answer
64 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
98 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....
1 vote
1 answer
216 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 ...
3 votes
1 answer
55 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
46 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 ...
0 votes
1 answer
91 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 votes
1 answer
141 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 ...
2 votes
1 answer
211 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(...
2 votes
0 answers
89 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 ...
3 votes
2 answers
211 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 ...
7 votes
2 answers
801 views

How to establish trust between a user's wallet, and the backend of a website?

I am building an application that will hopefully offer a login option via Nami wallet, rather than the typical email/password. I understand how this approach can work for on-chain data, but is it ...
3 votes
1 answer
242 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 ...
2 votes
1 answer
205 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": "...
0 votes
0 answers
173 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 ...
2 votes
0 answers
131 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 ...
1 vote
0 answers
102 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 ...
4 votes
1 answer
423 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 ...
2 votes
1 answer
176 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
2 answers
84 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 ...