Giter Club home page Giter Club logo

Comments (18)

pyropy avatar pyropy commented on August 12, 2024 3

It seems that issue has been resolved in #15 but version on npm is stuck at v4.0.0 while there is new v4.0.1 release that has not been published yet.

I've opened issue #18 to address the problem.

from cardanocli-js.

MarceloArraes avatar MarceloArraes commented on August 12, 2024 1

I don't really know why but i cloned the original cardanocli-js and tryed the example codes and got the same error as before option --tx-out: unexpected "N"
But then i got back to my original code and tryed again, and suddenly it worked..
So thank you for your Help @pyropy !
Know i will be able to go foward on my coding!

from cardanocli-js.

MarceloArraes avatar MarceloArraes commented on August 12, 2024 1

Mine is working since i deleted the cardanocli-js and re-installed to "version": "4.0.1".
The transaction changed @MadOrkestra.
Inside the tx (mint transaction as exemple) on the value bit, the new transaction looks like this:
value: { lovelace: wallet.balance().value.lovelace,[COIN]:1 }

from cardanocli-js.

MadOrkestra avatar MadOrkestra commented on August 12, 2024 1

@MadOrkestra @MarceloArraes What versions of package do you use?

4.0.1 but didn't delete the old version before as @MarceloArraes did. Should I check again?

I switched to Berry-Pool/cardanocli-js as @pyropy suggested, which solved the problem.

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

I think it has to do something with the formatting of the transaction string that is passed to execSync. I'm testing some ideas, and I'll share them as soon as I figure something out.

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

@pastuh Try updating package to v4.0.1.

It resolved issue for me.

from cardanocli-js.

MarceloArraes avatar MarceloArraes commented on August 12, 2024

@pyropy @pastuh So you have fixed the minting script? It is working with you? The error in mine is somewhat close to yours.

node create-nft.js 
/home/cnode/cardano-my-node/db/node.socket
option --tx-out: 
unexpected "N"
expecting white space or quantity (word64)

Like there is a mistake on this transaction:
const tx = { txIn: wallet.balance().utxo, txOut: [ { address: wallet.paymentAddr, value: { ...wallet.balance().value, [ASSET_ID]: 1 }, }, ], minting: [{ action: 'mint', quantity: 1, asset: ASSET_ID, script: mintScript }], metadata, witnessCount: 2, };

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

@MarceloArraes What's version of the library you got installed? Remember to update to v4.0.1

from cardanocli-js.

MarceloArraes avatar MarceloArraes commented on August 12, 2024

@pyropy I thought i had, but i've seen your comment about the npm been stuck at v4.0. Now i'm trying to update. I used this code to update: git clone https://github.com/Berry-Pool/cardanocli-js.git cd cardanocli-js npm install

Just doing that i garantee a updated version? (trying to write a 'cardanocli-js --version' don't work. I'm not really linux savy)

Aaand when i done i received a vulnerabilites warning that i fix using 'npm audit fix --force', is that right?

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

Yeah you're cloning the project and hence updating it that way. To check if you got the right version of the project you can check version inside package.json file.

If it says something like this you're good then:

{
  "name": "cardanocli-js",
  "version": "4.0.1",
  "description": "A library binding the cardano-cli to JavaScript",
... etc
}

from cardanocli-js.

MarceloArraes avatar MarceloArraes commented on August 12, 2024

@pyropy You have a code for minting that is working? Could you send to me please? [email protected]

Everything else im trying to do is working, like creating wallets, checking balances. But the minting give me that error.. Maybe i got some details wrong..

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

@pyropy You have a code for minting that is working? Could you send to me please? [email protected]

Everything else im trying to do is working, like creating wallets, checking balances. But the minting give me that error.. Maybe i got some details wrong..

I've used code from the repo. What scripts are you using? Could you post it ?

from cardanocli-js.

masood1 avatar masood1 commented on August 12, 2024

Im getting the same error, tried to switch back to older version asweell 3.1.2 ,
getting same error on both 3.1.2 and 4.0.1

i downloaded the official repo and tried running the official examples it is same

option --tx-out: 
unexpected "N"
expecting white space or quantity (word64)

cardano-node = 1.30.0
node.js = 14.18.0

@pastuh any suggestions for debugging, i looked into the code, it looks fine, it has your fix of space issue

from cardanocli-js.

MadOrkestra avatar MadOrkestra commented on August 12, 2024
Warning: Local header state query unavailable. Falling back to chain sync query
option --tx-out:
unexpected "N"
expecting white space or quantity (word64)

nodejs v16.13.0
cardano-cli 1.31.0

from cardanocli-js.

pyropy avatar pyropy commented on August 12, 2024

@MadOrkestra @MarceloArraes What versions of package do you use?

from cardanocli-js.

nemanjamil avatar nemanjamil commented on August 12, 2024

I have a problem with unexpected “u”

option --tx-out:
unexpected “u”
expecting white space or multi-asset value expression

Any hint?

image

from cardanocli-js.

nemanjamil avatar nemanjamil commented on August 12, 2024

I have a problem with unexpected “u”

option --tx-out: unexpected “u” expecting white space or multi-asset value expression

Any hint?

image

RESOLVED
https://forum.cardano.org/t/cardano-cli-query-utxo-getting-error-unexpected-key/75652/13?u=nemanjamil

from cardanocli-js.

Hqasim avatar Hqasim commented on August 12, 2024

Mine is working since i deleted the cardanocli-js and re-installed to "version": "4.0.1". The transaction changed @MadOrkestra. Inside the tx (mint transaction as exemple) on the value bit, the new transaction looks like this: value: { lovelace: wallet.balance().value.lovelace,[COIN]:1 }

This worked for me, thank you sir :)

from cardanocli-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.