Comments (7)
for deriveSpendKey
, deriveChangeKey
and deriveStakeKey
these should NOT be hardened (in the same way they are not hardened in BIP44). Only derivation paths up the account key are hardened.
from cardano-serialization-lib.
CardanoWasm.TransactionHash.from_bytes(Buffer.from(utxo.transaction.hash, "hex"))
This is incorrect, You have to use the hash of the tx you're building, not the hash of the tx the utxo belongs to (aka use txHash
instead like you have later in the code). Transactions will fail if you add witnesses that aren't required to avoid people dumping unnecessary witnesses onto the chain.
Also, are you sure the UTXO belongs to the account key and not an address generated from the account key?
from cardano-serialization-lib.
CardanoWasm.TransactionHash.from_bytes(Buffer.from(utxo.transaction.hash, "hex"))
This is incorrect, You have to use the hash of the tx you're building, not the hash of the tx the utxo belongs to (aka use
txHash
instead like you have later in the code). Transactions will fail if you add witnesses that aren't required to avoid people dumping unnecessary witnesses onto the chain.
Changed it back to what we had previously ArkEcosystemArchive/platform-sdk@1f04ce0. Currently we are using 3 values to sign, which of those would be required or allowed to be used before the transaction gets rejected?
Also, are you sure the UTXO belongs to the account key and not an address generated from the account key?
We derive UTXO for a specific address like this https://github.com/ArkEcosystem/platform-sdk/blob/feat/broadcast-tx-graphql/packages/platform-sdk-ada/src/services/transaction.ts#L215-L238. Is there any way to retrieve UTXO directly for an account key or how should we retrieve UTXO to sign a new transaction?
from cardano-serialization-lib.
You're going to have to build a mapping of which derivation path corresponds to which address in the wallet that way you know which path to use to derive the key for the witness
Is there any way to retrieve UTXO directly for an account key or how should we retrieve UTXO to sign a new transaction?
You can't get the UTXO by querying addresses. You have to get UTXOs by querying the payment credentials inside the transactions. I don't use cardano-graphql so I'm not sure the best way to do that kind of query
from cardano-serialization-lib.
Thanks, will give the derivation path mapping a shot and see if we can get the transaction accepted.
from cardano-serialization-lib.
@SebastienGllmt. Before going for the calculation of the full mapping, we're trying to have at least one transaction accepted with all data controlled. So we're trying a specific address which has only one utxo, but we can't get it through, so not even sure how to build the mapping if we can't get this one right. Perhaps you can easily spot what's wrong...
In this test we're trying to do the transfer.
This is the code that creates and signs the transaction.
from cardano-serialization-lib.
Thanks! Overlooked that bit, working fine now.
from cardano-serialization-lib.
Related Issues (20)
- Trying to find a Rust Crate/Functionality Demonstration of COSESign1 and COSEKey HOT 2
- `BigNumFinalization.unregister is not a function` when running CSL built with `WASM_BINDGEN_WEAKREF` HOT 1
- Help please? Private Keys in code?
- Help please? Private Keys in code? HOT 1
- DatumSource struct makes the script input to be reference input
- Unable to deregistration stake raw transaction HOT 2
- Finding a Go library that can perform basic data signature validation. HOT 2
- Distribute as a single NPM package HOT 1
- Make JSON encoding total & standardize it HOT 11
- RewardAddress method naming: why payment_cred() and not stake_cred()? HOT 1
- `RewardAddress`, `BaseAddress`, `EnterpriseAddress`, `PointerAddress` have no getter for network id HOT 3
- OutputDatum is not used in TransactionOutput HOT 1
- TransactionMetadatum.as_* methods: wrong type annotation HOT 1
- Fee calculation mismatch with conway certificates HOT 4
- `add_change_if_needed` multiple change outputs on many assets causes Error from node `OutputTooSmallUTxO` HOT 3
- plutus script witness deserialization issue HOT 8
- Add inputs with assets. HOT 1
- Witness Set Serialization differs between v11.5 and v12a18 HOT 3
- when a transaction has 2 inputs the fees are miscalculated, and uses 1 ADA as fee HOT 4
- Reference script to_bytes() includes tag 24 cbor wrapper HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cardano-serialization-lib.