> For the complete documentation index, see [llms.txt](https://apexpool.gitbook.io/stake-pool-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apexpool.gitbook.io/stake-pool-scripts/hardware-wallet-for-pledge/transactions/registration-certificate.md).

# Registration certificate

The transaction for submitting the new stake pool registration certificate needs to be signed with 4 signing keys:

* the cold key
* the payment key (to pay the transaction fees)
* the first stake pool owner stake key
* the hardware wallet stake key (the new pool owner)

When not using a hardware wallet, the transaction to submit a stake pool registration certificate can be signed with one command. But because of the way the hardware wallet can sign transactions, the transaction must be witnessed by every signing key, and then all the witness files must be combined into a signed transaction file, which will be submitted to the blockchain.

Create and execute the following scripts in a subfolder of `transactions` (for example `pool-update`):

`transaction.sh`:

```bash
#!/bin/bash


source ../../pool-scripts/env

ADDRESS=$(cat ${NODE_HOME}/keys/payment-0.addr)
TRANS=$(cardano-cli query utxo ${NET} --address $ADDRESS | tail -n +3 | sort -k3rn | tail -n 1)
UTXO=$(echo ${TRANS} | awk '{print $1}')
ID=$(echo ${TRANS} | awk '{print $2}')
TXIN="${UTXO}#${ID}"

cardano-cli transaction build \
${NET} \
--cddl-format \
--witness-override 4 \
--tx-in ${TXIN} \
--change-address $(cat ${NODE_HOME}/keys/payment-0.addr) \
--certificate-file ${NODE_HOME}/pool-certificates/pool-registration.cert \
--out-file tx.raw
```

`witness-cold.sh`:

```bash
#!/bin/bash


source ../../pool-scripts/env

cardano-cli transaction witness \
--tx-body-file tx.raw \
--signing-key-file ${NODE_HOME}/pool-keys/cold.skey \
${NET} \
--out-file tx-cold.witness
```

`witness-payment.sh`:

```bash
#!/bin/bash


source ../../pool-scripts/env

cardano-cli transaction witness \
--tx-body-file tx.raw \
--signing-key-file ${NODE_HOME}/keys/payment-0.skey \
${NET} \
--out-file tx-payment.witness
```

`witness-stake.sh:`

```bash
#!/bin/bash


source ../../pool-scripts/env

cardano-cli transaction witness \
--tx-body-file tx.raw \
--signing-key-file ${NODE_HOME}/keys/stake.skey \
${NET} \
--out-file tx-stake.witness
```

`witness-hw-stake` (when executing this script, the witness must be confirmed on the hardware wallet):

```bash
#!/bin/bash


source ../../pool-scripts/env

cardano-hw-cli transaction witness \
--tx-file tx.raw \
--hw-signing-file ${NODE_HOME}/keys/hw-stake.hwsfile \
${NET} \
--out-file tx-hw-stake.witness
```

`transaction-assemble.sh`:&#x20;

```bash
#!/bin/bash


cardano-cli transaction assemble \
--tx-body-file tx.raw \
--witness-file tx-cold.witness \
--witness-file tx-payment.witness \
--witness-file tx-stake.witness \
--witness-file tx-hw-stake.witness \
--out-file tx.multisign
```

The `transaction-assemble.sh` will create the signed transaction file, which needs to be submitted to the blockchain with the following script (`submit-sh`):

```bash
#!/bin/bash


source ../../pool-scripts/env

cardano-cli transaction submit \
--tx-file tx.multisign \
${NET}
```

&#x20;
