Closed akshitv1 closed 2 years ago
I didn't go through all of the code, but derivation of spend key looks weird
let spend = rootKey
.derive(harden(1852))
.derive(harden(1815))
.derive(harden(0)) // THIS IS ACCOUNT INDEX
.derive(this.accountKey) // 1 THIS SHOULD BE INDEED SET TO 1 FOR EXTERNAL ADDRESS, ARE YOU SURE IT IS SINCE YOU ARE PASSING accountKey
.derive(this.addressKey); // 34 // THIS IS ADDRESS INDEX
are you sure this is a correct key here?
You are probably better to ask on cardano stack exchange as there are way more people that are working with CSL and could probably spot the error right away
Hi @slowbackspace i used this same key to sign transaction here (https://github.com/blockfrost/blockfrost-js/blob/fb9a55fee07927f8d7c8b0a5aa9efd2d3daf6c77/examples/simple-transaction/src/helpers/signTransaction.ts#L10) and it worked.
I am pretty sure that this is correct derivation path.
Anyways, thanks for replying ill add this on cardano stack exchange.
@akshitv1
I just noticed another thing, stakeCred is using spend key, instead of stake key. Are you sure that's what you want?
let spendCred = Cardano.StakeCredential.from_keyhash(stake.to_public().to_raw_key().hash());
let stakeCred = Cardano.StakeCredential.from_keyhash(spend.to_public().to_raw_key().hash());
If that doesn't help then your best bet is cardano stack exchange as this is not really related to Blockfrost. I'll close this issue, if you have any other problems with Blockfrost sdk itself don't hesitate to open an issue!
Hi guys, 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,
Here's my code :
// Error when i use blockfrost :
transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash \"some hash\"])))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash \"somehash\")))))])
//Error when i use infinito : {"type":"jsonwsp/fault","version":"1.0","servicename":"ogmios","fault":{"code":"client","string":"Invalid request: DeserialiseFailure 539 \"Size mismatch when decoding \nRecord RecD.\nExpected 4, but found 3.\"."},"reflection":{"requestId":"XEpib"}} is an unknown result
Maybe i am just creating the transaction in a wrong way or my keys might be messed up.
Open to any help and suggestions
THnaks