Register Pool with Hardware-Wallet

Hi Community,

i want to register my pool with metadata with created payment+stake keys as Operator and Hw-Wallet as Owner.

i followed this guide for instructions:

issue1) alonzo era is not supported yet, so i had to add --mary-era in tx build → OK!
issue2) when i now want to sign with the provided witness.json (from adalite.io) i get an era-error.

cardano-cli stake-pool registration-certificate \
--cold-verification-key-file cold.vkey \
--vrf-verification-key-file vrf.vkey \
--pool-pledge 10000000000 \
--pool-cost 340000000 \
--pool-margin 0.00 \
--pool-reward-account-verification-key-file stake.vkey \
--pool-owner-stake-verification-key-file stake.vkey \
--pool-owner-stake-verification-key-file owner_stake.vkey \
--mainnet \
--single-host-pool-relay relay1.xxx.xx \
--pool-relay-port 6001 \
--single-host-pool-relay relay2.xxx.xx \
--pool-relay-port 6002 \
--metadata-url https://tinyurl.com/xyz \
--metadata-hash <someHash> \
--out-file pool-registration.cert
cardano-cli transaction build-raw \
    --tx-in <tx>#0 \
    --mary-era \
    --tx-out $(cat payment.addr)+0 \
    --invalid-hereafter 0 \
    --fee 0 \
    --out-file tx.draft \
    --certificate-file pool-registration.cert
cardano-cli transaction calculate-min-fee \
    --tx-body-file tx.draft \
    --tx-in-count 1 \
    --tx-out-count 1 \
    --witness-count 4 \
    --byron-witness-count 0 \
    --mainnet \
    --protocol-params-file mainnet-protocol.json
cardano-cli transaction build-raw \
    --tx-in <tx>#0 \
    --mary-era \
    --tx-out $(cat payment.addr)+4797583 \
    --invalid-hereafter 53541664 \
    --fee 202417 \
    --out-file tx.raw \
    --certificate-file pool-registration.cert
cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --signing-key-file witness.json \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

Command failed: transaction sign Error: Error reading signing key: witness.json : TextEnvelope type error: Expected one of: PaymentSigningKeyByron_ed25519_bip32, PaymentSigningKeyShelley_ed25519, PaymentExtendedSigningKeyShelley_ed25519_bip32, StakeSigningKeyShelley_ed25519, StakeExtendedSigningKeyShelley_ed25519_bip32, StakePoolSigningKey_ed25519, GenesisSigningKey_ed25519, GenesisExtendedSigningKey_ed25519_bip32, GenesisDelegateSigningKey_ed25519, GenesisDelegateExtendedSigningKey_ed25519_bip32, GenesisUTxOSigningKey_ed25519 Actual: TxWitness MaryEra

i know it’s a sign/assemble topic but i cannot figure out, how to get my .skeys + witness files along in one signed transaction to submit.

Regards Patrick

I think this last command isn’t correct. You should “assemble” the transaction with the witness, not sign it

So instead of this

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --signing-key-file witness.json \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

It should be something like this:

cardano-cli transaction assemble \
--tx-body-file tx.raw \
--witness-file operator.witness \
--witness-file pool.witness \
--witness-file owner.witness \
--out-file tx.signed

so you need to produce the respective witnesses for the other signing keys (stake.skey, payment.skey, cold.skey) using the cardano-cli shelley transaction witness command

These instructions can be found in the docs linked from the blog article: cardano-hw-cli/poolRegistration.md at develop · vacuumlabs/cardano-hw-cli · GitHub

2 Likes

exactly what i needed - somehome i missread the documenation before - thank you for clarifying with your post - helped a lot!

Regards Patrick