Closed Floatiez closed 2 years ago
You need to derive the private key from the root key. Just follow the correct derivation path according to the standards. Also keep in mind that if you select a wallet from a private key you end up creating an Enterprise Addess
without the staking key part. So if you have the funds locked at an address with a staking key then Lucid will not see those UTxOs.
Is this line const privateKey = rootKey.to_raw_key().to_bech32();
not deriving the private key from the root key? Would there not be a way to use just a regular address with stake key instead of an enterprise address?
I was able to get it working using the enterprise address generated at lucid.wallet.address(). Transactions will submit and post to the blockchain, but sometimes if I submit multiple tx in a row I get this:
Error: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Testnet (KeyHashObj (KeyHash \"5229a19dde7e37fa60dfcbb438165e43fe3d811ae4c7df513ed28107\")) StakeRefNull,Value 168090 (fromList [(PolicyID {policyID = ScriptHash \"8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3\"},fromList [(666c6f617469657a,1)])]),NoDatum,SNothing),Coin 1034400)]))])"
at Blockfrost._callee8$ (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:3296:21)
at tryCatch (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:141:40)
at Generator.invoke [as _invoke] (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:372:22)
at Generator.next (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:197:21)
at asyncGeneratorStep (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:3:24)
at _next (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:25:9)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I was able to get it working using the enterprise address generated at lucid.wallet.address(). Transactions will submit and post to the blockchain, but sometimes if I submit multiple tx in a row I get this:
Error: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Testnet (KeyHashObj (KeyHash \"5229a19dde7e37fa60dfcbb438165e43fe3d811ae4c7df513ed28107\")) StakeRefNull,Value 168090 (fromList [(PolicyID {policyID = ScriptHash \"8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3\"},fromList [(666c6f617469657a,1)])]),NoDatum,SNothing),Coin 1034400)]))])" at Blockfrost._callee8$ (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:3296:21) at tryCatch (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:141:40) at Generator.invoke [as _invoke] (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:372:22) at Generator.next (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:197:21) at asyncGeneratorStep (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:3:24) at _next (file:///var/task/lucid/node_modules/lucid-cardano/dist/index.js:25:9) at processTicksAndRejections (node:internal/process/task_queues:96:5)
>
This was solved by ensuring the min amount of $tADA that accompanies any UTXO with a token is atleast 2. Something wrong with blockfrost API, not sure what exactly.
I seem to be experiencing this issue while trying to spend the funds here
[https://preview.cardanoscan.io/address/60eefb5b9dbac4a380296de0655f6ace6c97e9b981eef89a7bf53dcd52]()
That is the address I get when I do lucid.wallet.address() and it doesnt have a staking componenet. I believe all my outputs have the minimum ada amount for all that have native tokens attached. This is a multisignature tx and it seems to be working fine on the client. This error is appearing on the server
I seem to be experiencing this issue while trying to spend the funds here
https://preview.cardanoscan.io/address/60eefb5b9dbac4a380296de0655f6ace6c97e9b981eef89a7bf53dcd52
That is the address I get when I do lucid.wallet.address() and it doesnt have a staking componenet. I believe all my outputs have the minimum ada amount for all that have native tokens attached. This is a multisignature tx and it seems to be working fine on the client. This error is appearing on the server
I'm good
I am using a wallet on the testnet with 220 tADA on 2 UTxOs. This is a single address wallet. I am trying to send a 50 tADA transaction to another wallet using lucid. I am building the entropy from a mnemonic.
This is what I have for building the tx:
I get the error:
Insufficient input in transaction
I dont understand why there is insufficient input if I have more than 50 tADA in the wallet? Does this not automatically select UTxOs for input?