Comments (2)
We are trying to sign ZenCash transactions with extended private keys, and it seems like it doesn't support it.
Getting the error:
Underlying error: private key length is invalid
But as per this website, we know we're using the correct private key for that address on that index.
Can you confirm if this error is on our end or if this library does not support extended pub/priv keys ?
from zencashjs.
Nevermind,
The library does support xpub/xpriv keys.
What I was doing was deriving the private-key from extended-private-key using the bip32 library:
const wifKey = t.derivePath(derivedIndex).toWIF();
and then sending this wifKey
as the private-key to
zencashjs.transaction.signTx(tx, i, wifKey);
However, it seems I needed to convert this WIF key like so:
const privateKey = zencashjs.address.WIFToPrivKey(wifKey);
and then send this privateKey to the zencashjs signTx
method.
from zencashjs.
Related Issues (20)
- Script failed an OP_EQUALVERIFY operation HOT 2
- Configuration for ZENCash Coin HOT 1
- Err: Code:-25 HOT 7
- Code:-26 error with multi-sig transaction HOT 2
- serializeTx and deserializeTx misses prevScriptPubKey from inputs HOT 2
- `zt` is also a multisig address, but not when used in the context of a testnet
- Add check to CI pipeline to ensure that ./lib is in sync with ./src HOT 16
- I love project HOT 1
- public insight api instance HOT 1
- How do use? HOT 3
- Open
- How to calculate the scriptPubKey of utxo HOT 1
- Are multiple inputs from a multisig supported when creating a raw tx? HOT 21
- TypeError: unsupported input type for privateKey HOT 2
- Replace instances of zencash in code and comments with horizen
- Update list of nodejs versions in CI
- Attempted sending of unshielded coinbase UTXO
- HDE Scavenger Hunt #1 - zencashjs - 1122211318
- RpcError: 16: mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation) HOT 1
- pubKeyToAddr only outputs correct address when compressed pubkey is used HOT 1
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 zencashjs.